/* Halo — site styles */
:root {
  --bg: #f6f6fa;
  --paper: #ffffff;
  --ink: #16142b;
  --muted: #5e5b78;
  --line: #e1e0ec;
  --soft: #eeedf5;
  --violet: #5b4cf0;
  --violet-dark: #4637d6;
  --gold: #e2a93b;
  --silver: #9aa5b8;
  --pass: #1f8f5a;
  --warn: #c98512;
  --fail: #d93f45;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 9px;
  --font-head: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --font-mono: "DM Mono", ui-monospace, monospace;
  --wrap: 1160px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--font-body); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.5rem, 6vw, 4.8rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); font-weight: 750; }
h3 { font-size: 1.12rem; font-weight: 700; letter-spacing: -0.015em; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 58ch; }
.page-head { padding: 64px 0 32px; }
.page-head .lead { margin: 0; }
.sim-tag { display: inline-block; font-size: 0.72rem; font-weight: 700; color: var(--muted); border: 1px dashed #c4c2d6; border-radius: 999px; padding: 1px 8px; vertical-align: middle; letter-spacing: 0.03em; }
.sim-note { font-size: 0.82rem; color: var(--muted); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(246, 246, 250, 0.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.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(--font-head); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.03em; }
.logo svg { width: 30px; height: 30px; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: var(--radius-sm); font-size: 0.95rem; }
.nav a:hover { color: var(--ink); background: var(--soft); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.nav .btn { margin-left: 8px; }
.nav a.btn-primary, .nav a.btn-primary:hover { color: #fff; background: var(--violet); }
.nav a.btn-primary:hover { background: var(--violet-dark); }
.table-scroll { overflow-x: auto; border-radius: var(--radius-md); }
.menu-btn { display: none; margin-left: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 12px; cursor: pointer; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); text-decoration: none; font-weight: 700; font-size: 0.95rem; cursor: pointer; }
.btn:hover { border-color: var(--muted); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--violet); border-color: var(--violet); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--violet-dark); border-color: var(--violet-dark); }
.btn-gold { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 0.86rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- the halo (signature element) ---------- */
.haloed { --s: 72px; position: relative; width: var(--s); height: var(--s); flex: none; }
.haloed .logo-img { position: absolute; inset: 13%; border-radius: 50%; overflow: hidden; }
.haloed .logo-img svg { width: 100%; height: 100%; }
.haloed::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px dashed var(--line); }
.haloed[data-tier="gold"]::before { border: 3px solid var(--gold); box-shadow: 0 0 0 5px rgba(226, 169, 59, 0.16), 0 0 calc(var(--s) * 0.35) rgba(226, 169, 59, 0.55); }
.haloed[data-tier="silver"]::before { border: 3px solid var(--silver); box-shadow: 0 0 0 5px rgba(154, 165, 184, 0.18); }
.haloed[data-tier="none"]::before { border: 2px dashed #c4c2d6; }
.haloed[data-tier="lost"]::before, .haloed[data-tier="blocked"]::before { border: 2px dashed var(--fail); }
.haloed.xl { --s: 168px; }
.haloed.lg { --s: 112px; }
.haloed.sm { --s: 48px; }
@media (prefers-reduced-motion: no-preference) {
  .haloed.lighting::before { animation: haloOn 1.2s ease-out; }
}
@keyframes haloOn { 0% { box-shadow: 0 0 0 0 rgba(226,169,59,0); opacity: .3; } 60% { box-shadow: 0 0 0 14px rgba(226,169,59,.25), 0 0 80px rgba(226,169,59,.8); opacity: 1; } }

.tier { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.85rem; padding: 3px 10px; border-radius: 999px; background: var(--soft); white-space: nowrap; }
.tier.gold { background: #fbefd5; color: #8a5a00; }
.tier.silver { background: #eceff4; color: #4b5567; }
.tier.none { background: var(--soft); color: var(--muted); }
.tier.lost, .tier.blocked { background: #fde6e7; color: var(--fail); }
.score { font-family: var(--font-head); font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }

/* ---------- check list ---------- */
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; padding: 12px 0; border-top: 1px solid var(--soft); align-items: start; }
.checks li:first-child { border-top: 0; }
.checks .ico { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 0.78rem; font-weight: 800; color: #fff; margin-top: 1px; }
.checks .pass .ico { background: var(--pass); }
.checks .warn .ico { background: var(--warn); }
.checks .fail .ico, .checks .block .ico { background: var(--fail); }
.checks .label { font-weight: 700; }
.checks .detail { font-size: 0.88rem; color: var(--muted); }
.checks .pts { font-family: var(--font-mono); font-size: 0.85rem; color: var(--fail); white-space: nowrap; }
@media (prefers-reduced-motion: no-preference) {
  .checks li.reveal { animation: rowIn 0.35s ease-out both; }
}
@keyframes rowIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- hero ---------- */
.hero { padding: 72px 0 80px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero-grid > * { min-width: 0; }
.hero h1 { max-width: 11ch; }
.hero .lead { margin-bottom: 28px; }
.report-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; box-shadow: 0 30px 60px -40px rgba(22, 20, 43, 0.5); }
.report-top { display: flex; gap: 20px; align-items: center; margin-bottom: 18px; }
.report-top h3 { margin: 0; font-size: 1.35rem; }
.report-top .score { font-size: 2.6rem; line-height: 1; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.stat { padding: 24px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-value { font-family: var(--font-head); font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: 0.9rem; }

/* ---------- criteria + steps ---------- */
.criteria { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 40px; margin-top: 32px; }
.criterion { padding: 22px 0; border-top: 1px solid var(--line); }
.criterion p { color: var(--muted); margin: 0; }
.criterion .cost { font-family: var(--font-mono); font-size: 0.85rem; color: var(--fail); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 32px; }
.step-num { font-family: var(--font-head); font-weight: 800; font-size: 3rem; line-height: 1; color: var(--violet); margin-bottom: 10px; }
.step p { color: var(--muted); margin: 0; }
.tiers-band { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.tier-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; display: flex; gap: 16px; align-items: center; }
.tier-card p { margin: 0; color: var(--muted); font-size: 0.92rem; }

/* ---------- token cards (gallery) ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.token-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; text-align: left; cursor: pointer; width: 100%; display: flex; flex-direction: column; gap: 14px; }
.token-card:hover { border-color: #c4c2d6; }
.token-card .top { display: flex; gap: 14px; align-items: center; }
.token-card .name { font-family: var(--font-head); font-weight: 750; font-size: 1.1rem; line-height: 1.15; }
.token-card .ticker { font-family: var(--font-mono); color: var(--muted); font-size: 0.88rem; }
.token-card .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--muted); }
.token-card .score { font-size: 1.5rem; color: var(--ink); }
.own-tag { font-size: 0.72rem; font-weight: 700; color: var(--violet); border: 1px solid #c9c3fb; border-radius: 999px; padding: 1px 8px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg button { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 7px 14px; cursor: pointer; font-weight: 600; font-size: 0.9rem; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- create ---------- */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; }
.idea-box textarea { width: 100%; min-height: 96px; resize: vertical; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px; font-size: 1.15rem; outline: none; }
.idea-box textarea:focus { border-color: var(--violet); background: var(--paper); }
.vibe { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; margin: 18px 0 20px; font-size: 0.9rem; color: var(--muted); }
input[type="range"] { width: 100%; accent-color: var(--violet); }
.examples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.examples button { border: 1px dashed #c4c2d6; background: none; border-radius: 999px; padding: 4px 12px; cursor: pointer; font-size: 0.85rem; color: var(--muted); }
.examples button:hover { color: var(--ink); border-color: var(--ink); }
.notice { border-radius: var(--radius-md); padding: 14px 16px; background: #fde6e7; color: #8c1d22; margin-top: 16px; }
.variants { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.variant { background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius-lg); padding: 20px; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 12px; }
.variant[aria-pressed="true"] { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(91, 76, 240, 0.12); }
.variant .name { font-family: var(--font-head); font-weight: 750; font-size: 1.25rem; line-height: 1.1; }
.variant .ticker { font-family: var(--font-mono); color: var(--muted); }
.variant p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.variant .logo-only { width: 64px; height: 64px; }
.build-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 24px; align-items: start; margin-top: 40px; }
.build-grid > * { min-width: 0; }
.field { padding: 16px 0; border-top: 1px solid var(--soft); }
.field:first-child { border-top: 0; padding-top: 0; }
.field label, .field .label { display: block; font-weight: 700; margin-bottom: 8px; }
.field-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field-head output { font-family: var(--font-mono); color: var(--violet); }
.field .hint { font-size: 0.84rem; color: var(--muted); margin-top: 6px; }
.field input[type="text"], .field textarea { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; outline: none; }
.field input[type="text"]:focus, .field textarea:focus { border-color: var(--violet); background: var(--paper); }
.field textarea { resize: vertical; min-height: 64px; font-size: 0.94rem; }
.two { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.post-list { display: flex; flex-direction: column; gap: 8px; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.toggle { position: relative; width: 44px; height: 24px; flex: none; }
.toggle input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; z-index: 1; }
.toggle span { position: absolute; inset: 0; border-radius: 999px; background: #cfcde0; transition: background 0.2s; }
.toggle span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.toggle input:checked + span { background: var(--violet); }
.toggle input:checked + span::after { transform: translateX(20px); }
.toggle input:focus-visible + span { outline: 2px solid var(--violet); outline-offset: 2px; }
.sticky { position: sticky; top: 88px; }
.group-title { font-family: var(--font-head); font-weight: 750; font-size: 1.2rem; margin: 28px 0 4px; }
.group-title:first-child { margin-top: 0; }
.gens { font-size: 0.88rem; color: var(--muted); }

/* ---------- site preview (modal) ---------- */
.preview-site { border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--line); }
.preview-hero { padding: 32px 24px; text-align: center; }
.preview-hero .haloed { margin: 0 auto 16px; }
.preview-hero h2 { margin: 0 0 6px; }
.preview-body { padding: 20px 24px; background: var(--paper); }
.preview-body p { color: var(--muted); }
.terms-list { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; margin: 0; font-size: 0.92rem; }
.terms-list dt { color: var(--muted); }
.terms-list dd { margin: 0; font-weight: 700; text-align: right; }

/* ---------- token page ---------- */
.burn { text-align: center; padding: 88px 0 64px; }
.burn-num { font-family: var(--font-head); font-weight: 800; font-size: clamp(3rem, 10vw, 7rem); letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.plan { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; }
.plan.active { border: 2px solid var(--gold); padding: 27px; box-shadow: 0 0 0 5px rgba(226,169,59,.12); }
.plan .hold { font-family: var(--font-head); font-weight: 800; font-size: 1.6rem; margin: 6px 0 4px; letter-spacing: -0.03em; }
.plan ul { list-style: none; padding: 0; margin: 16px 0 0; }
.plan li { padding: 8px 0; border-top: 1px solid var(--soft); color: var(--muted); }
.uses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 32px; }
.uses p { color: var(--muted); margin: 0; }
.note { border-left: 3px solid var(--gold); padding: 12px 16px; background: var(--paper); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--muted); }
.hold-field { max-width: 340px; margin-top: 20px; }
.hold-field input { width: 100%; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }

/* ---------- docs ---------- */
.docs-layout { display: grid; grid-template-columns: 210px 1fr; gap: 56px; align-items: start; padding-bottom: 96px; }
.docs-layout > * { min-width: 0; }
.docs-nav { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 2px; }
.docs-nav a { text-decoration: none; color: var(--muted); padding: 6px 12px; border-radius: var(--radius-sm); font-size: 0.93rem; }
.docs-nav a:hover { color: var(--ink); background: var(--soft); }
.docs-body section { padding-bottom: 44px; scroll-margin-top: 96px; }
.docs-body p, .docs-body li { max-width: 68ch; }
table.simple { width: 100%; border-collapse: collapse; font-size: 0.93rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.simple th, .simple td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--soft); vertical-align: top; }
.simple th { font-weight: 600; color: var(--muted); font-size: 0.82rem; }
.simple tr:last-child td { border-bottom: 0; }
.simple .pts { font-family: var(--font-mono); color: var(--fail); white-space: nowrap; }
:not(pre) > code { background: var(--soft); padding: 1px 6px; border-radius: 4px; font: 0.88em var(--font-mono); }
details.faq { border-top: 1px solid var(--line); }
details.faq:last-of-type { border-bottom: 1px solid var(--line); }
details.faq summary { cursor: pointer; padding: 16px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 1.3rem; line-height: 1; }
details.faq[open] summary::after { content: "–"; }
details.faq p { padding-bottom: 16px; margin: 0; color: var(--muted); }

/* ---------- modal, toast, footer ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(22, 20, 43, 0.55); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 100; }
.modal-backdrop.open { display: flex; }
.modal { background: var(--paper); border-radius: var(--radius-lg); width: min(600px, 100%); max-height: 88vh; overflow-y: auto; padding: 28px; position: relative; }
.modal-close { position: absolute; top: 12px; right: 12px; background: none; border: 0; font-size: 1.6rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 8px; z-index: 2; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 0.92rem; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 120; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.site-footer { border-top: 1px solid var(--line); padding: 44px 0; color: var(--muted); font-size: 0.9rem; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--ink); }
.disclaimer { margin-top: 20px; font-size: 0.82rem; max-width: 72ch; }
.empty { color: var(--muted); padding: 32px 0; text-align: center; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .build-grid, .docs-layout { grid-template-columns: 1fr; }
  .variants, .plans, .uses, .tiers-band, .criteria { grid-template-columns: 1fr; }
  .sticky, .docs-nav { position: static; }
  .docs-nav { flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 768px) {
  .section { padding: 60px 0; }
  .wrap { padding: 0 16px; }
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px 16px; }
  .nav.open { display: flex; }
  .nav .btn { margin: 8px 0 0; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .steps { grid-template-columns: 1fr; }
  .panel, .report-card { padding: 20px; }
  .haloed.xl { --s: 128px; }
  .two { grid-template-columns: 1fr; }
}
