/* Faint: an app suite on quiet light grey. App tiles carry identity color. Red and green always mean bad and good. */
:root {
  color-scheme: light;
  --bg: #eceef1; --surface: #ffffff; --sunken: #f3f4f6; --hover: #eef0f3;
  --ink: #111419; --text: #2a2f37; --muted: #5a616d; --line: #dcdfe4; --strong-line: #b4bac3;
  --red: #c0241b; --red-bg: #fdecea; --red-line: #f2c4bf;
  --green: #0c7a48; --green-bg: #e3f5eb; --green-line: #b3e0c6;
  --amber: #8f5c00; --amber-bg: #fcf2dc; --amber-line: #eed9a6;
  --link: #1a56c4;
  --sans: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --shadow: 0 1px 2px rgba(17, 20, 25, .06), 0 1px 1px rgba(17, 20, 25, .04);
  --pop: 0 12px 40px rgba(17, 20, 25, .18), 0 2px 6px rgba(17, 20, 25, .08);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font: 400 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
#threads { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; transition: opacity .4s; }
#root { position: relative; z-index: 1; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); text-wrap: balance; letter-spacing: -.015em; }
h1:focus, h2:focus { outline: none; }
a { color: var(--link); text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.ico { display: inline-flex; flex: none; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tiny { font-size: .8rem; }
.red { color: var(--red); }
.green { color: var(--green); }
.amber { color: var(--amber); }
.strong { color: var(--ink); font-weight: 650; }

.mark { display: inline-flex; align-items: center; gap: 9px; font: 700 1.28rem/1 var(--display); letter-spacing: -.02em; background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink); text-decoration: none; }
.mark img { width: 26px; height: 26px; display: block; }
.mark i { font-style: normal; }
.mark i:nth-of-type(2) { opacity: .8; }
.mark i:nth-of-type(3) { opacity: .6; }
.mark i:nth-of-type(4) { opacity: .42; }
.mark i:nth-of-type(5) { opacity: .28; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--ink); background: var(--ink); color: #fff; border-radius: 7px; padding: 10px 18px; font-weight: 600; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s; white-space: nowrap; }
.btn:hover { background: #2b3038; }
.btn.alt { background: var(--surface); color: var(--ink); border-color: var(--strong-line); }
.btn.alt:hover { background: var(--hover); border-color: var(--ink); }
.btn.danger { background: var(--surface); color: var(--red); border-color: var(--red-line); }
.btn.danger:hover { background: var(--red-bg); }
.btn.sm { padding: 6px 12px; font-size: .875rem; }
.btn.lg { padding: 13px 24px; font-size: 1.05rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.linkish { background: none; border: 0; padding: 0; color: var(--link); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

input[type=text], input[type=email], input[type=password], input[type=search], select, textarea { width: 100%; background: #fff; border: 1px solid var(--strong-line); border-radius: 7px; padding: 10px 12px; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(17, 20, 25, .1); }
textarea { min-height: 150px; font: 400 .875rem/1.45 var(--mono); resize: vertical; }
label.field { display: grid; gap: 5px; font-weight: 600; font-size: .9rem; color: var(--ink); }
label.field input, label.field select, label.field textarea { font-weight: 400; }
.grid-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.err { color: var(--red); font-weight: 600; font-size: .9rem; }
.ok { color: var(--green); font-weight: 600; font-size: .9rem; }

/* Rolling numbers */
.odo { display: inline-flex; line-height: 1; font-weight: 650; font-family: var(--display); font-variant-numeric: tabular-nums lining-nums; }
.odo-col { display: block; width: .6em; height: 1em; overflow: hidden; }
.odo-stack { display: block; transition: transform .9s cubic-bezier(.16, 1, .3, 1); }
.odo-stack b { display: block; height: 1em; line-height: 1; text-align: center; font: inherit; }
.odo-sep { display: block; width: .3em; text-align: center; }

/* Public flow */
.flow { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; padding-inline: max(20px, env(safe-area-inset-left, 0px)) max(20px, env(safe-area-inset-right, 0px)); }
.flow-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 20px; }
.flow-main { align-self: center; justify-self: center; width: 100%; max-width: 660px; display: grid; gap: 20px; padding-block: 28px 64px; }
.flow h1.hero { font-size: clamp(2.3rem, 6.4vw, 3.7rem); line-height: 1.04; font-weight: 650; letter-spacing: -.028em; }
.flow .sub { font-size: 1.125rem; color: var(--muted); max-width: 52ch; }
.scanbox { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; background: #fff; border: 1px solid var(--ink); border-radius: 9px; padding: 6px; box-shadow: var(--shadow); }
.scanbox input { border: 0; padding: 11px 12px; font-size: 1.125rem; background: transparent; }
.scanbox input:focus { box-shadow: none; }
.scanbox input:focus-visible { outline: none; }
.scanbox:focus-within { box-shadow: 0 0 0 3px rgba(17, 20, 25, .16); }
.disclose { font-size: .85rem; color: var(--muted); max-width: 62ch; }
.flow-foot { padding-block: 16px; font-size: .85rem; color: var(--muted); }
.panel { width: 100%; max-width: 460px; justify-self: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: clamp(22px, 5vw, 34px); display: grid; gap: 18px; box-shadow: var(--shadow); }
.panel h1 { font-size: 1.65rem; font-weight: 650; line-height: 1.15; }
.steps { display: flex; gap: 6px; }
.steps i { height: 4px; flex: 1; border-radius: 2px; background: var(--line); }
.steps i.on { background: var(--ink); }
.code-input { font: 650 1.9rem/1 var(--mono) !important; letter-spacing: .3em; text-align: center; padding: 14px 8px 14px 18px !important; }
.dev { background: var(--amber-bg); border: 1px solid var(--amber-line); border-radius: 7px; padding: 8px 12px; font-size: .875rem; color: var(--amber); }
.choice { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; padding: 14px; border: 1px solid var(--strong-line); border-radius: 9px; cursor: pointer; overflow-wrap: anywhere; }
.choice:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.choice input { margin-top: 4px; accent-color: var(--ink); }
.fields { display: grid; gap: 12px; }
.field-wrap { display: grid; gap: 4px; }
.checkline { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; cursor: pointer; }
.checkline input { margin-top: 4px; accent-color: var(--ink); width: 16px; height: 16px; }
.pw-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }

.page { max-width: 880px; margin: 0 auto; padding: 18px max(20px, env(safe-area-inset-right, 0px)) 72px max(20px, env(safe-area-inset-left, 0px)); display: grid; gap: 22px; }
.page-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.scan-head { display: grid; gap: 4px; }
.scan-head h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.12; font-weight: 650; overflow-wrap: anywhere; }
.counters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.counters > div { padding: 18px; display: grid; gap: 9px; border-left: 1px solid var(--line); min-width: 0; align-content: start; }
.counters > div:first-child { border-left: 0; }
.counters .odo { font-size: clamp(2rem, 7vw, 3.4rem); }
.progress { height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.progress div { height: 100%; background: var(--ink); width: 0; transition: width .3s; }
.verdict { padding: 18px 20px; border-radius: 10px; border: 1px solid; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; align-items: start; }
.verdict > .ico { grid-row: span 2; margin-top: 2px; }
.verdict.bad { background: var(--red-bg); border-color: var(--red-line); }
.verdict.warn { background: var(--amber-bg); border-color: var(--amber-line); }
.verdict.good { background: var(--green-bg); border-color: var(--green-line); }
.verdict h2 { font-size: 1.25rem; }
.verdict.bad h2, .verdict.bad > .ico { color: var(--red); }
.verdict.warn h2, .verdict.warn > .ico { color: var(--amber); }
.verdict.good h2, .verdict.good > .ico { color: var(--green); }
.sticky-cta { position: sticky; bottom: 0; padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px)); display: flex; justify-content: flex-end; z-index: 4; pointer-events: none; }
.sticky-cta .btn { pointer-events: auto; box-shadow: var(--pop); }
.section-title { font-size: 1.2rem; font-weight: 650; }
.live { display: grid; gap: 12px; }
.live-big { background: var(--ink); color: #fff; border-radius: 10px; padding: 24px 22px; display: grid; gap: 10px; min-width: 0; }
.live-big .odo { font-size: clamp(1.7rem, 7.2vw, 3.8rem); color: #ff8d84; }
.live-big .sub2 { color: #c3c8d0; font-size: .875rem; }
.live-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: grid; gap: 7px; align-content: start; min-width: 0; box-shadow: var(--shadow); }
.stat .odo { font-size: 2rem; }
.stat .name { font-size: 1.02rem; font-weight: 650; color: var(--ink); overflow-wrap: anywhere; }

/* Suite shell */
.topbar { position: sticky; top: 0; z-index: 20; height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 max(14px, env(safe-area-inset-right, 0px)) 0 max(10px, env(safe-area-inset-left, 0px)); background: var(--surface); border-bottom: 1px solid var(--line); }
.iconbtn { position: relative; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; border-radius: 8px; color: var(--text); cursor: pointer; flex: none; }
.iconbtn:hover, .iconbtn.on { background: var(--hover); color: var(--ink); }
.dot-count { position: absolute; top: 2px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: .68rem; font-weight: 700; line-height: 17px; text-align: center; }
.searchbtn { flex: 1; max-width: 520px; margin-inline: auto; display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 12px; background: var(--sunken); border: 1px solid transparent; border-radius: 8px; color: var(--muted); cursor: pointer; text-align: left; min-width: 0; }
.searchbtn:hover { border-color: var(--strong-line); }
.searchbtn span.t { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
kbd { font: 500 .72rem/1 var(--sans); padding: 3px 5px; border: 1px solid var(--strong-line); border-radius: 4px; background: #fff; color: var(--muted); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; }
.shell { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: calc(100vh - 56px); min-height: calc(100dvh - 56px); }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 12px 10px 20px; position: sticky; top: 56px; height: calc(100vh - 56px); height: calc(100dvh - 56px); overflow-y: auto; }
.side h4 { margin: 14px 10px 4px; font: 600 .7rem/1.3 var(--sans); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.side a { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; padding: 6px 10px 6px 7px; border-radius: 7px; font-weight: 500; font-size: .92rem; }
.side a:hover { background: var(--hover); color: var(--ink); }
.side a.on { background: var(--hover); color: var(--ink); font-weight: 650; box-shadow: inset 3px 0 0 var(--ink); }
.tile { --c: #333; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 46px; height: 46px; border-radius: 12px; color: #fff; background: var(--c); }
.tile.s { width: 26px; height: 26px; border-radius: 7px; }
.main { padding: 26px clamp(16px, 4vw, 44px) 80px; max-width: 1120px; width: 100%; display: grid; gap: 22px; align-content: start; min-width: 0; }
.app-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.app-head > div { flex: 1 1 260px; min-width: 0; }
.app-head h1 { font-size: 1.75rem; font-weight: 650; line-height: 1.15; }
.app-head p { color: var(--muted); max-width: 70ch; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; display: grid; gap: 12px; min-width: 0; box-shadow: var(--shadow); align-content: start; }
.card h2 { font-size: 1.06rem; font-weight: 650; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.between { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 5px; font-size: .76rem; font-weight: 600; white-space: nowrap; }
.pill.bad { background: var(--red-bg); color: var(--red); }
.pill.warn { background: var(--amber-bg); color: var(--amber); }
.pill.good { background: var(--green-bg); color: var(--green); }
.pill.off { background: var(--sunken); color: var(--muted); }
.pill.ink { background: var(--ink); color: #fff; }

/* Home */
.hero-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 26px; align-items: center; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.ring { position: relative; width: 148px; height: 148px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 11; }
.ring .t { stroke: var(--sunken); }
.ring .v { stroke-linecap: round; transition: stroke-dashoffset 1.3s cubic-bezier(.16, 1, .3, 1); }
.ring .n { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 3px; }
.ring .n .odo { font-size: 2.8rem; justify-content: center; }
.hero-copy { display: grid; gap: 10px; min-width: 0; justify-items: start; }
.hero-copy h1 { font-size: clamp(1.45rem, 3vw, 2rem); font-weight: 650; line-height: 1.15; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: grid; gap: 7px; text-decoration: none; color: inherit; box-shadow: var(--shadow); min-width: 0; transition: border-color .15s; }
.kpi:hover { border-color: var(--ink); }
.kpi .odo { font-size: 2rem; }
.action { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.action:first-child { border-top: 0; padding-top: 0; }
.action:last-child { padding-bottom: 0; }
.action b { display: block; font-weight: 650; color: var(--ink); }
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 10px; }
.appcard { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: transform .12s, border-color .12s; }
.appcard:hover { transform: translateY(-1px); border-color: var(--ink); }
.appcard b { display: block; color: var(--ink); font-weight: 650; }
.appcard span.d { display: block; font-size: .8rem; color: var(--muted); line-height: 1.3; }
.apps-group { display: grid; gap: 8px; }
.apps-group h3 { font: 600 .74rem/1.3 var(--sans); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }

/* Popovers */
.pop { position: fixed; z-index: 40; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--pop); max-width: calc(100vw - 16px); max-height: calc(100dvh - 72px); overflow-y: auto; }
.pop-waffle { top: 60px; left: 8px; width: 356px; padding: 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.pop-waffle a { display: grid; justify-items: center; gap: 6px; padding: 10px 2px; border-radius: 9px; text-decoration: none; color: var(--text); font-size: .8rem; text-align: center; line-height: 1.2; }
.pop-waffle a:hover { background: var(--hover); }
.pop-right { top: 60px; right: 8px; width: 340px; padding: 8px; }
.pop-right a, .pop-right button.mi { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 7px; background: none; border: 0; text-align: left; text-decoration: none; color: var(--text); cursor: pointer; }
.pop-right a:hover, .pop-right button.mi:hover { background: var(--hover); }
.alert-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 10px; padding: 10px; border-bottom: 1px solid var(--line); }
.alert-item:last-child { border-bottom: 0; }
.alert-item > .ico { grid-row: span 2; }
.scrim { position: fixed; inset: 0; z-index: 30; background: rgba(17, 20, 25, .28); }
.scrim.clear { background: transparent; }
.palette { position: fixed; z-index: 40; top: 12vh; left: 50%; transform: translateX(-50%); width: min(560px, calc(100vw - 20px)); background: var(--surface); border-radius: 12px; box-shadow: var(--pop); overflow: hidden; }
.palette input { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 15px 16px; font-size: 1.05rem; }
.palette input:focus { box-shadow: none; border-color: var(--line); }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: 52vh; overflow-y: auto; }
.palette li a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 7px; text-decoration: none; color: var(--text); }
.palette li.sel a, .palette li a:hover { background: var(--hover); }
.palette li b { color: var(--ink); font-weight: 650; }

/* Lists and tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th { text-align: left; font-size: .78rem; color: var(--muted); font-weight: 600; padding: 7px 12px 7px 0; border-bottom: 1px solid var(--strong-line); white-space: nowrap; }
td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
details.breach { border-top: 1px solid var(--line); }
details.breach:first-of-type { border-top: 0; }
.breach summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 11px 2px; align-items: center; }
.breach summary::-webkit-details-marker { display: none; }
.breach summary:hover { background: var(--sunken); }
.breach .bname { font-weight: 650; color: var(--ink); overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 2px 13px; }
.chip { font-size: .76rem; padding: 2px 8px; border-radius: 12px; background: var(--sunken); color: var(--text); }
.chip.bad { background: var(--red-bg); color: var(--red); font-weight: 600; }
.letter { white-space: pre-wrap; font: 400 .84rem/1.5 var(--mono); background: var(--sunken); border: 1px solid var(--line); border-radius: 7px; padding: 14px; overflow-wrap: anywhere; color: var(--text); }
.tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--strong-line); }
.tabs button { background: none; border: 0; padding: 8px 12px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--ink); border-color: var(--ink); }
.reason { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); align-items: start; }
.reason:first-child { border-top: 0; }
.bar-stack { display: flex; height: 9px; border-radius: 5px; overflow: hidden; background: var(--sunken); gap: 2px; }
.bar-stack i { display: block; height: 100%; transition: width .5s; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .82rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 9px; height: 9px; border-radius: 2px; display: block; }
.filter { display: flex; flex-wrap: wrap; gap: 4px; }
.filter button { background: var(--surface); border: 1px solid var(--strong-line); border-radius: 15px; padding: 3px 11px; font-size: .84rem; cursor: pointer; font-weight: 500; }
.filter button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
input[type=range] { width: 100%; accent-color: var(--ink); }
.levels { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); font-size: .8rem; color: var(--muted); text-align: center; }
.levels b { color: var(--ink); }
.check { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; }
.check:first-child { border-top: 0; }
.check input { margin-top: 4px; accent-color: var(--green); }
.ticks { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ticks li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; }
.ticks .ico { color: var(--green); margin-top: 2px; }

/* Plans */
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; box-shadow: var(--shadow); }
.plan.suggested { border: 2px solid var(--ink); }
.plan h2 { font-size: 1.1rem; font-weight: 650; }
.price { font: 650 1.9rem/1.1 var(--display); letter-spacing: -.02em; color: var(--ink); }
.price small { font-size: .82rem; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.plan ul { flex: 1; font-size: .88rem; }
.enterprise { background: var(--ink); color: #d7dbe1; border-radius: 12px; padding: 24px; display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr); gap: 14px 32px; }
.enterprise h2, .enterprise .price { color: #fff; }
.enterprise .price small, .enterprise .muted { color: #bcc2cc; }
.enterprise .ticks { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.enterprise .ticks .ico { color: #72d6a0; }
.enterprise .intro { display: grid; gap: 10px; align-content: start; }
.selectable { user-select: all; font-family: var(--mono); font-size: .9rem; }

.bottomnav { display: none; }
.legal { max-width: 720px; margin: 0 auto; padding: 24px max(20px, env(safe-area-inset-right, 0px)) 72px max(20px, env(safe-area-inset-left, 0px)); display: grid; gap: 14px; position: relative; z-index: 1; }
.legal article { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: clamp(18px, 4vw, 32px); display: grid; gap: 12px; }
.legal h1 { font-size: 2rem; font-weight: 650; }
.legal h2 { font-size: 1.1rem; font-weight: 650; margin-top: 10px; }
.legal ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

@media (max-width: 1000px) {
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .main { padding-top: 18px; padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
  .searchbtn kbd { display: none; }
  .bottomnav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--line); padding: 6px max(6px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px)); }
  .bottomnav a, .bottomnav button { display: grid; justify-items: center; gap: 2px; font-size: .68rem; color: var(--muted); text-decoration: none; background: none; border: 0; padding: 4px 0; cursor: pointer; }
  .bottomnav .on { color: var(--ink); font-weight: 650; }
  .enterprise { grid-template-columns: minmax(0, 1fr); }
  .hero-card { padding: 18px; gap: 16px; }
}
@media (max-width: 560px) {
  .scanbox { grid-template-columns: minmax(0, 1fr); }
  .counters { grid-template-columns: minmax(0, 1fr); }
  .counters > div { border-left: 0; border-top: 1px solid var(--line); grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .counters > div:first-child { border-top: 0; }
  .hero-card { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  .hero-copy { justify-items: center; }
  .plans { grid-template-columns: minmax(0, 1fr); }
  .action { grid-template-columns: auto minmax(0, 1fr); }
  .action .btn { grid-column: 2; justify-self: start; }
  .apps { grid-template-columns: minmax(0, 1fr); }
  .pop-waffle { left: 8px; right: 8px; width: auto; }
  .pop-right { left: 8px; right: 8px; width: auto; }
}
@media print {
  #threads, .topbar, .side, .bottomnav, .noprint { display: none !important; }
  body { background: #fff; }
  .shell { display: block; }
  .main { padding: 0; max-width: none; }
  .card, .stat { box-shadow: none; break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) {
  .odo-stack, .ring .v, .bar-stack i, .progress div, .appcard { transition: none; }
}
