/* Fathom — site styles: a nautical chart, where safety is depth */
:root {
  --sea: #e5eef0;
  --sea-2: #d6e4e7;
  --paper: #f6f9f9;
  --ink: #0d2b45;
  --muted: #4e6475;
  --rule: #b9ccd2;
  --hair: #d3e0e3;
  --hazard: #b0176f;   /* magenta: how charts mark dangers */
  --caution: #b57a00;
  --safe: #17796b;
  --deep: #12466b;
  --serif: "Newsreader", Georgia, serif;
  --sans: "Public Sans", system-ui, sans-serif;
  --mono: "Red Hat Mono", ui-monospace, monospace;
  --wrap: 1100px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
  background-color: var(--sea);
  /* faint chart graticule */
  background-image: linear-gradient(rgba(13,43,69,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(13,43,69,.045) 1px, transparent 1px);
  background-size: 96px 96px;
}
svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--hazard); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; line-height: 1.08; margin: 0 0 0.45em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 500; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 500; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
em, .chart-label { font-family: var(--serif); font-style: italic; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 58ch; }
.real-tag, .sim-tag { display: inline-block; font-size: 0.72rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; vertical-align: middle; letter-spacing: .02em; }
.real-tag { color: var(--safe); border: 1px solid rgba(23,121,107,.45); }
.sim-tag { color: var(--muted); border: 1px dashed #93a9b1; }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--rule); background: rgba(229,238,240,.92); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 40; }
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-size: 1.55rem; font-weight: 600; letter-spacing: -0.01em; }
.logo svg { width: 26px; height: 30px; }
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--muted); padding: 8px 12px; font-size: 0.95rem; border-radius: 6px; }
.nav a:hover { color: var(--ink); background: var(--sea-2); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); border-radius: 0; }
.menu-btn { display: none; margin-left: auto; background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: 6px 12px; cursor: pointer; }

/* ---------- buttons + inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border: 1px solid var(--ink); background: transparent; text-decoration: none; font-weight: 600; font-size: 0.95rem; cursor: pointer; border-radius: 6px; white-space: nowrap; }
.btn:hover { background: var(--sea-2); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--deep); }
.btn-sm { padding: 6px 12px; font-size: 0.86rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.probe { display: flex; gap: 10px; flex-wrap: wrap; }
.probe input { flex: 1 1 340px; min-width: 0; background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: 13px 16px; font-family: var(--mono); font-size: 0.92rem; outline: none; }
.probe input:focus { border-color: var(--ink); }
.form-error { color: var(--hazard); font-size: 0.9rem; min-height: 1.4em; margin: 8px 0 0; }
.examples { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 0.88rem; color: var(--muted); }
.examples button { background: none; border: 0; border-bottom: 1px dotted var(--muted); padding: 2px 0; margin-right: 8px; cursor: pointer; font-family: var(--serif); font-style: italic; font-size: 1rem; color: var(--ink); }
.examples button:hover { border-bottom-color: var(--ink); }

/* ---------- hero ---------- */
.hero { padding: 72px 0 80px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 64px; align-items: center; }
.hero-grid > * { min-width: 0; }
.hero h1 { max-width: 12ch; }
.hero .lead { margin-bottom: 26px; }

/* ---------- depth gauge (signature element) ---------- */
.gauge { display: grid; grid-template-columns: 34px 92px 1fr; gap: 0 12px; height: 360px; }
.gauge .scale { position: relative; font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.gauge .scale span { position: absolute; right: 0; transform: translateY(-50%); }
.gauge .column { position: relative; border: 1px solid var(--ink); background: linear-gradient(180deg, #f2f7f7 0%, #c9dee2 32%, #6f9db3 62%, #12466b 100%); overflow: hidden; }
.gauge .column .contour { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed rgba(13,43,69,.35); }
.gauge .marker { position: absolute; left: -6px; right: -6px; height: 0; border-top: 3px solid var(--hazard); }
.gauge .marker::after { content: ""; position: absolute; right: -2px; top: -8px; border: 7px solid transparent; border-left-color: var(--hazard); transform: translateX(100%); }
@media (prefers-reduced-motion: no-preference) {
  .gauge .marker { transition: top 1.4s cubic-bezier(.25,.8,.25,1); }
}
.gauge .zones { position: relative; }
.gauge .zone { position: absolute; left: 6px; font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--muted); line-height: 1.2; }
.gauge .zone small { display: block; font-family: var(--sans); font-style: normal; font-size: 0.75rem; }
.gauge .zone.here { color: var(--ink); font-weight: 600; }
.gauge-score { font-family: var(--serif); font-size: 4rem; font-weight: 500; line-height: 1; letter-spacing: -0.02em; }

/* ---------- report ---------- */
.report-head { padding: 48px 0 28px; border-bottom: 1px solid var(--rule); }
.report-head .addr { font-family: var(--mono); font-size: 0.92rem; color: var(--muted); word-break: break-all; }
.report-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 48px; padding: 36px 0 80px; align-items: start; }
.report-side { position: sticky; top: 88px; }
.verdict { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--rule); }
.verdict .tier { font-family: var(--serif); font-size: 1.6rem; font-style: italic; }
.verdict .tier.reef, .verdict .tier.invalid { color: var(--hazard); }
.verdict .tier.shoals { color: var(--caution); }
.verdict .tier.deep, .verdict .tier.empty { color: var(--deep); }
.block { padding-bottom: 36px; margin-bottom: 36px; border-bottom: 1px solid var(--rule); }
.block:last-child { border-bottom: 0; }
.block-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; margin-bottom: 16px; }
.block-head h2 { margin: 0; font-size: 1.7rem; }
.who { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.who div { background: var(--paper); border: 1px solid var(--hair); border-radius: 8px; padding: 16px 18px; }
.who h3 { font-size: 1.05rem; margin-bottom: 6px; }
.who p { margin: 0; color: var(--muted); }
.notice { background: rgba(176,23,111,.07); border-left: 3px solid var(--hazard); padding: 12px 16px; margin-bottom: 16px; }

/* bits strip */
.bits { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 18px; align-items: flex-end; }
.bit { width: 34px; text-align: center; font-family: var(--mono); }
.bit b { display: block; height: 34px; line-height: 34px; border: 1px solid var(--rule); background: var(--paper); font-weight: 500; }
.bit.on b { background: var(--ink); color: #fff; border-color: var(--ink); }
.bit small { font-size: 0.66rem; color: var(--muted); }
.bits-caption { font-size: 0.85rem; color: var(--muted); margin: -8px 0 18px; }

/* permission grid (soundings) */
.perms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.perm { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; padding: 12px 0; border-top: 1px solid var(--hair); align-items: start; }
.perm .mk { width: 14px; height: 14px; border: 1.5px solid var(--rule); border-radius: 50%; margin-top: 4px; }
.perm.on .mk { background: var(--safe); border-color: var(--safe); }
.perm.on.medium .mk { background: var(--caution); border-color: var(--caution); }
.perm.on.high .mk, .perm.on.critical .mk { background: var(--hazard); border-color: var(--hazard); transform: rotate(45deg); border-radius: 2px; }
.perm .name { font-weight: 600; }
.perm .does { font-size: 0.86rem; color: var(--muted); }
.perm .code { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.perm.off { opacity: .5; }
.perm.off .does { display: none; }
.perm .pts { font-family: var(--mono); font-size: 0.85rem; color: var(--hazard); white-space: nowrap; }
.key { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.82rem; color: var(--muted); margin-bottom: 8px; }
.key i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; vertical-align: -1px; margin-right: 6px; }

/* checks + pools tables */
table.list { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.list th { text-align: left; font-weight: 500; color: var(--muted); font-size: 0.8rem; padding: 8px 10px; border-bottom: 1px solid var(--ink); }
.list td { padding: 11px 10px; border-bottom: 1px solid var(--hair); vertical-align: top; }
.list th:first-child, .list td:first-child { padding-left: 0; }
.list th:last-child, .list td:last-child { padding-right: 0; }
.list .r { text-align: right; font-family: var(--mono); white-space: nowrap; }
.list .pts { color: var(--hazard); }
.yes { color: var(--safe); } .no { color: var(--hazard); }

/* ---------- hook chart (list page) ---------- */
.hook-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.hook-row a { display: grid; grid-template-columns: 70px minmax(0, 1fr) 120px 110px; gap: 20px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.hook-row a:hover { background: rgba(255,255,255,.45); }
.hook-row .score { font-family: var(--serif); font-size: 2rem; line-height: 1; }
.hook-row .name { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; }
.hook-row .desc { color: var(--muted); font-size: 0.9rem; }
.hook-row .addr { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.hook-row .tier { font-family: var(--serif); font-style: italic; font-size: 1.05rem; }
.hook-row .tier.reef { color: var(--hazard); } .hook-row .tier.shoals { color: var(--caution); } .hook-row .tier.deep { color: var(--deep); }
.hook-row .tvl { text-align: right; font-family: var(--mono); font-size: 0.88rem; }
.seg { display: inline-flex; border: 1px solid var(--ink); border-radius: 6px; overflow: hidden; }
.seg button { background: none; border: 0; padding: 6px 14px; cursor: pointer; font-size: 0.88rem; }
.seg button + button { border-left: 1px solid var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* ---------- home sections ---------- */
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 28px; }
.three p { color: var(--muted); margin: 0; }
.legend-zones { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--ink); border-radius: 8px; overflow: hidden; margin-top: 28px; }
.legend-zones div { padding: 22px; }
.legend-zones div + div { border-left: 1px solid var(--ink); }
.legend-zones .z1 { background: #f2f7f7; } .legend-zones .z2 { background: #c9dee2; } .legend-zones .z3 { background: var(--deep); color: #e8f1f5; }
.legend-zones h3 { font-style: italic; margin-bottom: 4px; }
.legend-zones p { margin: 0; font-size: 0.92rem; opacity: .85; }

/* ---------- token + docs ---------- */
.burn { font-family: var(--serif); font-size: clamp(3rem, 9vw, 6rem); font-weight: 500; line-height: 1; letter-spacing: -0.02em; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--ink); border-radius: 8px; overflow: hidden; margin-top: 24px; background: var(--paper); }
.plan { padding: 24px; }
.plan + .plan { border-left: 1px solid var(--ink); }
.plan.active { background: #fff; box-shadow: inset 0 4px 0 var(--hazard); }
.plan .hold { font-family: var(--serif); font-size: 1.7rem; margin: 4px 0 12px; }
.plan ul { list-style: none; padding: 0; margin: 0; color: var(--muted); }
.plan li { padding: 8px 0; border-top: 1px solid var(--hair); }
.note { border-left: 3px solid var(--ink); padding: 12px 16px; background: var(--paper); color: var(--muted); }
.hold-field input { background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: 10px 12px; width: 220px; max-width: 100%; font-family: var(--mono); }
.docs { max-width: 760px; padding: 48px 0 80px; }
.docs section { padding: 24px 0; border-bottom: 1px solid var(--rule); scroll-margin-top: 80px; }
.docs code { font-family: var(--mono); background: var(--paper); padding: 1px 6px; border-radius: 4px; font-size: 0.88em; }
.docs pre { background: var(--ink); color: #dbe7ee; padding: 16px 18px; border-radius: 8px; overflow-x: auto; font: 0.85rem/1.7 var(--mono); }
.toc { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.9rem; }
.toc a { color: var(--muted); }

/* ---------- footer, toast ---------- */
.site-footer { border-top: 1px solid var(--rule); padding: 36px 0; color: var(--muted); font-size: 0.86rem; }
.site-footer .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 40px; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.site-footer p { margin: 16px 0 0; max-width: 76ch; font-size: 0.8rem; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(16px); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 6px; font-size: 0.9rem; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 100; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .report-grid { grid-template-columns: 1fr; }
  .report-side { position: static; }
  .perms, .who { grid-template-columns: 1fr; }
  .three, .plans, .legend-zones { grid-template-columns: 1fr; }
  .plan + .plan, .legend-zones div + div { border-left: 0; border-top: 1px solid var(--ink); }
}
@media (max-width: 768px) {
  .wrap { padding: 0 16px; }
  .section { padding: 56px 0; }
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--sea); border-bottom: 1px solid var(--rule); padding: 10px 16px; }
  .nav.open { display: flex; }
  .nav a[aria-current="page"] { box-shadow: inset 2px 0 0 var(--ink); }
  .gauge { height: 300px; grid-template-columns: 30px 72px 1fr; }
  .hook-row a { grid-template-columns: 56px minmax(0, 1fr); gap: 4px 14px; }
  .hook-row .tier, .hook-row .tvl { grid-column: 2; text-align: left; }
  .bit { width: calc((100% - 13 * 4px) / 14); min-width: 18px; }
  .bit b { height: 28px; line-height: 28px; font-size: 0.8rem; }
  .bit small { font-size: 0.58rem; }
  table.list thead { display: none; }
  table.list, .list tbody, .list tr, .list td { display: block; width: 100%; }
  .list tr { padding: 10px 0; border-bottom: 1px solid var(--hair); }
  .list td { border: 0; padding: 2px 0 !important; display: flex; justify-content: space-between; gap: 12px; }
  .list td::before { content: attr(data-label); color: var(--muted); font-size: 0.8rem; }
  .list td.first { display: block; font-weight: 600; }
  .list td.first::before { content: none; }
}
