/* Tallis — a financial statement you can read.
   Archivo (condensed for headlines, normal for text), Fragment Mono for amounts.
   Ink on ledger paper, hairlines, and one red for what is still open. */

:root {
  --bg: #f1f3f0;
  --panel: #ffffff;
  --panel-2: #f8f9f7;
  --ink: #111412;
  --ink-2: #3a3f3b;
  --mute: #697069;
  --line: #dde1db;
  --line-2: #c5cbc4;
  --tint: #e8ece6;
  --red: #b3232b;
  --red-ink: #941b22;
  --red-soft: #f7e4e2;

  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Fragment Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --wrap: 1320px;
  --pad: 40px;
  --k: 196px;   /* label column */
  --v: 256px;   /* amount column */
  --gap: 48px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 0; text-align: left; font-weight: inherit; }

::selection { background: var(--ink); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 1px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  font-size: 14px;
}
.skip:focus { top: 12px; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.mono { font-family: var(--mono); letter-spacing: -0.01em; }
.amt { font-feature-settings: "tnum" 1, "lnum" 1; font-variant-numeric: tabular-nums lining-nums; }
.small { font-size: 14px; line-height: 1.5; color: var(--mute); }
.red { color: var(--red); }

/* ---------- Type ---------- */

.display {
  font-stretch: 72%;
  font-weight: 600;
  font-size: clamp(52px, 9.4vw, 150px);
  line-height: 0.9;
  letter-spacing: -0.022em;
}
.display--m { font-size: clamp(44px, 6.6vw, 104px); line-height: 0.93; }

.h2 {
  font-stretch: 78%;
  font-weight: 600;
  font-size: clamp(32px, 3.9vw, 54px);
  line-height: 1;
  letter-spacing: -0.015em;
}
.h3 {
  font-stretch: 86%;
  font-weight: 600;
  font-size: clamp(25px, 2.3vw, 32px);
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.lede { font-size: clamp(18px, 1.45vw, 21px); line-height: 1.5; color: var(--ink-2); }
.prose p + p { margin-top: 1em; }
.prose p { color: var(--ink-2); }

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 20px;
  background: var(--ink);
  color: #fff;
  font-weight: 500;
  font-size: 16px;
  border: 0;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.btn:hover { background: #2a302c; }
.btn .arr { transition: transform 0.2s ease; }
.btn:hover .arr { transform: translateX(3px); }
.btn--small { height: 38px; padding: 0 14px; font-size: 15px; }

.link {
  font-weight: 500;
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 2px;
  transition: border-color 0.2s ease;
}
.link:hover { border-color: var(--ink); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }

/* ---------- Brand ---------- */

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand svg { width: 22px; height: 22px; flex: none; }
.brand span {
  font-stretch: 80%;
  font-weight: 650;
  font-size: 23px;
  letter-spacing: -0.01em;
  line-height: 1;
}
.mark-red { fill: var(--red); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(241, 243, 240, 0.92);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}
.site-header.is-scrolled { border-color: var(--line); }

.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav-links { display: flex; align-items: center; gap: 32px; font-size: 15px; }
.nav-links a:not(.btn) { color: var(--ink-2); transition: color 0.2s ease; }
.nav-links a:not(.btn):hover,
.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"]:not(.btn) { box-shadow: inset 0 -1px 0 var(--ink); }
.menu-btn { display: none; }

@media (max-width: 760px) {
  :root { --pad: 20px; }
  .nav { height: 60px; }
  .menu-btn {
    display: block;
    background: none;
    border: 0;
    padding: 8px 0;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
  }
  .nav-links {
    position: fixed;
    inset: 60px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--pad) 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    font-size: 20px;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
  }
  .nav-links a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav-links a[aria-current="page"]:not(.btn) { box-shadow: none; }
  .nav-links .btn { margin-top: 20px; justify-content: center; height: 48px; font-size: 16px; }
  .menu-open .nav-links { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
}

/* ---------- Ledger grid ---------- */

.lg {
  display: grid;
  grid-template-columns: var(--k) minmax(0, 1fr) var(--v);
  column-gap: var(--gap);
}
.lg-k { grid-column: 1; }
.lg-b { grid-column: 2; min-width: 0; }
.lg-v { grid-column: 3; text-align: right; }
.lg-bv { grid-column: 2 / -1; min-width: 0; }
.lg-all { grid-column: 1 / -1; min-width: 0; }

.k {
  font-size: 14px;
  line-height: 1.45;
  color: var(--mute);
  padding-top: 6px;
}
.k b { display: block; color: var(--ink); font-weight: 600; font-size: 15px; }

.block > .wrap,
.opening > .wrap {
  padding-top: clamp(64px, 8vw, 112px);
  padding-bottom: clamp(64px, 8vw, 112px);
  background: linear-gradient(var(--line-2), var(--line-2)) top center / calc(100% - 2 * var(--pad)) 1px no-repeat;
}
.block--cont > .wrap { padding-top: 0; background: none; }
.block-head { row-gap: 18px; margin-bottom: clamp(36px, 4vw, 56px); }
.block-head .h3 + p,
.block-head .h2 + p { margin-top: 16px; max-width: 36em; }

@media (max-width: 1080px) {
  :root { --k: 150px; --v: 210px; --gap: 32px; }
}
@media (max-width: 900px) {
  .lg { grid-template-columns: minmax(0, 1fr); row-gap: 14px; }
  .lg-k, .lg-b, .lg-v, .lg-bv, .lg-all { grid-column: 1; }
  .lg-v { text-align: left; }
  .k { padding-top: 0; }
}

/* ---------- Tally (running difference) ---------- */

.tally {
  margin-top: clamp(40px, 5vw, 64px);
  font-size: 15px;
}
.tally-row { align-items: baseline; padding: 12px 0; }
.tally-row .k { padding-top: 0; }
.tally-row .m { color: var(--mute); }
.tally-row .v { font-size: 17px; white-space: nowrap; font-variant-numeric: tabular-nums lining-nums; }
.tally-row.clear { border-top: 1px solid var(--line); }
.tally-row.clear .v { color: var(--ink-2); }
.tally-row.bal { border-top: 1px solid var(--ink); }
.tally-row.bal .k { color: var(--ink); font-weight: 600; }
.tally-row.bal .v { font-stretch: 88%; font-weight: 500; font-size: 26px; letter-spacing: -0.01em; color: var(--red); transition: color 0.5s ease; }
.tally-row.bal .v.zero { color: var(--ink); }

.js .tally .clear { opacity: 0; transform: translateY(6px); transition: opacity 0.5s ease, transform 0.5s ease; }
.js .tally.in .clear { opacity: 1; transform: none; }

/* the accountant's double rule under the final total */
.dbl { position: relative; display: inline-block; padding-bottom: 7px; }
.dbl::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  border-top: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.7s cubic-bezier(0.3, 0.7, 0.2, 1) 0.2s;
}
.zero .dbl::after, .dbl.zero::after, .no-anim .dbl::after { transform: scaleX(1); }

@media (max-width: 900px) {
  .tally-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; row-gap: 2px; }
  .tally-row .k { grid-column: 1; grid-row: 1; }
  .tally-row .m { grid-column: 1 / -1; grid-row: 2; font-size: 14px; }
  .tally-row .v { grid-column: 2; grid-row: 1; text-align: right; }
}

/* ---------- Home: hero ---------- */

.hero { padding: clamp(56px, 7vw, 104px) 0 clamp(64px, 7vw, 104px); }
.hero .display { max-width: 9.5em; }
.hero-row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  column-gap: clamp(40px, 7vw, 120px);
  margin-top: clamp(40px, 5vw, 72px);
  align-items: start;
}
.hero-row .lede { max-width: 25em; }
.hero-row .actions { margin-top: 32px; }
.hero-row .tag-line { margin-bottom: 18px; }

@media (max-width: 900px) {
  .hero-row { grid-template-columns: minmax(0, 1fr); row-gap: 56px; }
}

/* customers as data */
.days caption {
  caption-side: top;
  text-align: left;
  font-size: 14px;
  color: var(--mute);
  padding-bottom: 12px;
}
.days th {
  font-size: 13px;
  color: var(--mute);
  padding: 0 0 10px;
  border-bottom: 1px solid var(--ink);
  white-space: nowrap;
}
.days td { padding: 11px 0; border-bottom: 1px solid var(--line-2); font-size: 15px; vertical-align: middle; }
.days .n { text-align: right; font-size: 15px; padding-left: 14px; width: 1%; white-space: nowrap; }
.days th.n { font-family: var(--font); font-size: 13px; }
.days .co { white-space: nowrap; padding-right: 18px; }
.days .bars { width: 46%; padding-left: 22px; }
.days .bar { position: relative; height: 10px; }
.days .bar i {
  position: absolute;
  left: 0;
  top: 0;
  height: 10px;
  width: calc(var(--w) * 1%);
}
.days .bar .was { background: repeating-linear-gradient(90deg, var(--line-2) 0 1px, transparent 1px 4px); box-shadow: inset 0 0 0 1px var(--line-2); }
.days .bar .now { background: var(--ink); }
.js .days .bar .now { transform: scaleX(0); transform-origin: left; transition: transform 0.8s cubic-bezier(0.3, 0.7, 0.2, 1) calc(var(--i) * 70ms + 200ms); }
.js .days.in .bar .now { transform: none; }
.days tfoot td { border-bottom: 0; border-top: 1px solid var(--ink); font-weight: 600; padding-top: 12px; }
.days tfoot .n { font-weight: 400; }

@media (max-width: 520px) {
  .days .bars { display: none; }
  .days .co { white-space: normal; }
}

/* walkthrough intro */
.opening > .wrap { padding-bottom: clamp(40px, 5vw, 56px); }
.opening .h2 { max-width: 13em; }
.opening .lg-b p { margin-top: 18px; max-width: 34em; }
.opening .open-amt { display: block; font-stretch: 88%; font-weight: 500; font-size: clamp(34px, 3.4vw, 48px); color: var(--red); line-height: 1.05; letter-spacing: -0.015em; font-variant-numeric: tabular-nums lining-nums; margin-top: 6px; }
.opening .lg-v .small { display: block; margin-top: 8px; }
.opening .lg-v { padding-top: 4px; }

/* ---------- App window (signature) ---------- */

.stage { padding-bottom: 0; }

.app {
  border: 1px solid var(--line-2);
  border-radius: 4px;
  background: var(--panel);
  box-shadow: 0 1px 0 rgba(17, 20, 18, 0.03), 0 30px 60px -36px rgba(17, 20, 18, 0.3);
  overflow: hidden;
  font-size: 13.5px;
  line-height: 1.4;
}

.app-top {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 50px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.app-org { display: flex; align-items: center; gap: 10px; font-weight: 500; white-space: nowrap; }
.app-org svg { width: 14px; height: 14px; }
.app-org .slash { color: var(--line-2); }
.app-org .period { color: var(--mute); font-weight: 400; }

.app-day {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--mute);
  white-space: nowrap;
}
.daybar { display: flex; gap: 3px; }
.daybar i { width: 22px; height: 4px; background: var(--line); }
.daybar i.on { background: var(--ink); }
.daybar i.now { background: var(--red); }

.avatar {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-2);
}
.avatar svg { width: 13px; height: 13px; }

.app-body { display: grid; grid-template-columns: 232px minmax(0, 1fr); }

.app-side {
  border-right: 1px solid var(--line);
  padding: 18px 10px;
  background: var(--panel-2);
}
.side-h { padding: 0 10px 10px; font-size: 12px; color: var(--mute); }
.side-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  color: var(--ink-2);
}
.side-list li.on { background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font-weight: 500; }
.side-list .acc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-list .st { flex: none; font-size: 12px; color: var(--mute); }
.side-list .st.ok::before {
  content: "✓";
  margin-right: 5px;
  color: var(--ink);
}
.side-list .st.prog { color: var(--red); }
.side-sep { height: 1px; background: var(--line); margin: 14px 10px; }

.app-main { padding: 22px 24px 20px; min-width: 0; }

.acct-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.acct-head h4 { font-size: 16px; font-weight: 600; }
.acct-head p { color: var(--mute); margin-top: 3px; }

.acct-stats { display: flex; gap: 28px; text-align: right; }
.acct-stats dt { font-size: 12px; color: var(--mute); white-space: nowrap; }
.acct-stats dd { font-size: 15px; font-weight: 500; margin-top: 3px; white-space: nowrap; }
.acct-stats dd.diff { color: var(--red); transition: color 0.4s ease; }
.acct-stats dd.diff.zero { color: var(--ink); }

.recon {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr);
  margin-top: 6px;
}
.recon-col-h {
  display: flex;
  justify-content: space-between;
  padding: 12px 10px 8px;
  font-size: 12px;
  color: var(--mute);
  border-bottom: 1px solid var(--line);
}
.rows li {
  position: relative;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  height: 40px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.35s ease, color 0.35s ease, opacity 0.35s ease;
}
.rows .d { color: var(--mute); }
.rows .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rows .a { text-align: right; font-weight: 500; }
.bank .t { font-family: var(--mono); font-size: 12px; letter-spacing: -0.02em; }
.gl .rows { min-height: 320px; }

.rows li.active { background: var(--tint); }
.rows li.done { color: var(--ink-2); }
.rows li.flag { background: var(--red-soft); }
.rows li.flag .a { color: var(--red); }
.rows li.draft { background: var(--tint); }
.rows li.enter { animation: rowIn 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.rows .tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 6px;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink);
  background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--line-2);
  vertical-align: 1px;
  letter-spacing: 0;
}

.rows li::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: var(--ink);
  transform: scale(0);
  transition: transform 0.3s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.bank li::after { right: -4px; }
.gl li::after { left: -4px; }
.rows li.done::after,
.rows li.draft::after { transform: scale(1); }

@keyframes rowIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.wires { position: relative; }
.wires svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.wires path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.2;
  transition: opacity 0.5s ease;
}
.wires path.settled { opacity: 0.3; }
.wires path.dashed { stroke: var(--red); stroke-dasharray: 3 3; }

.recon-note {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  min-height: 64px;
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--panel-2);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-2);
  transition: background-color 0.4s ease;
}
.recon-note .glyph { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.recon-note b { color: var(--ink); font-weight: 600; }
.recon-note.is-flag { background: var(--red-soft); box-shadow: none; }
.recon-note.is-flag b { color: var(--red-ink); }
.recon-note.is-done { background: var(--tint); box-shadow: none; }
.recon-note .fade { animation: fadeIn 0.45s ease both; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.measuring *, .measuring *::after { transition: none !important; }
.m-match { display: none; }

@media (max-width: 1080px) {
  .app-body { grid-template-columns: minmax(0, 1fr); }
  .app-side { display: none; }
}

@media (max-width: 760px) {
  .app { font-size: 13px; }
  .app-top { height: auto; flex-wrap: wrap; gap: 8px 14px; padding: 12px 14px; }
  .app-org .period, .app-org .slash { display: none; }
  .app-day { margin-left: auto; gap: 8px; }
  .app-day .lbl { display: none; }
  .daybar i { width: 14px; }
  .app-top .avatar { display: none; }
  .app-main { padding: 16px 14px 14px; }
  .acct-head { flex-direction: column; gap: 14px; }
  .acct-head h4 { font-size: 15px; }
  .acct-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; width: 100%; text-align: left; }
  .acct-stats > div:nth-child(2) { display: none; }
  .recon { grid-template-columns: minmax(0, 1fr); margin-bottom: 16px; }
  .recon-wrap { display: flex; flex-direction: column; }
  .recon-wrap .recon-note { margin-top: auto; }
  .recon .gl, .recon .wires { display: none; }
  .gl .rows { min-height: 0; }
  .bank .recon-col-h span:first-child::after { content: " → ledger match"; }
  .rows li { grid-template-columns: 44px minmax(0, 1fr) auto; height: auto; min-height: 42px; padding: 10px 6px; align-items: start; row-gap: 0; }
  .rows li::after { display: none; }
  .bank .t { font-size: 11.5px; }
  .m-match {
    display: grid;
    grid-column: 2 / -1;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  .m-match > div { overflow: hidden; }
  .m-match p {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding-top: 6px;
    color: var(--ink-2);
    font-size: 12.5px;
  }
  .m-match p span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .m-match p span:first-child::before { content: "↳ "; color: var(--mute); }
  .rows li.done .m-match,
  .rows li.draft .m-match,
  .rows li.paired .m-match { grid-template-rows: 1fr; }
  .rows li.done, .rows li.draft { background: transparent; }
}

/* ---------- Panels & tables (product UI) ---------- */

.panel {
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 4px;
  box-shadow: 0 24px 50px -36px rgba(17, 20, 18, 0.28);
  font-size: 14px;
  line-height: 1.45;
  overflow: hidden;
}
.panel-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.panel-h b { font-weight: 600; }
.panel-h span { color: var(--mute); font-size: 13px; white-space: nowrap; }

.scroll-x { overflow-x: auto; }

.tbl th {
  font-size: 12px;
  color: var(--mute);
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl td { padding: 11px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; }
.tbl .amt { font-weight: 500; }
.tbl .acc { font-family: var(--mono); font-size: 12.5px; color: var(--mute); margin-right: 10px; }
.tbl tfoot td { border-top: 1px solid var(--ink); border-bottom: 0; font-weight: 600; }
.tbl .memo { color: var(--mute); white-space: normal; }

.status { font-size: 12.5px; white-space: nowrap; }
.status::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: currentColor; vertical-align: 1px; }
.status.ok { color: var(--ink); }
.status.prog { color: var(--mute); }
.status.open { color: var(--red); }
.status.draft { color: var(--ink-2); }
.status.draft::before { background: none; box-shadow: inset 0 0 0 1px currentColor; }

.bar-mini { display: inline-block; width: 64px; height: 3px; margin-right: 10px; background: var(--line); vertical-align: middle; }
.bar-mini i { display: block; height: 3px; background: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-block;
  padding: 3px 8px;
  font-size: 12.5px;
  color: var(--ink-2);
  background: var(--panel-2);
  box-shadow: inset 0 0 0 1px var(--line);
  white-space: nowrap;
}
.chip.je { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); background: var(--panel); }

@media (max-width: 760px) {
  .tbl .hs { display: none; }
  .tbl th, .tbl td { padding-left: 12px; padding-right: 12px; }
  .tbl td:first-child { white-space: normal; }
  .tbl .acc { display: block; margin: 0 0 1px; }
  .panel-h { padding: 12px 14px; }
}

/* accruals panel on the home page */
.accruals td { vertical-align: top; }
.accruals .je { font-family: var(--mono); font-size: 12.5px; color: var(--mute); display: block; margin-bottom: 2px; }
.accruals .src { display: block; font-size: 13px; color: var(--mute); margin-top: 3px; white-space: normal; }
.accruals td:first-child { white-space: normal; }

/* ---------- Flux table ---------- */

.flux { border-top: 1px solid var(--ink); }
.flux-h,
.flux-row > button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px 140px 150px 32px;
  gap: 16px;
  align-items: center;
}
.flux-h { padding: 10px 0; font-size: 13px; color: var(--mute); border-bottom: 1px solid var(--line-2); }
.flux-h span:nth-child(n+2):nth-child(-n+4) { text-align: right; }
.flux-row { border-bottom: 1px solid var(--line-2); }
.flux-row > button {
  width: 100%;
  padding: 18px 0;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
}
.flux-row .acct { display: flex; gap: 14px; align-items: baseline; font-weight: 500; }
.flux-row .code { font-family: var(--mono); font-size: 13px; color: var(--mute); font-weight: 400; }
.flux-row .n { text-align: right; font-size: 16px; }
.flux-row .prev { color: var(--mute); }
.flux-row .chg small { display: block; font-size: 12px; color: var(--mute); margin-top: 2px; }
.flux-row .pm { position: relative; width: 14px; height: 14px; justify-self: end; }
.flux-row .pm::before,
.flux-row .pm::after { content: ""; position: absolute; left: 0; top: 6.5px; width: 14px; height: 1.5px; background: var(--ink); transition: transform 0.3s ease; }
.flux-row .pm::after { transform: rotate(90deg); }
.flux-row.open .pm::after { transform: rotate(0deg); }
.flux-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.45s cubic-bezier(0.2, 0.7, 0.2, 1); }
.flux-body > div { overflow: hidden; }
.flux-row.open .flux-body { grid-template-rows: 1fr; }
.flux-exp {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  padding: 0 0 22px;
  max-width: 900px;
}
.flux-exp .by { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--mute); padding-top: 2px; }
.flux-exp .by svg { width: 13px; height: 13px; }
.flux-exp p { color: var(--ink-2); margin-bottom: 12px; max-width: 40em; }

@media (max-width: 760px) {
  .flux-h { display: none; }
  .flux-row > button { grid-template-columns: minmax(0, 1fr) auto 20px; }
  .flux-row .prev, .flux-row .cur { display: none; }
  .flux-exp { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}

/* ---------- Controls (approve) ---------- */

.defs { border-top: 1px solid var(--ink); }
.defs > div { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--line-2); }
.defs dt { font-weight: 600; }
.defs dd { color: var(--ink-2); }
@media (max-width: 600px) {
  .defs > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

.pull {
  margin-top: clamp(56px, 7vw, 88px);
}
.pull blockquote {
  font-stretch: 84%;
  font-weight: 500;
  font-size: clamp(26px, 2.7vw, 38px);
  line-height: 1.16;
  letter-spacing: -0.01em;
  max-width: 22em;
  text-indent: -0.42em;
}
.pull figcaption { margin-top: 22px; font-size: 15px; }
.pull figcaption span { color: var(--mute); }

/* ---------- Final statement + CTA ---------- */

.closing { padding: clamp(40px, 5vw, 64px) 0 clamp(88px, 10vw, 140px); }
.closing .tally { margin-top: 0; }
.closing .tally-row.bal .v { font-size: clamp(36px, 4vw, 60px); line-height: 1; }
.closing .cta-h { margin-top: clamp(72px, 9vw, 120px); max-width: 10em; }
.closing .actions { margin-top: 36px; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line-2); padding: 56px 0 36px; font-size: 14.5px; }
.foot { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 40px; }
.foot-brand p { margin-top: 14px; color: var(--mute); max-width: 20em; }
.foot-col h4 { font-size: 13px; font-weight: 500; color: var(--mute); margin-bottom: 12px; }
.foot-col li + li { margin-top: 6px; }
.foot-col a { color: var(--ink-2); transition: color 0.2s ease; }
.foot-col a:hover { color: var(--ink); }
.foot-col address { font-style: normal; color: var(--ink-2); }
.foot-base {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--mute);
}
.foot-base a { color: var(--ink-2); }
.foot-base a:hover { color: var(--ink); }

@media (max-width: 900px) {
  .foot { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .foot { grid-template-columns: 1fr 1fr; }
  .foot-base { flex-direction: column; gap: 6px; }
}

/* ---------- Product page ---------- */

.contents { border-top: 1px solid var(--ink); }
.contents a {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) 24px;
  gap: 24px;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-2);
  transition: padding 0.25s ease;
}
.contents a b {
  font-stretch: 82%;
  font-weight: 600;
  font-size: clamp(21px, 1.8vw, 26px);
  line-height: 1.1;
}
.contents a span { color: var(--mute); font-size: 15px; }
.contents a .go { text-align: right; color: var(--ink); transition: transform 0.25s ease; }
.contents a:hover .go { transform: translateX(4px); }
@media (max-width: 600px) {
  .contents a { grid-template-columns: minmax(0, 1fr) 20px; gap: 4px 12px; }
  .contents a span:not(.go) { grid-column: 1; grid-row: 2; }
  .contents a .go { grid-column: 2; grid-row: 1; }
}

.specs { border-top: 1px solid var(--ink); text-align: left; font-size: 14.5px; }
.specs li { padding: 9px 0; border-bottom: 1px solid var(--line-2); color: var(--ink-2); }

.je-meta { display: flex; flex-wrap: wrap; gap: 12px 40px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.je-meta dt { font-size: 12px; color: var(--mute); }
.je-meta dd { margin-top: 2px; }
.je-support { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 18px; border-top: 1px solid var(--line); }
.je-foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line); background: var(--panel-2); }
.fake-btn { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; font-size: 13px; font-weight: 500; box-shadow: inset 0 0 0 1px var(--line-2); background: var(--panel); border-radius: 2px; }
.fake-btn.primary { background: var(--ink); color: #fff; box-shadow: none; }
.btns { display: flex; gap: 8px; }

.checklist li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto 28px; gap: 12px; align-items: center; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist .grp-li { display: block; padding: 12px 18px 8px; background: var(--panel-2); font-size: 12.5px; color: var(--mute); }
.checklist .box { width: 15px; height: 15px; box-shadow: inset 0 0 0 1.5px var(--line-2); border-radius: 2px; position: relative; }
.checklist .box.ok { background: var(--ink); box-shadow: none; }
.checklist .box.ok::after { content: ""; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; border: solid #fff; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.checklist .done-t { color: var(--mute); }
.checklist .day { font-family: var(--mono); font-size: 12.5px; color: var(--mute); }

.log li { display: grid; grid-template-columns: 120px 14px minmax(0, 1fr); gap: 14px; align-items: baseline; padding: 11px 18px; border-bottom: 1px solid var(--line); }
.log li:last-child { border-bottom: 0; }
.log time { font-family: var(--mono); font-size: 12.5px; color: var(--mute); white-space: nowrap; }
.log .pin { width: 7px; height: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink); align-self: center; }
.log li.ai .pin { background: var(--ink); }
.log p span { color: var(--mute); }
@media (max-width: 600px) {
  .log li { grid-template-columns: 14px minmax(0, 1fr); row-gap: 2px; }
  .log time { grid-column: 2; }
  .log .pin { grid-row: 1 / span 2; align-self: start; margin-top: 6px; }
  .checklist li { grid-template-columns: 18px minmax(0, 1fr) auto; }
  .checklist .avatar { display: none; }
}

.matrix { border-top: 1px solid var(--ink); font-size: 15px; }
.matrix th { font-size: 13px; color: var(--mute); padding: 10px 24px 10px 0; border-bottom: 1px solid var(--line-2); }
.matrix td { padding: 14px 24px 14px 0; border-bottom: 1px solid var(--line-2); vertical-align: top; color: var(--ink-2); }
.matrix td:first-child { color: var(--ink); font-weight: 600; white-space: nowrap; }
.matrix td.no { color: var(--mute); }
@media (max-width: 760px) {
  .matrix thead { display: none; }
  .matrix tr { display: grid; grid-template-columns: minmax(0, 1fr); padding: 14px 0; border-bottom: 1px solid var(--line-2); }
  .matrix td { padding: 2px 0; border: 0; }
  .matrix td[data-h]::before { content: attr(data-h) " · "; color: var(--mute); }
}

.feature-panel { margin-top: clamp(8px, 1vw, 16px); }

/* ---------- Company page ---------- */

.stmt { border-top: 1px solid var(--ink); font-size: 16px; }
.stmt th { font-size: 13px; color: var(--mute); padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.stmt td { padding: 13px 0; border-bottom: 1px solid var(--line-2); }
.stmt .n { text-align: right; font-size: 16px; font-weight: 500; padding-left: 24px; width: 1%; white-space: nowrap; }
.stmt th.n { font-family: var(--font); font-size: 13px; }
.stmt .n.prior { color: var(--mute); }
.stmt tbody tr:last-child td { border-bottom: 0; }
.stmt tfoot td { border-top: 1px solid var(--ink); padding-top: 0; height: 5px; border-bottom: 1px solid var(--ink); }
.stmt-note { margin-top: 18px; }

.people { border-top: 1px solid var(--ink); font-size: 15.5px; }
.people th { font-size: 13px; color: var(--mute); padding: 10px 24px 10px 0; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.people td { padding: 13px 24px 13px 0; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.people .team td { padding-top: 26px; font-weight: 600; border-bottom: 1px solid var(--line-2); }
.people .who { font-weight: 500; white-space: nowrap; }
.people .bg { color: var(--mute); }
.people tr.open td { color: var(--ink-2); }
.people tr.open .who { color: var(--red); font-weight: 500; }
.people tr.open a { display: inline-flex; gap: 10px; }
.people tr.open a:hover .role-t { box-shadow: inset 0 -1px 0 var(--ink); }
.people .go { color: var(--ink); }
@media (max-width: 760px) {
  .people thead { display: none; }
  .people tr { display: grid; grid-template-columns: minmax(0, 1fr); padding: 12px 0; border-bottom: 1px solid var(--line-2); }
  .people td { padding: 1px 0; border: 0; }
  .people .team { padding: 22px 0 6px; }
  .people .team td { padding: 0; border: 0; }
}

.notes { border-top: 1px solid var(--ink); }
.notes li { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.6fr); gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line-2); }
.notes b { font-stretch: 84%; font-weight: 600; font-size: 21px; line-height: 1.2; }
.notes p { color: var(--ink-2); }
@media (max-width: 600px) {
  .notes li { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}

/* ---------- Contact page ---------- */

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 28px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; color: var(--mute); }
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  border-radius: 0;
  background: transparent;
  padding: 8px 0 9px;
  font-size: 17px;
  outline: none;
  transition: border-color 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 10px) 52%, calc(100% - 5px) 52%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 24px;
  cursor: pointer;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--ink); }
.field input:user-invalid,
.field select:user-invalid { border-color: var(--red); }
.form-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 6px; }
.form-status { font-size: 14px; color: var(--mute); }

.next { border-top: 1px solid var(--ink); text-align: left; }
.next li { padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.next b { display: block; font-weight: 600; font-size: 15.5px; }
.next span { font-size: 14.5px; color: var(--mute); }
.office { margin-top: 32px; text-align: left; font-size: 15px; }
.office h4 { font-size: 13px; font-weight: 500; color: var(--mute); margin-bottom: 6px; }
.office address { font-style: normal; }

@media (max-width: 600px) {
  .form { grid-template-columns: minmax(0, 1fr); gap: 22px; }
}

/* ---------- 404 ---------- */

.nf { padding: clamp(64px, 9vw, 128px) 0 clamp(88px, 10vw, 140px); }
.nf .panel { max-width: 560px; margin-top: 48px; }

/* ---------- Reveal ---------- */

.js .rv { opacity: 0; transform: translateY(14px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv, .js .tally .clear { opacity: 1; transform: none; transition: none; }
  .js .days .bar .now { transform: none; transition: none; }
  .dbl::after { transition: none; }
}
