/* Zilliqa Institutional Layer: tokens, layout and components for every page. */
:root {
  --bg: #f3f2ef;
  --ink: #121211;
  --rule-soft: #12121133;
  --accent: oklch(0.58 0.2 28);
  --gutter: clamp(20px, 5vw, 64px);
}
html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--accent);
}
p {
  margin: 0;
}

.hero {
  padding: clamp(56px, 11vw, 160px) var(--gutter) clamp(48px, 7vw, 88px);
  border-bottom: 1px solid var(--ink);
}
.hero h1 {
  margin: 0;
  font-size: clamp(56px, 11vw, 168px);
  line-height: 0.9;
  letter-spacing: -0.045em;
  font-weight: 700;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero .sub {
  margin-top: clamp(28px, 4vw, 48px);
  font-size: clamp(20px, 2.4vw, 32px);
  line-height: 1.25;
  max-width: 26ch;
  text-wrap: pretty;
}

.sec {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 24px clamp(24px, 5vw, 80px);
  padding: clamp(44px, 6vw, 88px) var(--gutter);
  border-bottom: 1px solid var(--ink);
}
.sec:last-of-type {
  border-bottom: 0;
}
.label {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}
.body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 760px;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.5;
  text-wrap: pretty;
}
.statement {
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.statement em {
  font-style: normal;
  color: var(--accent);
}
ul.rows {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--rule-soft);
}
ul.rows li {
  padding: 14px 0;
  border-bottom: 1px solid var(--rule-soft);
}
ul.rows b {
  font-weight: 700;
}

.flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  border-top: 1px solid var(--ink);
}
.flow div {
  padding: 16px 16px 18px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.flow .n {
  display: block;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 6px;
}
.flow .n i {
  font-style: normal;
  color: var(--accent);
}

.ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 24px;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
}
.btn.primary {
  background: var(--ink);
  color: var(--bg);
}
.btn.secondary {
  border: 1px solid var(--ink);
}
.btn:hover {
  color: var(--accent);
}

footer {
  background: var(--ink);
  color: var(--bg);
  padding: clamp(56px, 9vw, 120px) var(--gutter) 32px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}
footer .big {
  font-size: clamp(40px, 7vw, 112px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  font-weight: 700;
}
footer .meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-top: 1px solid #f3f2ef33;
  padding-top: 20px;
}
footer .meta span {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

/* site header */
.site {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--ink);
  display: flex;
  align-items: center;
  gap: 20px 32px;
  flex-wrap: wrap;
  padding: 14px var(--gutter);
}
.site .brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  margin-right: auto;
}
.site .brand b {
  font-size: 22px;
  letter-spacing: -0.03em;
  font-weight: 700;
}
.site .brand span {
  font-size: 13px;
  color: #121211a6;
}
.site nav {
  display: flex;
  gap: 28px;
  font-size: 15px;
}
.site nav a {
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.site nav a[aria-current='page'] {
  border-bottom-color: var(--ink);
  font-weight: 700;
}
.site nav a:hover {
  color: var(--accent);
}
.site .btn {
  min-height: 40px;
  padding: 0 18px;
  font-size: 15px;
}
@media (max-width: 640px) {
  .site {
    gap: 10px 16px;
  }
  .site .brand span {
    display: none;
  }
  .site nav {
    order: 3;
    width: 100%;
    gap: 22px;
    border-top: 1px solid var(--rule-soft);
    padding-top: 8px;
  }
}

.more {
  font-weight: 700;
}
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  z-index: 20;
}
.skip:focus {
  left: var(--gutter);
}

/* subpages: title + labelled entries (changelog, privacy, incidents, 404) */
.page-title {
  padding: clamp(48px, 9vw, 128px) var(--gutter) clamp(36px, 5vw, 64px);
  border-bottom: 1px solid var(--ink);
}
.page-title h1 {
  margin: 0;
  font-size: clamp(48px, 9vw, 128px);
  line-height: 0.92;
  letter-spacing: -0.045em;
  font-weight: 700;
}
.page-title p {
  margin-top: clamp(20px, 3vw, 32px);
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.3;
  max-width: 40ch;
}
.log-entry {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px clamp(24px, 5vw, 80px);
  padding: clamp(36px, 5vw, 72px) var(--gutter);
  border-bottom: 1px solid var(--ink);
}
.log-entry:last-child {
  border-bottom: 0;
}
.log-entry h2 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}
.section-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 760px;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.55;
  text-wrap: pretty;
}
.section-body h3 {
  margin: 12px 0 0;
  font-size: clamp(20px, 2vw, 26px);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.section-body .statement {
  margin: 0;
}
ul.rules,
ol.rules {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--rule-soft);
}
ul.rules li,
ol.rules li {
  padding: 12px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.legal .section-body {
  font-size: 16px;
}
.status-pill {
  align-self: flex-start;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  border: 1px solid var(--ink);
  padding: 5px 10px;
}
.status-pill.open {
  border-color: var(--accent);
  color: var(--accent);
}

/* facts table (ZIL page) */
.facts {
  width: 100%;
  border-collapse: collapse;
  font-size: clamp(16px, 1.4vw, 19px);
}
.facts th,
.facts td {
  text-align: left;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: top;
}
.facts th {
  font-weight: 700;
  padding-right: 24px;
  width: 38%;
}
.facts td {
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.facts tr:first-child th,
.facts tr:first-child td {
  border-top: 1px solid var(--rule-soft);
}

/* address converter */
.conv {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--ink);
  padding: 18px;
}
.conv label {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}
.conv input {
  font: inherit;
  font-size: 16px;
  padding: 12px;
  border: 1px solid var(--ink);
  background: #fff;
  color: var(--ink);
  border-radius: 0;
  width: 100%;
  box-sizing: border-box;
}
.conv .out {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
  overflow-wrap: anywhere;
  min-height: 1.5em;
}
.conv .err {
  color: var(--accent);
}

/* footer */
footer {
  gap: clamp(36px, 5vw, 64px);
}
.foot-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 28px 32px;
}
.foot-cols h2 {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: #f3f2efa6;
}
.foot-cols ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 15px;
  line-height: 1.35;
}
.foot-cols a {
  color: var(--bg);
  text-decoration: none;
}
.foot-cols a:hover {
  color: var(--accent);
}
.foot-cols .deprecated {
  margin: -4px 0 12px;
  font-size: 13px;
  line-height: 1.4;
  color: #f3f2efa6;
  font-style: italic;
}
.foot-cols .when {
  color: #f3f2ef80;
  font-size: 13px;
}
footer .meta a {
  color: var(--bg);
}

/* how-it-works diagram */
.sec.wide .body {
  max-width: none;
  grid-column: 1/-1;
}
.dia {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px minmax(0, 1.9fr) 92px minmax(0, 1fr);
  align-items: stretch;
  margin-top: 8px;
}
.box {
  border: 1px solid var(--ink);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 16px;
  line-height: 1.4;
}
.box h4 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.box .who {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--rule-soft);
}
.box .who span {
  padding: 8px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.l2 {
  border-width: 2px;
  gap: 14px;
}
.l2 .title {
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.l2 .parts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.part {
  border: 1px solid var(--rule-soft);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14.5px;
  line-height: 1.4;
}
.part b {
  font-size: 15px;
}
.part.ltin {
  border: 1px solid var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}
.tag {
  align-self: flex-start;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
}
.arr {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 8px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}
.arr i {
  font-style: normal;
  color: var(--accent);
}
.arr .line {
  font-size: 26px;
  letter-spacing: 0;
  line-height: 1;
}
.arr .line::before {
  content: '⟶';
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 14px;
  color: #121211b3;
  margin-top: 4px;
}
.legend span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.legend .sw {
  width: 14px;
  height: 14px;
  border: 1px solid var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}
@media (max-width: 900px) {
  .dia {
    grid-template-columns: 1fr;
  }
  .arr {
    flex-direction: row;
    padding: 10px 0;
  }
  .arr .line::before {
    content: '↓';
  }
  .l2 .parts {
    grid-template-columns: 1fr;
  }
}

[id] {
  scroll-margin-top: 90px;
}

/* FAQ accordion (<details>/<summary>), used on the Ledger incident pages */
.faq-list{border-top:1px solid var(--rule-soft)}
.faq-item{border-bottom:1px solid var(--rule-soft)}
.faq-q{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:18px 0;list-style:none;cursor:pointer;font-size:17px;font-weight:700;line-height:1.35;color:var(--ink)}
.faq-q::-webkit-details-marker{display:none}
.faq-q:hover{color:var(--accent)}
.faq-q:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
.faq-icon{flex:none;width:18px;height:18px;transition:transform .2s ease}
.faq-item[open] .faq-icon{transform:rotate(180deg)}
.faq-a{max-width:68ch;padding:0 0 22px;line-height:1.6}

/* ZIL supply band (zil.html) */
.supply{padding:clamp(48px,8vw,120px) var(--gutter);border-bottom:1px solid var(--ink);display:flex;flex-direction:column;gap:clamp(8px,1.5vw,16px)}
.supply .label{color:var(--accent);margin-bottom:clamp(12px,2vw,24px)}
.supply .n{font-size:clamp(34px,10.5vw,180px);line-height:.95;letter-spacing:-.045em;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.supply .m{font-size:clamp(20px,4.2vw,72px);line-height:1;letter-spacing:-.03em;font-weight:700;color:#121211a6;font-variant-numeric:tabular-nums;white-space:nowrap}
.supply .n span,.supply .m span{font-size:.35em;letter-spacing:.02em;margin-left:.35em;vertical-align:.9em}
.supply .n span{color:var(--accent)}
.supply .say{margin-top:clamp(16px,3vw,36px);font-size:clamp(22px,2.6vw,36px);line-height:1.2;font-weight:700;letter-spacing:-.02em;max-width:30ch}
.supply .note{font-size:15px;color:#121211a6}
.fight{display:flex;flex-direction:column;gap:2px;font-size:clamp(24px,2.8vw,40px);line-height:1.15;letter-spacing:-.02em;font-weight:700}
.fight .red{color:var(--accent)}

/* three-column explainer (index.html, LEI / vLEI / agentic finance) */
.trio{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));border-top:1px solid var(--ink)}
.trio>div{padding:18px 24px 22px 0;display:flex;flex-direction:column;gap:10px}
.trio h3{margin:0;font-size:13px;letter-spacing:.08em;text-transform:uppercase}
.trio p{font-size:clamp(16px,1.3vw,18px);line-height:1.55}
.statement.small{font-size:clamp(22px,2.4vw,32px);margin-top:12px}

/* mission band under the homepage hero */
.mission{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:20px clamp(24px,5vw,80px);padding:clamp(40px,6vw,88px) var(--gutter);border-bottom:1px solid var(--ink);background:var(--ink);color:var(--bg)}
.mission .label{color:#f3f2efa6}
.mission-text{grid-column:span 2;margin:0;font-size:clamp(28px,3.1vw,48px);line-height:1.12;letter-spacing:-.025em;font-weight:500;text-wrap:balance}
.mission-text em{font-style:normal;font-weight:700;color:var(--accent)}
@media (max-width:640px){.mission-text{grid-column:auto}}

/* Human / Agent toggle (navbar) */
.mode{display:inline-flex;align-items:center;gap:4px;padding:4px;border:1px solid var(--ink);border-radius:999px}
.mode a{display:inline-flex;align-items:center;gap:8px;min-height:34px;padding:0 16px;border-radius:999px;text-decoration:none;font-size:15px;font-weight:600;color:#121211a6}
.mode a:hover{color:var(--ink)}
.mode a.on{background:var(--ink);color:var(--bg)}
.mode .dot{width:9px;height:9px;border-radius:50%;border:2px solid currentColor;box-sizing:border-box}
.mode .prompt{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px;letter-spacing:-.04em}
.ref{margin-top:4px;font-size:15px;line-height:1.5;color:#121211a6}
.ref a{color:inherit}

/* agent view */
.agent-view{background:var(--ink);color:var(--bg);padding:clamp(40px,6vw,88px) var(--gutter)}
.agent-view a{color:var(--bg)}
.agent-head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:24px 48px;padding-bottom:28px;border-bottom:1px solid #f3f2ef33}
.agent-head .label{color:var(--accent)}
.agent-head h1{margin:14px 0 12px;font-size:clamp(34px,5vw,72px);line-height:.95;letter-spacing:-.04em}
.agent-head p{max-width:60ch;color:#f3f2efb3;font-size:17px;line-height:1.5}
.agent-actions{display:flex;flex-wrap:wrap;gap:10px}
.agent-view .btn.primary{background:var(--bg);color:var(--ink)}
.agent-view .btn.secondary{border:1px solid #f3f2ef80;color:var(--bg);background:transparent;font:inherit;font-weight:700;font-size:16px;cursor:pointer}
.agent-meta{display:flex;flex-wrap:wrap;gap:8px 24px;padding:14px 0;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px;color:#f3f2ef99}
.md-view{margin:0;padding:24px;max-height:75vh;overflow:auto;background:#1c1c1a;border:1px solid #f3f2ef26;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13.5px;line-height:1.6;white-space:pre-wrap;word-break:break-word;color:#e9e8e4}
@media (max-width:640px){.mode a{padding:0 12px;font-size:14px}}

/* vLEI section: compact reasons + further-reading link */
.reasons h3{margin:8px 0 12px;font-size:13px;letter-spacing:.08em;text-transform:uppercase}
.reasons ul{margin:0;padding:0;list-style:none;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:0 32px;border-top:1px solid var(--rule-soft)}
.reasons li{padding:12px 0;border-bottom:1px solid var(--rule-soft);font-size:16px;line-height:1.45}

/* agentic finance strip at the top of the L2 box (homepage diagram) */
.agentic{margin:-18px -18px 2px;padding:14px 18px;background:var(--ink);color:var(--bg);display:flex;flex-direction:column;gap:6px}
.agentic-label{font-size:12px;letter-spacing:.08em;text-transform:uppercase;font-weight:700;color:var(--accent)}
.agentic-label span{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:-.04em}
.agentic-text{font-size:15px;line-height:1.45}

/* sequencer as the foundation at the bottom of the L2 box */
.foundation{margin:2px -18px -18px;padding:14px 18px;border-top:1px solid var(--accent);box-shadow:inset 3px 0 0 var(--accent);background:#d7352d0d;display:grid;grid-template-columns:1fr auto;gap:6px 16px;align-items:end;text-decoration:none;color:var(--ink)}
.foundation .tag{grid-column:1/-1}
.foundation-body{font-size:14.5px;line-height:1.45}
.foundation-body b{font-size:15px;margin-right:4px}
.foundation-more{font-size:14px;font-weight:700;white-space:nowrap}
.foundation:hover .foundation-more{color:var(--accent)}
@media (max-width:900px){.foundation{grid-template-columns:1fr}}

/* dark section (homepage 07, matches the agentic finance layer) */
.sec.dark{background:var(--ink);color:var(--bg);border-bottom-color:var(--ink)}
.sec.dark .label{color:var(--accent)}
.sec.dark .label::before{content:">_ ";font-family:ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:-.04em}
.sec.dark .trio{border-top-color:#f3f2ef59}
.sec.dark .trio h3{color:#f3f2efb3}
.sec.dark .reasons h3{color:#f3f2efb3}
.sec.dark .reasons ul{border-top-color:#f3f2ef33}
.sec.dark .reasons li{border-bottom-color:#f3f2ef33}
.sec.dark .ref{color:#f3f2ef99}
.sec.dark a{color:var(--bg)}
.sec.dark a:hover{color:var(--accent)}
