@font-face { font-family: "Bodoni Moda"; src: url("assets/fonts/bodoni-moda-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Bodoni Moda"; src: url("assets/fonts/bodoni-moda-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("assets/fonts/spectral-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("assets/fonts/spectral-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("assets/fonts/spectral-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("assets/fonts/public-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("assets/fonts/public-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --paper: #e4ebdb;
  --paper-deep: #d9e2ce;
  --ink: #1c2840;
  --ink-soft: #3e4a60;
  --red: #a92c24;
  --rule: #a9bd98;
  --rule-faint: #c8d5bb;
  --cloth: #23402f;
  --pad: clamp(1rem, 4vw, 3.5rem);
  --display: "Bodoni Moda", "Didot", serif;
  --text: "Spectral", Georgia, serif;
  --label: "Public Sans", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--text);
  font-variant-numeric: lining-nums tabular-nums;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; top: 0; bottom: 0; left: calc(var(--pad) * .5); width: 1px;
  background: var(--red); opacity: .35; pointer-events: none; z-index: 0;
}
::selection { background: var(--red); color: var(--paper); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
a { color: inherit; text-decoration-color: var(--red); text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { color: var(--red); }
html { scrollbar-color: var(--rule) var(--paper); }
img { max-width: 100%; display: block; }

.label {
  font: 700 .72rem/1.2 var(--label);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- tabs ---------- */
.tabs {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: stretch;
  padding: 0 var(--pad);
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.tabs .mark { font: 700 1.05rem/1 var(--display); align-self: center; text-decoration: none; letter-spacing: .02em; }
.tabs ul { display: flex; gap: 0; list-style: none; margin: 0; padding: 0; }
.tabs li a, .tabs button {
  display: flex; align-items: center; height: 3.5rem; padding: 0 1rem;
  font: 500 .8rem/1 var(--label); letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; color: var(--ink-soft); background: none; border: 0; cursor: pointer;
  border-left: 1px solid var(--rule-faint);
}
.tabs li a:hover, .tabs button:hover { color: var(--red); background: var(--paper-deep); }
.tabs button { color: var(--red); font-weight: 700; }

/* ---------- head ---------- */
.head {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(18rem, 1fr);
  gap: 2rem var(--pad);
  padding: clamp(2.5rem, 6vh, 4.5rem) var(--pad) 2.25rem;
}
.head h1 {
  margin: 0;
  font: 700 clamp(3.5rem, 8.5vw, 6rem)/.92 var(--display);
  letter-spacing: -.02em;
}
.promise { margin: 1.1rem 0 0; font: italic 400 clamp(1.35rem, 2.4vw, 1.9rem)/1.25 var(--text); max-width: 30ch; }
.intro { margin: 1rem 0 0; max-width: 58ch; color: var(--ink-soft); }

.balance { align-self: end; }
.balance table { width: 100%; border-collapse: collapse; margin-top: .6rem; }
.balance td { padding: .5rem 0; border-bottom: 1px solid var(--rule); font-size: 1.05rem; }
.balance td + td { text-align: right; font: 600 1.6rem/1 var(--text); color: var(--red); }
.balance tr:last-child td { border-bottom: 3px double var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.15rem; min-height: 2.9rem;
  font: 700 .8rem/1 var(--label); letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
  border: 1.5px solid var(--ink); color: var(--ink); background: transparent;
  transition: background .2s, color .2s;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: var(--red); border-color: var(--red); }
.btn svg { width: 1rem; height: 1rem; }

.double { height: 7px; border: 0; border-top: 2px solid var(--red); border-bottom: 2px solid var(--red); margin: 0; }

/* ---------- sections ---------- */
section { padding: clamp(3.5rem, 8vh, 6rem) var(--pad) 0; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; border-bottom: 1.5px solid var(--ink); padding-bottom: .6rem; }
.sec-head h2 { margin: 0; font: 700 clamp(2rem, 4vw, 3rem)/1 var(--display); letter-spacing: -.01em; }
.sec-head p { margin: 0; color: var(--ink-soft); max-width: 46ch; }

/* journal */
.journal { width: 100%; border-collapse: collapse; }
.journal th { text-align: left; padding: .9rem .75rem .5rem; border-bottom: 1px solid var(--rule); vertical-align: bottom; }
.journal td { padding: 1rem .75rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.journal td:first-child, .journal th:first-child { padding-left: 0; width: 9.5rem; white-space: nowrap; color: var(--ink-soft); }
.journal .folio { width: 4rem; color: var(--ink-soft); border-left: 1px solid var(--rule-faint); border-right: 1px solid var(--rule-faint); text-align: center; }
.journal .cr { width: 21rem; text-align: right; color: var(--red); font-weight: 600; font-size: 1.3rem; line-height: 1.25; padding-right: 0; white-space: nowrap; }
.journal th.cr { color: var(--ink-soft); font-size: .72rem; white-space: normal; }
.journal .role { font-weight: 600; font-size: 1.15rem; }
.journal .org { font-style: italic; }
.journal .what { margin: .3rem 0 0; color: var(--ink-soft); max-width: 60ch; }
.journal .post { font-size: .95rem; color: var(--ink-soft); }
.journal .post a { color: var(--red); }
.journal tbody tr { transition: background .2s; }
.journal tbody tr:hover { background: var(--paper-deep); }

/* accounts */
.accounts { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.15fr); gap: 0 clamp(1.5rem, 3vw, 3rem); align-items: start; }
.acc-list { list-style: none; margin: 0; padding: 0; }
.acc-list button {
  width: 100%; display: grid; grid-template-columns: 2.75rem 1fr; gap: .1rem .9rem; align-items: baseline;
  text-align: left; padding: 1rem .25rem; background: none; border: 0; border-bottom: 1px solid var(--rule);
  font: inherit; color: inherit; cursor: pointer; transition: background .2s;
}
.acc-list button:hover { background: var(--paper-deep); }
.acc-list .f { color: var(--ink-soft); font-size: .95rem; }
.acc-list .n { font-weight: 600; font-size: 1.1rem; line-height: 1.3; }
.acc-list .n small { display: block; font-weight: 400; font-style: italic; color: var(--ink-soft); font-size: .95rem; }
.acc-list .r { grid-column: 2; color: var(--red); font-weight: 600; }
.acc-list .f { position: relative; }
.acc-list button[aria-pressed="true"] .f { color: var(--red); }
.acc-list button[aria-pressed="true"] .f::before {
  content: ""; position: absolute; left: -1.35rem; top: -.1rem; width: 1.1rem; height: 1.1rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M2.5 11.5c1.6 1.2 3 2.8 4.1 5 2.6-5.6 6.2-10 11-13.6' fill='none' stroke='%23a92c24' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}


.desk { position: sticky; top: 4.5rem; }
.book { position: relative; aspect-ratio: 16 / 9; }
.enlarge { display: inline-flex; margin-top: .5rem; font: 700 .72rem/1 var(--label); letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.book canvas { display: block; width: 100%; height: 100%; }
.book .still { position: absolute; inset: 6%; width: 88%; height: 88%; object-fit: contain; box-shadow: 0 10px 30px rgba(28, 40, 64, .25); background: #fff; }
.book.gl .still { display: none; }
.detail { padding: 1.1rem 0 0; }
.detail h3 { margin: 0 0 .75rem; font: 700 1.6rem/1.15 var(--display); }
.detail dl { display: grid; grid-template-columns: 7.5rem 1fr; margin: 0; }
.detail dt, .detail dd { padding: .55rem 0; border-top: 1px solid var(--rule); margin: 0; }
.detail dt { padding-top: .75rem; }
.detail dd.res { color: var(--red); font-weight: 600; }
.thumbs { display: flex; gap: .5rem; margin-top: .9rem; flex-wrap: wrap; }
.thumbs button { width: 5.25rem; aspect-ratio: 16/10; padding: 0; border: 1px solid var(--rule); background: #fff; cursor: pointer; opacity: .7; transition: opacity .2s, border-color .2s; }
.thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.thumbs button:hover, .thumbs button[aria-pressed="true"] { opacity: 1; border-color: var(--red); }

/* chart of tools */
.chart { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-left: 1px solid var(--rule); }
.chart > div { border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 1.1rem 1.1rem 1.25rem; }
.chart h3 { margin: 0 0 .6rem; display: flex; gap: .75rem; align-items: baseline; font: 600 1.15rem/1.2 var(--text); }
.chart h3 span { color: var(--red); font-size: .95rem; }
.chart ul { margin: 0; padding: 0; list-style: none; }
.chart li { padding: .2rem 0; border-bottom: 1px dotted var(--rule-faint); }
.chart li:last-child { border-bottom: 0; }

/* closing */
.closing { padding-bottom: 4rem; }
.closing-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 2rem var(--pad); padding-top: 2rem; }
.closing h2.big { margin: 0; font: 700 clamp(2.4rem, 5vw, 4rem)/1 var(--display); letter-spacing: -.015em; max-width: 14ch; }
.closing .actions { margin-top: 1.75rem; }
.closing dl { display: grid; grid-template-columns: 8rem 1fr; margin: 0; }
.closing dt, .closing dd { margin: 0; padding: .6rem 0; border-top: 1px solid var(--rule); }
.total { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 3rem; padding: .6rem 0; border-top: 1px solid var(--ink); font-size: 1.15rem; }
.total b { color: var(--red); font-weight: 600; }
.sign { margin-top: 0; display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; border-top: 3px double var(--ink); padding-top: .75rem; color: var(--ink-soft); }
.sign em { font: italic 400 1.5rem/1 var(--text); color: var(--ink); }


/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .head { grid-template-columns: 1fr; }
  .accounts { grid-template-columns: 1fr; }
  .desk { position: static; order: -1; margin-bottom: 1rem; }
  .chart { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .closing-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .tabs ul li:not(.keep) { display: none; }
  .journal thead { display: none; }
  .journal, .journal tbody, .journal tr, .journal td { display: block; width: 100%; }
  .journal tr { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "date folio" "part part" "cr cr"; padding: 1rem 0; border-bottom: 1px solid var(--rule); }
  .journal td:nth-child(1) { grid-area: date; }
  .journal td:nth-child(2) { grid-area: part; }
  .journal td:nth-child(3) { grid-area: folio; }
  .journal td:nth-child(4) { grid-area: cr; }
  .journal td { border: 0; padding: 0; text-align: left !important; width: auto !important; }
  .journal .folio { width: auto; border: 0; text-align: right !important; font-size: .95rem; }
  body::before { display: none; }
  .journal .cr { white-space: normal; font-size: 1.15rem; }
  .journal td:first-child { font-size: .95rem; }
  .journal .cr { margin-top: .4rem; }
  .chart { grid-template-columns: 1fr; }
  .acc-list button { grid-template-columns: 2.25rem 1fr; }
  .detail dl, .closing dl { grid-template-columns: 1fr; }
  .detail dt, .closing dt { border-top: 1px solid var(--rule); padding-bottom: 0; }
  .detail dd, .closing dd { border-top: 0; padding-top: .2rem; }
}
