/* Tool pages: Registry, Audit, Readiness Index, Curve Clock, Lab log. Builds on style2.css tokens. */
.tool-page { background: var(--bg); }
.tool-page main { pointer-events: auto; }
.stars { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }
.tool-page .top { z-index: 50; }
.tool-page .top::before { opacity: 1; }
.tool-page .pill-nav a[aria-current="page"] { color: var(--white); background: rgba(255, 255, 255, .09); }
.tool { position: relative; z-index: 2; max-width: 1180px; margin: 0 auto; padding: 150px var(--gutter) 60px; }
.tool-head { max-width: 780px; margin-bottom: 44px; }
.tool-head h1 { margin: 0 0 20px; font: 300 clamp(42px, 5.4vw, 80px)/1.02 var(--sans); letter-spacing: -0.055em; color: var(--white); animation: rise 1s var(--ease) both; }
.tool-head .lede { margin: 0; animation: rise 1s var(--ease) .08s both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.k { display: block; margin: 0 0 6px; font-size: 12px; color: var(--dim); font-weight: 500; }
.small { font-size: 13.5px; }
.note-line { margin: 14px 0 0; font-size: 13px; color: var(--dim); line-height: 1.55; }
.note-line a, .muted a, .prose a { color: var(--text); text-underline-offset: 3px; }
code, .mono { font: 400 .9em var(--mono); }
code { color: var(--text); background: rgba(255, 255, 255, .06); padding: 1px 6px; border-radius: 5px; word-break: break-all; }
h2.h { margin: 0 0 8px; font: 300 28px/1.15 var(--sans); letter-spacing: -0.04em; color: var(--white); }
h3.h { margin: 0 0 6px; font: 500 17px/1.3 var(--sans); color: var(--white); letter-spacing: -0.01em; }
.stack > * + * { margin-top: 18px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

/* buttons */
.t-btn { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 99px; border: 1px solid var(--glass-b); font: 500 13.5px var(--sans); color: var(--text); background: rgba(255, 255, 255, .03); transition: background .25s, border-color .25s, color .25s, transform .2s var(--ease); white-space: nowrap; }
.t-btn:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .2); color: var(--white); }
.t-btn:active { transform: scale(.97); }
.t-btn.ghost { border-color: rgba(143, 155, 255, .35); color: #C9D0FF; }
.t-btn.ghost:hover { background: rgba(143, 155, 255, .12); }
.t-btn:disabled, .go:disabled { opacity: .5; cursor: default; pointer-events: none; }
.go { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 24px; border-radius: 99px; background: var(--white); color: #0B0C0F; font: 600 14.5px var(--sans); transition: transform .3s var(--ease), box-shadow .3s; white-space: nowrap; }
.go:hover { transform: translateY(-1px); box-shadow: 0 12px 40px rgba(143, 155, 255, .35); }
.go.wide { display: flex; width: 100%; }
:is(.t-btn, .go, .chip, input, textarea, summary, a):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* inputs */
.search { display: flex; gap: 8px; padding: 6px; border-radius: 99px; border: 1px solid var(--glass-b); background: rgba(10, 12, 18, .6); backdrop-filter: blur(14px); transition: border-color .25s, box-shadow .25s; }
.search:focus-within { border-color: rgba(143, 155, 255, .55); box-shadow: 0 0 0 5px rgba(143, 155, 255, .1); }
.search input { all: unset; flex: 1; min-width: 0; padding: 10px 18px; font: 400 15px var(--mono); color: var(--white); }
.search input::placeholder { color: var(--dim); font-family: var(--sans); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { all: unset; cursor: pointer; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); font-size: 12.5px; color: var(--mute); transition: color .2s, border-color .2s, background .2s; }
.chip:hover { color: var(--white); border-color: var(--glass-b); }
.chip[aria-pressed="true"] { color: var(--white); background: rgba(143, 155, 255, .14); border-color: rgba(143, 155, 255, .4); }
.field { display: block; }
.field > span { display: block; margin-bottom: 8px; font-size: 12.5px; color: var(--dim); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--mute); cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; }

/* status lines */
.status { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; font-size: 14px; line-height: 1.5; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.status i { flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; background: var(--dim); }
.status.ok { background: rgba(124, 245, 196, .06); border-color: rgba(124, 245, 196, .2); } .status.ok i { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.status.bad { background: rgba(255, 107, 138, .07); border-color: rgba(255, 107, 138, .25); } .status.bad i { background: var(--alarm); box-shadow: 0 0 10px var(--alarm); }
.status.wait i { background: #FFD28A; box-shadow: 0 0 10px #FFD28A; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.status b { color: var(--white); font-weight: 600; }

/* grade */
.grade { --g: var(--mute); display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: .42em; font: 600 1em/1 var(--sans); color: var(--g); background: color-mix(in srgb, var(--g) 13%, transparent); border: 1px solid color-mix(in srgb, var(--g) 35%, transparent); }
.grade.A { --g: #7CF5C4; } .grade.B { --g: #B5F07C; } .grade.C { --g: #FFD28A; } .grade.D { --g: #FFA077; } .grade.F { --g: #FF6B8A; }
.grade.big { font-size: 64px; border-radius: 22px; }

/* badges for how a power is held */
.ctl { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12px; white-space: nowrap; border: 1px solid var(--line); color: var(--mute); }
.ctl::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ctl.none { color: #7CF5C4; } .ctl.key { color: #FF6B8A; } .ctl.multisig { color: #FFD28A; } .ctl.program { color: #A9B3FF; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 90; transform: translate(-50%, 20px); max-width: min(560px, calc(100vw - 32px)); padding: 13px 20px; border-radius: 16px; background: rgba(14, 16, 24, .94); border: 1px solid var(--glass-b); backdrop-filter: blur(14px); font-size: 14px; color: var(--white); opacity: 0; pointer-events: none; transition: opacity .35s var(--ease), transform .45s var(--ease); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* footer with anchor status */
.tool-foot { position: relative; z-index: 2; max-width: 1180px; margin: 0 auto; padding: 30px var(--gutter) 60px; display: flex; gap: 20px 40px; flex-wrap: wrap; justify-content: space-between; border-top: 1px solid var(--line); font-size: 13px; color: var(--dim); }
.tool-foot a { color: var(--mute); }
.tool-foot .anchor-line { display: flex; gap: 10px; align-items: center; }
.tool-foot .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.tool-foot .dot.on { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.tool-foot .dot.off { background: #FFD28A; }

/* key-value list */
.kv { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 10px 22px; margin: 0; font-size: 14px; }
.kv dt { color: var(--dim); }
.kv dd { margin: 0; color: var(--text); min-width: 0; overflow-wrap: anywhere; }

/* proof */
.proof { font-size: 13.5px; }
.proof ol { list-style: none; margin: 12px 0 0; padding: 0; }
.proof li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); color: var(--mute); }
.proof li::before { content: ''; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; border: 1px solid var(--dim); }
.proof li.ok::before { border: 0; background: rgba(124, 245, 196, .18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-5' fill='none' stroke='%237CF5C4' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); }
.proof li.bad::before { border: 0; background: rgba(255, 107, 138, .2); }
.proof li.wait::before { border-style: dashed; }
.proof li b { display: block; color: var(--white); font-weight: 500; }
.proof details summary { cursor: pointer; color: var(--mute); }
.proof pre { margin: 10px 0 0; padding: 14px; border-radius: 12px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); white-space: pre-wrap; word-break: break-all; font: 400 12px/1.6 var(--mono); color: var(--mute); max-height: 260px; overflow: auto; }

/* tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 500; font-size: 12.5px; color: var(--dim); padding: 0 12px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr { transition: background .2s; }
.tbl tbody tr:hover { background: rgba(255, 255, 255, .025); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl-wrap { overflow-x: auto; margin: 0 -12px; }

.empty { color: var(--dim); font-size: 14px; padding: 18px 0; }
.two { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 920px) { .two { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .tool { padding-top: 120px; } .glass { padding: 22px; } .grade.big { font-size: 48px; } .kv { grid-template-columns: 1fr; gap: 2px 0; } .kv dd { margin-bottom: 10px; } }
[hidden] { display: none !important; }
@media (max-width: 900px) { .tool { padding-top: 130px; } }


/* performance: no live blur over the animated starfield */
.tool-page .glass, .search, .toast { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.tool-page .glass { background: linear-gradient(180deg, rgba(18, 20, 30, .8), rgba(10, 12, 18, .84)); }
.search { background: rgba(10, 12, 18, .86); }

/* long-form pages (privacy, terms) */
.prose { max-width: 720px; }
.prose h1 { margin: 0 0 20px; font: 300 clamp(42px, 5.4vw, 72px)/1.02 var(--sans); letter-spacing: -0.06em; color: var(--white); }
.prose h2 { margin: 44px 0 12px; font: 400 22px/1.3 var(--sans); letter-spacing: -0.02em; color: var(--white); }
.prose p, .prose li { color: var(--mute); font-size: 15.5px; line-height: 1.7; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 10px; }
.prose li b { color: var(--text); font-weight: 600; }
.prose .updated { font-size: 13px; color: var(--dim); margin-top: 18px; }
.todo { color: #FFD28A; }
.foot-legal { display: flex; gap: 18px; }
