.board-case {
  padding-bottom: 2rem;
}

.case-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.back {
  display: inline-block;
  padding: 0.28rem 0.75rem;
  background: var(--paper);
  box-shadow: 2px 3px 8px rgba(0, 0, 0, 0.14);
  font-family: var(--font-hand);
  font-size: 1.35rem;
  font-weight: 700;
  transform: rotate(-0.6deg);
}

.case-sheet {
  position: relative;
  background: #f6f1e4;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 27px,
    rgba(80, 60, 30, 0.07) 28px
  );
  padding: 1.5rem 1.5rem 1.35rem;
  box-shadow: 4px 8px 22px rgba(0, 0, 0, 0.18);
}

.clip {
  position: absolute;
  top: -8px;
  right: 28px;
  width: 22px;
  height: 38px;
  z-index: 2;
  pointer-events: none;
}

.file-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  padding-right: 2.75rem;
  margin-bottom: 0.35rem;
}

.file-kicker {
  margin: 0;
  font-family: var(--font-typed);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}

.file-ref {
  font-family: var(--font-typed);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}

.file-tabs > .tab-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid rgba(80, 60, 30, 0.22);
  margin-bottom: 1.15rem;
}

.tabs .tab {
  padding: 0.55rem 0.95rem 0.5rem;
  font-family: var(--font-typed);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  cursor: pointer;
  border-bottom: 3px solid transparent;
}

#tab-subject:checked ~ .tabs label[for="tab-subject"],
#tab-contacts:checked ~ .tabs label[for="tab-contacts"],
#tab-sources:checked ~ .tabs label[for="tab-sources"] {
  color: var(--ink);
  border-bottom-color: #9b2c2c;
}

.tab-panel {
  display: none;
}

#tab-subject:checked ~ .panel-subject,
#tab-contacts:checked ~ .panel-contacts,
#tab-sources:checked ~ .panel-sources {
  display: block;
}

.subject {
  --portrait-col: 180px;
  --portrait-gap: 1.5rem;
  display: grid;
  grid-template-columns: var(--portrait-col) minmax(0, 1fr);
  gap: 1.25rem var(--portrait-gap);
  align-items: start;
}

.portrait {
  width: 180px;
  background: #fff;
  padding: 8px 8px 12px;
  box-shadow: 4px 6px 16px rgba(0, 0, 0, 0.2);
  transform: rotate(-1.5deg);
}

.portrait img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #d9d4c8;
}

.identity {
  position: relative;
}

.identity h1 {
  margin: 0 5.5rem 0.75rem 0;
  font-family: var(--font-hand);
  font-size: clamp(2rem, 3.4vw, 2.55rem);
  font-weight: 700;
  line-height: 1.05;
}

.file-stamp {
  position: absolute;
  top: 0.15rem;
  right: 0;
  border: 3px solid #2f6f4e;
  color: #2f6f4e;
  padding: 0.22rem 0.5rem;
  font-family: var(--font-typed);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transform: rotate(12deg);
  background: rgba(255, 255, 255, 0.45);
}

.facts {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.identity .facts {
  margin-left: calc(-1 * var(--portrait-col) - var(--portrait-gap));
  width: calc(100% + var(--portrait-col) + var(--portrait-gap));
}

.identity .facts th {
  padding-left: calc(var(--portrait-col) + var(--portrait-gap));
}

.facts th,
.facts td {
  padding: 0.4rem 0;
  border-bottom: 1px dotted rgba(80, 60, 30, 0.25);
  text-align: left;
  vertical-align: top;
}

.facts th {
  width: 36%;
  font-family: var(--font-typed);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--ink-soft);
}

.facts td {
  font-family: var(--font-typed);
  font-size: 0.92rem;
  color: var(--ink);
}

.hand-heading {
  margin: 1.55rem 0 0.65rem;
  font-family: var(--font-hand);
  font-size: 2rem;
  font-weight: 700;
  color: #8b1e1e;
  text-decoration: underline;
  text-underline-offset: 0.14em;
  text-decoration-thickness: 2px;
}

.callout {
  background: #e7f3ea;
  border-left: 4px solid #2f6f4e;
  padding: 0.85rem 1rem;
}

.callout-label {
  margin: 0 0 0.4rem;
  font-family: var(--font-typed);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #2f6f4e;
}

.callout p {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.55;
}

.meters {
  display: grid;
  gap: 0.55rem;
  max-width: 420px;
}

.meter-row {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr) 1.5rem;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-typed);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.meter-track {
  height: 10px;
  background:
    repeating-linear-gradient(
      to right,
      rgba(80, 60, 30, 0.08) 0 11px,
      transparent 11px 14px
    );
}

.meter-fill {
  display: block;
  height: 100%;
  width: var(--fill, 25%);
}

.meter-fill-photo {
  background: repeating-linear-gradient(-45deg, #c45c6a 0 7px, #e39aa6 7px 14px);
}

.meter-fill-doc {
  background: repeating-linear-gradient(-45deg, #c9a227 0 7px, #e6d08a 7px 14px);
}

.meter-fill-source {
  background: repeating-linear-gradient(-45deg, #2f6f4e 0 7px, #88c5a4 7px 14px);
}

.link-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.link-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  padding: 0.45rem 0 0.45rem 0.7rem;
  border-left: 4px solid #c45c6a;
  margin-bottom: 0.45rem;
}

.link-list .kind {
  font-family: var(--font-typed);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.link-list a,
.link-list span {
  font-family: var(--font-typed);
  font-size: 0.95rem;
}

.link-list a,
.facts td a {
  word-break: break-word;
}

.time-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 2px solid rgba(80, 60, 30, 0.2);
}

.time-list li {
  position: relative;
  padding: 0 0 1rem 1.1rem;
}

.time-list li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #9b2c2c;
}

.time-tag {
  display: inline-block;
  margin-right: 0.45rem;
  padding: 0.12rem 0.4rem;
  background: #2f6f4e;
  color: #f7f1e3;
  font-family: var(--font-typed);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.time-list time {
  font-family: var(--font-typed);
  font-size: 0.72rem;
  color: var(--ink-soft);
}

.time-list p {
  margin: 0.3rem 0 0;
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.45;
}

.cite-list {
  display: grid;
  gap: 0.75rem;
}

.cite-card {
  background: rgba(255, 255, 255, 0.45);
  border-left: 4px solid #1e4d7b;
  padding: 0.7rem 0.85rem;
}

.cite-card h3 {
  margin: 0 0 0.2rem;
  font-family: var(--font-typed);
  font-size: 0.95rem;
}

.cite-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.empty-cite {
  font-family: var(--font-hand);
  font-size: 1.2rem;
  color: var(--ink-soft);
}

.doc-pin,
.photo-stack {
  display: inline-block;
  background: #fff;
  padding: 8px;
  box-shadow: 3px 5px 14px rgba(0, 0, 0, 0.16);
  transform: rotate(-1deg);
}

.photo-stack img {
  display: block;
  max-width: min(280px, 100%);
}

.doc-pin {
  font-family: var(--font-typed);
  font-size: 0.82rem;
  padding: 1rem 1.1rem;
}

.sheet-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.4rem;
}

.tip-btn {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  background: #ffe08a;
  box-shadow: 2px 3px 8px rgba(0, 0, 0, 0.14);
  font-family: var(--font-hand);
  font-size: 1.25rem;
  font-weight: 700;
  transform: rotate(0.8deg);
}

.file-foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
  padding-top: 0.7rem;
  border-top: 1px dashed rgba(80, 60, 30, 0.25);
  font-family: var(--font-typed);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.file-foot span:last-child {
  text-align: right;
}

.tip-card {
  max-width: 520px;
  margin: 0 auto;
  background: #f6f1e4;
  padding: 1.5rem 1.4rem 1.3rem;
  box-shadow: 4px 8px 20px rgba(0, 0, 0, 0.18);
}

.tip-card h1 {
  margin: 0 0 0.35rem;
  font-family: var(--font-hand);
  font-size: 2.2rem;
  font-weight: 700;
  text-align: center;
}

.tip-card .lede {
  margin: 0 0 1rem;
  font-family: var(--font-typed);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink-soft);
}

.tip-form label {
  display: block;
  margin: 0.75rem 0 0.25rem;
  font-family: var(--font-typed);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tip-form input,
.tip-form textarea {
  width: 100%;
  border: 1px solid rgba(80, 60, 30, 0.25);
  background: #fffdf8;
  padding: 0.45rem 0.55rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.tip-form textarea {
  min-height: 8rem;
  resize: vertical;
}

.tip-form button {
  margin-top: 1rem;
  width: 100%;
  border: 0;
  padding: 0.55rem;
  background: #e8e0d0;
  font-family: var(--font-typed);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.tip-status {
  margin: 0.85rem 0 0;
  font-family: var(--font-hand);
  font-size: 1.2rem;
  text-align: center;
}

@media (max-width: 720px) {
  .subject {
    grid-template-columns: 1fr;
  }

  .identity .facts {
    margin-left: 0;
    width: 100%;
  }

  .identity .facts th {
    padding-left: 0;
  }

  .identity h1 {
    margin-right: 0;
    padding-right: 5.5rem;
  }

  .meter-row {
    grid-template-columns: 1fr;
  }

  .file-foot {
    flex-direction: column;
  }
}
