/* AIML Digital Tools */
:root {
  --accent: #8b5cf6; --accent2: #d4af37; --gold: #d4af37; --gold2: #f3dc8a;
  --bg: #0c0a14; --bg2: #110e1b; --panel: #161222; --panel2: #1d182c; --line: #2a2340; --line2: #3a3155;
  --text: #ececf3; --muted: #9393a8; --good: #34d399; --bad: #f87171; --warn: #fbbf24;
  --r: 14px; --r-sm: 10px; --side: 256px;
  --font: Manrope, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Playfair Display", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --shadow: 0 10px 30px -12px rgba(0,0,0,.5);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #faf8f4; --bg2: #ffffff; --panel: #ffffff; --panel2: #f5f1ea; --line: #e8e1d4; --line2: #d9cfbd; --gold: #a8841f;
  --text: #15151f; --muted: #6a6a80; --shadow: 0 10px 30px -14px rgba(30,30,60,.18); color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); min-height: 100vh; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.12; margin: 0 0 .4em; letter-spacing: -.01em; font-family: var(--display); font-weight: 600; }
h1 { font-size: clamp(26px, 3.2vw, 36px); }
h2 { font-size: 22px; }
p { margin: 0 0 .8em; }
code, .mono { font-family: var(--mono); font-size: .92em; }
kbd { font: 11px var(--mono); padding: 2px 6px; border: 1px solid var(--line2); border-radius: 6px; color: var(--muted); background: var(--panel2); }
.muted { color: var(--muted); } .small { font-size: 13px; } .grow { flex: 1; min-width: 0; } .right { text-align: right; } .break { word-break: break-all; }
.boot { display: grid; place-items: center; min-height: 100vh; color: var(--muted); }
.ic { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- layout ---------- */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--bg2); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 14px 12px; z-index: 40; transition: transform .2s, width .2s; }
.content { margin-left: var(--side); min-width: 0; transition: margin .2s; }
#main { max-width: 1200px; margin: 0 auto; padding: 24px 28px 80px; outline: none; }
.brand-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; padding: 2px 4px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 19px/1.05 var(--display); letter-spacing: .01em; }
.brand b { font-weight: 700; background: linear-gradient(120deg, var(--gold2), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-txt small { display: block; font: 600 10px var(--font); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.logo { width: 40px; height: 40px; border-radius: 12px; padding: 4px; object-fit: contain; background: #fff; box-shadow: 0 6px 18px -8px var(--accent), inset 0 0 0 1px color-mix(in srgb, var(--gold) 45%, transparent); }
.i3d { display: block; flex: none; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0,0,0,.25)); }
.nav-link .i3d { width: 22px; height: 22px; }
.search-btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 10px; border: 1px solid var(--line); background: var(--panel); border-radius: var(--r-sm); color: var(--muted); cursor: pointer; margin-bottom: 12px; }
.search-btn span { flex: 1; text-align: left; } .search-btn:hover { border-color: var(--line2); }
.side-nav { flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.side-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 16px 10px 6px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; text-decoration: none; color: var(--muted); font-size: 14px; }
.nav-link .ic { color: var(--c, currentColor); opacity: .9; }
.nav-link:hover { background: var(--panel); color: var(--text); }
.nav-link.active { background: var(--panel2); color: var(--text); box-shadow: inset 2px 0 0 var(--c, var(--accent)); }
.nav-link .nl { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.count { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.side-cta { display: block; margin: 12px 0 8px; padding: 12px; border-radius: 12px; text-decoration: none; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, transparent), color-mix(in srgb, var(--accent2) 14%, transparent)); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); font-size: 13px; }
.side-cta b { display: block; margin-bottom: 2px; } .side-cta span { color: var(--muted); }
.side-foot { display: flex; gap: 14px; font-size: 12px; padding: 6px 8px 0; } .side-foot a { color: var(--muted); text-decoration: none; } .side-foot a:hover { color: var(--text); }
body.collapsed { --side: 72px; }
body.collapsed .brand-txt, body.collapsed .search-btn span, body.collapsed .search-btn kbd, body.collapsed .nav-link .nl, body.collapsed .count, body.collapsed .side-label, body.collapsed .side-cta, body.collapsed .side-foot { display: none; }
body.collapsed .brand-row { flex-direction: column; gap: 10px; } body.collapsed .collapse-btn { transform: rotate(180deg); }
body.collapsed .nav-link, body.collapsed .search-btn { justify-content: center; }

.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 10px 28px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.crumbs { flex: 1; display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); min-width: 0; white-space: nowrap; overflow: hidden; }
.crumbs a { text-decoration: none; } .crumbs a:hover { color: var(--text); } .crumbs .cur { color: var(--text); overflow: hidden; text-overflow: ellipsis; } .crumbs .sep { opacity: .5; }
.top-search { display: flex; align-items: center; gap: 8px; padding: 7px 12px; min-width: 260px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); cursor: pointer; }
.top-search span { flex: 1; text-align: left; font-size: 14px; }
.pill-local { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.pill-local i, .eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 25%, transparent); }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid transparent; background: none; cursor: pointer; color: var(--muted); text-decoration: none; }
.icon-btn:hover { background: var(--panel); color: var(--text); border-color: var(--line); }
.menu-btn { display: none; }
.scrim { display: none; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line2); background: var(--panel2); cursor: pointer; text-decoration: none; font-weight: 550; font-size: 14px; white-space: nowrap; transition: transform .05s, background .15s, border-color .15s; }
.btn:hover { border-color: var(--muted); } .btn:active { transform: translateY(1px); } .btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: linear-gradient(135deg, #7c3aed, #5b21b6); border-color: transparent; color: #fff; box-shadow: 0 8px 20px -10px var(--accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { background: color-mix(in srgb, var(--bad) 18%, var(--panel2)); border-color: color-mix(in srgb, var(--bad) 50%, transparent); }
.btn.ghost { background: transparent; } .btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; } .btn.big { padding: 12px 22px; font-size: 15px; }
.btn.on { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 50%, transparent); } .btn.on .ic { fill: var(--warn); }
.input { width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.input.big { font-size: 17px; padding: 12px 14px; } .input.mono { font-family: var(--mono); font-size: 13.5px; }
textarea.input { resize: vertical; line-height: 1.5; min-height: 80px; }
select.input { cursor: pointer; }
.color { width: 44px; height: 38px; padding: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); cursor: pointer; }
.range { width: 100%; accent-color: var(--accent); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: 13px; color: var(--muted); font-weight: 500; } .field-label b { color: var(--text); }
.hint { color: var(--muted); font-size: 12px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; user-select: none; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line); flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; cursor: pointer; color: var(--muted); font-size: 13.5px; font-weight: 550; }
.seg button.on { background: var(--bg2); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
.row.tight { gap: 6px; margin: 0; flex-wrap: nowrap; } .row.between { justify-content: space-between; } .row.center { justify-content: center; } .row > .input { flex: 1; min-width: 180px; }
.stack { display: flex; flex-direction: column; gap: 10px; margin: 10px 0; }
.options { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; align-items: end; margin: 14px 0; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 12px 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin: 12px 0; min-width: 0; }
.split > .panel { margin: 0; }
.panel-head, .ph { font-weight: 600; font-size: 14px; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ph-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.panel > .input { min-height: 0; }
.error { color: var(--bad); font-size: 14px; min-height: 0; } .error:empty { display: none; }
.warn { color: var(--warn); } .ok { color: var(--good); } .bad-t { color: var(--bad); }
p.warn, p.ok, p.cmp { padding: 10px 14px; border-radius: 10px; background: color-mix(in srgb, currentColor 10%, transparent); }
.note { color: var(--muted); font-size: 13px; margin-top: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; } .chips.col { flex-direction: column; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-size: 13px; text-decoration: none; }
.chip:hover { border-color: var(--accent); } .chip.static { cursor: default; } .chip.static:hover { border-color: var(--line); } .chip.big { padding: 8px 14px 8px 8px; font-size: 14px; }
.dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; border: 1px solid rgba(127,127,127,.3); }
.badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--panel2); border: 1px solid var(--line); white-space: nowrap; }
.badge.good { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, transparent); background: color-mix(in srgb, var(--good) 10%, transparent); }
.badge.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); background: color-mix(in srgb, var(--bad) 10%, transparent); }
.badge.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.badge.c2 { color: var(--good); } .badge.c3 { color: var(--accent2); } .badge.c4 { color: var(--warn); } .badge.c5 { color: var(--bad); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.stat { padding: 12px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.stat-v { font-size: 21px; font-weight: 700; font-family: var(--display); letter-spacing: -.01em; font-variant-numeric: tabular-nums; word-break: break-word; } .stat-l { font-size: 12px; color: var(--muted); }
.big-num { font-family: var(--display); font-size: clamp(26px, 4vw, 40px); font-weight: 600; letter-spacing: -.01em; margin: 12px 0; word-break: break-word; font-variant-numeric: tabular-nums; }
.lead { font-size: 17px; color: var(--muted); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 12px 0; font-size: 14px; } .kv dt { color: var(--muted); } .kv dd { margin: 0; min-width: 0; word-break: break-word; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; margin: 10px 0; max-height: 560px; } .table-wrap.tall { max-height: 70vh; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th, .tbl td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tbl th { position: sticky; top: 0; background: var(--panel2); font-weight: 600; white-space: nowrap; z-index: 1; }
.tbl tr:last-child td { border-bottom: 0; } .tbl tbody tr:hover td { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.tbl.compact { width: auto; } .tbl.compact td { text-align: center; }
.sortable { cursor: pointer; user-select: none; } .sortable:hover { color: var(--accent); }
pre.code { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; overflow: auto; font: 12.5px/1.5 var(--mono); margin: 0; white-space: pre-wrap; word-break: break-word; }
.hash-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); background: var(--panel); border-radius: 10px; margin: 6px 0; }
.hash-row.match { border-color: var(--good); }
.hash-l { min-width: 90px; font-size: 13px; color: var(--muted); font-weight: 600; } .hash-v { flex: 1; min-width: 0; word-break: break-all; font-size: 13px; }
.copyable { cursor: copy; } .copyable:hover { color: var(--accent); }

/* dropzone & files */
.dropzone { border: 1.5px dashed var(--line2); border-radius: 16px; padding: 34px 20px; text-align: center; cursor: pointer; background: color-mix(in srgb, var(--accent) 4%, var(--panel)); transition: all .15s; margin: 6px 0 14px; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--panel)); }
.dz-icon { width: 64px; height: 64px; margin: 0 auto 10px; display: grid; place-items: center; }
.dz-icon .i3d { width: 56px; height: 56px; }
.dz-label { font-weight: 600; font-size: 16px; } .dz-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.filebar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); margin: 6px 0 12px; }
.fname { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.idx { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--panel2); font-size: 12px; font-weight: 700; flex: none; }
.thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; background: var(--panel2); flex: none; } .thumb.lg { width: 140px; height: 90px; }
.preview { display: flex; justify-content: center; align-items: center; border-radius: 14px; border: 1px solid var(--line); padding: 12px; margin: 12px 0; overflow: hidden; background: var(--panel); }
.checker { background-color: var(--panel); background-image: linear-gradient(45deg, var(--panel2) 25%, transparent 25%), linear-gradient(-45deg, var(--panel2) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--panel2) 75%), linear-gradient(-45deg, transparent 75%, var(--panel2) 75%); background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0; }
.fit { max-width: 100%; max-height: 62vh; height: auto; display: block; border-radius: 6px; }
.crop-canvas { max-width: 100%; height: auto; touch-action: none; }
.editor { display: grid; grid-template-columns: 300px 1fr; gap: 16px; margin: 12px 0; align-items: start; }
.editor.wide { grid-template-columns: minmax(320px, 420px) 1fr; }
.editor-side { display: flex; flex-direction: column; gap: 12px; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.editor-main { min-width: 0; } .editor-main .preview { margin-top: 0; }
.icon-grid { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0; }
.icon-cell { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); min-width: 110px; justify-content: flex-end; }
.swatch.big { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); }

/* text helpers */
.highlight { white-space: pre-wrap; word-break: break-word; line-height: 1.7; font-size: 13.5px; }
.highlight mark { background: color-mix(in srgb, var(--accent) 35%, transparent); color: inherit; border-radius: 3px; padding: 1px 0; box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 60%, transparent); }
.diff { border: 1px solid var(--line); border-radius: 12px; overflow: auto; max-height: 70vh; font-size: 13px; }
.dl { display: grid; grid-template-columns: 44px 44px 20px 1fr; white-space: pre-wrap; word-break: break-word; }
.dl .ln { color: var(--muted); text-align: right; padding-right: 8px; user-select: none; opacity: .7; } .dl .sig { color: var(--muted); }
.dl.add { background: color-mix(in srgb, var(--good) 14%, transparent); } .dl.del { background: color-mix(in srgb, var(--bad) 14%, transparent); }
.tree { font: 13px/1.7 var(--mono); overflow: auto; max-height: 70vh; } .tree details { padding-left: 16px; } .tree summary { cursor: pointer; margin-left: -16px; } .tree .leaf { padding-left: 16px; }
.tk { color: var(--accent2); } .t-string { color: var(--good); } .t-number { color: var(--warn); } .t-boolean, .t-null { color: #f472b6; }
.path { margin-left: 8px; font-size: 11px; border: 0; background: none; color: var(--muted); cursor: pointer; opacity: 0; } summary:hover .path { opacity: 1; }
.prose { line-height: 1.7; } .prose h1, .prose h2, .prose h3 { margin-top: 1.2em; } .prose table { border-collapse: collapse; } .prose td, .prose th { border: 1px solid var(--line); padding: 6px 10px; }
.prose pre { background: var(--bg2); padding: 12px; border-radius: 10px; overflow: auto; } .prose blockquote { border-left: 3px solid var(--accent); margin: 0; padding-left: 14px; color: var(--muted); } .prose img { max-width: 100%; }
.prose.narrow { max-width: 720px; } .md-preview { min-height: 420px; overflow: auto; max-height: 70vh; }
.cron-legend { font-size: 12px; margin: 4px 0 12px; letter-spacing: .02em; }
.calc-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; } .calc-line .input { width: 130px; flex: none; } .result { font-size: 18px; }
.meter { margin: 10px 0; } .meter-bar { height: 8px; border-radius: 99px; background: var(--panel2); overflow: hidden; margin: 6px 0 2px; }
.meter-bar span { display: block; height: 100%; border-radius: 99px; transition: width .2s; } .meter-bar .good { background: var(--good); } .meter-bar .warn { background: var(--warn); } .meter-bar .bad { background: var(--bad); }
.bar { display: flex; border-radius: 10px; overflow: hidden; font-size: 12px; font-weight: 600; margin: 12px 0; }
.bar span { padding: 8px 10px; background: var(--accent); color: #fff; white-space: nowrap; overflow: hidden; } .bar .b2 { background: var(--warn); color: #111; }
.clock { font-size: clamp(44px, 9vw, 84px); font-weight: 700; text-align: center; margin: 18px 0; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.laps { max-width: 360px; margin: 10px auto; }
.pw-box { padding: 18px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); margin: 10px 0; }
.pw-main { font-size: clamp(18px, 2.6vw, 26px); word-break: break-all; margin-bottom: 8px; }
.tips { margin: 8px 0; padding-left: 20px; color: var(--warn); }
.qr-wrap { display: flex; justify-content: center; margin: 12px 0; } .qr { max-width: min(100%, 360px); height: auto; border-radius: 12px; background: #fff; }
.cam { position: relative; } .mirror { transform: scaleX(-1); } .countdown { position: absolute; inset: 0; display: grid; place-items: center; font-size: 120px; font-weight: 800; color: #fff; text-shadow: 0 4px 30px rgba(0,0,0,.6); pointer-events: none; }

/* design */
.color-hero { height: 140px; border-radius: 16px; display: grid; place-items: center; font: 700 28px var(--mono); margin: 12px 0; border: 1px solid var(--line); }
.swatches { display: grid; grid-template-columns: repeat(12, 1fr); border-radius: 12px; overflow: hidden; }
.sw { height: 64px; border: 0; cursor: pointer; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; font: 10px var(--mono); }
.sw span { opacity: 0; } .sw:hover span { opacity: 1; }
.grad-prev { height: 220px; border-radius: 16px; border: 1px solid var(--line); margin: 8px 0; }
.palette { display: grid; grid-template-columns: repeat(5, 1fr); height: 200px; border-radius: 16px; overflow: hidden; margin: 12px 0; }
.pal { border: 0; cursor: pointer; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 14px; font: 600 13px var(--mono); }
.shadow-stage { display: grid; place-items: center; min-height: 320px; border-radius: 16px; background: var(--panel2); border: 1px solid var(--line); }
[data-theme="dark"] .shadow-stage { background: #e9e9f1; }
.shadow-box, .radius-box { width: 200px; height: 140px; background: #fff; border-radius: 16px; display: grid; place-items: center; color: #333; font-weight: 600; }
.radius-box { background: linear-gradient(135deg, var(--accent), var(--accent2)); width: 220px; height: 220px; }
.contrast-demo { padding: 24px; border-radius: 14px; margin: 12px 0; border: 1px solid var(--line); } .cd-l { font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.type-scale { margin: 12px 0; } .ts-row { padding: 10px 0; border-bottom: 1px solid var(--line); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.glass-stage { min-height: 300px; border-radius: 16px; display: grid; place-items: center; background: radial-gradient(circle at 25% 30%, #ff6ec7 0 18%, transparent 19%), radial-gradient(circle at 75% 70%, #22d3ee 0 20%, transparent 21%), linear-gradient(135deg, #7c5cff, #1e1b4b); margin: 12px 0; }
.glass-card { width: 260px; padding: 28px; color: #fff; display: flex; flex-direction: column; gap: 4px; }
.glass-card b { font-size: 20px; }

/* marketing */
.serp { font-family: Arial, sans-serif; max-width: 640px; padding: 6px 2px; } .serp.mobile { max-width: 400px; }
.serp-site { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; } .serp-fav { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--panel2); border: 1px solid var(--line); font-size: 12px; font-weight: 700; }
.serp-name { font-size: 14px; } .serp-url { font-size: 12px; color: var(--muted); }
.serp-title { color: #8ab4f8; font-size: 20px; line-height: 1.3; margin-bottom: 4px; } [data-theme="light"] .serp-title { color: #1a0dab; }
.serp-desc { font-size: 14px; color: var(--muted); line-height: 1.58; }
.og-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; max-width: 520px; }
.og-img { aspect-ratio: 1.91/1; background: var(--panel2) center/cover; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.og-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; background: var(--panel2); }

/* invoice */
.invoice-paper { background: #fff; color: #1b1b25; padding: 36px; border-radius: 12px; box-shadow: var(--shadow); font-size: 14px; }
.inv-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #1b1b25; padding-bottom: 14px; margin-bottom: 18px; } .inv-head h2 { margin: 0; letter-spacing: .04em; }
.invoice-paper .muted { color: #666; }
.inv-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 18px; } .inv-parties small { color: #777; font-weight: 700; letter-spacing: .06em; } .inv-parties pre, .inv-notes { font: inherit; white-space: pre-wrap; margin: 4px 0 0; }
.inv-tbl { width: 100%; border-collapse: collapse; margin-bottom: 14px; } .inv-tbl th { background: #f2f2f7; text-align: left; padding: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; } .inv-tbl td { padding: 8px; border-bottom: 1px solid #eee; } .inv-tbl td:not(:first-child), .inv-tbl th:not(:first-child) { text-align: right; }
.inv-tot { margin-left: auto; max-width: 280px; } .inv-tot div { display: flex; justify-content: space-between; padding: 4px 0; } .inv-tot .grand { border-top: 2px solid #1b1b25; margin-top: 6px; padding-top: 8px; font-size: 17px; }
.inv-notes { margin-top: 20px; color: #555; border-top: 1px solid #eee; padding-top: 12px; }

/* ---------- pages ---------- */
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 28px; align-items: center; padding: 18px 0 8px; }
.hero h1 { font-size: clamp(38px, 5.4vw, 68px); line-height: 1.02; letter-spacing: -.015em; margin: 14px 0; font-weight: 600; }
.hero h1 .grad { font-style: italic; }
.grad { background: linear-gradient(100deg, #c4b5fd, var(--accent) 40%, var(--gold) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--gold); padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); }
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0; } .hero-stats .stat { text-align: left; }
.ud { padding: 16px; border-radius: 20px; border: 1px solid var(--line); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 10%, var(--panel)), var(--panel)); box-shadow: var(--shadow); }
.ud .dropzone { padding: 56px 20px; margin: 0; } .ud-suggest:not(:empty) { margin-top: 14px; } .ud-file { margin-bottom: 4px; }
.sec { margin: 40px 0; } .sec-head { margin-bottom: 14px; } .sec-head h2 { margin: 0; } .sec-head p { margin: 4px 0 0; }
.sec-num { font: 700 11px var(--font); letter-spacing: .2em !important; color: var(--gold); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.quick-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; font-weight: 550; font-size: 14px; transition: border-color .15s, transform .15s; }
.quick-item:hover { border-color: var(--accent); transform: translateY(-1px); }
.mono-tile { width: 46px; height: 46px; flex: none; border-radius: 14px; display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--c, var(--accent)) 26%, transparent), color-mix(in srgb, var(--c, var(--accent)) 8%, var(--panel2))); border: 1px solid color-mix(in srgb, var(--c, var(--accent)) 28%, var(--line)); }
.mono-tile .i3d { width: 32px; height: 32px; }
.quick-item .mono-tile, .chip .mono-tile, .ranked .mono-tile, .pal-item .mono-tile { width: 36px; height: 36px; border-radius: 11px; } .quick-item .i3d, .chip .i3d, .ranked .i3d, .pal-item .i3d { width: 24px; height: 24px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.tool-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; min-height: 150px; }
.tool-card:hover { border-color: color-mix(in srgb, var(--c) 60%, transparent); transform: translateY(-2px); box-shadow: var(--shadow); }
.tool-card.big { background: linear-gradient(160deg, color-mix(in srgb, var(--c) 12%, var(--panel)), var(--panel)); min-height: 170px; }
.tc-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.tc-name { font: 600 18px/1.25 var(--display); } .tc-desc { color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.tc-cat { margin-top: auto; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding-top: 6px; }
.fav-btn { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 8px; opacity: .55; transition: opacity .15s; }
.tool-card:hover .fav-btn, .fav-btn.on { opacity: 1; } .fav-btn.on { color: var(--warn); } .fav-btn.on .ic { fill: var(--warn); } .fav-btn:hover { background: var(--panel2); }
.ranked { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 4px 20px; }
.ranked a { display: flex; align-items: center; gap: 12px; padding: 9px 6px; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 550; }
.ranked a:hover { color: var(--accent); } .rk { font: 600 12px var(--mono); color: var(--muted); width: 22px; }
.cat-strip { display: flex; flex-wrap: wrap; gap: 8px; margin: 32px 0 8px; }
.cat-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; font-size: 14px; font-weight: 550; }
.cat-chip .ic { color: var(--c); } .cat-chip b { font-size: 12px; color: var(--muted); font-weight: 600; } .cat-chip:hover { border-color: var(--c); }
.cat-sec { padding-top: 28px; border-top: 1px solid var(--line); }
.mini-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2px 20px; margin-top: 12px; }
.mini-list a { display: flex; flex-direction: column; padding: 9px 0; border-bottom: 1px dashed var(--line); text-decoration: none; font-size: 14px; } .mini-list a:hover b { color: var(--c); } .mini-list .muted { font-size: 13px; }
.agency { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: center; padding: 32px; margin: 48px 0 0; border-radius: 22px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); background: radial-gradient(circle at 100% 0, color-mix(in srgb, var(--accent2) 18%, transparent), transparent 50%), linear-gradient(160deg, color-mix(in srgb, var(--accent) 14%, var(--panel)), var(--panel)); }
.agency h2 { font-size: clamp(24px, 3vw, 34px); margin: 12px 0 8px; } .agency p { color: var(--muted); }
.agency-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-weight: 550; } .agency-list li { padding: 10px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.agency-list.compact { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.page-head, .tool-head { display: flex; align-items: center; gap: 16px; margin: 6px 0 18px; flex-wrap: wrap; }
.cat-icon { width: 68px; height: 68px; border-radius: 16px; display: grid; place-items: center; color: var(--c, var(--accent)); background: color-mix(in srgb, var(--c, var(--accent)) 14%, var(--panel)); border: 1px solid var(--line); }
.page-head h1, .tool-head h1 { margin: 0 0 4px; } .page-head p, .tool-head p { margin: 0; }
.tool-head .mono-tile { width: 72px; height: 72px; border-radius: 20px; } .tool-head .mono-tile .i3d { width: 52px; height: 52px; }
.privacy-strip { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--good); padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--good) 8%, transparent); border: 1px solid color-mix(in srgb, var(--good) 22%, transparent); margin-bottom: 16px; }
.tool-body { min-height: 300px; }
.empty { padding: 28px; text-align: center; border: 1px dashed var(--line2); border-radius: 16px; color: var(--muted); } .empty b { color: var(--text); display: block; margin-bottom: 4px; }
.empty.big { padding: 56px 24px; } .empty.big h1, .empty.big h2 { color: var(--text); }
.settings { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; } .settings .panel { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.accent-dot { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; } .accent-dot.on { border-color: var(--text); box-shadow: 0 0 0 3px var(--bg); }
.contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px; align-items: start; } .contact h1 { font-size: clamp(30px, 4vw, 46px); margin: 14px 0; }
.contact-form .options { background: none; border: 0; padding: 0; margin: 0 0 12px; }
.contact-form .btn { margin-top: 14px; }

/* palette */
.pal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(5,5,10,.55); backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; animation: fade .12s; }
.pal { width: 100%; max-width: 640px; background: var(--bg2); border: 1px solid var(--line2); border-radius: 18px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.6); overflow: hidden; }
.pal-top { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.pal-input { flex: 1; border: 0; outline: none; background: none; font-size: 17px; color: var(--text); }
.pal-list { max-height: 56vh; overflow-y: auto; padding: 6px; }
.pal-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; text-decoration: none; }
.pal-item b { font-weight: 600; } .pal-item .grow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .pal-item.sel { background: var(--panel2); }
.pal-item .tc-cat { margin: 0; padding: 0; }
.pal-foot { padding: 8px 16px; border-top: 1px solid var(--line); }
@keyframes fade { from { opacity: 0; } }

#toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); padding: 10px 18px; border-radius: 12px; background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: all .2s; z-index: 200; max-width: 90vw; }
#toast.show { opacity: 1; transform: translate(-50%, 0); } #toast.err { background: var(--bad); color: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) { .hero { grid-template-columns: 1fr; } .agency { grid-template-columns: 1fr; } .top-search { min-width: 0; } .top-search span { display: none; } }
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); width: 272px; box-shadow: var(--shadow); }
  body.nav-open .sidebar { transform: none; } body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 35; }
  body.collapsed { --side: 256px; } .content, body.collapsed .content { margin-left: 0; }
  .menu-btn { display: inline-grid; } .collapse-btn, .pill-local { display: none; }
  #main { padding: 18px 16px 64px; } .topbar { padding: 10px 14px; }
  .split, .editor, .editor.wide, .contact, .inv-parties { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .swatches { grid-template-columns: repeat(6, 1fr); } .palette { height: 140px; }
  .invoice-paper { padding: 20px; }
  .tool-head > .row { width: 100%; margin: 0; } .tool-head .grow { flex: 1 1 200px; } .tool-head .mono-tile { width: 56px; height: 56px; } .tool-head .mono-tile .i3d { width: 40px; height: 40px; }
}

/* ---------- print (invoice) ---------- */
@media print {
  body.print-invoice * { visibility: hidden; }
  body.print-invoice #invoice-print, body.print-invoice #invoice-print * { visibility: visible; }
  body.print-invoice #invoice-print { position: absolute; left: 0; top: 0; width: 100%; box-shadow: none; padding: 0; }
  body.print-invoice .sidebar, body.print-invoice .topbar { display: none; }
  body.print-invoice .content { margin: 0; }
}

/* luxury finish */
.tool-card { border-radius: 18px; }
.tool-card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 18%, transparent), transparent 35%); opacity: 0; transition: opacity .2s; }
.tool-card:hover::after { opacity: 1; }
.agency { border-color: color-mix(in srgb, var(--gold) 40%, var(--line)); }
.side-cta { border-color: color-mix(in srgb, var(--gold) 40%, transparent); }
.side-cta b { font-family: var(--display); font-size: 15px; color: var(--gold2); }
[data-theme="light"] .side-cta b { color: var(--gold); }
.page-head h1, .tool-head h1 { font-size: clamp(30px, 3.6vw, 44px); }
.sec-head h2, .agency h2 { font-weight: 600; }
.kv dt, .field-label, .stat-l { letter-spacing: .02em; }
.formula { margin: 28px 0 8px; border: 1px solid color-mix(in srgb, var(--gold) 35%, var(--line)); border-radius: 18px; background: linear-gradient(160deg, color-mix(in srgb, var(--gold) 7%, var(--panel)), var(--panel)); overflow: hidden; }
.formula summary { cursor: pointer; padding: 14px 18px; display: flex; align-items: center; gap: 12px; font: 600 19px var(--display); list-style: none; }
.formula summary::-webkit-details-marker { display: none; }
.formula summary .i3d { width: 28px; height: 28px; }
.formula summary::after { content: '+'; margin-left: auto; font: 400 22px var(--font); color: var(--gold); }
.formula[open] summary::after { content: '−'; }
.formula-body { padding: 0 18px 18px; }
.formula-body h4 { margin: 14px 0 6px; font: 700 11px var(--font); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.eq { font: 15px/1.7 var(--mono); padding: 10px 14px; margin: 6px 0; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); overflow-x: auto; white-space: pre-wrap; }
.formula-body ol, .formula-body ul { margin: 6px 0; padding-left: 20px; } .formula-body li { margin: 3px 0; }
.formula-body .src { font-size: 12.5px; color: var(--muted); margin-top: 10px; }
h1, h2, h3, .stat-v, .big-num, .tc-name, .brand { font-variant-numeric: lining-nums proportional-nums; }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Pre-rendered static content (seen by crawlers / before JS boots; replaced by the app) */
.static-page { max-width: 860px; margin: 0 auto; padding: 48px 24px; line-height: 1.65; }
.static-page h1 { font-size: 40px; line-height: 1.15; margin: 8px 0 12px; }
.static-page h2 { font-size: 24px; margin: 32px 0 10px; }
.static-page h3 { font-size: 17px; margin: 18px 0 4px; font-family: var(--font); }
.static-page a { color: var(--accent, #8b5cf6); }
.static-page .lead { font-size: 18px; color: var(--muted); }
.static-page code { font-family: ui-monospace, monospace; background: var(--panel2); padding: 2px 6px; border-radius: 6px; }
.static-crumbs { font-size: 13px; color: var(--muted); }
.static-nav ul, .static-page section ul { columns: 2; padding-left: 18px; }

/* Analytics consent banner */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90; max-width: 560px; margin-left: auto; display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 14px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line2); box-shadow: 0 12px 40px rgba(0,0,0,.35); font-size: 13.5px; }
.consent p { margin: 0; flex: 1 1 260px; color: var(--muted); }
.consent a { color: inherit; text-decoration: underline; }
