/* Himaya landing page.
   One idea: the page is a drawing sheet. Navy ink on cool drafting paper.
   Coral only ever marks a threat; teal only ever marks what stops one. */

:root {
  --paper: #f3f5f2;
  --sheet: #fcfdfb;
  --ink: #17202e;
  --graphite: #566070;
  --rule: #d7dce2;
  --rule-strong: #b9c1cb;
  --grid: rgb(23 32 46 / 0.045);
  --brand: #ff7e5f;
  --brand-hover: #f2694a;
  --on-brand: #17202e;
  --threat: #be2f3f;
  --threat-wash: rgb(190 47 63 / 0.09);
  --guard: #1d7364;
  --guard-wash: rgb(29 115 100 / 0.1);
  --on-mark: #ffffff;
  --focus: #c14528;
  --brand-ink: #c14528;
  --sheet-shadow: 0 1px 0 rgb(23 32 46 / 0.04), 0 24px 48px -28px rgb(23 32 46 / 0.28);

  --serif: "Merriweather", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --cond: "IBM Plex Sans Condensed", "Arial Narrow", "IBM Plex Sans", sans-serif;

  --gutter: 16px;
  --max: 1160px;
  color-scheme: light;
}

/* Dark is opt-in from the header switch; light is the default for everyone. */
:root[data-theme="dark"] {
  --paper: #0d1625;
  --sheet: #111d30;
  --ink: #e5eaf1;
  --graphite: #9aa6b7;
  --rule: #23324a;
  --rule-strong: #34465f;
  --grid: rgb(140 170 210 / 0.07);
  --threat: #ff6b78;
  --threat-wash: rgb(255 107 120 / 0.12);
  --guard: #4cc3ac;
  --guard-wash: rgb(76 195 172 / 0.12);
  --on-mark: #0d1625;
  --focus: #ff8666;
  --brand-ink: #ff8666;
  --sheet-shadow: 0 0 0 1px rgb(140 170 210 / 0.06), 0 24px 48px -28px rgb(0 0 0 / 0.7);
  color-scheme: dark;
}

@media (min-width: 720px) { :root { --gutter: 32px; } }

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
p, h1, h2, h3, ol, ul, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 100;
  padding: 8px 12px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 6px;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Type scale (classical: 14 16 18 21 24 36 48 60) ---------- */

.h-display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.375rem, 1.3rem + 4.4vw, 4.5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.h-section {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.25rem);
  line-height: 1.22;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
.h-item { font-size: 1.125rem; font-weight: 600; line-height: 1.35; }
.lead { font-size: 1.1875rem; line-height: 1.6; color: var(--graphite); max-width: 36em; }
.small { font-size: 0.875rem; color: var(--graphite); }

/* ---------- Header ---------- */

.site-header { border-bottom: 1px solid var(--rule); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-size: 1.25rem; line-height: 1; letter-spacing: -0.01em;
  text-decoration: none; white-space: nowrap;
}
/* The shield is the brand coral in both themes. */
.mark { flex-shrink: 0; height: 30px; width: auto; }

.theme-toggle {
  display: grid; place-items: center; width: 38px; height: 38px; margin-left: 4px;
  border-radius: 8px; border: 1px solid transparent; background: none; cursor: pointer; color: var(--graphite);
  transition: color 0.15s, border-color 0.15s;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--rule-strong); }
.theme-toggle svg { width: 18px; height: 18px; }
/* Shows the theme you would switch to. */
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; font-size: 0.9375rem; }
.nav-links a:not(.btn) {
  display: block; padding: 8px 12px; border-radius: 6px; text-decoration: none; color: var(--graphite);
}
.nav-links a:not(.btn):hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule-strong); }
.nav-links .nav-cta { margin-left: 8px; }

@media (max-width: 600px) {
  .nav-links .nav-cta, .nav-links .nav-home { display: none; }
  .nav-links a:not(.btn) { padding: 8px; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 22px;
  border-radius: 8px; border: 1px solid transparent;
  font-size: 1rem; font-weight: 500; line-height: 1; text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn-solid { background: var(--brand); color: var(--on-brand); }
.btn-solid:hover { background: var(--brand-hover); }
.btn-line { border-color: var(--rule-strong); color: var(--ink); background: transparent; }
.btn-line:hover { border-color: var(--ink); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 0.9375rem; }
.btn[disabled] { opacity: 0.65; cursor: progress; }

.text-link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule-strong); }
.text-link:hover { text-decoration-color: currentColor; }

/* ---------- Hero ---------- */

.hero { padding: 64px 0 40px; }
@media (min-width: 960px) { .hero { padding: 96px 0 56px; } }

.hero-top { display: grid; gap: 28px; align-items: end; }
@media (min-width: 960px) {
  .hero-top { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 64px; }
}
.hero-top .h-display { max-width: 12em; }
.hero-side { display: grid; gap: 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.beta-note { font-size: 0.9375rem; color: var(--graphite); }
.beta-note strong { color: var(--ink); font-weight: 600; }

/* ---------- The sheet (interactive lifecycle drawing) ---------- */

.sheet {
  margin-top: 56px;
  background: var(--sheet);
  border: 1px solid var(--rule-strong);
  border-radius: 14px;
  box-shadow: var(--sheet-shadow);
  overflow: hidden;
}

.stages {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.stage-tab {
  position: relative;
  display: grid; gap: 2px; align-content: start; text-align: left;
  padding: 16px 18px 18px;
  background: none; border: 0; cursor: pointer;
  border-right: 1px solid var(--rule);
  color: var(--graphite);
  transition: color 0.2s, background-color 0.2s;
}
.stage-tab:last-child { border-right: 0; }
.stage-tab:hover { color: var(--ink); background: var(--grid); }
.stage-tab .stage-name { font-weight: 600; font-size: 1rem; color: inherit; }
.stage-tab .stage-sub { font-size: 0.8125rem; line-height: 1.35; }
.stage-tab[aria-selected="true"] { color: var(--ink); }
.stage-tab:focus-visible { outline-offset: -3px; }

.stage-bar {
  position: absolute; left: 0; bottom: -1px; height: 3px; width: 25%;
  background: var(--brand);
  transition: transform 0.45s cubic-bezier(0.3, 0.7, 0.2, 1);
}

@media (max-width: 640px) {
  .stage-tab { padding: 12px 10px 14px; }
  .stage-tab .stage-sub { display: none; }
  .stage-tab .stage-name { font-size: 0.9375rem; }
}


.drawing {
  position: relative;
  padding: 20px;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: -1px -1px;
  min-height: 300px;
}
.drawing { border-bottom: 1px solid var(--rule); }
@media (min-width: 960px) { .drawing { padding: 36px 40px 40px; } }
.drawing svg { width: 100%; max-width: 1000px; margin: 0 auto; height: auto; overflow: visible; }
.halo-text { paint-order: stroke; stroke: var(--sheet); stroke-width: 5px; stroke-linejoin: round; }

/* SVG parts */
.d-boundary { fill: none; stroke: var(--graphite); stroke-width: 1.25; stroke-dasharray: 7 6; }
.d-boundary-label { font: 500 12px var(--mono); fill: var(--graphite); }
.d-node rect { fill: var(--sheet); stroke: var(--ink); stroke-width: 1.4; transition: stroke 0.3s; }
.d-node .store-fill { fill: var(--sheet); }
.d-node .store-line { stroke: var(--ink); stroke-width: 1.4; transition: stroke 0.3s; }
.d-node text { font: 500 13px var(--mono); fill: var(--ink); transition: fill 0.3s, opacity 0.3s; }
.d-node.is-dim rect, .d-node.is-dim .store-line { stroke: var(--rule-strong); }
.d-node.is-dim text { fill: var(--graphite); opacity: 0.75; }
.d-node.is-changed rect { stroke: var(--guard); stroke-width: 2; }
.d-node .d-tag { font: 500 11.5px var(--mono); fill: var(--guard); }

.d-edge { fill: none; stroke: var(--ink); stroke-width: 1.4; transition: stroke 0.3s; }
.d-edge.is-dim { stroke: var(--rule-strong); }
.d-edge.is-hot { stroke-width: 2.2; }
.d-edge-label { font: 400 11.5px var(--mono); fill: var(--graphite); transition: opacity 0.3s; }
.d-edge-label.is-dim { opacity: 0.4; }
.d-arrow { fill: var(--ink); transition: fill 0.3s; }
.d-arrow.is-dim { fill: var(--rule-strong); }

.d-mark { cursor: pointer; outline: none; }
.d-mark .core { stroke: var(--sheet); stroke-width: 3; }
.d-mark text { font: 600 12px var(--sans); fill: var(--on-mark); pointer-events: none; }
.d-mark.threat .core { fill: var(--threat); }
.d-mark.guard .core { fill: var(--guard); }
.d-mark .halo { fill: none; stroke-width: 1.5; opacity: 0; transition: opacity 0.2s; }
.d-mark.threat .halo { stroke: var(--threat); }
.d-mark.guard .halo { stroke: var(--guard); }
.d-mark.is-active .halo, .d-mark.is-hover .halo, .d-mark:hover .halo, .d-mark:focus-visible .halo { opacity: 1; }
.d-mark .pop { transform-box: fill-box; transform-origin: center; animation: pop 0.4s cubic-bezier(0.3, 1.5, 0.5, 1) both; animation-delay: var(--delay, 0s); }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
.d-fade { animation: fade 0.4s ease both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.drawing.is-drawing .d-edge { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 0.8s ease forwards; animation-delay: var(--delay, 0s); }
.drawing.is-drawing .d-arrow, .drawing.is-drawing .d-edge-label { animation: fade 0.3s ease both; animation-delay: calc(var(--delay, 0s) + 0.6s); }
@keyframes draw { to { stroke-dashoffset: 0; } }

.title-block {
  position: absolute; right: 20px; bottom: 20px;
  display: grid; grid-template-columns: auto auto auto;
  border: 1px solid var(--rule-strong); background: var(--sheet);
  font: 400 11px/1.3 var(--mono); color: var(--graphite);
}
.title-block div { padding: 5px 10px; }
.title-block div + div { border-left: 1px solid var(--rule); }
.title-block b { display: block; font-weight: 500; color: var(--ink); font-size: 12px; }
@media (max-width: 959px) { .title-block { display: none; } }

/* The explanation beside the drawing */
.note { padding: 24px 20px 28px; display: grid; gap: 28px; align-content: start; }
@media (min-width: 960px) {
  .note { grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr) minmax(0, 1.25fr); gap: 48px; padding: 32px 40px 40px; }
}
.note-head .h-item { font-family: var(--serif); font-weight: 400; font-size: 1.3125rem; line-height: 1.35; }
.doc-list { list-style: none; display: grid; gap: 8px; font-size: 0.9688rem; }
.doc-list li { display: flex; gap: 10px; align-items: baseline; }
.doc-list li::before {
  content: ""; flex-shrink: 0; width: 14px; height: 16px; transform: translateY(2px);
  background: var(--graphite);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 16' fill='none' stroke='black' stroke-width='1.3' stroke-linejoin='round'%3E%3Cpath d='M2 1h6.5L12 4.5V15H2z'/%3E%3Cpath d='M8.5 1v3.5H12'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 16' fill='none' stroke='black' stroke-width='1.3' stroke-linejoin='round'%3E%3Cpath d='M2 1h6.5L12 4.5V15H2z'/%3E%3Cpath d='M8.5 1v3.5H12'/%3E%3C/svg%3E") center / contain no-repeat;
}
.note[hidden] { display: none; }
.note-head { display: grid; gap: 10px; align-content: start; }
.note > div { align-self: start; }
.note-head p { color: var(--graphite); font-size: 1rem; }
.note-label { font-size: 0.875rem; font-weight: 600; color: var(--graphite); margin-bottom: 8px; }

.quote-card {
  margin: 0;
  border-left: 2px solid var(--rule-strong);
  padding: 2px 0 2px 14px;
  font-family: var(--serif); font-size: 0.9688rem; line-height: 1.7;
}

.criteria { list-style: none; display: grid; gap: 10px; }
.criteria li { position: relative; padding-left: 26px; font-size: 0.9688rem; line-height: 1.5; }
.criteria li::before {
  content: ""; position: absolute; left: 1px; top: 0.3em;
  width: 13px; height: 13px; border-radius: 3px; border: 1.5px solid var(--guard);
  background: var(--guard-wash);
}

.findings { list-style: none; display: grid; gap: 2px; }
.finding {
  display: grid; grid-template-columns: 22px 1fr; gap: 12px;
  padding: 12px; margin: 0 -12px; border-radius: 8px;
  cursor: pointer; text-align: left; background: none; border: 0; width: calc(100% + 24px);
  transition: background-color 0.2s;
}
.finding:hover, .finding.is-hover, .finding.is-active { background: var(--grid); }
.finding:focus-visible { outline-offset: -2px; }
.finding .num {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: var(--on-mark); margin-top: 1px;
}
.finding.threat .num { background: var(--threat); }
.finding.guard .num { background: var(--guard); }
.finding .what { font-size: 0.9688rem; line-height: 1.45; }
.finding .more { display: none; margin-top: 10px; font-size: 0.9063rem; color: var(--graphite); line-height: 1.5; gap: 8px; }
.finding.is-active .more { display: grid; }
.finding .more strong { color: var(--ink); font-weight: 600; }
.finding .refs { font-family: var(--mono); font-size: 0.8125rem; }

.terminal {
  border-radius: 8px; background: var(--ink); color: var(--paper);
  padding: 14px 16px; font: 400 0.78rem/1.7 var(--mono); overflow-x: auto; white-space: pre;
}
.terminal .dim { opacity: 0.55; }
.terminal .ok { color: color-mix(in srgb, var(--guard) 55%, var(--paper)); }

.soon-note { font-size: 0.9375rem; color: var(--graphite); border-left: 2px solid var(--rule-strong); padding-left: 14px; }

/* ---------- Generic sections ---------- */

.section { padding: 88px 0; }
@media (min-width: 960px) { .section { padding: 128px 0; } }
.ruled { border-top: 1px solid var(--rule); }
.section-intro { display: grid; gap: 16px; max-width: 40em; margin-bottom: 56px; }
.section-intro p { color: var(--graphite); }

/* ---------- Anatomy of a finding ---------- */

.anatomy { display: grid; gap: 40px; }
@media (min-width: 1000px) { .anatomy { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 0; } }

.record {
  background: var(--sheet); border: 1px solid var(--rule-strong); border-top: 6px solid var(--brand); border-radius: 8px;
  box-shadow: var(--sheet-shadow); padding: 6px 0;
}
.record-row { padding: 18px 24px; display: grid; gap: 6px; transition: background-color 0.2s; }
@media (min-width: 720px) { .record-row { grid-template-columns: 132px 1fr; gap: 20px; padding: 20px 28px; } }
.record-row + .record-row { border-top: 1px solid var(--rule); }
.record-row dt { font-size: 0.875rem; font-weight: 600; color: var(--graphite); padding-top: 3px; }
.record-row dd { font-size: 1rem; line-height: 1.55; }
.record-row.is-lit { background: var(--grid); }
.record-row .threat-text { font-family: var(--serif); font-size: 1.1875rem; line-height: 1.5; }
.record-row .threat-dt { color: var(--threat); }
.record-row .guard-dt { color: var(--guard); }
.record-row blockquote { margin: 0; font-family: var(--serif); font-style: italic; color: var(--graphite); }
.record-row cite { display: block; margin-top: 6px; font-style: normal; font-size: 0.875rem; font-family: var(--sans); }
.record-row .refs { font-family: var(--mono); font-size: 0.875rem; display: grid; gap: 2px; }

.readers { list-style: none; display: grid; gap: 2px; align-content: center; }
.reader {
  position: relative; display: grid; gap: 4px;
  padding: 16px 20px; border-radius: 8px;
  transition: background-color 0.2s;
}
@media (min-width: 1000px) {
  .reader { padding-left: 72px; }
  .reader::before {
    content: ""; position: absolute; left: 0; top: 29px; width: 52px; height: 1px;
    background: var(--rule-strong); transition: background-color 0.2s;
  }
  .reader::after {
    content: ""; position: absolute; left: 52px; top: 26px; width: 7px; height: 7px; border-radius: 999px;
    border: 1px solid var(--rule-strong); background: var(--paper); transition: border-color 0.2s, background-color 0.2s;
  }
  .reader.is-lit::before { background: var(--ink); }
  .reader.is-lit::after { border-color: var(--ink); background: var(--ink); }
}
.reader.is-lit { background: var(--grid); }
.reader .who { font-weight: 600; }
.reader p { color: var(--graphite); font-size: 0.9688rem; }

/* ---------- Facts ---------- */

.facts { display: grid; gap: 40px; }
@media (min-width: 960px) { .facts { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 80px; } }
/* ---------- Section heads: a drawing's detail marker ---------- */

.section-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px 28px; align-items: start; margin-bottom: 56px; }
.section-head .section-intro { margin-bottom: 0; }
.detail {
  position: relative; display: grid; grid-template-rows: 1fr 1fr;
  width: 68px; height: 68px; margin-top: 2px; border-radius: 999px;
  background: var(--brand); color: var(--on-brand); border: 1.5px solid var(--ink);
  text-align: center; overflow: hidden;
}
.detail::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; background: var(--ink); }
.detail-n { align-self: end; font: 700 1.5rem/1 var(--cond); padding-bottom: 5px; }
.detail-s { align-self: start; font: 600 0.5625rem/1 var(--cond); letter-spacing: 0.16em; text-transform: uppercase; padding-top: 8px; }
@media (max-width: 600px) {
  .section-head { grid-template-columns: 1fr; }
  .detail { width: 56px; height: 56px; }
  .detail-n { font-size: 1.25rem; }
}

/* ---------- The specialists: badges with a coloured band ---------- */

.crew { display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: 16px; }
.badge {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: 8px;
  box-shadow: var(--sheet-shadow);
}
.badge-top {
  background: var(--brand); color: var(--on-brand);
  font: 600 0.75rem/1 var(--cond); letter-spacing: 0.16em; text-transform: uppercase;
  padding: 10px 18px;
}
.badge-body { display: grid; gap: 4px; align-content: start; padding: 20px 18px 22px; }
.agent-mark { width: 46px; height: 46px; color: var(--ink); margin-bottom: 12px; overflow: visible; }
.agent-ring { stroke: var(--brand-ink); }
.badge-name { font: 400 1.375rem/1.2 var(--serif); }
.badge-handle { font: 500 0.8125rem var(--mono); color: var(--brand-ink); }
.badge-body p:last-child { margin-top: 8px; color: var(--graphite); font-size: 0.9688rem; line-height: 1.5; }
.cameos { margin-top: 28px; max-width: 48em; color: var(--graphite); font-size: 1rem; }
.cameos b { color: var(--ink); font-weight: 600; }

/* ---------- Tags: a big number, the point, and an asset-tag footer ---------- */

.tags { display: grid; gap: 20px; }
@media (min-width: 960px) { .tags { grid-template-columns: 1fr 1fr; } }
.tag {
  display: grid; grid-template-columns: minmax(8.5rem, 10rem) minmax(0, 1fr);
  background: var(--sheet); border: 1px solid var(--rule-strong); border-top: 6px solid var(--brand);
  border-radius: 6px; box-shadow: var(--sheet-shadow);
}
.tag-price { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 20px 16px 20px 22px; border-right: 1px dashed var(--rule-strong); }
.tag-big { font: 700 2.875rem/1 var(--cond); letter-spacing: -0.01em; white-space: nowrap; }
.tag-big.tight { font-size: 1.875rem; }
.tag-unit { margin-top: 8px; font: 500 0.875rem/1.3 var(--cond); color: var(--graphite); }
.tag-body { display: grid; gap: 6px; align-content: start; min-width: 0; padding: 18px 22px 18px; }
.tag-eye { font: 600 0.75rem var(--cond); letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand-ink); }
.tag-body p { font: 400 1.0625rem/1.55 var(--serif); }
.tag-sku {
  display: flex; align-items: center; gap: 12px; margin-top: 8px;
  font: 500 0.75rem var(--cond); letter-spacing: 0.08em; text-transform: uppercase; color: var(--graphite);
}
.bars { flex: none; width: 78px; height: 15px; color: var(--ink); }
@media (max-width: 560px) {
  .tag { grid-template-columns: 1fr; }
  .tag-price { flex-direction: row; justify-content: flex-start; align-items: baseline; gap: 12px; border-right: 0; border-bottom: 1px dashed var(--rule-strong); padding-bottom: 14px; }
  .tag-unit { margin-top: 0; }
}

/* ---------- Closing band ---------- */

.closing { --band: var(--ink); --band-text: var(--paper); background: var(--band); color: var(--band-text); }
:root[data-theme="dark"] .closing { --band: #1a2b47; --band-text: #e5eaf1; }
.closing .wrap { padding-top: 96px; padding-bottom: 96px; display: grid; gap: 32px; }
@media (min-width: 960px) {
  .closing .wrap { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); align-items: end; gap: 64px; padding-top: 128px; padding-bottom: 128px; }
}
.closing p { color: color-mix(in srgb, var(--band-text) 72%, var(--band)); max-width: 34em; margin-top: 18px; }
.closing .text-link { color: var(--band-text); text-decoration-color: color-mix(in srgb, var(--band-text) 40%, transparent); }
.closing .stack { display: grid; gap: 18px; justify-items: start; }

/* ---------- Inner pages ---------- */

.page-head { padding: 72px 0 56px; border-bottom: 1px solid var(--rule); }
@media (min-width: 960px) { .page-head { padding: 104px 0 80px; } }
.page-head .h-display { max-width: 15em; }
.page-head .lead { margin-top: 24px; }

.story { display: grid; gap: 48px; }
@media (min-width: 960px) { .story { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 80px; } }
.prose { display: grid; gap: 1.3em; max-width: 36em; font-size: 1.125rem; line-height: 1.7; }
.prose h2 { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; line-height: 1.3; margin-top: 0.8em; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--graphite); }

.name-plate {
  align-self: start;
  background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: 14px;
  box-shadow: var(--sheet-shadow); overflow: hidden;
}
@media (min-width: 960px) { .name-plate { position: sticky; top: 32px; } }
.name-plate .art {
  display: grid; place-items: center; padding: 44px 24px 36px;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  border-bottom: 1px solid var(--rule);
}
.name-plate .art .mark { height: 110px; }
.name-plate .words { padding: 24px 28px 28px; display: grid; gap: 6px; }
.name-plate .arabic { justify-self: start; font-family: "Noto Naskh Arabic", "Geeza Pro", serif; font-size: 2.25rem; line-height: 1.3; }
.name-plate .latin { font-family: var(--serif); font-size: 1.3125rem; }
.name-plate p { color: var(--graphite); font-size: 0.9688rem; margin-top: 6px; }

.beliefs { display: grid; }
@media (min-width: 720px) { .beliefs { grid-template-columns: 1fr 1fr; column-gap: 48px; } }
.belief { padding: 28px 0 32px; border-top: 1px solid var(--rule); display: grid; gap: 8px; align-content: start; }
.belief p { color: var(--graphite); }

/* ---------- Contact ---------- */

.contact { display: grid; gap: 48px; padding-top: 56px; padding-bottom: 104px; }
@media (min-width: 960px) { .contact { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 80px; padding-top: 72px; } }

.contact-side { display: grid; gap: 40px; align-content: start; }
.contact-side .block { display: grid; gap: 10px; }
.contact-side .block > p { color: var(--graphite); }
.contact-side .mail {
  font-family: var(--serif); font-size: 1.3125rem; text-decoration: underline;
  text-decoration-color: var(--rule-strong); word-break: break-word;
}
.contact-side .mail:hover { text-decoration-color: currentColor; }
.steps { list-style: none; display: grid; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 8px; padding: 14px 0; border-top: 1px solid var(--rule); color: var(--graphite); font-size: 1rem; }
.steps li::before { content: counter(s); font-family: var(--serif); color: var(--ink); }

.form-sheet {
  background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: 14px;
  box-shadow: var(--sheet-shadow); padding: 24px;
}
@media (min-width: 720px) { .form-sheet { padding: 40px; } }

.form-grid { display: grid; gap: 22px; }
@media (min-width: 720px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: 1 / -1; } }

.field { display: grid; gap: 8px; align-content: start; }
.field label, .field legend { font-size: 0.9375rem; font-weight: 500; }
.field .opt { font-weight: 400; color: var(--graphite); }

.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 11px 14px;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 8px;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
.input::placeholder, .textarea::placeholder { color: var(--graphite); opacity: 0.75; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--graphite); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--ink); background: var(--sheet);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent);
}
.textarea { min-height: 148px; resize: vertical; line-height: 1.55; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23808a99' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
}

.field.has-error .input, .field.has-error .textarea { border-color: var(--threat); }
.error-msg { display: none; font-size: 0.875rem; color: var(--threat); }
.field.has-error .error-msg { display: block; }

.choices { border: 0; margin: 0; padding: 0; min-width: 0; }
.choices legend { padding: 0; margin-bottom: 10px; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: inline-block; padding: 9px 16px; border-radius: 8px;
  border: 1px solid var(--rule-strong); font-size: 0.9375rem; background: var(--paper);
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.choice input:hover + span { border-color: var(--graphite); }
.choice input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.choice input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

.form-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--rule);
}
.form-foot p { font-size: 0.875rem; color: var(--graphite); max-width: 26em; }

.spinner {
  width: 15px; height: 15px; margin-right: 10px; border-radius: 999px;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form-done { display: none; padding: 16px 0 8px; justify-items: start; }
.form-sheet.is-sent form { display: none; }
.form-sheet.is-sent .form-done { display: grid; gap: 18px; }
.form-done .h-section:focus { outline: none; }
.form-done p { color: var(--graphite); max-width: 32em; }
.stamp {
  width: 56px; height: 56px; border-radius: 999px; display: grid; place-items: center;
  border: 1.5px solid var(--guard); color: var(--guard); background: var(--guard-wash);
}
.stamp svg { width: 26px; height: 26px; }

/* ---------- 404 ---------- */

.lost { padding-top: 120px; padding-bottom: 160px; display: grid; gap: 20px; justify-items: start; }
.lost .mark { height: 84px; margin-bottom: 12px; }
.lost p { color: var(--graphite); }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--rule); padding: 40px 0 48px; font-size: 0.9375rem; color: var(--graphite); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; }
.footer-row .brand { color: var(--ink); font-size: 1.125rem; }
.footer-row .brand .mark { height: 26px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-delay: 0s !important;
    animation-iteration-count: 1 !important; transition-duration: 0.01ms !important;
  }
}
