/* Todiste story: Twin-Frame Witness Seam layout. Warm archival copper-amber accent on deep camera graphite,
   a split seam header, step rail, responsive 390px-safe tables, paired-capture workflow band, twin phone views,
   and balanced limits panels. Chromium 67 safe (no flex gap, clamp/min/max, inset, logical padding, or JS). */
@font-face {
  font-family: 'TD UI';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'TD Display';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/assets/fonts/space-grotesk-latin.woff2') format('woff2');
}

body.page-todiste {
  --head: 'TD Display', 'Segoe UI', Roboto, Arial, sans-serif;
  --body: 'TD UI', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --bg: #0C0F14;
  --surface: #141922;
  --raised: #1B222F;
  --bar: rgba(12, 15, 20, .95);
  --hair: rgba(255, 255, 255, .09);
  --hair-2: rgba(255, 255, 255, .17);
  --text: #EFF2F7;
  --text-2: #B6BFCE;
  --muted: #8B96AA;
  --accent: #EE9B54;
  --accent-ink: #231102;
  --accent-soft: rgba(238, 155, 84, .13);
  --td-ok: #7FA9FF;
  --td-ok-soft: rgba(127, 169, 255, .14);
  --live: #34D399;
}

@media (prefers-color-scheme: light) {
  body.page-todiste {
    --bg: #0C0F14;
    --surface: #141922;
    --raised: #1B222F;
    --bar: rgba(12, 15, 20, .95);
    --hair: rgba(255, 255, 255, .09);
    --hair-2: rgba(255, 255, 255, .17);
    --text: #EFF2F7;
    --text-2: #B6BFCE;
    --muted: #8B96AA;
    --live: #34D399;
  }
}

/* Frame and reading column */
.page-todiste main { padding-bottom: 52px; }
.page-todiste main .wrap { max-width: 828px; }
.page-todiste main > .wrap:first-child { padding-top: 40px; }
.page-todiste .crumb { margin: 0 0 28px; font-size: 14px; }
.page-todiste .crumb a { color: var(--muted); text-decoration: none; }
.page-todiste .crumb a:before { content: "\2190"; margin-right: 8px; }
.page-todiste .crumb a:hover { color: var(--accent); }
.page-todiste .story-app { margin-bottom: 36px; }
.page-todiste main strong { color: var(--text); font-weight: 600; }
.page-todiste main code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--raised);
  color: var(--text);
  font-size: .9em;
}

/* Inline links */
.page-todiste main p:not(.crumb) a:not(.btn),
.page-todiste main li a,
.page-todiste main figcaption a {
  color: var(--text);
  text-decoration: underline;
  -webkit-text-decoration-color: var(--accent);
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}
.page-todiste main p:not(.crumb) a:not(.btn):hover,
.page-todiste main li a:hover {
  color: var(--accent);
}

/* Hero with twin-frame split seam */
.td-hero {
  padding-bottom: 34px;
  border-bottom: 1px solid var(--hair-2);
}
.td-eyebrow {
  margin: 0 0 12px;
  font: 600 12px/1.4 var(--head);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.td-hero h1 {
  margin: 0 0 18px;
  max-width: 17em;
  font-size: 33px;
  line-height: 1.13;
  letter-spacing: -.03em;
}
.td-lead {
  margin: 0 0 24px;
  max-width: 40em;
  font-size: 18px;
  line-height: 1.62;
  color: var(--text-2);
}
.td-seam {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--surface);
  border: 1px solid var(--hair-2);
  border-radius: 8px;
  overflow: hidden;
}
.td-pane {
  padding: 16px 18px;
  border-top: 1px dashed var(--hair-2);
}
.td-pane:first-child {
  border-top: 0;
}
.td-pane-tag {
  margin: 0 0 6px;
  font: 600 12px/1.3 var(--head);
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--accent);
}
.td-pane-right .td-pane-tag {
  color: var(--td-ok);
}
.td-pane p:last-child {
  margin: 0;
  font-size: 15px;
  line-height: 1.54;
  color: var(--text-2);
}

/* Sections */
.td-sec { padding-top: 40px; }
.td-sec h2 {
  margin: 0 0 16px;
  font-size: 24px;
  line-height: 1.22;
}
.td-sec h3 {
  margin: 26px 0 12px;
  font-size: 19px;
  line-height: 1.3;
  color: var(--text);
}
.td-sec p {
  margin: 0 0 18px;
  color: var(--text-2);
}
.td-sec p:last-child { margin-bottom: 0; }

/* Quoted authority callouts */
.td-quote {
  margin: 20px 0 24px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
}
.td-quote p {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.58;
  color: var(--text);
}
.td-quote cite {
  display: block;
  font-size: 13.5px;
  font-style: normal;
  color: var(--muted);
}

/* Numbered step rail */
.td-checklist {
  list-style: none;
  counter-reset: tdstep;
  margin: 14px 0 24px;
  padding: 0;
}
.td-checklist li {
  counter-increment: tdstep;
  position: relative;
  margin: 0 0 14px;
  padding: 15px 16px 15px 56px;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: 8px;
  color: var(--text-2);
}
.td-checklist li:last-child { margin-bottom: 0; }
.td-checklist li:before {
  content: "0" counter(tdstep);
  position: absolute;
  left: 14px;
  top: 15px;
  width: 30px;
  padding: 3px 0;
  border-bottom: 2px solid var(--accent);
  color: var(--accent);
  font: 700 14px/1.2 var(--head);
  text-align: center;
}
.td-checklist li > strong:first-child {
  display: block;
  margin-bottom: 4px;
  font-family: var(--head);
  font-size: 16.5px;
}

/* Tables */
.td-table-wrap {
  margin: 20px 0 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--surface);
  border: 1px solid var(--hair-2);
  border-radius: 8px;
}
.td-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.48;
  font-variant-numeric: tabular-nums;
}
.td-table caption {
  padding: 12px 16px;
  text-align: left;
  font: 600 14px/1.4 var(--head);
  color: var(--text);
  background: var(--raised);
  border-bottom: 2px solid var(--accent);
}
.td-table th,
.td-table td {
  padding: 11px 14px;
  text-align: left;
  border-top: 1px solid var(--hair);
  vertical-align: top;
}
.td-table thead th {
  border-top: 0;
  color: var(--accent);
  font: 600 12px/1.35 var(--head);
  letter-spacing: .05em;
  text-transform: uppercase;
}
.td-table tbody th {
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}
.td-table td { color: var(--text-2); }
.td-tag-ok,
.td-tag-lim {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font: 600 12px/1.35 var(--head);
}
.td-tag-ok {
  background: var(--td-ok-soft);
  color: var(--td-ok);
}
.td-tag-lim {
  background: var(--accent-soft);
  color: var(--accent);
}

/* Paired-capture workflow band (1 phone picture beside stage list on desktop) */
.td-flow-band {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 24px;
  margin: 24px 0 26px;
  -webkit-align-items: start;
  align-items: start;
}
.td-solo {
  margin: 0 auto;
  max-width: 268px;
}
.td-solo img,
.td-twin img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 14px;
  border: 1px solid var(--hair-2);
}
.td-solo figcaption,
.td-twin figcaption {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  text-align: left;
}
.td-stages {
  list-style: none;
  counter-reset: tdstage;
  margin: 0;
  padding: 0 0 0 18px;
  border-left: 2px solid var(--hair-2);
}
.td-stages li {
  counter-increment: tdstage;
  position: relative;
  margin: 0 0 14px;
  padding: 13px 15px;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: 8px;
  font-size: 15.5px;
  line-height: 1.54;
  color: var(--text-2);
}
.td-stages li:last-child { margin-bottom: 0; }
.td-stages li:before {
  content: counter(tdstage);
  position: absolute;
  left: -31px;
  top: 13px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--td-ok);
  color: var(--td-ok);
  font: 700 12px/20px var(--head);
  text-align: center;
}
.td-stages li > strong:first-child {
  display: block;
  margin-bottom: 3px;
  font-family: var(--head);
  font-size: 16px;
}

/* Side-by-side twin phone shots */
.td-twin {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 26px;
  max-width: 272px;
  margin: 26px auto;
}
.td-twin figure {
  margin: 0;
}

/* Redaction & sharing warning notice */
.td-notice {
  margin: 24px 0 0;
  padding: 18px 20px;
  background: var(--accent-soft);
  border: 1px solid var(--hair-2);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
}
.td-notice p {
  margin: 0;
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.56;
}

/* Limits and What was not checked */
.td-audit-pair {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 18px;
  margin-top: 8px;
}
.td-card {
  padding: 20px 18px;
  background: var(--surface);
  border: 1px solid var(--hair-2);
  border-top: 3px solid var(--td-ok);
  border-radius: 8px;
}
.td-card-unchecked {
  border-top-color: var(--accent);
}
.td-card h3 {
  margin: 0 0 12px;
  font-size: 19px;
}
.td-bullets {
  list-style: none;
  margin: 0;
  padding: 0;
}
.td-bullets li {
  position: relative;
  margin: 0 0 11px;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.54;
  color: var(--text-2);
}
.td-bullets li:last-child { margin-bottom: 0; }
.td-bullets li:before {
  content: "";
  position: absolute;
  left: 2px;
  top: .62em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--td-ok);
}
.td-card-unchecked .td-bullets li:before {
  background: var(--accent);
}

/* Closing row */
.td-end { margin: 38px 0 4px; }
.td-end .btn { margin: 0 18px 12px 0; vertical-align: middle; }
.page-todiste .td-end a:not(.btn) {
  display: inline-block;
  margin-bottom: 12px;
  vertical-align: middle;
}

@media (max-width: 600px) {
  .td-table-wrap { overflow-x: visible; }
  .td-table {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
    font-size: 12.5px;
    line-height: 1.42;
  }
  .td-table caption { padding: 10px 10px; font-size: 13px; }
  .td-table th,
  .td-table td {
    min-width: 0;
    padding: 8px 6px;
    overflow-wrap: break-word;
    word-wrap: break-word;
  }
  .td-table thead th { font-size: 10.5px; }
  .td-table thead th:first-child,
  .td-table tbody th:first-child {
    white-space: nowrap;
    width: 24%;
  }
  .td-table thead th:nth-child(2),
  .td-table tbody td:nth-child(2) { width: 42%; }
  .td-table thead th:nth-child(3),
  .td-table tbody td:nth-child(3) { width: 34%; }
  .td-checklist li { padding: 14px 14px 14px 50px; }
  .td-stages { padding-left: 14px; }
  .td-stages li:before { left: -27px; }
  .td-card { padding: 18px 16px; }
}

@media (min-width: 640px) {
  .td-seam {
    grid-template-columns: 1fr 1fr;
  }
  .td-pane {
    border-top: 0;
  }
  .td-pane-right {
    border-left: 1px dashed var(--hair-2);
  }
  .td-twin {
    grid-template-columns: 270px 270px;
    max-width: 576px;
    grid-gap: 36px;
  }
  .td-audit-pair {
    grid-template-columns: 1fr 1fr;
    grid-gap: 18px;
  }
}

@media (min-width: 760px) {
  .td-flow-band {
    grid-template-columns: 265px 1fr;
    grid-gap: 28px;
  }
  .td-solo {
    width: 265px;
    max-width: none;
    margin: 0;
  }
}

@media (min-width: 900px) {
  .page-todiste main > .wrap:first-child { padding-top: 64px; }
  .td-hero { padding-bottom: 40px; }
  .td-hero h1 { font-size: 46px; }
  .td-lead { font-size: 20px; }
  .td-sec { padding-top: 56px; }
  .td-sec h2 { font-size: 29px; }
}
