/* ============================================================================
   Solvitur — site stylesheet (solvitursoftware.com)

   Iron gall: one palette, two grounds, no accent. Colour on this site belongs
   to the product frames only, where it means a service or a status. The
   reserved status hues — green for on call now, amber for time off, red for
   conflict — are never spent on brand or chrome, so a screenshot of the app
   can never be confused with decoration around it.

   Tokens mirror app/static/platform.css where they describe the product, so a
   frame is a screenshot of the app rather than a pastiche of it. Square
   corners everywhere: this is a product made of tables, and a table cell has
   no radius.

   The ground follows the system's prefers-color-scheme. There is no toggle.

   Contents
     1  Tokens
     2  Reset and base
     3  Layout
     4  Typography
     5  Controls
     6  Forms
     7  Tables
     8  Disclosure
     9  Product frame          — the app, drawn in the app's own tokens
    10  Landing page
    11  Document pages         — statements, policies, long-form
    12  Phone
    13  Print
   ========================================================================= */


/* 1  Tokens ---------------------------------------------------------------- */

:root {
  --bg: #faf8f4;
  --bg2: #f2eee7;
  --ink: #14161f;
  --muted: #41414a;
  --dim: #5f5b52;
  --line: #ddd7cb;
  --line2: #c9c2b4;
  --ink3: #8a8f98;

  --font-ui: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Source Serif 4', Georgia, serif;
  --font-mark: 'Atkinson Hyperlegible Next', 'Atkinson Hyperlegible', system-ui, sans-serif;
  --font-grid: 'Atkinson Hyperlegible Mono', ui-monospace, Menlo, monospace;

  /* The product frame keeps the platform's values in both grounds. */
  --f-surface: #ffffff;
  --f-s1: #f6f6f4;
  --f-s2: #eeeeeb;
  --f-ink: #1b1d22;
  --f-ink2: #5b6068;
  --f-ink3: #8a8f98;
  --f-line1: #e2e3e0;
  --f-line2: #c3c5c1;

  --svc-night: #263553;
  --svc-day: #3a5a8c;
  --svc-gs: #4a3560;
  --svc-unit: #2f5d50;
  --status-now: #0b7a55;
  --status-pto: #a05a00;
  --status-conflict: #b3261e;
  --pto-hatch: repeating-linear-gradient(135deg, transparent 0 3px, rgba(160, 90, 0, .35) 3px 5px);

  /* 4px base, matching the platform's scale. */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px;
  --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;

  --gutter: clamp(20px, 4vw, 56px);
  --measure: 72ch;
  --sticky-clear: 96px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161f;
    --bg2: #0e121a;
    --ink: #ece7de;
    --muted: #c4bfb5;
    --dim: #a49e94;
    --line: #232937;
    --line2: #2f3545;
    --ink3: #6b7079;
  }
}


/* 2  Reset and base -------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  color-scheme: light dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 var(--font-ui);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
em { font-style: italic; }

a {
  color: inherit;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover { opacity: .68; }

input, textarea, button, select { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
::selection { background: var(--ink); color: var(--bg); }

/* Anchored targets clear the sticky masthead. */
[id] { scroll-margin-top: var(--sticky-clear); }

.vh {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: absolute; left: var(--s4); top: var(--s2); z-index: 20;
  padding: var(--s2) var(--s3);
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--ink); text-decoration: none; font-weight: 500;
}
.skip:not(:focus) {
  width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); padding: 0; border: 0;
}

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


/* 3  Layout ---------------------------------------------------------------- */

.wrap { max-width: 1240px; margin: 0 auto; }
.wrap-narrow { max-width: 820px; margin: 0 auto; }
.pad { padding-left: var(--gutter); padding-right: var(--gutter); }
.measure { max-width: var(--measure); }
.stack { display: grid; gap: var(--s4); align-content: start; }
.row-wrap { display: flex; flex-wrap: wrap; gap: var(--s4) var(--s5); }
.rule { border: 0; border-top: 1px solid var(--line); margin: var(--s6) 0; }

.masthead {
  position: sticky; top: 0; z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.masthead .row {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 14px 28px;
  padding-top: var(--s4); padding-bottom: var(--s4);
}

.nav {
  display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5);
  margin-left: auto; font-size: 14px; color: var(--dim);
}
.nav a { text-decoration: none; }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 500; }

.colophon {
  display: flex; justify-content: space-between; flex-wrap: wrap;
  gap: var(--s3) var(--s6);
  padding-top: var(--s5); padding-bottom: var(--s7);
  border-top: 1px solid var(--line);
  font-size: 13.5px; color: var(--dim);
  background: var(--bg2);
}
.colophon .mark {
  font: 600 13.5px/1.4 var(--font-mark);
  letter-spacing: -0.008em; color: var(--muted);
}


/* 4  Typography ------------------------------------------------------------ */

.wordmark {
  font: 600 20px/1 var(--font-mark);
  letter-spacing: -0.012em;
  text-decoration: none;
}
.wordmark:hover { opacity: 1; }

h1 {
  font: 600 clamp(38px, 5vw, 60px)/1.05 var(--font-display);
  letter-spacing: -0.02em;
  text-wrap: pretty;
}
h2 {
  font: 600 clamp(26px, 2.6vw, 32px)/1.15 var(--font-display);
  letter-spacing: -0.015em;
  text-wrap: pretty;
}
h3 { font-size: 16px; font-weight: 600; }

.page-title {
  font: 600 clamp(30px, 4vw, 44px)/1.08 var(--font-display);
  letter-spacing: -0.02em; text-wrap: pretty;
}

.lede {
  max-width: 56ch;
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.6; color: var(--muted);
  text-wrap: pretty;
}
.body { color: var(--muted); font-size: 15px; text-wrap: pretty; }
.note { font-size: 14px; color: var(--dim); }
.caption { font-size: 13.5px; line-height: 1.55; color: var(--dim); text-wrap: pretty; }

.eyebrow {
  font: 500 11px/1 var(--font-ui);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--dim);
}


/* 5  Controls -------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  flex: none; white-space: nowrap;
  min-height: 40px; padding: 0 18px;
  border: 1px solid currentColor; background: none;
  text-decoration: none; font-size: 14px; font-weight: 500;
  cursor: pointer;
}
.btn:hover { opacity: .68; }

.btn-fill {
  background: var(--ink); color: var(--bg); border-color: var(--ink);
  min-height: 50px; padding: 0 26px; font-size: 16px; font-weight: 600;
}
.btn-fill:hover { opacity: .88; }

.btn-quiet { border-color: var(--line2); color: var(--dim); }

.actions {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--s4) 22px;
}


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

form {
  display: grid; gap: 14px; align-content: start;
  border: 1px solid var(--line2);
  padding: clamp(22px, 3vw, 30px);
}
label { display: grid; gap: var(--s2); }
label .lab {
  font: 500 11px/1 var(--font-ui);
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--dim);
}

/* The field sits on the page surface, a step off its panel, with the
   platform's own ink-3 border — 3:1 against both, per WCAG 1.4.11. */
input, textarea, select {
  min-height: 46px; padding: 0 13px; width: 100%;
  border: 1px solid var(--ink3);
  background: var(--bg); color: var(--ink);
  font-size: 16px; border-radius: 0;
}
textarea { padding: 11px 13px; min-height: 84px; resize: vertical; }

form button {
  min-height: 50px; border: 0;
  background: var(--ink); color: var(--bg);
  font-weight: 600; font-size: 16px; cursor: pointer;
}
form button:hover { opacity: .88; }
form .note { font-size: 13px; }


/* 7  Tables ---------------------------------------------------------------- */

.tally { border-collapse: collapse; width: 100%; font-size: 15px; }
.tally caption {
  text-align: left; padding-bottom: var(--s3);
  font: 500 11px/1 var(--font-ui);
  letter-spacing: .13em; text-transform: uppercase; color: var(--dim);
}
.tally td { padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.tally td + td {
  text-align: right; font-variant-numeric: tabular-nums; font-weight: 600;
}
.tally tr:last-child td { color: var(--dim); }

.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }


/* 8  Disclosure ------------------------------------------------------------ */

details { border-bottom: 1px solid var(--line); }
summary {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: var(--s4) var(--s5); flex-wrap: wrap;
  padding: 20px 0; cursor: pointer; list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary h2 { font-size: clamp(20px, 2vw, 24px); line-height: 1.2; }
summary .hint {
  display: flex; align-items: baseline; gap: 14px;
  font-size: 13.5px; color: var(--dim);
}
summary .pm {
  font: 400 18px/1 var(--font-ui); color: var(--ink);
  width: 14px; text-align: center;
}
summary .pm::before { content: "+"; }
details[open] summary .pm::before { content: "\2212"; }


/* 9  Product frame --------------------------------------------------------- */
/* Everything below draws the app. It does not follow the site's ground: the
   platform is black on white so a tenant's colour is the only colour on it,
   and a screenshot that changed with the marketing theme would be a lie. */

.frame {
  border: 1px solid var(--f-line2);
  background: var(--f-surface); color: var(--f-ink);
  font-family: var(--font-mark);
  box-shadow: 0 1px 0 var(--line2);   /* holds an edge on the paper ground */
}
.frame-bar {
  display: flex; align-items: center; gap: 9px;
  min-height: 34px; padding: 0 13px;
  background: var(--f-s1); border-bottom: 1px solid var(--f-line2);
  font: 600 10px/1 var(--font-grid);
  letter-spacing: .09em; text-transform: uppercase; color: var(--f-ink2);
}
.frame-bar .live { width: 7px; height: 7px; flex: none; background: var(--status-now); }
.frame-bar .right { margin-left: auto; }

.sheet { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.sheet th, .sheet td { text-align: left; white-space: nowrap; }
.sheet thead th {
  padding: 6px 8px;
  background: var(--f-s1); border-bottom: 1px solid var(--f-line2);
  font: 600 10.5px/1.2 var(--font-grid); color: var(--f-ink2);
}
.sheet thead th.who { padding-left: 10px; padding-right: 10px; }
.sheet thead th.wk { background: var(--f-s2); }
.sheet thead th b { font-weight: 600; color: var(--f-ink2); }
.sheet tbody th {
  padding: 4px 10px; border-bottom: 1px solid var(--f-line1);
  font-weight: 600; font-size: 12.5px;
}
.sheet tbody td { padding: 3px 4px; border-bottom: 1px solid var(--f-line1); }
.sheet tbody tr:last-child th,
.sheet tbody tr:last-child td { border-bottom: 0; }
.sheet td.wk { background: var(--f-s1); }

.cell {
  display: grid; place-items: center; height: 24px;
  font: 600 10px/1 var(--font-grid); color: #fff;
}
.cell.off { background: none; color: var(--f-ink3); }   /* em dash is the signal */
.cell.night { background: var(--svc-night); }
.cell.day { background: var(--svc-day); }
.cell.gs { background: var(--svc-gs); }
.cell.unit {
  background: var(--svc-unit);
  display: flex; align-items: center; justify-content: flex-start; padding-left: 9px;
}
.cell.pto { background: var(--pto-hatch); color: var(--status-pto); }
.cell.locked { box-shadow: inset 0 3px 0 var(--f-ink); }

.legend {
  display: flex; flex-wrap: wrap; gap: var(--s2) 18px;
  padding: 11px 13px;
  border-top: 1px solid var(--f-line1); background: var(--f-s1);
  font-size: 11.5px; color: var(--f-ink2);
}
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 10px; display: block; flex: none; }
.legend i.pto { background: var(--pto-hatch); border: 1px solid var(--f-line1); }

.inway {
  border: 1px solid var(--f-line2);
  background: var(--f-surface); color: var(--f-ink);
  font-family: var(--font-mark);
}
.inway .flag { height: 4px; background: var(--status-conflict); }
.inway .in { padding: 17px 19px; }
.inway p.lead { font-weight: 600; font-size: 13.5px; }
.inway ul {
  margin-top: 13px; display: grid; gap: 1px;
  background: var(--f-line1); border: 1px solid var(--f-line1);
}
.inway li {
  background: var(--f-surface); padding: 10px 12px;
  font: 600 12px/1.3 var(--font-grid);
}
.inway p.after { margin-top: 14px; font-size: 12.5px; color: var(--f-ink2); }


/* 10  Landing page --------------------------------------------------------- */

.hero {
  display: flex; flex-wrap: wrap; gap: var(--s7); align-items: center;
  padding-top: clamp(48px, 6vw, 80px);
  padding-bottom: clamp(40px, 5vw, 64px);
}
.hero .say { flex: 1 1 380px; min-width: 0; }
.hero .show { flex: 1.25 1 480px; min-width: 0; }
.hero .lede { margin-top: 26px; }
.hero .actions { margin-top: 34px; }
.hero .caption { margin-top: var(--s4); }

.facts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.facts span {
  border: 1px solid var(--line2); padding: var(--s2) 13px;
  font-size: 13px; color: var(--dim);
}

.split { display: flex; flex-wrap: wrap; border-top: 1px solid var(--line); }
.split > div {
  flex: 1 1 400px; min-width: 0;
  padding: clamp(36px, 4vw, 52px) var(--gutter);
}
.split > div:first-child { border-right: 1px solid var(--line); }
.split .body { margin-top: 18px; }
.split .inway { margin-top: 28px; }

.ledger { margin-top: var(--s5); }
.ledger li {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--line);
}
.ledger li:last-child { border-bottom: 0; }
.ledger .rule { font-size: 15px; border: 0; margin: 0; }
.ledger .rule small { display: block; margin-top: var(--s1); font-size: 13px; color: var(--dim); }
.ledger .holds {
  font: 600 11px/1 var(--font-ui);
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink); white-space: nowrap;
}

.sections {
  padding-top: clamp(36px, 4vw, 52px); padding-bottom: var(--s2);
  border-top: 1px solid var(--line);
}

.steps { padding-bottom: 28px; }
.steps li {
  display: flex; flex-wrap: wrap; gap: var(--s2) 20px;
  padding: 15px 0; border-top: 1px solid var(--line);
}
.steps .n {
  flex: 0 0 42px; padding-top: 6px;
  font: 400 11px/1 var(--font-ui); letter-spacing: .14em; color: var(--dim);
}
.steps .t { flex: 1 1 300px; min-width: 0; }
.steps p { margin-top: 6px; max-width: 70ch; color: var(--muted); font-size: 15px; }

.two {
  display: flex; flex-wrap: wrap; gap: var(--s5) var(--s7);
  padding: 6px 0 28px; align-items: flex-start;
}
.two .prose { flex: 1.3 1 340px; min-width: 0; display: grid; gap: 14px; color: var(--muted); font-size: 15px; }
.two .prose p { text-wrap: pretty; }
.two .tally { flex: 1 1 260px; min-width: 0; }

.plain { padding: 6px 0 28px; }
.plain li {
  display: flex; flex-wrap: wrap; gap: 6px var(--s6);
  padding: 15px 0; border-top: 1px solid var(--line);
}
.plain strong { flex: 1 1 280px; min-width: 0; font-weight: 600; font-size: 15px; }
.plain span { flex: 1.3 1 340px; min-width: 0; color: var(--muted); font-size: 15px; }

.pilot {
  display: flex; flex-wrap: wrap; gap: var(--s7) 56px;
  padding-top: clamp(44px, 5vw, 64px);
  padding-bottom: clamp(44px, 5vw, 64px);
  margin-top: clamp(36px, 4vw, 52px);
  background: var(--bg2); border-top: 1px solid var(--line);
}
.pilot .say { flex: 1 1 380px; min-width: 0; }
.pilot p { max-width: 62ch; color: var(--muted); text-wrap: pretty; }
.pilot h2 {
  margin-top: var(--s6);
  font-size: clamp(28px, 3vw, 36px); line-height: 1.12; letter-spacing: -0.02em;
}
.pilot form { flex: 1 1 340px; min-width: 0; }
.mt-4 { margin-top: var(--s4); }
.mt-5 { margin-top: 20px; }


/* 11  Document pages ------------------------------------------------------- */
/* The data-handling statement, a pricing page, a 404. Long-form measured to
   72 characters, lists that read as lists, nothing else needed. */

.doc { padding-top: clamp(40px, 5vw, 72px); padding-bottom: var(--s8); }
.doc-head { padding-bottom: var(--s5); border-bottom: 2px solid var(--ink); }
.doc-head .eyebrow + .page-title { margin-top: var(--s4); }
.doc-head .lede { margin-top: var(--s4); }

.prose { max-width: var(--measure); }
.prose > * + * { margin-top: var(--s4); }
.prose h2 { margin-top: var(--s7); font-size: clamp(22px, 2.2vw, 27px); }
.prose h3 { margin-top: var(--s5); }
.prose p { color: var(--muted); text-wrap: pretty; }
.prose a { color: var(--ink); }
.prose ul, .prose ol { display: grid; gap: var(--s2); color: var(--muted); }
.prose ul li { padding-left: 1.2em; position: relative; }
.prose ul li::before {
  content: "\2014"; position: absolute; left: 0; color: var(--dim);
}
.prose ol { counter-reset: n; }
.prose ol li { padding-left: 1.6em; position: relative; counter-increment: n; }
.prose ol li::before {
  content: counter(n); position: absolute; left: 0;
  font-variant-numeric: tabular-nums; color: var(--dim);
}
.prose blockquote {
  padding-left: var(--s4); border-left: 2px solid var(--line2);
  font: 400 19px/1.45 var(--font-display);
}
.prose dl { display: grid; gap: var(--s3); }
.prose dt { font-weight: 600; }
.prose dd { margin: 0; color: var(--muted); }

.slab {
  min-height: 70vh;
  display: grid; align-content: center; justify-items: start;
  gap: var(--s4);
  padding-top: var(--s8); padding-bottom: var(--s8);
}


/* 12  Phone ---------------------------------------------------------------- */

@media (max-width: 860px) {
  .split > div:first-child {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .masthead .row { gap: var(--s3) var(--s4); padding-top: var(--s3); padding-bottom: var(--s3); }
  .nav { order: 3; flex-basis: 100%; margin-left: 0; gap: var(--s2) 18px; }

  .hero { gap: var(--s6); padding-top: var(--s6); }

  /* Every control is a 44px target. */
  .btn, form button { min-height: 44px; }
  input, textarea, select { min-height: 44px; }
  .btn-fill { width: 100%; min-height: 50px; }
  .actions { gap: var(--s3); }

  .frame-bar { font-size: 9.5px; }
  summary { padding: var(--s4) 0; }
  .steps .n { flex-basis: 100%; padding-top: 0; }
  .plain strong, .plain span { flex-basis: 100%; }
  .two { gap: 20px; }
  .doc { padding-top: var(--s6); }
}


/* 13  Print ---------------------------------------------------------------- */
/* Statements and policies get printed and attached to procurement email. */

@media print {
  :root {
    --bg: #ffffff; --bg2: #ffffff;
    --ink: #14161f; --muted: #33333a; --dim: #55555e;
    --line: #d5d5d5; --line2: #b8b8b8;
  }
  .masthead { position: static; }
  .skip, .nav, form { display: none; }
  .frame { box-shadow: none; }
  .split > div:first-child { border-right: 0; }
  details { border-bottom: 1px solid var(--line); }
  details > summary { list-style: none; }
  details:not([open]) > *:not(summary) { display: revert; }
  summary .pm, summary .hint { display: none; }
  .prose, .measure { max-width: none; }
  a { text-decoration: none; }
  .steps li, .plain li, .ledger li { break-inside: avoid; }
}
