/* OnService public site. Same paper, ink and typefaces as the app. */
@font-face { font-family: 'Spectral'; font-style: normal; font-weight: 400; font-display: swap; src: url('spectral-400.woff') format('woff'); }
@font-face { font-family: 'Spectral'; font-style: italic; font-weight: 400; font-display: swap; src: url('spectral-400i.woff') format('woff'); }
@font-face { font-family: 'Spectral'; font-style: normal; font-weight: 500; font-display: swap; src: url('spectral-500.woff') format('woff'); }
@font-face { font-family: 'Spectral'; font-style: normal; font-weight: 600; font-display: swap; src: url('spectral-600.woff') format('woff'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('IBMPlexMono-Regular-Latin1.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('IBMPlexMono-Medium-Latin1.woff2') format('woff2'); }

:root {
  --paper: #F6F4EF; --line: #E4E0D5; --line-strong: #CFCABC; --ink: #20242B; --soft: #5B5F66; --surface: #FFFFFF;
  --teal: #1F6F5C; --teal-deep: #185748; --rust: #B4482B; --indigo: #4A4E9C;
  --serif: 'Spectral', Georgia, 'Times New Roman', serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--serif); font-size: 1.1875rem; line-height: 1.62; font-variant-numeric: lining-nums; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--teal-deep); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 3px; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-weight: 500; margin: 0; text-wrap: balance; }
.wrap { max-width: 71rem; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: 0.6rem 1rem; z-index: 10; }
.skip:focus { left: var(--gutter); top: 0.5rem; }

/* ---- top bar ---- */
.top { display: flex; align-items: center; gap: 1rem 1.6rem; flex-wrap: wrap; padding: 1.15rem 0; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--teal); font-weight: 600; font-size: 1.6rem; line-height: 1; letter-spacing: 0.005em; }
.brand img { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); }
.top nav { display: flex; align-items: center; gap: 0.4rem 1.5rem; flex-wrap: wrap; margin-left: auto; font-family: var(--mono); font-size: 0.875rem; }
.top nav a { color: var(--ink); text-decoration: none; padding: 0.3rem 0; }
.top nav a:hover { color: var(--teal); text-decoration: underline; }
.top nav a[aria-current="page"] { color: var(--teal); }

/* ---- buttons ---- */
.btn { display: inline-block; font-family: var(--mono); font-size: 0.9375rem; font-weight: 500; line-height: 1.2; padding: 0.85rem 1.3rem; border-radius: 8px; text-decoration: none; border: 1.5px solid var(--ink); color: var(--ink); background: var(--surface); }
.btn:hover { color: var(--ink); background: #EFEDE6; }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.primary:hover { background: var(--teal-deep); border-color: var(--teal-deep); color: #fff; }
.top nav a.btn { padding: 0.6rem 1rem; font-size: 0.875rem; color: #fff; }
.top nav a.btn:hover { text-decoration: none; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1rem; margin-top: 1.9rem; }
.aside-note { font-family: var(--mono); font-size: 0.8125rem; color: var(--soft); line-height: 1.5; margin: 1rem 0 0; }

/* ---- hero ---- */
.hero { padding: clamp(2.6rem, 7vw, 5.2rem) 0 clamp(2.5rem, 5vw, 4rem); }
.hero h1 { font-size: clamp(2.3rem, 5.5vw, 4.05rem); line-height: 1.06; letter-spacing: -0.018em; }
.hero h1 span { display: block; }
.hero h1 span + span { color: var(--soft); }
.lede { font-size: clamp(1.2rem, 1.9vw, 1.4rem); line-height: 1.5; max-width: 37rem; margin: 1.6rem 0 0; }

.week { margin: clamp(2.6rem, 6vw, 4.2rem) 0 0; }
.define { max-width: 44rem; margin: 0 0 1.6rem; padding-left: 1rem; border-left: 3px solid var(--teal); font-size: 1.125rem; line-height: 1.5; }
.define b { font-weight: 600; }
.week-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.4rem 1.5rem; margin-bottom: 0.7rem; font-family: var(--mono); font-size: 0.8125rem; color: var(--soft); }
.week-head strong { color: var(--ink); font-weight: 500; }
.key { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; }
.key i { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 2px; margin-right: 0.4rem; vertical-align: -0.08rem; }
.key .k-line { height: 0; width: 1.3rem; border-top: 2.5px solid var(--ink); border-radius: 0; vertical-align: 0.25rem; }
.chart { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: clamp(0.5rem, 1.5vw, 1.1rem) clamp(0.3rem, 1.2vw, 1rem) clamp(0.3rem, 1vw, 0.7rem); }
.chart svg { width: 100%; height: auto; font-family: var(--mono); }
.chart .narrow { display: none; }
.chart text { fill: var(--soft); }
.chart .tired { fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.chart .under { fill: var(--teal); opacity: 0.1; }
.chart .mark circle { fill: var(--surface); stroke: var(--ink); stroke-width: 1.5; }
.chart .mark text { fill: var(--ink); font-weight: 500; text-anchor: middle; }
@media (prefers-reduced-motion: no-preference) {
  .chart .tired { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.4s cubic-bezier(0.45, 0, 0.25, 1) 0.25s forwards; }
  .chart .under, .chart .mark { opacity: 0; animation: appear 0.7s ease 2.3s forwards; }
  .chart .under { animation-name: appear-soft; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }
@keyframes appear-soft { to { opacity: 0.1; } }
.notes { list-style: none; counter-reset: note; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem clamp(1.4rem, 3vw, 2.6rem); }
.notes li { counter-increment: note; position: relative; padding-left: 2.3rem; font-size: 1.0625rem; line-height: 1.5; }
.notes li::before { content: counter(note); position: absolute; left: 0; top: 0.12rem; width: 1.55rem; height: 1.55rem; border: 1.5px solid var(--ink); border-radius: 50%; font-family: var(--mono); font-size: 0.8125rem; font-weight: 500; line-height: 1.38rem; text-align: center; font-variant-numeric: lining-nums; }
.notes b { font-weight: 600; }

/* ---- sections ---- */
.band { border-top: 1px solid var(--line); padding: clamp(3.2rem, 8vw, 6rem) 0; }
.band h2 { font-size: clamp(1.9rem, 3.8vw, 2.7rem); line-height: 1.12; letter-spacing: -0.012em; max-width: 30ch; }
.band .intro { max-width: 37rem; margin: 1.1rem 0 0; font-size: 1.25rem; line-height: 1.5; }
.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.points { margin: 2.2rem 0 0; }
.points dt { font-weight: 600; margin-top: 1.5rem; }
.points dt:first-child { margin-top: 0; }
.points dd { margin: 0.15rem 0 0; max-width: 34rem; }
.phones { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(0.8rem, 2vw, 1.6rem); align-items: start; position: sticky; top: 1.5rem; }
.phones figure, .shot { margin: 0; }
.phones img { border-radius: clamp(14px, 2.4vw, 26px); border: 1px solid var(--line-strong); box-shadow: 0 18px 40px -22px rgba(32, 36, 43, 0.35); }
.phones figure + figure { margin-top: clamp(2rem, 6vw, 4.5rem); }
figcaption { font-family: var(--mono); font-size: 0.8125rem; color: var(--soft); line-height: 1.5; margin-top: 0.75rem; }
.shot { margin-top: clamp(2rem, 5vw, 3.2rem); }
.shot img { width: 100%; border-radius: 12px; border: 1px solid var(--line-strong); box-shadow: 0 24px 50px -30px rgba(32, 36, 43, 0.35); }
.cols { columns: 2; column-gap: clamp(2rem, 5vw, 4.5rem); margin: clamp(2rem, 5vw, 3.2rem) 0 0; padding: 0; list-style: none; }
.cols li { break-inside: avoid; padding: 0.95rem 0; border-top: 1px solid var(--line); }
.cols b { font-weight: 600; }
.plain { max-width: 37rem; margin-top: 2rem; }

.steps { counter-reset: step; list-style: none; margin: 2.4rem 0 0; padding: 0; max-width: 44rem; }
.steps li { counter-increment: step; position: relative; padding: 0 0 1.7rem 3.6rem; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -0.15rem; font-size: 2.1rem; line-height: 1; font-weight: 500; color: var(--teal); font-variant-numeric: lining-nums; }
.steps li::after { content: ''; position: absolute; left: 0.62rem; top: 2.3rem; bottom: 0.35rem; border-left: 1px solid var(--line-strong); }
.steps li:last-child::after { display: none; }
.steps b { font-weight: 600; display: block; }

.ledger { margin: 2.4rem 0 0; border-top: 1px solid var(--line-strong); }
.ledger > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 0.4rem clamp(1.5rem, 4vw, 3.5rem); padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.ledger dt { font-weight: 600; }
.ledger dd { margin: 0; }
.ledger .where { font-family: var(--mono); font-size: 0.8125rem; display: block; margin-bottom: 0.3rem; font-variant-numeric: lining-nums; }
.ledger .stays { color: var(--teal); }
.ledger .once { color: var(--soft); }
.ledger .shared { color: var(--indigo); }

.closing { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); }
.closing h3 { font-size: 1.5rem; line-height: 1.2; }
.closing p { margin: 0.7rem 0 0; max-width: 30rem; }

/* ---- footer ---- */
.foot { border-top: 1px solid var(--line); padding: 2.4rem 0 3.5rem; font-family: var(--mono); font-size: 0.8125rem; color: var(--soft); line-height: 1.65; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; margin-bottom: 1.3rem; }
.foot a { color: var(--ink); }
.foot p { max-width: 46rem; margin: 0 0 0.6em; }

/* ---- long text pages ---- */
.doc { padding-top: clamp(2.4rem, 6vw, 4.5rem); padding-bottom: clamp(3rem, 7vw, 5rem); }
.doc .inner { max-width: 41rem; }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3.3rem); line-height: 1.08; letter-spacing: -0.015em; }
.doc .dated { font-family: var(--mono); font-size: 0.8125rem; color: var(--soft); margin: 1rem 0 2.2rem; font-variant-numeric: lining-nums; }
.doc h2 { font-size: 1.55rem; line-height: 1.2; margin: 2.6rem 0 0.7rem; }
.doc h3 { font-size: 1.1875rem; font-weight: 600; margin: 1.6rem 0 0.3rem; }
.doc ul { padding-left: 1.2rem; margin: 0 0 1em; }
.doc li { margin-bottom: 0.45em; }
.doc .short { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.3rem 1.5rem 0.5rem; margin-bottom: 0.5rem; }
.fill { background: #FBE9B5; padding: 0 0.25em; border-radius: 3px; font-style: normal; }

@media (max-width: 860px) {
  .split, .closing { grid-template-columns: 1fr; }
  .notes { grid-template-columns: 1fr; }
  .cols { columns: 1; }
  .phones { max-width: 30rem; position: static; }
}
@media (max-width: 640px) {
  body { font-size: 1.125rem; }
  .chart .wide { display: none; }
  .chart .narrow { display: block; }
  .ledger > div { grid-template-columns: 1fr; }
  .top { gap: 0.5rem 1.4rem; padding-bottom: 0.9rem; }
  .top nav { display: contents; }
  .top nav a { order: 3; font-family: var(--mono); font-size: 0.8125rem; }
  .top nav a.btn { order: 1; margin-left: auto; padding: 0.55rem 0.85rem; }
  .top nav::before { content: ''; order: 2; flex-basis: 100%; height: 0; }
  .top nav .optional { display: none; }
  .brand { font-size: 1.45rem; }
}
