/* Dehweles story: route-recovery and junction-audit layout. Dark slate ground, highway cobalt accent,
   emerald recovery tags, warm coral-amber caution frame. Built for older mobile browsers (Chromium 67). */
@font-face {
  font-family: 'DH Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'DH Space';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/assets/fonts/space-grotesk-latin.woff2') format('woff2');
}

body.page-dehweles {
  --head: 'DH Space', 'Segoe UI', Roboto, Arial, sans-serif;
  --body: 'DH Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --bg: #0A0D14;
  --surface: #121824;
  --raised: #192234;
  --bar: rgba(10, 13, 20, .94);
  --hair: rgba(255, 255, 255, .09);
  --hair-2: rgba(255, 255, 255, .17);
  --text: #EEF2F7;
  --text-2: #B3C0D4;
  --muted: #8B98AE;
  --accent: #48B8FF;
  --accent-ink: #061A29;
  --accent-soft: rgba(72, 184, 255, .13);
  --dh-recover: #3ED6A8;
  --dh-recover-soft: rgba(62, 214, 168, .12);
  --dh-warn: #F59E6C;
  --dh-warn-soft: rgba(245, 158, 108, .11);
  --live: #34D399;
}

@media (prefers-color-scheme: light) {
  body.page-dehweles {
    --bg: #0A0D14;
    --surface: #121824;
    --raised: #192234;
    --bar: rgba(10, 13, 20, .94);
    --hair: rgba(255, 255, 255, .09);
    --hair-2: rgba(255, 255, 255, .17);
    --text: #EEF2F7;
    --text-2: #B3C0D4;
    --muted: #8B98AE;
    --live: #34D399;
  }
}

/* Frame and reading column */
.page-dehweles main { padding-bottom: 52px; }
.page-dehweles main .wrap { max-width: 820px; }
.page-dehweles main > .wrap:first-child { padding-top: 40px; }
.page-dehweles .crumb { margin: 0 0 26px; font-size: 14px; }
.page-dehweles .crumb a { color: var(--muted); text-decoration: none; }
.page-dehweles .crumb a:before { content: "\2190"; margin-right: 8px; }
.page-dehweles .crumb a:hover { color: var(--accent); }
.page-dehweles .story-app { margin-bottom: 36px; }
.page-dehweles main strong { color: var(--text); font-weight: 600; }

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

/* Hero block */
.dh-hero {
  padding-bottom: 34px;
  border-bottom: 1px solid var(--hair-2);
}
.dh-kicker {
  margin: 0 0 12px;
  font: 600 12px/1.4 var(--head);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.dh-hero h1 {
  margin: 0 0 18px;
  font-size: 32px;
  line-height: 1.15;
}
.dh-lead {
  margin: 0 0 24px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-2);
}

/* Highway-rule bar inside hero */
.dh-rules {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 12px;
  margin: 0;
  padding: 0;
}
.dh-rule-item {
  padding: 13px 16px;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
}
.dh-rule-item dt {
  margin: 0 0 4px;
  font: 600 12px/1.3 var(--head);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}
.dh-rule-item dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
}

/* Sections */
.dh-band { padding-top: 40px; }
.dh-band h2 {
  margin: 0 0 16px;
  font-size: 24px;
  line-height: 1.24;
}
.dh-band h3 {
  margin: 24px 0 12px;
  font-size: 19px;
  line-height: 1.3;
  color: var(--text);
}
.dh-band p {
  margin: 0 0 18px;
  color: var(--text-2);
}

/* Source citations */
.dh-cite {
  margin: 20px 0 24px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
}
.dh-cite p {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.58;
  color: var(--text);
}
.dh-cite cite {
  display: block;
  font-size: 13px;
  font-style: normal;
  color: var(--muted);
}

/* Four-junction audit grid */
.dh-forks {
  list-style: none;
  counter-reset: dhfork;
  margin: 12px 0 24px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 14px;
}
.dh-forks li {
  counter-increment: dhfork;
  position: relative;
  margin: 0;
  padding: 18px 18px 18px 64px;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: 12px;
  font-size: 16px;
  line-height: 1.56;
  color: var(--text-2);
}
.dh-forks li:before {
  content: "J" counter(dhfork);
  position: absolute;
  left: 16px;
  top: 18px;
  width: 34px;
  height: 28px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  color: var(--accent);
  font: 700 13px/26px var(--head);
  text-align: center;
}
.dh-forks strong {
  display: block;
  margin-bottom: 5px;
  font-family: var(--head);
  font-size: 17px;
}

/* Worked-example table */
.dh-table-wrap {
  margin: 18px 0 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--surface);
  border: 1px solid var(--hair-2);
  border-radius: 12px;
}
.dh-table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.48;
  font-variant-numeric: tabular-nums;
}
.dh-table caption {
  padding: 12px 16px;
  text-align: left;
  font: 600 14px/1.4 var(--head);
  color: var(--text);
  background: var(--accent-soft);
  border-bottom: 2px solid var(--accent);
}
.dh-table th,
.dh-table td {
  padding: 11px 14px;
  text-align: left;
  border-top: 1px solid var(--hair);
  vertical-align: top;
}
.dh-table thead th {
  border-top: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.dh-table tbody th {
  color: var(--text);
  font-weight: 600;
}
.dh-table td { color: var(--text-2); }
.dh-tag-pass {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--dh-recover-soft);
  color: var(--dh-recover);
  font: 600 13px/1.4 var(--head);
}
.dh-tag-fail {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--dh-warn-soft);
  color: var(--dh-warn);
  font: 600 13px/1.4 var(--head);
}

/* App detail list */
.dh-list {
  list-style: none;
  margin: 8px 0 24px;
  padding: 0;
}
.dh-list li {
  position: relative;
  margin: 0 0 13px;
  padding-left: 26px;
  color: var(--text-2);
}
.dh-list li:before {
  content: "";
  position: absolute;
  left: 3px;
  top: .62em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
}

/* Status chip grid */
.dh-statuses {
  list-style: none;
  margin: 10px 0 24px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 10px;
}
.dh-statuses li {
  position: relative;
  padding: 12px 14px 12px 30px;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-2);
}
.dh-statuses li:before {
  content: "";
  position: absolute;
  left: 12px;
  top: 1.05em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dh-recover);
}

/* Phone pictures */
.dh-gallery {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 26px;
  margin: 28px auto;
  max-width: 280px;
}
.dh-gallery figure { margin: 0; text-align: center; }
.dh-solo {
  margin: 28px auto;
  max-width: 280px;
  text-align: center;
}
.dh-gallery img,
.dh-solo img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 20px;
  border: 1px solid var(--hair-2);
}
.dh-gallery figcaption,
.dh-solo figcaption {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  text-align: left;
}

/* Honest limits and what was not checked */
.dh-limits {
  padding: 24px 22px;
  background: var(--surface);
  border: 1px solid var(--hair-2);
  border-top: 3px solid var(--dh-warn);
  border-radius: 14px;
}
.dh-limits h2 {
  margin: 0 0 14px;
  font-size: 22px;
  color: var(--text);
}
.dh-limits h3 {
  margin: 20px 0 10px;
  font-size: 18px;
  color: var(--dh-warn);
}
.dh-limits p {
  margin: 0 0 16px;
  color: var(--text-2);
}
.dh-limits ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dh-limits li {
  position: relative;
  margin: 0 0 12px;
  padding-left: 24px;
  color: var(--text-2);
}
.dh-limits li:last-child { margin-bottom: 0; }
.dh-limits li:before {
  content: "";
  position: absolute;
  left: 3px;
  top: .62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dh-warn);
}

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

@media (max-width: 600px) {
  .dh-table { min-width: 0; font-size: 13px; }
  .dh-table caption { padding: 10px 10px; font-size: 13px; }
  .dh-table th,
  .dh-table td { min-width: 0; padding: 8px 6px; }
  .dh-table thead th { font-size: 11px; }
  .dh-table tbody th { white-space: nowrap; }
  .dh-forks li { padding: 16px 14px 16px 58px; }
  .dh-forks li:before { left: 12px; }
  .dh-limits { padding: 20px 18px; }
}

@media (min-width: 640px) {
  .dh-rules {
    grid-template-columns: 1fr 1fr 1fr;
    grid-gap: 14px;
  }
  .dh-gallery {
    grid-template-columns: 270px 270px;
    max-width: 572px;
    grid-gap: 32px;
  }
}

@media (min-width: 720px) {
  .dh-forks {
    grid-template-columns: 1fr 1fr;
    grid-gap: 16px;
  }
  .dh-statuses {
    grid-template-columns: 1fr 1fr;
    grid-gap: 12px;
  }
}

@media (min-width: 900px) {
  .page-dehweles main > .wrap:first-child { padding-top: 64px; }
  .dh-hero { padding-bottom: 40px; }
  .dh-hero h1 { font-size: 42px; }
  .dh-lead { font-size: 20px; }
  .dh-band { padding-top: 56px; }
  .dh-band h2 { font-size: 28px; }
  .dh-limits { padding: 28px 26px; }
}
