/* JB Corp app. Colors, fonts and shapes follow ../JB-Brand/brand.md. */

@font-face{ font-family: 'Brygada 1918'; font-style: italic; font-weight: 400 700; font-display: swap; src: url(fonts/brygada1918-italic-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face{ font-family: 'Brygada 1918'; font-style: italic; font-weight: 400 700; font-display: swap; src: url(fonts/brygada1918-italic-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face{ font-family: 'Brygada 1918'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/brygada1918-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face{ font-family: 'Brygada 1918'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/brygada1918-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face{ font-family: 'Inria Sans'; font-style: italic; font-weight: 400; font-display: swap; size-adjust: 107%; src: url(fonts/inriasans-400italic-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face{ font-family: 'Inria Sans'; font-style: italic; font-weight: 400; font-display: swap; size-adjust: 107%; src: url(fonts/inriasans-400italic-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face{ font-family: 'Inria Sans'; font-style: normal; font-weight: 400; font-display: swap; size-adjust: 107%; src: url(fonts/inriasans-400-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face{ font-family: 'Inria Sans'; font-style: normal; font-weight: 400; font-display: swap; size-adjust: 107%; src: url(fonts/inriasans-400-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face{ font-family: 'Inria Sans'; font-style: normal; font-weight: 700; font-display: swap; size-adjust: 107%; src: url(fonts/inriasans-700-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face{ font-family: 'Inria Sans'; font-style: normal; font-weight: 700; font-display: swap; size-adjust: 107%; src: url(fonts/inriasans-700-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root{
  --ivory: #FBF6EF;
  --ivory-deep: #F4EBDD;
  --white: #FFFFFF;
  --green: #0B4A3C;
  --green-deep: #083A2F;
  --green-mid: #3F7A69;
  --terra: #D89A78;
  --terra-soft: #E7B79A;
  --terra-deep: #C07E58;
  --terra-ink: #9C5733;
  --ink: #2A1F1A;
  --ink-soft: #5B4B42;
  --line: rgba(42,31,26,0.12);
  --line-strong: rgba(42,31,26,0.28);
  --wash: rgba(11,74,60,0.06);
  --on-green: #FBF6EF;
  --on-green-soft: rgba(251,246,239,0.74);
  --on-green-line: rgba(251,246,239,0.16);

  --font-title: 'Brygada 1918', Georgia, 'Times New Roman', serif;
  --font-text: 'Inria Sans', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;

  --radius-card: 6px;
  --radius-panel: 24px;
  --radius-pill: 999px;
  --rail: 216px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --lift: 0 1px 2px rgba(42,31,26,0.05), 0 10px 28px -14px rgba(42,31,26,0.22);
}

*, *::before, *::after{ box-sizing: border-box; }
html{ -webkit-text-size-adjust: 100%; scrollbar-color: rgba(42,31,26,0.28) transparent; }
body{
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.55;
  caret-color: var(--green);
}
::selection{ background: var(--terra-soft); color: var(--ink); }
h1, h2, h3, p, ul, ol, dl, dd, figure{ margin: 0; }
ul, ol{ padding: 0; list-style: none; }
img, svg{ display: block; max-width: 100%; }
a{ color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, select, textarea{ font: inherit; color: inherit; }
small{ font-size: 14px; font-weight: 400; color: var(--ink-soft); }
strong{ font-weight: 700; }
[hidden]{ display: none !important; }
.icon{ flex: none; }

h1{ font-family: var(--font-title); font-weight: 600; font-size: 32px; line-height: 1.15; letter-spacing: -0.012em; text-wrap: balance; }
h2{ font-family: var(--font-title); font-weight: 600; font-size: 22px; line-height: 1.2; letter-spacing: -0.006em; text-wrap: balance; }
h3{ font-size: 15px; font-weight: 700; }
h2 small{ font-family: var(--font-text); margin-left: 6px; }

:focus-visible{ outline: 2px solid var(--green); outline-offset: 2px; border-radius: 3px; }
.page:focus{ outline: none; }

.skip{ position: absolute; left: 12px; top: -60px; z-index: 60; padding: 10px 16px; background: var(--white); border-radius: var(--radius-card); font-weight: 700; box-shadow: var(--lift); }
.skip:focus{ top: 12px; }

/* ---- Frame: a green rail on the left; on the forecast page it joins the answer strip ---- */

.shell{ display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100vh; }

.rail{
  position: sticky; top: 0; height: 100vh; z-index: 30;
  display: flex; flex-direction: column;
  padding: 28px 14px 18px;
  background: var(--green); color: var(--on-green);
  scrollbar-color: rgba(251,246,239,0.3) transparent;
}
.rail ::selection{ background: var(--terra); }
.rail :focus-visible{ outline-color: var(--on-green); }
.rail-check{ position: absolute; opacity: 0; pointer-events: none; }
.rail-toggle{ display: none; }
.rail-logo{ display: block; width: max-content; padding: 0 12px; border-radius: var(--radius-card); }
.rail-logo img{ width: 88px; height: auto; }

.rail-nav{ flex: 1; display: flex; flex-direction: column; margin-top: 34px; min-height: 0; overflow-y: auto; }
.rail-nav a{
  display: flex; align-items: center; gap: 10px;
  min-height: 40px; padding: 0 12px;
  border-radius: var(--radius-card);
  color: var(--on-green-soft); font-weight: 700; font-size: 15px; text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}
/* The bridge from the logo marks the page you are on. */
.rail-nav a::before{
  content: ""; flex: none;
  width: 16px; height: 8px;
  border: 2px solid transparent; border-bottom: 0;
  border-radius: 999px 999px 0 0;
  transition: border-color 0.15s ease;
}
.rail-nav a:hover{ color: var(--on-green); background: rgba(251,246,239,0.06); }
.rail-nav a[aria-current="page"]{ color: var(--on-green); background: rgba(251,246,239,0.1); }
.rail-nav a[aria-current="page"]::before{ border-color: var(--terra); }
.mark{ display: inline-block; width: 8px; height: 8px; margin-left: 8px; border-radius: 50%; background: var(--terra); vertical-align: middle; }
.rail-foot{ margin-top: auto; padding-top: 24px; }
.rail-user{
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 10px; padding: 14px 12px 0;
  border-top: 1px solid var(--on-green-line);
  font-size: 14px;
}
.rail-user span{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-out{ padding: 6px 0; background: none; border: 0; color: var(--on-green-soft); font-size: 14px; font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: pointer; white-space: nowrap; }
.rail-out:hover{ color: var(--on-green); }

.page{ width: 100%; max-width: 1180px; padding: 40px 48px 96px; }

.page-head{
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap;
  padding-bottom: 20px; margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.page-head .hint{ margin-top: 6px; }
.crumb{ margin-bottom: 6px; font-size: 14px; font-weight: 700; }
.crumb a{ display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.crumb a:hover{ text-decoration: underline; }

.block{ margin-bottom: 44px; }
.block > h2{ margin-bottom: 10px; }
.block-head{ display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 14px; }
.block > p + p, .block > p + form, .block > dl + p{ margin-top: 12px; }

.lead{ font-size: 19px; line-height: 1.45; max-width: 60ch; }
.hello{ display: grid; gap: 12px; justify-items: start; padding: 24px 0 8px; margin-bottom: 56px; }
.hello .lead{ color: var(--ink-soft); }
.hello .btn{ margin-top: 12px; }
.btn.btn-big{ min-height: 56px; padding: 0 30px 0 26px; font-size: 17px; }
.quiet-link{ margin-top: 40px; }
.quiet-link .link{ font-weight: 400; color: var(--ink-soft); }
.lead-small{ margin-bottom: 24px; color: var(--ink-soft); }
.hint{ font-size: 14px; color: var(--ink-soft); max-width: 68ch; }
.block > .hint{ margin-bottom: 14px; }
.grid-2 + .hint, .grid-3 + .hint{ margin: 10px 0 0; }
.empty{ padding: 6px 0 18px; color: var(--ink-soft); max-width: 62ch; }
.empty-page{ max-width: 620px; display: grid; gap: 12px; justify-items: start; padding-top: 8px; }
.is-loss{ color: var(--terra-ink); }

/* ---- Buttons and links ---- */

.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 24px;
  border: 1px solid transparent; border-radius: var(--radius-pill);
  background: var(--terra); color: var(--ink);
  font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s var(--ease);
}
.btn:hover{ background: var(--terra-deep); }
.btn:active{ transform: scale(0.98); }
.btn-quiet{ background: transparent; border-color: var(--line-strong); color: var(--green); }
.btn-quiet:hover{ background: var(--wash); border-color: var(--green); }
.link{ display: inline-flex; align-items: center; gap: 6px; padding: 0; background: none; border: 0; color: var(--green); font-weight: 700; font-size: 15px; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: pointer; }
.link:hover{ color: var(--green-deep); }
.link-danger{ color: var(--terra-ink); }
.link-danger:hover{ color: var(--ink); }
.actions{ display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; padding-top: 4px; }
.inline-form{ margin-top: 18px; }

/* ---- Forms ---- */

.field{ display: block; min-width: 0; }
.field > span, .line label > span, .line-total > span, .line-qty > span{ display: block; margin-bottom: 6px; font-size: 14px; font-weight: 700; }
.field label{ display: block; margin-bottom: 6px; font-size: 14px; font-weight: 700; }
.field .hint{ margin-top: 6px; }
input:not([type="checkbox"]), select, textarea{
  display: block; width: 100%; min-height: 44px; padding: 9px 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-card);
  background: var(--white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:not([type="checkbox"]):hover, select:hover, textarea:hover{ border-color: rgba(42,31,26,0.45); }
textarea{ resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder{ color: #7A6A60; }
input:focus-visible, select:focus-visible, textarea:focus-visible{ outline: none; border-color: var(--green); border-radius: var(--radius-card); box-shadow: 0 0 0 3px rgba(11,74,60,0.16); }
.digits{ font-size: 22px; font-weight: 700; letter-spacing: 0.16em; font-variant-numeric: tabular-nums; }

.strength{ margin-top: 10px; }
.strength-meter{ display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.strength-bar{ flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; height: 6px; }
.strength-bar i{ border-radius: 3px; background: var(--line); transition: background-color 0.15s ease; }
.strength-bar[data-level="1"] i:nth-child(-n+1){ background: var(--terra-ink); }
.strength-bar[data-level="2"] i:nth-child(-n+2){ background: var(--terra-deep); }
.strength-bar[data-level="3"] i:nth-child(-n+3){ background: var(--green-mid); }
.strength-bar[data-level="4"] i{ background: var(--green); }
.strength-label{ min-width: 13ch; font-size: 14px; font-weight: 700; }
.strength-rules{ display: grid; gap: 3px; font-size: 14px; color: var(--ink-soft); }
.strength-rules li{ display: flex; align-items: center; gap: 9px; }
.strength-rules li::before{ content: ""; flex: none; width: 9px; height: 9px; border: 1.5px solid var(--line-strong); border-radius: 50%; }
.strength-rules li.is-met{ color: var(--green); font-weight: 700; }
.strength-rules li.is-met::before{ border-color: var(--green); background: var(--green); }

.stack{ display: grid; gap: 16px; justify-items: start; }
.stack > .field{ width: 100%; }
.stack-narrow{ max-width: 380px; }
.grid-2, .grid-3{ display: grid; gap: 16px 20px; }
.grid-2{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-wide{ grid-column: 1 / -1; }
.field-short{ max-width: 320px; }

.checks{ display: flex; flex-wrap: wrap; gap: 4px 28px; }
.check{ display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.check input{ width: 20px; height: 20px; margin: 0; accent-color: var(--green); }

/* ---- Messages ---- */

.notice{ margin-bottom: 18px; padding: 12px 16px; border: 1px solid rgba(192,126,88,0.45); border-radius: var(--radius-card); background: var(--ivory-deep); max-width: 80ch; }
.notice-success{ border-color: rgba(11,74,60,0.3); background: rgba(11,74,60,0.08); }
.notice-error{ border-color: var(--terra-ink); background: rgba(192,126,88,0.16); font-weight: 700; }
.notice .digits{ margin-left: 4px; }

.reveal{ margin-bottom: 28px; padding: 28px 32px; border-radius: var(--radius-panel); background: var(--green); color: var(--on-green); display: grid; gap: 16px; justify-items: start; max-width: 620px; }
.reveal p{ color: var(--on-green-soft); font-size: 15px; }
.reveal-codes{ display: grid; grid-template-columns: repeat(2, auto); gap: 6px 36px; font-size: 19px; font-weight: 700; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
.reveal .btn-quiet{ border-color: rgba(251,246,239,0.4); color: var(--on-green); }
.reveal .btn-quiet:hover{ background: rgba(251,246,239,0.1); border-color: var(--on-green); }
.reveal :focus-visible{ outline-color: var(--on-green); }

/* ---- Lists and tables ---- */

.tag{ display: inline-block; padding: 2px 11px; border-radius: var(--radius-pill); background: var(--ivory-deep); color: var(--ink-soft); font-size: 13px; font-weight: 700; white-space: nowrap; }
.tag-quoted{ background: rgba(216,154,120,0.3); color: #6E3A1F; }
.tag-won{ background: rgba(11,74,60,0.12); color: var(--green); }
.tag-lost{ background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); }

.rows{ border-top: 1px solid var(--line); margin-top: 14px; }
.rows li{ display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(130px, auto); align-items: center; gap: 8px 20px; padding: 14px 12px; margin: 0 -12px; border-bottom: 1px solid var(--line); border-radius: var(--radius-card); transition: background-color 0.15s ease; }
.rows li:hover{ background: var(--wash); }
.rows + p{ margin-top: 14px; }
.row-main{ display: grid; text-decoration: none; min-width: 0; color: var(--ink); }
.row-main strong{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-main:hover strong{ text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.row-main span{ font-size: 14px; color: var(--ink-soft); }
.row-num{ text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-num small{ display: block; }

/* Settings start page: a short list of plain choices. */
.menu-list{ max-width: 720px; border-top: 1px solid var(--line); }
.menu-list a{ display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 18px 12px; margin: 0 -12px; border-bottom: 1px solid var(--line); border-radius: var(--radius-card); color: var(--ink); text-decoration: none; transition: background-color 0.15s ease; }
.menu-list a:hover{ background: var(--wash); }
.menu-list strong{ display: block; font-size: 17px; }
.menu-list small{ display: block; margin-top: 2px; }
.menu-list .icon{ color: var(--ink-soft); }

/* Anything needed only sometimes sits behind a plain link, closed until asked for. */
.more > summary{ display: inline-flex; align-items: center; gap: 6px; min-height: 40px; font-size: 15px; font-weight: 700; color: var(--green); cursor: pointer; list-style: none; border-radius: var(--radius-card); }
.more > summary::-webkit-details-marker{ display: none; }
.more > summary:hover{ color: var(--green-deep); }
.more > summary .icon{ transition: transform 0.2s var(--ease); }
.more[open] > summary .icon{ transform: rotate(180deg); }
.more > summary span{ font-weight: 400; color: var(--ink-soft); }
.more-block{ margin-top: 40px; max-width: 720px; }
.more-block[open] > summary{ margin-bottom: 8px; }
.more-block > * + *{ margin-top: 14px; }

.table-wrap{ overflow-x: auto; }
.table{ width: 100%; border-collapse: collapse; }
.table th, .table td{ padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th:first-child, .table td:first-child{ padding-left: 0; }
.table th:last-child, .table td:last-child{ padding-right: 0; }
.table thead th{ padding-top: 0; font-size: 13px; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }
.table tbody th{ font-weight: 700; }
.table tbody th a{ color: var(--ink); text-decoration: none; }
.table tbody th a:hover{ color: var(--green); text-decoration: underline; }
.table tbody th small{ display: block; }
.table .num{ text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-plain td{ font-size: 15px; }

.facts > div{ display: grid; grid-template-columns: minmax(140px, 240px) minmax(0, 1fr); gap: 4px 20px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts > div:first-child{ border-top: 1px solid var(--line); }
.facts dt{ color: var(--ink-soft); }
.facts dd{ overflow-wrap: anywhere; }


/* ---- Settings ---- */

.people{ max-width: 720px; border-top: 1px solid var(--line); }
.people > li{ border-bottom: 1px solid var(--line); }
.person > summary{ display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 16px 0; cursor: pointer; list-style: none; border-radius: var(--radius-card); }
.person > summary::-webkit-details-marker{ display: none; }
.person > summary strong{ display: block; font-size: 17px; }
.person > summary strong small{ margin-left: 6px; }
.person > summary > span > small{ display: block; margin-top: 2px; }
.person-edit{ display: inline-flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 700; color: var(--green); }
.person-edit .icon{ transition: transform 0.2s var(--ease); }
.person[open] .person-edit .icon{ transform: rotate(180deg); }
.person-body{ padding: 4px 0 28px; }
.person-help{ display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 22px; }
.person-add{ max-width: 720px; margin-top: 28px; }
.person-add > summary{ display: block; padding: 0; }
.person-add[open] > summary{ margin-bottom: 16px; }
.band{ display: grid; grid-template-columns: repeat(2, minmax(0, 260px)); align-items: end; gap: 12px 20px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.band:first-child{ border-top: 1px solid var(--line); }
.band-rest{ align-self: center; font-weight: 700; }

/* ---- Forecast: the worksheet ---- */

.page-sheet{ max-width: none; padding: 0; display: flex; flex-direction: column; min-height: 100vh; }
.sheet{ flex: 1; display: flex; flex-direction: column; min-width: 0; }
.sheet-body{ flex: 1; width: 100%; max-width: 1180px; padding: 32px 48px 40px; }
.page-sheet > .notice, .page-sheet > .reveal{ margin: 24px 48px 0; }

.sheet-head{ margin-bottom: 22px; }
/* The name of the forecast is typed straight into the page title. */
input.title-input{
  min-height: 0; padding: 2px 8px; margin: 0 -9px;
  border-color: transparent; background: transparent;
  font-family: var(--font-title); font-weight: 600; font-size: 32px; line-height: 1.2; letter-spacing: -0.012em;
  text-overflow: ellipsis;
}
input.title-input:hover{ border-color: var(--line-strong); }
input.title-input:focus-visible{ background: var(--white); }
input.title-input::placeholder{ color: #7A6A60; }

.request-fields{ display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 20px; padding: 14px 0 6px; max-width: 860px; }
.request-fields .field-wide{ grid-column: 1 / -1; }
.request-fields .field-half{ grid-column: span 2; }

/* The four steps: numbered circles joined by a thin line. */
.steps{ margin-bottom: 34px; border-bottom: 1px solid var(--line); }
.steps ol{ display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 1000px; }
.steps a{
  position: relative;
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 2px 14px;
  padding: 14px 20px 16px 0;
  color: var(--ink-soft); text-decoration: none;
  border-radius: var(--radius-card);
}
.steps a::after{ content: ""; position: absolute; left: 0; right: 20px; bottom: -1px; height: 2px; background: var(--terra-deep); transform: scaleX(0); transform-origin: left center; transition: transform 0.3s var(--ease); }
.steps a[aria-current="step"]::after{ transform: scaleX(1); }
.step-n{
  grid-row: span 2;
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border: 1px solid var(--line-strong); border-radius: 50%;
  font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.step-t{ font-weight: 700; font-size: 16px; color: var(--ink); align-self: end; }
.step-v{ font-size: 14px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; align-self: start; min-height: 21px; }
.steps a:hover .step-n{ border-color: var(--green); color: var(--green); }
.steps a[aria-current="step"] .step-n{ background: var(--green); border-color: var(--green); color: var(--on-green); }
.steps a[aria-current="step"] .step-t{ color: var(--green); }

.step{ max-width: 1084px; }
.step:focus{ outline: none; }
.step > h2{ margin-bottom: 6px; }
.step > h2 + .hint{ margin-bottom: 20px; }
/* A part within a step: a second, smaller heading. */
.part{ margin: 34px 0 10px; font-size: 17px; line-height: 1.3; }
.part + .hint{ margin: -6px 0 14px; }
.js-steps .step:not([hidden]){ animation: step-in 0.26s var(--ease); }
@keyframes step-in{ from{ opacity: 0; transform: translateY(8px); } }
.step-nav{ display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); }
.step-nav .btn:only-child{ margin-left: auto; }
.step + .step{ margin-top: 56px; }
.js-steps .step + .step{ margin-top: 0; }

/* A line of the ledger. Wide screens: one row. Narrower: what it is, then the numbers. */
.lines{ border-top: 1px solid var(--line); }
.line{
  display: grid; align-items: end; gap: 10px 12px; padding: 12px 0;
  border-bottom: 1px solid var(--line);
  grid-template-columns: minmax(180px, 1fr) 132px minmax(120px, 170px) minmax(132px, 150px) 40px;
  grid-template-areas: "desc qty unit total remove";
}
.line-cost{
  grid-template-columns: 150px minmax(160px, 1fr) 132px minmax(120px, 170px) minmax(132px, 150px) 40px;
  grid-template-areas: "cat desc qty unit total remove";
}
.has-currency .line{
  grid-template-columns: minmax(180px, 1fr) 132px minmax(120px, 170px) 88px minmax(132px, 150px) 40px;
  grid-template-areas: "desc qty unit cur total remove";
}
.has-currency .line-cost{
  grid-template-columns: 150px minmax(160px, 1fr) 132px minmax(120px, 170px) 88px minmax(132px, 150px) 40px;
  grid-template-areas: "cat desc qty unit cur total remove";
}
.line.is-new{ animation: line-in 0.28s var(--ease); }
@keyframes line-in{ from{ opacity: 0; transform: translateY(-6px); } }
.line-cat{ grid-area: cat; }
.line-desc{ grid-area: desc; }
.line-qty{ grid-area: qty; min-width: 0; }
.line-unit{ grid-area: unit; }
.line-cur{ grid-area: cur; display: none; }
.has-currency .line-cur{ display: block; }
.line-total{ grid-area: total; text-align: right; }
.line-remove{ grid-area: remove; }
.line label{ min-width: 0; }
.line label > span, .line-total > span, .line-qty > span{ font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
.line-unit input{ text-align: right; font-variant-numeric: tabular-nums; }
.line-total output{ display: block; min-height: 44px; line-height: 44px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.line-remove{ display: grid; place-items: center; width: 40px; height: 44px; padding: 0; background: none; border: 0; border-radius: var(--radius-card); color: var(--ink-soft); cursor: pointer; transition: color 0.15s ease, background-color 0.15s ease; }
.line-remove:hover{ color: var(--terra-ink); background: rgba(192,126,88,0.14); }

.stepper{ display: grid; grid-template-columns: 38px minmax(0, 1fr) 38px; }
.stepper button{ display: grid; place-items: center; min-height: 44px; padding: 0; border: 1px solid var(--line-strong); background: var(--ivory-deep); color: var(--green); cursor: pointer; transition: background-color 0.15s ease; }
.stepper button:first-child{ border-right: 0; border-radius: var(--radius-card) 0 0 var(--radius-card); }
.stepper button:last-child{ border-left: 0; border-radius: 0 var(--radius-card) var(--radius-card) 0; }
.stepper button:hover{ background: rgba(11,74,60,0.12); }
.stepper button:focus-visible{ position: relative; z-index: 1; }
.stepper input:not([type="checkbox"]){ border-radius: 0; padding-left: 4px; padding-right: 4px; text-align: center; font-variant-numeric: tabular-nums; }

.quick{ display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.quick > span{ margin-right: 4px; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.chip{ display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: transparent; color: var(--green); font-size: 14px; font-weight: 700; cursor: pointer; transition: background-color 0.15s ease, border-color 0.15s ease; }
.chip:hover{ background: var(--wash); border-color: var(--green); }
.chip .icon{ width: 16px; height: 16px; }

.subtotal{ display: flex; justify-content: flex-end; align-items: baseline; gap: 16px; padding: 14px 52px 0 0; font-size: 15px; color: var(--ink-soft); }
.subtotal strong{ min-width: 132px; text-align: right; font-size: 17px; color: var(--ink); font-variant-numeric: tabular-nums; }
/* Under the expenses: the one button that adds a line, and the total. */
.lines-foot{ display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 14px; }
.lines-foot .subtotal{ padding-top: 0; margin-left: auto; }
.lines-foot .btn .icon{ width: 18px; height: 18px; }

.extras{ display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 32px; margin-top: 22px; }
.extras > .link{ min-height: 40px; }
.extras .breakdown{ padding: 8px 0 4px; min-width: min(560px, 80vw); }
.rates-block{ margin-top: 18px; }
.rates-block h3{ margin-bottom: 10px; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.rates{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; max-width: 420px; }

/* Bar segments lie on top of each other at full width and are moved and scaled into
   place, so a change never makes the page lay itself out again. */
.breakdown-bar{ position: relative; height: 12px; overflow: hidden; border-radius: 3px; background: var(--line); }
.breakdown-bar i, .share-bar i{ position: absolute; inset: 0; transform: scaleX(0); transform-origin: left center; transition: transform 0.4s var(--ease); }
.breakdown-legend{ display: flex; flex-wrap: wrap; gap: 6px 24px; margin-top: 10px; font-size: 14px; }
.breakdown-legend li{ display: flex; align-items: center; }
.breakdown-legend strong{ margin-left: 8px; font-variant-numeric: tabular-nums; }
.dot{ display: inline-block; flex: none; width: 10px; height: 10px; margin-right: 9px; border-radius: 50%; }
.cat-freelancer{ background: var(--green); }
.cat-travel{ background: var(--terra); }
.cat-hotel{ background: var(--terra-ink); }
.cat-meals{ background: var(--terra-soft); }
.cat-visa{ background: var(--green-mid); }
.cat-equipment{ background: var(--ink-soft); }
.cat-other{ background: rgba(42,31,26,0.3); }

/* Who goes: three large choices. */
.picks{ display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-width: 860px; }
.pick{ position: relative; display: block; cursor: pointer; }
.pick input, .pick button{ position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.pick-face{
  display: grid; gap: 4px; align-content: start;
  min-height: 96px; padding: 18px 20px 18px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-card);
  background: var(--white);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.pick-face::before{ content: ""; width: 22px; height: 11px; margin-bottom: 8px; border: 2px solid var(--line-strong); border-bottom: 0; border-radius: 999px 999px 0 0; transition: border-color 0.2s ease; }
.pick-face strong{ font-size: 17px; line-height: 1.25; }
.pick-face span{ font-size: 14px; color: var(--ink-soft); transition: color 0.2s ease; }
.pick:hover .pick-face{ border-color: var(--green); box-shadow: var(--lift); }
.pick input:checked + .pick-face, .pick button[aria-pressed="true"] + .pick-face{ background: var(--green); border-color: var(--green); color: var(--on-green); }
.pick input:checked + .pick-face::before, .pick button[aria-pressed="true"] + .pick-face::before{ border-color: var(--terra); }
.pick input:checked + .pick-face span, .pick button[aria-pressed="true"] + .pick-face span{ color: var(--on-green-soft); }
.pick input:focus-visible + .pick-face, .pick button:focus-visible + .pick-face{ outline: 2px solid var(--green); outline-offset: 2px; }
.picks + .notice{ margin: 18px 0 0; }

.compare{ margin-top: 26px; max-width: 860px; }
.compare[open] > summary{ margin-bottom: 6px; }
.compare-table{ width: 100%; border-collapse: collapse; }
.compare-table th, .compare-table td{ height: 48px; padding: 0 14px; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.compare-table thead th{ height: 34px; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.compare-table .num{ text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.compare-table tbody tr{ cursor: pointer; transition: background-color 0.15s ease; }
.compare-table tbody tr:hover{ background: var(--wash); }
.compare-table tbody tr.is-current{ background: rgba(11,74,60,0.1); }
.compare-table tbody tr.is-current th, .compare-table tbody tr.is-current td{ font-weight: 700; color: var(--green); }
.compare-pick{ min-height: 44px; padding: 0; background: none; border: 0; font-weight: inherit; color: inherit; text-align: left; cursor: pointer; }
.basis{ margin-top: 14px; font-size: 15px; color: var(--ink-soft); max-width: 68ch; }

/* Step 4: the review. Figures on the left, the decision and the text for the client on the right. */
.review{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 64px; margin-top: 14px; }
.review-col > .part:first-child{ margin-top: 0; }
.summary{ border-top: 1px solid var(--line); transition: opacity 0.2s ease; }
.summary > div{ display: flex; justify-content: space-between; align-items: baseline; gap: 6px 20px; min-height: 46px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.summary dt{ color: var(--ink-soft); }
.summary dd{ font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.summary-main dt{ font-weight: 700; color: var(--ink); }
.summary-main dd{ font-family: var(--font-title); font-weight: 600; font-size: 24px; line-height: 1.2; }
.summary .is-short dd{ color: var(--terra-ink); }
.summary.is-stale{ opacity: 0.45; }

.segs{ display: flex; flex-wrap: wrap; gap: 8px; }
.seg{ position: relative; display: block; cursor: pointer; }
.seg input{ position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.seg span{ display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); color: var(--green); font-size: 15px; font-weight: 700; transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
.seg:hover span{ background: var(--wash); border-color: var(--green); }
.seg input:checked + span{ background: var(--green); border-color: var(--green); color: var(--on-green); }
.seg input:focus-visible + span{ outline: 2px solid var(--green); outline-offset: 2px; }

.quote{ padding: 16px 18px; border-radius: var(--radius-card); background: var(--ivory-deep); font-size: 15px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.quote li:empty{ height: 10px; }
.quote li:first-child{ font-weight: 700; }
.quote-actions{ display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 14px; }
.quote-actions small{ flex: 1 1 220px; }

/* Step 3: the price finder. */
.split{ margin-bottom: 30px; }
.finder{ display: grid; gap: 22px; margin-top: 14px; padding: 28px 28px 20px; border-radius: var(--radius-panel); background: var(--ivory-deep); max-width: 620px; }
.finder-grid{ display: grid; gap: 20px; padding: 10px 0 8px; }
.price-field > span:first-child{ display: block; margin-bottom: 8px; font-size: 14px; font-weight: 700; }
.price-input{ display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius-card); background: var(--white); transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.price-input i{ padding-left: 16px; font-style: normal; font-family: var(--font-title); font-weight: 600; font-size: 24px; color: var(--ink-soft); }
.price-input input:not([type="checkbox"]){ min-height: 64px; padding: 8px 16px 8px 10px; border: 0; background: transparent; box-shadow: none; font-family: var(--font-title); font-weight: 600; font-size: 30px; font-variant-numeric: tabular-nums; }
.price-input:focus-within{ border-color: var(--green); box-shadow: 0 0 0 3px rgba(11,74,60,0.16); }
.split-toggle{ margin-top: 16px; }
.split-toggle .link{ font-weight: 400; }
.slider{ display: block; }
.slider > span{ display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.slider output{ font-weight: 700; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.finder .field{ max-width: 260px; }
.try-actions{ display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 10px; }

input[type="range"]{ -webkit-appearance: none; appearance: none; min-height: 36px; padding: 0; border: 0; background: transparent; cursor: pointer; box-shadow: none; }
input[type="range"]::-webkit-slider-runnable-track{ height: 4px; border-radius: 3px; background: var(--line-strong); }
input[type="range"]::-moz-range-track{ height: 4px; border-radius: 3px; background: var(--line-strong); }
input[type="range"]::-webkit-slider-thumb{ -webkit-appearance: none; width: 24px; height: 24px; margin-top: -10px; border: 3px solid var(--white); border-radius: 50%; background: var(--terra-deep); box-shadow: 0 1px 3px rgba(42,31,26,0.3); transition: transform 0.15s var(--ease); }
input[type="range"]::-moz-range-thumb{ width: 18px; height: 18px; border: 3px solid var(--white); border-radius: 50%; background: var(--terra-deep); box-shadow: 0 1px 3px rgba(42,31,26,0.3); }
input[type="range"]:hover::-webkit-slider-thumb, input[type="range"]:focus-visible::-webkit-slider-thumb{ transform: scale(1.12); }
input[type="range"]:disabled{ opacity: 0.4; cursor: default; }
input[type="range"]:focus-visible{ outline: 2px solid var(--green); outline-offset: 4px; border-radius: var(--radius-card); box-shadow: none; }

/* The answer strip: always in view along the bottom, joined to the rail. */
.strip{
  position: sticky; bottom: 0; z-index: 20;
  background: var(--green); color: var(--on-green);
  border-top: 1px solid var(--on-green-line);
  scrollbar-color: rgba(251,246,239,0.3) transparent;
}
.strip ::selection{ background: var(--terra); }
.strip :focus-visible{ outline-color: var(--on-green); }
.strip-note{ display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 10px 48px; background: rgba(216,154,120,0.2); border-bottom: 1px solid var(--on-green-line); font-size: 15px; }
.strip-note p{ flex: 1 1 320px; }
.strip-main{ display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 12px 40px; padding: 16px 48px 18px; max-width: 1180px; }
.strip-label{ font-size: 13px; font-weight: 700; color: var(--on-green-soft); }
.strip-figure{ font-family: var(--font-title); font-weight: 600; font-size: 30px; line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; transition: color 0.2s ease; }
.strip-figure.is-loss{ color: var(--terra-soft); }
.strip-sub{ min-height: 22px; font-size: 14px; color: var(--on-green-soft); }
.strip-totals{ display: grid; gap: 4px; padding-left: 40px; border-left: 1px solid var(--on-green-line); }
.strip-totals > div{ display: flex; justify-content: space-between; align-items: baseline; gap: 20px; }
.strip-totals dt, .strip-shares dt{ font-size: 14px; color: var(--on-green-soft); white-space: nowrap; }
.strip-totals dd, .strip-shares dd{ font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.strip-shares{ min-width: 0; padding-left: 40px; border-left: 1px solid var(--on-green-line); }
.strip-shares dl{ display: flex; flex-wrap: wrap; gap: 2px 28px; margin-top: 10px; }
.strip-shares dl > div{ display: flex; align-items: baseline; gap: 10px; }
.strip-shares dt{ display: flex; align-items: center; }
.share-bar{ position: relative; height: 8px; overflow: hidden; border-radius: 3px; max-width: 460px; }
.bar-reserve{ background: rgba(251,246,239,0.34); }
.bar-p0{ background: var(--ivory); }
.bar-p1{ background: var(--terra); }
.bar-p2{ background: var(--terra-deep); }
.strip-empty{ padding-left: 40px; border-left: 1px solid var(--on-green-line); font-size: 15px; color: var(--on-green-soft); max-width: 44ch; }
.strip-actions{ display: flex; align-items: center; gap: 14px; justify-self: end; }
.strip-more{ display: none; }
.strip.is-stale .strip-figure, .strip.is-stale .strip-sub, .strip.is-stale .strip-totals{ opacity: 0.45; }
.btn-on-green{ min-height: 38px; padding: 0 18px; font-size: 14px; }
.link-on-green{ color: var(--on-green); font-size: 14px; }
.link-on-green:hover{ color: var(--terra-soft); }
.sheet-tools{ display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); }

/* ---- Sign-in and other single-panel pages ---- */

.gate{ display: grid; grid-template-columns: minmax(300px, 40%) minmax(0, 1fr); min-height: 100vh; }
.gate-brand{ position: relative; overflow: hidden; display: grid; place-items: center; padding: 40px; background: var(--green); }
.gate-brand img{ position: relative; width: min(280px, 70%); height: auto; }
/* Two arcs rising behind the logo: the bridge in "Jembatan Budaya". */
.gate-brand::before, .gate-brand::after{
  content: ""; position: absolute; left: 50%; top: 62%;
  width: 190%; aspect-ratio: 1; transform: translateX(-50%);
  border: 1.5px solid rgba(216,154,120,0.5); border-radius: 50%;
}
.gate-brand::after{ top: 70%; border-color: rgba(251,246,239,0.14); }
.gate-panel{ align-self: center; width: 100%; max-width: 520px; padding: 48px 80px; display: grid; gap: 18px; }
.gate-panel h1{ margin-bottom: 4px; }
.gate-panel .stack{ max-width: 380px; }
.gate-panel .notice{ margin-bottom: 0; }

/* ---- Narrower screens ---- */

@media (max-width: 1240px){
  .line, .line-cost{ grid-template-columns: 132px 24px minmax(90px, 170px) minmax(0, 1fr) 40px; grid-template-areas: "desc desc desc desc desc" "qty unit unit total remove"; }
  .line-cost{ grid-template-areas: "cat cat desc desc desc" "qty unit unit total remove"; }
  .has-currency .line, .has-currency .line-cost{ grid-template-columns: 132px 24px minmax(90px, 170px) 88px minmax(0, 1fr) 40px; grid-template-areas: "desc desc desc desc desc desc" "qty unit unit cur total remove"; }
  .has-currency .line-cost{ grid-template-areas: "cat cat desc desc desc desc" "qty unit unit cur total remove"; }
  .strip-main{ grid-template-columns: auto minmax(0, 1fr) auto; }
  .strip-totals{ justify-self: start; }
  .strip-shares, .strip-empty{ grid-column: 1 / -1; grid-row: 2; padding-left: 0; border-left: 0; }
  .review{ grid-template-columns: minmax(0, 1fr); max-width: 620px; }
  .review-col + .review-col > .part:first-child{ margin-top: 34px; }
}

@media (max-width: 860px){
  .shell{ display: block; }
  .rail{ position: sticky; height: auto; padding: 0 16px; z-index: 40; }
  .rail-top{ display: flex; align-items: center; justify-content: space-between; min-height: 60px; }
  .rail-logo{ padding: 0; }
  .rail-logo img{ width: 68px; }
  .rail-toggle{ display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 1px solid rgba(251,246,239,0.4); border-radius: var(--radius-pill); font-weight: 700; font-size: 15px; cursor: pointer; }
  .rail-check{ pointer-events: auto; top: 8px; right: 16px; width: 80px; height: 44px; margin: 0; }
  .rail-check:focus-visible ~ .rail-top .rail-toggle{ outline: 2px solid var(--on-green); outline-offset: 2px; }
  .rail-nav{ display: none; margin-top: 0; padding: 4px 0 18px; max-height: calc(100vh - 60px); }
  .rail-check:checked ~ .rail-nav{ display: flex; }
  .rail-foot{ padding-top: 14px; }
  .page{ padding: 28px 20px 80px; }
  .page-sheet{ padding: 0; min-height: calc(100vh - 60px); }
  .sheet-body{ padding: 24px 20px 32px; }
  .page-sheet > .notice, .page-sheet > .reveal{ margin: 16px 20px 0; }

  .grid-3{ grid-template-columns: minmax(0, 1fr); }
  .request-fields{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finder{ padding: 22px 20px; }
  .reveal{ padding: 24px 20px; }

  .strip-note{ padding: 10px 20px; }
  .strip-main{ grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; padding: 12px 20px 14px; }
  .strip-figure{ font-size: 24px; }
  .strip-profit{ display: grid; grid-template-columns: minmax(0, 1fr); }
  .strip-sub{ min-height: 0; }
  .strip-actions .btn{ padding: 0 18px; }
  .strip-totals, .strip-shares, .strip-empty{ display: none; grid-column: 1 / -1; grid-row: auto; padding-left: 0; border-left: 0; }
  .strip.is-open .strip-totals{ display: grid; }
  .strip.is-open .strip-shares, .strip.is-open .strip-empty{ display: block; }
  .strip-more{ display: inline-flex; align-items: center; gap: 4px; justify-self: start; min-height: 36px; margin-top: 2px; padding: 0; background: none; border: 0; color: var(--on-green); font-size: 14px; font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: pointer; }
  .strip-more .icon{ transition: transform 0.2s var(--ease); }
  .strip.is-open .strip-more .icon{ transform: rotate(180deg); }

  .gate{ grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .gate-brand{ padding: 28px 24px; }
  .gate-brand img{ width: 150px; }
  .gate-panel{ align-self: start; padding: 36px 24px 48px; }
}

@media (max-width: 720px){
  h1, input.title-input{ font-size: 27px; }
  .grid-2{ grid-template-columns: minmax(0, 1fr); }
  .band{ grid-template-columns: minmax(0, 1fr); }
  .facts > div{ grid-template-columns: minmax(0, 1fr); }
  .reveal-codes{ grid-template-columns: auto; }
  .picks{ grid-template-columns: minmax(0, 1fr); }
  .pick-face{ min-height: 0; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; align-items: center; }
  .pick-face::before{ margin-bottom: 0; }
  .chip{ min-height: 44px; }
  .subtotal{ padding-right: 0; }
  .lines-foot .subtotal{ flex: 1 1 100%; justify-content: space-between; }
  .steps a{ grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 10px 8px 12px 0; }
  .step-t{ font-size: 15px; }
  .steps a::after{ right: 8px; }
  .step-n{ grid-row: auto; width: 30px; height: 30px; }
  .step-v{ display: none; }

  /* A line becomes a small form of its own, with every label shown. */
  .line, .line-cost, .has-currency .line, .has-currency .line-cost{ grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 40px; grid-template-areas: "desc desc remove" "qty unit unit" "total total total"; padding: 16px 0; }
  .line-cost, .has-currency .line-cost{ grid-template-areas: "cat cat remove" "desc desc desc" "qty unit unit" "total total total"; }
  .has-currency .line{ grid-template-areas: "desc desc remove" "qty unit unit" "cur total total"; }
  .has-currency .line-cost{ grid-template-areas: "cat cat remove" "desc desc desc" "qty unit unit" "cur total total"; }
  .price-input input:not([type="checkbox"]){ font-size: 27px; }
  .hello{ margin-bottom: 40px; }

  .rows li{ grid-template-columns: minmax(0, 1fr) auto; }
  .rows .tag{ justify-self: start; grid-row: 2; }
  .rows .row-num{ grid-row: 1 / span 2; grid-column: 2; }

  /* The forecast table turns into one block per forecast. */
  .table:not(.table-plain) thead{ position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table:not(.table-plain), .table:not(.table-plain) tbody{ display: block; }
  .table:not(.table-plain) tr{ display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .table:not(.table-plain) th, .table:not(.table-plain) td{ display: block; padding: 0; border: 0; text-align: left; }
  .table:not(.table-plain) tbody th{ grid-column: 1 / -1; font-size: 17px; }
  .table:not(.table-plain) td::before{ content: attr(data-label); display: block; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
  .table:not(.table-plain) .num{ text-align: left; }
}

/* On wide screens the first line's labels are the column headings; the rest are for screen readers. */
@media (min-width: 721px){
  .line + .line label > span, .line + .line .line-total > span, .line + .line .line-qty > span{
    position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{ transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print{
  .rail, .actions, .skip, .step-nav, .quick, .lines-foot .btn, .quote-actions, .sheet-tools{ display: none; }
  .shell{ display: block; }
  .strip{ position: static; }
  .step[hidden]{ display: block !important; }
}
