svg { max-width: none; max-height: none; }
/* D4rC Tools – design system */
:root, .dark {
    color-scheme: dark;
    --bg: #0c0e12;
    --surface: #13161b;
    --surface-2: #191d24;
    --surface-3: #20252d;
    --border: #252a33;
    --border-strong: #343b46;
    --text: #e8ebef;
    --muted: #8b94a1;
    --accent: #64dfcc;
    --accent-strong: #8ff0e1;
    --accent-fg: #052520;
    --accent-soft: rgba(100, 223, 204, 0.12);
    --danger: #f2716b;
    --danger-soft: rgba(242, 113, 107, 0.12);
    --warn: #e9b45a;
    --warn-soft: rgba(233, 180, 90, 0.12);
    --success: #64dfcc;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.25);
    --checker: #2a2f38;
}
.light {
    color-scheme: light;
    --bg: #f4f5f7;
    --surface: #ffffff;
    --surface-2: #f1f3f6;
    --surface-3: #e8ebf0;
    --border: #dfe3e9;
    --border-strong: #c7cdd6;
    --text: #11151a;
    --muted: #5a6470;
    --accent: #0c8576;
    --accent-strong: #096b5f;
    --accent-fg: #ffffff;
    --accent-soft: rgba(12, 133, 118, 0.1);
    --danger: #c9302c;
    --danger-soft: rgba(201, 48, 44, 0.09);
    --warn: #9a6400;
    --warn-soft: rgba(154, 100, 0, 0.1);
    --success: #0c8576;
    --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 8px 24px rgba(16, 24, 40, 0.06);
    --checker: #d9dde3;
}
:root {
    --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, "JetBrains Mono", "SFMono-Regular", "Cascadia Code", Menlo, Consolas, monospace;
    --radius: 12px;
    --radius-sm: 8px;
    --sidebar-w: 248px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }
code, pre, kbd, samp { font-family: var(--font-mono); }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-soft); color: var(--text); }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; left: 1rem; top: -3rem; z-index: 100;
    padding: .5rem 1rem; border-radius: var(--radius-sm);
    background: var(--accent); color: var(--accent-fg); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 1rem; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }
.icon { width: 18px; height: 18px; flex-shrink: 0; }
.icon-sm { width: 15px; height: 15px; }
.icon-muted { color: var(--muted); }

/* ---------- Shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
    position: sticky; top: 0; height: 100vh; width: var(--sidebar-w); flex-shrink: 0;
    display: flex; flex-direction: column; gap: 1.5rem;
    padding: 1.5rem 1rem 1rem;
    background: var(--surface); border-right: 1px solid var(--border);
    overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: .65rem; padding: 0 .5rem; text-decoration: none; }
.logo-mark { width: 30px; height: 30px; color: var(--accent); }
.brand-name { font-size: 1.2rem; letter-spacing: -0.02em; color: var(--muted); }
.brand-name strong { color: var(--text); font-weight: 700; }
.nav { display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.nav-heading {
    margin: 1rem .75rem .35rem; font-family: var(--font-mono);
    font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.nav-list { display: flex; flex-direction: column; gap: 2px; }
.nav-link {
    display: flex; align-items: center; gap: .7rem;
    padding: .55rem .75rem; border-radius: var(--radius-sm);
    color: var(--muted); text-decoration: none; font-size: .92rem;
    transition: background-color .15s, color .15s;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.sidebar-note {
    display: flex; flex-direction: column; gap: .35rem;
    padding: 1rem .75rem 0; border-top: 1px solid var(--border);
    font-size: .8rem; color: var(--muted);
}
.sidebar-note-title { display: flex; align-items: center; gap: .45rem; color: var(--text); font-weight: 600; }
.sidebar-note-title .icon { width: 15px; height: 15px; color: var(--accent); }
.sidebar-backdrop { display: none; }

.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: .75rem;
    min-height: 64px; padding: .75rem 2.5rem;
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.menu-btn { display: none; }
.breadcrumb { display: flex; align-items: center; gap: .55rem; min-width: 0; font-size: .9rem; color: var(--muted); }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb [aria-current] { color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.lang-switch {
    display: flex; gap: 2px; padding: 3px;
    border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
}
.lang-btn {
    display: flex; align-items: center; gap: .4rem;
    padding: .3rem .55rem; border: 0; border-radius: 7px;
    background: transparent; color: var(--muted);
    font: 600 .75rem var(--font-mono); letter-spacing: .04em; cursor: pointer;
}
.lang-btn:hover { color: var(--text); }
.lang-btn[aria-pressed="true"] { background: var(--surface-3); color: var(--text); }
.flag { width: 20px; height: 14px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
.theme-icon-light { display: none; }
.light .theme-icon-dark { display: none; }
.light .theme-icon-light { display: inline-flex; }

.content { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 2.5rem; display: flex; flex-direction: column; gap: 2rem; }
.footer {
    display: flex; gap: .5rem; justify-content: center;
    padding: 1.25rem; border-top: 1px solid var(--border);
    font-size: .8rem; color: var(--muted);
}

/* ---------- Typography blocks ---------- */
.eyebrow {
    display: inline-flex; align-items: center; gap: .55rem;
    font-family: var(--font-mono); font-size: .72rem; font-weight: 600;
    letter-spacing: .16em; text-transform: uppercase; color: var(--accent);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

.hero {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem;
    padding-bottom: 2rem; border-bottom: 1px solid var(--border);
}
.hero-copy { display: flex; flex-direction: column; gap: 1rem; max-width: 720px; }
.hero-title { display: flex; align-items: center; gap: .9rem; font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -0.035em; }
.hero-logo { display: inline-flex; padding: .55rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.hero-logo .logo-mark { width: clamp(30px, 4vw, 42px); height: clamp(30px, 4vw, 42px); }
.hero-lead { font-size: 1.05rem; color: var(--muted); max-width: 60ch; }
.hero-facts { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; font-size: .85rem; color: var(--muted); }
.hero-facts li { display: flex; align-items: center; gap: .45rem; }
.hero-facts .icon { color: var(--accent); }

/* ---------- Badges & tags ---------- */
.badge {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .2rem .55rem; border-radius: 6px;
    border: 1px solid var(--border); background: var(--surface-2);
    font-size: .72rem; color: var(--muted); white-space: nowrap;
}
.badge-mono { font-family: var(--font-mono); letter-spacing: .06em; text-transform: uppercase; font-size: .66rem; }
.badge-accent { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.badge-danger { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.badge-warn { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.tag-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag {
    padding: .15rem .45rem; border-radius: 5px; background: var(--surface-2);
    border: 1px solid var(--border); font: .7rem var(--font-mono); color: var(--muted);
}

/* ---------- Dashboard ---------- */
.stack-lg { display: flex; flex-direction: column; gap: 1.5rem; }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.stack-sm { display: flex; flex-direction: column; gap: .5rem; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.row-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.tabs { display: flex; flex-wrap: wrap; gap: .25rem; }
.tab {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .5rem .85rem; border-radius: var(--radius-sm);
    border: 1px solid transparent; background: transparent;
    color: var(--muted); font: 500 .87rem var(--font-sans); cursor: pointer;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { background: var(--surface); border-color: var(--border); color: var(--text); }
.tab-count { font: .7rem var(--font-mono); color: var(--accent); }
.search { position: relative; display: flex; align-items: center; min-width: min(260px, 100%); }
.search .icon { position: absolute; left: .75rem; pointer-events: none; }
.search .input { padding-left: 2.4rem; }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1rem; }
.tool-card {
    height: 100%; display: flex; flex-direction: column; gap: .75rem;
    padding: 1.4rem; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border);
    text-decoration: none; transition: border-color .15s, transform .15s, background-color .15s;
}
.tool-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); transform: translateY(-2px); }
.tool-card:hover .tool-card-arrow { color: var(--accent); }
.tool-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: .5rem; }
.tool-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 10px;
    background: var(--surface-2); border: 1px solid var(--border); color: var(--accent);
}
.tool-icon-lg { width: 52px; height: 52px; border-radius: 12px; }
.tool-icon-lg .icon { width: 24px; height: 24px; }
.tool-card-title { font-size: 1.1rem; font-weight: 650; }
.tool-card-desc { color: var(--muted); font-size: .9rem; flex: 1; }
.tool-card-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: .75rem; margin-top: .5rem; }
.empty-state { padding: 3rem 1rem; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: var(--radius); }

/* ---------- Tool header ---------- */
.tool-header { display: flex; flex-direction: column; gap: 1.1rem; padding-bottom: 1.75rem; border-bottom: 1px solid var(--border); }
.back-link {
    align-self: flex-start; display: inline-flex; align-items: center; gap: .45rem;
    padding: .35rem .7rem .35rem .5rem; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: var(--surface);
    font-size: .82rem; color: var(--muted); text-decoration: none;
}
.back-link:hover { color: var(--text); border-color: var(--border-strong); }
.back-link .icon { width: 15px; height: 15px; }
.tool-title-row { display: flex; align-items: center; gap: 1rem; }
.tool-title { display: flex; flex-direction: column; gap: .3rem; }
.tool-title h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 750; letter-spacing: -0.025em; }
.tool-title p { color: var(--muted); max-width: 70ch; }

/* ---------- Cards & layout grids ---------- */
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.grid-side { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem; }
.card {
    display: flex; flex-direction: column; min-width: 0;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.card-header {
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    padding: 1rem 1.25rem; border-bottom: 1px solid var(--border);
}
.card-title { display: flex; align-items: center; gap: .55rem; font-size: .95rem; font-weight: 600; }
.card-title .icon { color: var(--accent); width: 17px; height: 17px; }
.card-desc { font-size: .82rem; color: var(--muted); }
.card-body { display: flex; flex-direction: column; gap: 1.1rem; padding: 1.25rem; }
.card-footer {
    display: flex; flex-wrap: wrap; align-items: center; gap: .6rem;
    padding: 1rem 1.25rem; border-top: 1px solid var(--border);
}
.section-title { font-size: 1.05rem; font-weight: 650; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.label { display: flex; justify-content: space-between; gap: .5rem; font-size: .82rem; font-weight: 550; color: var(--text); }
.label-value { font-family: var(--font-mono); color: var(--accent); font-weight: 500; }
.hint { font-size: .78rem; color: var(--muted); }
.input, .select, .textarea {
    width: 100%; min-width: 0;
    padding: .6rem .75rem; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: var(--bg); color: var(--text);
    font: inherit; font-size: .9rem;
    transition: border-color .15s, box-shadow .15s;
}
.input::placeholder, .textarea::placeholder { color: var(--muted); opacity: .75; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--border-strong); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.input-mono, .textarea { font-family: var(--font-mono); font-size: .85rem; }
.textarea { min-height: 160px; resize: vertical; line-height: 1.6; tab-size: 4; }
.select {
    appearance: none; cursor: pointer; padding-right: 2.2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b94a1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right .65rem center; background-size: 16px;
}
.input-group { display: flex; }
.input-group > .input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; }
.input-group > .btn + .btn { border-radius: 0; }
.input-group > .btn:last-child { border-top-right-radius: var(--radius-sm); border-bottom-right-radius: var(--radius-sm); }

.check { display: flex; align-items: flex-start; gap: .6rem; font-size: .88rem; cursor: pointer; }
.check input { appearance: none; flex-shrink: 0; margin: .15rem 0 0; width: 17px; height: 17px; border-radius: 5px; border: 1px solid var(--border-strong); background: var(--bg); cursor: pointer; display: grid; place-content: center; }
.check input::after { content: ""; width: 9px; height: 9px; transform: scale(0); transition: transform .1s; clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); background: var(--accent-fg); }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { transform: scale(1); }
.check input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem 1rem; }
.fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; min-width: 0; }
.fieldset legend { padding: 0; margin-bottom: .7rem; font-size: .82rem; font-weight: 550; }

.segmented { display: flex; flex-wrap: wrap; gap: 3px; padding: 3px; border-radius: 10px; background: var(--bg); border: 1px solid var(--border); }
.segmented label { flex: 1; position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented span {
    display: flex; justify-content: center; align-items: center; gap: .4rem; white-space: nowrap;
    padding: .45rem .7rem; border-radius: 7px; font-size: .84rem; color: var(--muted); cursor: pointer;
}
.segmented input:checked + span { background: var(--surface-3); color: var(--text); font-weight: 550; }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }

input[type="range"].range { width: 100%; height: 22px; background: transparent; appearance: none; cursor: pointer; }
.range::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: var(--track, linear-gradient(to right, var(--accent) var(--fill, 50%), var(--surface-3) var(--fill, 50%))); }
.range::-moz-range-track { height: 6px; border-radius: 999px; background: var(--track, linear-gradient(to right, var(--accent) var(--fill, 50%), var(--surface-3) var(--fill, 50%))); }
.range::-webkit-slider-thumb { appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: var(--thumb, var(--accent)); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.range::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--thumb, var(--accent)); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 38px; padding: .5rem 1rem; border-radius: var(--radius-sm);
    border: 1px solid transparent; background: var(--surface-2); color: var(--text);
    font: 550 .87rem var(--font-sans); text-decoration: none; white-space: nowrap; cursor: pointer;
    transition: background-color .15s, border-color .15s, color .15s, opacity .15s;
}
.btn .icon { width: 16px; height: 16px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-primary:hover:not(:disabled) { background: var(--accent-strong); }
.btn-outline { background: var(--surface); border-color: var(--border); }
.btn-outline:hover:not(:disabled) { border-color: var(--border-strong); background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: var(--danger); color: #fff; }
.btn-sm { min-height: 30px; padding: .3rem .65rem; font-size: .8rem; }
.btn-icon { padding: 0; width: 38px; min-width: 38px; }
.btn-icon.btn-sm { width: 30px; min-width: 30px; }
.btn.is-done { color: var(--accent); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Alerts ---------- */
.alert { display: flex; gap: .7rem; padding: .85rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); font-size: .86rem; }
.alert .icon { margin-top: .1rem; width: 17px; height: 17px; }
.alert-info .icon { color: var(--accent); }
.alert-warn { background: var(--warn-soft); border-color: transparent; }
.alert-warn .icon { color: var(--warn); }
.alert-danger { background: var(--danger-soft); border-color: transparent; color: var(--text); }
.alert-danger .icon { color: var(--danger); }
.alert strong { font-weight: 650; }
.alert code { font-size: .8rem; padding: .05rem .3rem; border-radius: 4px; background: var(--surface-3); }

/* ---------- Code & results ---------- */
.code-block { position: relative; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); overflow: hidden; }
.code-block-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .4rem .5rem .4rem .85rem; border-bottom: 1px solid var(--border); background: var(--surface-2); font: .75rem var(--font-mono); color: var(--muted); }
.code-block pre { margin: 0; padding: .9rem 1rem; overflow-x: auto; font-size: .83rem; line-height: 1.65; white-space: pre; color: var(--text); }
.code-block pre.wrap { white-space: pre-wrap; word-break: break-all; }
.result-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.result-item { display: flex; align-items: center; gap: .75rem; padding: .55rem .6rem .55rem .9rem; background: var(--bg); }
.result-item + .result-item { border-top: 1px solid var(--border); }
.result-index { font: .72rem var(--font-mono); color: var(--muted); min-width: 1.8rem; }
.result-value { flex: 1; min-width: 0; font: .85rem var(--font-mono); word-break: break-all; }
.result-label { font: 600 .72rem var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); min-width: 7.5rem; }
.result-meta { font: .7rem var(--font-mono); color: var(--muted); white-space: nowrap; }
.blurred .result-value { filter: blur(6px); user-select: none; }

.stat-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.stat { display: flex; flex-direction: column; gap: .1rem; padding: .55rem .8rem; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); min-width: 90px; }
.stat-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-family: var(--font-mono); }
.stat-value { font: 600 .92rem var(--font-mono); }

.meter { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.meter-bar { height: 100%; width: 0; border-radius: inherit; background: var(--danger); transition: width .25s, background-color .25s; }
.meter-bar[data-level="2"] { background: var(--warn); }
.meter-bar[data-level="3"], .meter-bar[data-level="4"] { background: var(--accent); }

.dropzone {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
    padding: 2rem 1rem; text-align: center; border: 1.5px dashed var(--border-strong); border-radius: var(--radius);
    background: var(--bg); color: var(--muted); cursor: pointer; transition: border-color .15s, background-color .15s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.dropzone .icon { width: 28px; height: 28px; color: var(--accent); }
.preview-img { max-height: 280px; width: auto; margin: 0 auto; border-radius: var(--radius-sm); background: repeating-conic-gradient(var(--checker) 0 25%, transparent 0 50%) 0 0 / 16px 16px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.table th { text-align: left; font: 600 .7rem var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: .7rem .9rem; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: .75rem .9rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-family: var(--font-mono); white-space: nowrap; }

.table .nowrap, .nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.text-danger { color: var(--danger) !important; }
.file-name { display: flex; align-items: center; gap: .5rem; min-width: 0; max-width: 32ch; font-weight: 550; }
.file-name .icon { color: var(--accent); flex-shrink: 0; }
.checksum { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .45rem; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); color: var(--muted); cursor: pointer; font-size: .76rem; }
.checksum:hover { color: var(--text); border-color: var(--border-strong); }
.icon-xs { width: 12px; height: 12px; }
.unlock-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem; max-width: 32rem; }

/* ---------- Shared tool pieces ---------- */
.alert-warning { background: var(--warn-soft); border-color: transparent; }
.alert-warning .icon { color: var(--warn); }
.badge-warning { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.badge-success { color: var(--success); background: var(--accent-soft); border-color: transparent; }
.card-accent { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.grid-side-wide { grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); }
.tool-card-wrap { display: contents; }
.toolbar-spacer { flex: 1; }
.footer-sep { color: var(--border-strong); }
.select-sm { width: auto; padding-top: .35rem; padding-bottom: .35rem; font-size: .8rem; }
.search-field { position: relative; display: flex; align-items: center; }
.search-field > .icon { position: absolute; left: .75rem; pointer-events: none; color: var(--muted); }
.search-field > .input { padding-left: 2.3rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { padding: .3rem .7rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: .8rem; color: var(--muted); text-decoration: none; }
.chip:hover { color: var(--text); border-color: var(--border-strong); }
button.chip { cursor: pointer; font-family: var(--font-mono); }

.upload-dropzone { min-width: 0; width: 100%; padding: 1.25rem; cursor: pointer; }
.upload-dropzone .hint { overflow-wrap: anywhere; }
#out-diff > span { display: block; min-height: 1em; }
.diff-added { color: #69d9a0; background: #163a29; }
.diff-removed { color: #ffaaaa; background: #482126; }
.diff-hunk { color: #9dccff; background: #1c3048; }
.diff-file { font-weight: 700; color: var(--accent); }

/* Linux tools */
.tab-list-sub { background: var(--bg); }
.tab-list-sub .tab { font-family: var(--font-mono); font-size: .8rem; }
.perm-table th, .perm-table td { text-align: center; }
.perm-table tbody th { text-align: left; font-weight: 550; }
.perm-table .check { justify-content: center; }
.cron-fields { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem; }
.cron-fields .input { text-align: center; padding-inline: .4rem; }
.cron-description { margin: 0; font-size: 1.05rem; font-weight: 550; line-height: 1.45; text-wrap: pretty; }
.cron-runs { margin: 0; padding-left: 1.6rem; display: flex; flex-direction: column; gap: .25rem; font-size: .82rem; color: var(--muted); }
.cron-runs li::marker { color: var(--muted); }
@media (max-width: 560px) { .cron-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.tab-list { display: flex; flex-wrap: wrap; gap: 3px; padding: 3px; align-self: flex-start; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); }
.tab-list .tab { border: 0; }
.tab-list .tab[aria-selected="true"] { background: var(--surface-3); }
.tab-panel { display: flex; flex-direction: column; gap: 1.25rem; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; }
.split-json { min-height: 420px; }
.split-json .textarea { min-height: 420px; height: 100%; }
.status-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; min-height: 1.5rem; font: .78rem var(--font-mono); color: var(--muted); }
.status-bar.is-valid, .is-valid { color: var(--success); }
.status-bar.is-invalid, .is-invalid { color: var(--danger); }

.disclosure { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); }
.disclosure > summary { cursor: pointer; padding: .6rem .85rem; font-size: .84rem; font-weight: 550; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary::after { content: "+"; font-family: var(--font-mono); color: var(--muted); }
.disclosure[open] > summary::after { content: "–"; }
.disclosure > :not(summary) { padding: 0 .85rem .85rem; }
.dropdown { position: relative; }

.dropzone-title { font-weight: 600; color: var(--text); }
.dropzone.is-dragging { border-color: var(--accent); background: var(--accent-soft); }
.file-info { display: flex; align-items: center; gap: .9rem; padding: .75rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg); }
.file-preview { width: 64px; height: 64px; object-fit: contain; border-radius: 6px; background: repeating-conic-gradient(var(--checker) 0 25%, transparent 0 50%) 0 0 / 12px 12px; }
.preview-box { display: flex; align-items: center; justify-content: center; min-height: 120px; padding: 1rem; border: 1px dashed var(--border); border-radius: var(--radius-sm); background: repeating-conic-gradient(var(--checker) 0 25%, transparent 0 50%) 0 0 / 16px 16px; }
.preview-box img { max-height: 320px; width: auto; }

.hash-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.hash-item { display: flex; align-items: center; gap: .75rem; padding: .5rem .55rem .5rem .9rem; background: var(--bg); }
.hash-item + .hash-item { border-top: 1px solid var(--border); }
.hash-algo { flex-shrink: 0; min-width: 5.5rem; font: 600 .7rem var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.hash-value { flex: 1; min-width: 0; font-size: .83rem; word-break: break-all; }
.hash-list-numbered { counter-reset: hash; }
.hash-list-numbered .hash-item::before { counter-increment: hash; content: counter(hash, decimal-leading-zero); font: .7rem var(--font-mono); color: var(--muted); min-width: 1.6rem; }
.is-blurred .hash-value, .is-blurred .result-value { filter: blur(6px); user-select: none; }

/* ---------- JSON tree ---------- */
.json-tree { min-height: 420px; max-height: 70vh; overflow: auto; padding: .8rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); font: .83rem/1.7 var(--font-mono); }
.json-tree details { padding-left: 1rem; }
.json-tree summary { cursor: pointer; margin-left: -1rem; }
.json-tree .jt-key { color: var(--accent); }
.json-tree .jt-string { color: #e9b45a; }
.json-tree .jt-number { color: #8fb8ff; }
.json-tree .jt-bool, .json-tree .jt-null { color: #d39bf0; }
.json-tree .jt-meta { color: var(--muted); }
.light .json-tree .jt-string { color: #8a5a00; }
.light .json-tree .jt-number { color: #1f5fbf; }
.light .json-tree .jt-bool, .light .json-tree .jt-null { color: #8a3fae; }

/* ---------- Paste ---------- */
.paste-input { min-height: 340px; }
.code-view { display: flex; overflow: auto; max-height: 75vh; background: var(--bg); border-radius: 0 0 var(--radius) var(--radius); font: .83rem/1.65 var(--font-mono); }
.line-numbers { counter-reset: line; flex-shrink: 0; margin: 0; padding: 1rem .75rem 1rem 1rem; text-align: right; color: var(--muted); opacity: .6; user-select: none; border-right: 1px solid var(--border); position: sticky; left: 0; background: var(--bg); }
.line-numbers li { counter-increment: line; }
.line-numbers li::before { content: counter(line); }
.code-view pre { margin: 0; padding: 1rem; flex: 1; min-width: 0; }
.code-view code { white-space: pre; background: none; padding: 0; }
.code-view.is-wrapped .line-numbers { display: none; }
.code-view.is-wrapped code { white-space: pre-wrap; word-break: break-word; }
.result-link { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; text-decoration: none; }
.result-link:hover strong { color: var(--accent); }
.hljs-keyword, .hljs-selector-tag, .hljs-built_in, .hljs-type { color: #d39bf0; }
.hljs-string, .hljs-attr-value, .hljs-template-tag, .hljs-regexp { color: #e9b45a; }
.hljs-number, .hljs-literal, .hljs-symbol { color: #8fb8ff; }
.hljs-comment, .hljs-quote, .hljs-meta { color: var(--muted); font-style: italic; }
.hljs-title, .hljs-function .hljs-title, .hljs-section, .hljs-name { color: var(--accent); }
.hljs-attr, .hljs-attribute, .hljs-variable, .hljs-property, .hljs-selector-class, .hljs-selector-id { color: #f2a07b; }
.hljs-addition { color: var(--success); } .hljs-deletion { color: var(--danger); }
.light .hljs-keyword, .light .hljs-selector-tag, .light .hljs-built_in, .light .hljs-type { color: #8a3fae; }
.light .hljs-string, .light .hljs-attr-value, .light .hljs-regexp { color: #8a5a00; }
.light .hljs-number, .light .hljs-literal { color: #1f5fbf; }
.light .hljs-attr, .light .hljs-attribute, .light .hljs-variable, .light .hljs-property { color: #b4452a; }

/* ---------- Colors ---------- */
.sv-area {
    position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); cursor: crosshair; touch-action: none;
    background: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, var(--picker-hue, red));
}
.sv-thumb { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.35), 0 2px 6px rgba(0,0,0,.4); background: var(--picker-color); pointer-events: none; }
.range-hue { --track: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); }
.range-alpha { --track: linear-gradient(to right, transparent, var(--picker-color)), repeating-conic-gradient(var(--checker) 0 25%, #fff 0 50%) 0 0 / 8px 8px; }
.range-hue, .range-alpha { --thumb: var(--picker-color); }
.color-preview { height: 88px; border-radius: var(--radius-sm); border: 1px solid var(--border); overflow: hidden; background: repeating-conic-gradient(var(--checker) 0 25%, transparent 0 50%) 0 0 / 16px 16px; }
.color-preview span { display: block; height: 100%; }
.swatch-row, .palette { display: flex; flex-wrap: wrap; gap: .4rem; }
.palette { flex-wrap: nowrap; gap: 0; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.swatch { width: 28px; height: 28px; padding: 0; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--swatch); cursor: pointer; }
.palette .swatch { flex: 1; width: auto; height: 40px; border: 0; border-radius: 0; transition: transform .12s; }
.swatch:hover { transform: scale(1.08); position: relative; z-index: 1; }
.contrast-sample { display: flex; align-items: center; gap: .6rem; padding: 0 1rem; min-height: 42px; align-self: end; border-radius: var(--radius-sm); border: 1px solid var(--border); font-size: .95rem; }
.contrast-sample strong { font-size: 1.3rem; }
.contrast-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
.contrast-grid > div { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; padding: .65rem .8rem; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); }

/* ---------- Links ---------- */
.link-section { display: flex; flex-direction: column; gap: .85rem; scroll-margin-top: 5rem; }
.link-section .section-title { display: flex; align-items: center; gap: .5rem; }
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .75rem; }
.link-card { display: flex; flex-direction: column; gap: .3rem; padding: 1rem 1.1rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); text-decoration: none; transition: border-color .15s, transform .15s; }
.link-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); transform: translateY(-1px); }
.link-card-title { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-weight: 600; }
.link-card-title .icon { color: var(--muted); flex-shrink: 0; }
.link-card:hover .link-card-title .icon { color: var(--accent); }
.link-card-desc { font-size: .84rem; color: var(--muted); flex: 1; }
.link-card-host { font-size: .7rem; color: var(--accent); opacity: .85; }

@media (max-width: 720px) {
    .split { grid-template-columns: minmax(0, 1fr); }
    .contrast-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hide-sm { display: none; }
}

/* ---------- Toast ---------- */
.toast-region { position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 60; display: flex; flex-direction: column; gap: .5rem; pointer-events: none; }
.toast {
    display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; border-radius: var(--radius-sm);
    background: var(--surface-3); border: 1px solid var(--border-strong); box-shadow: var(--shadow);
    font-size: .86rem; animation: toast-in .2s ease-out;
}
.toast .icon { width: 16px; height: 16px; color: var(--accent); }
.toast-error .icon { color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }

.not-found { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1rem; padding: 4rem 1rem; }
.not-found h1 { font-size: 2rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
    .grid-side, .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
    .sidebar {
        position: fixed; left: 0; top: 0; bottom: 0; z-index: 50;
        transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow);
    }
    .sidebar.is-open { transform: none; }
    .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.5); }
    .menu-btn { display: inline-flex; }
    .topbar { padding: .6rem 1rem; }
    .content { padding: 1.5rem 1rem; }
    .lang-btn span:not(.sr-only) { display: none; }
    .hero-version { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- My IP ---------- */
.ip-hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.ip-display { margin: 0; font: 650 clamp(1.5rem, 3.6vw, 2.35rem)/1.15 var(--font-mono); letter-spacing: -.02em; color: var(--accent); word-break: break-all; }
.ip-facts { display: flex; flex-direction: column; gap: .7rem; margin: 0; padding-top: 1rem; border-top: 1px solid var(--border); }
.ip-facts > div { display: flex; flex-direction: column; gap: .25rem; }
.ip-facts dt { font: 600 .7rem var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.ip-facts dd { margin: 0; min-width: 0; word-break: break-all; }
.geo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem; }
.geo-value { font-weight: 550; word-break: break-word; }
.geo-country { display: inline-flex; align-items: center; gap: .55rem; }
.flag-lg { width: 28px; height: 20px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px var(--border-strong); flex-shrink: 0; }

/* Password check */
.alert-success { background: var(--accent-soft); border-color: transparent; }
.alert-success .icon { color: var(--success); }
.pc-strength { display: flex; flex-direction: column; gap: .5rem; }
.pc-strength-head { justify-content: space-between; align-items: center; }
.pc-bits { font: 600 .9rem var(--font-mono); color: var(--muted); }
.pc-list { display: flex; flex-direction: column; gap: .4rem; margin: 0; }
.pc-list > div { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--border); font-size: .86rem; }
.pc-list > div:last-child { border-bottom: 0; }
.pc-list dt { color: var(--muted); }
.pc-list dd { margin: 0; font: 600 .86rem var(--font-mono); text-align: right; }
.pc-sets { display: flex; flex-wrap: wrap; gap: .4rem; }
.pc-feedback { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.pc-finding { display: flex; gap: .5rem; align-items: flex-start; font-size: .86rem; }
.pc-finding .icon { margin-top: .15rem; flex-shrink: 0; }
.pc-finding-warn .icon { color: var(--warn); }
.pc-finding-ok .icon { color: var(--success); }
.pc-crack { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: .75rem; margin-bottom: .75rem; }
.pc-crack .stat-value { font-size: 1.05rem; }
.pc-crack .hint { margin: 0; font-size: .74rem; }

/* ---------- Tabs with panels ---------- */
.tabs[data-tabs] { flex-direction: column; flex-wrap: nowrap; gap: 1.25rem; }

/* ---------- Text Hash ---------- */
.th-options { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; }
.th-options .check { align-items: center; }
.th-options .check input { margin: 0; }
.th-key { flex: 1 1 240px; }
.algo-picker { margin: 0; padding: 1rem 1.25rem 1.25rem; border: 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: .9rem; min-width: 0; }
.algo-picker-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.algo-picker-head legend { float: left; padding: 0; display: inline-flex; align-items: center; gap: .5rem; }
.algo-groups { display: flex; flex-direction: column; gap: .7rem; }
.algo-group { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: .75rem; align-items: start; }
.algo-group-name { font: 600 .68rem var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: .4rem; }
.algo-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.algo-chip { position: relative; }
.algo-chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.algo-chip span {
    display: inline-flex; align-items: center; padding: .28rem .6rem; border-radius: 6px;
    border: 1px solid var(--border); background: var(--bg); color: var(--muted);
    font: 500 .74rem var(--font-mono); transition: background .12s, color .12s, border-color .12s;
}
.algo-chip:hover span { color: var(--text); border-color: var(--border-strong); }
.algo-chip input:checked + span { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.algo-chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 720px) {
    .algo-group { grid-template-columns: minmax(0, 1fr); gap: .35rem; }
    .algo-group-name { padding-top: 0; }
}

/* ---------- Lock pattern ---------- */
.pattern-stage { align-items: center; }
.pattern-frame {
    width: min(100%, 380px); aspect-ratio: 1; border-radius: 22px; padding: 0;
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
    background-color: var(--surface-2, var(--surface));
}
.pattern-frame[data-style="transparent"] {
    box-shadow: none; border: 1px dashed var(--border-strong);
    background-image: conic-gradient(var(--border) 25%, transparent 0 50%, var(--border) 0 75%, transparent 0);
    background-size: 18px 18px;
}
.pattern-canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; border-radius: 22px; }
.pattern-status { min-height: 1.2em; text-align: center; }
.pattern-actions { justify-content: center; }
.color-dot { width: 24px; height: 24px; border-radius: 999px; border: 2px solid var(--surface); background: var(--dot); box-shadow: 0 0 0 1px var(--border-strong); cursor: pointer; }
.color-dot:hover { transform: scale(1.08); }
.color-dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.color-swatch-input { width: 40px; height: 32px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); cursor: pointer; }

/* ---------- AdminCP ---------- */
.auth-wrap { display: flex; justify-content: center; padding: 3rem 0; }
.auth-card { width: 100%; max-width: 26rem; }
.admin-header .row-between { align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: .75rem; }
.admin-stats .stat { display: flex; flex-direction: column; gap: .25rem; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.check-list, .activity, .admin-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.check-list { gap: .6rem; }
.check-list li { display: flex; gap: .6rem; align-items: flex-start; font-size: .875rem; }
.check-list li > .icon { flex: none; margin-top: .1rem; }
.check-list li.is-ok > .icon { color: var(--success); }
.check-list li.is-warn > .icon { color: var(--warn); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.25rem; margin: 0; font-size: .875rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-family: var(--font-mono); font-size: .8rem; overflow-wrap: anywhere; }
.activity li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--border); font-size: .85rem; }
.activity li:last-child { border-bottom: 0; }
.admin-list { gap: .75rem; }
.admin-item { display: flex; flex-direction: column; gap: .75rem; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); }
.admin-item.is-inactive { opacity: .62; }
.admin-item-new { border-style: dashed; background: transparent; }
.admin-item-form { display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: .75rem; }
.admin-item-form .field { min-width: 8rem; margin: 0; }
.admin-nav-layout { display: grid; gap: 1.25rem; align-items: start; }
@media (min-width: 1100px) { .admin-nav-layout { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); } }
.admin-nav-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.admin-nav-group { display: flex; flex-direction: column; gap: .5rem; }
.admin-nav-group-title { margin: 0; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.admin-nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.admin-nav-row { display: flex; align-items: center; gap: .75rem; padding: .5rem .6rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); }
.admin-nav-icon { width: 2rem; height: 2rem; flex: none; }
.admin-nav-name { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .6rem; flex: 1; min-width: 0; font-size: .9rem; }
.admin-nav-select { width: auto; min-width: 8.5rem; flex: none; }
.admin-nav-move { display: flex; gap: .15rem; flex: none; }
.admin-nav-empty { margin: 0; padding: .7rem; border: 1px dashed var(--border); border-radius: var(--radius-sm); color: var(--muted); font-size: .82rem; }
@media (max-width: 560px) { .admin-nav-row { flex-wrap: wrap; } .admin-nav-select { flex: 1; } }
.admin-item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; color: var(--muted); font-size: .8rem; }
.admin-check { padding-bottom: .55rem; }
.admin-category > summary { cursor: pointer; list-style: none; }
.admin-category > summary::-webkit-details-marker { display: none; }
.admin-chevron { transition: transform .15s ease; color: var(--muted); }
.admin-category[open] .admin-chevron { transform: rotate(90deg); }
.table-actions { display: flex; gap: .35rem; justify-content: flex-end; }
.input-addon { display: inline-flex; align-items: center; padding: 0 .75rem; border: 1px solid var(--border); border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--surface); color: var(--muted); font-size: .8rem; white-space: nowrap; }
.input-group > .input:has(+ .input-addon) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.btn-xs { height: 1.75rem; padding: 0 .5rem; font-size: .75rem; }
fieldset.card { margin: 0; min-width: 0; }
fieldset.card > legend { float: left; width: 100%; box-sizing: border-box; }
fieldset.card > legend + * { clear: both; }

/* Secure Share */
.progress { height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; }
.progress-bar { height: 100%; background: var(--accent); transition: width .2s ease; }
.list-check { display: flex; flex-direction: column; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.list-check li { position: relative; padding-left: 1.4rem; line-height: 1.5; }
.list-check li::before { content: ""; position: absolute; left: .2rem; top: .55em; width: .45rem; height: .45rem; border-radius: 50%; background: var(--accent); }
.meta-list { display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 0; }
.meta-list dt { font-size: .8rem; color: var(--muted, inherit); opacity: .8; }
.meta-list dd { margin: .15rem 0 0; font-weight: 600; }
.share-view { max-width: 640px; margin: 2rem auto; display: flex; flex-direction: column; gap: 1rem; }
.center { text-align: center; }

/* Security & Crypto */
.totp-output { align-items: stretch; }
.totp-code { display: block; font: 600 2.4rem/1.1 var(--font-mono); letter-spacing: .08em; color: var(--accent); }
.totp-progress { width: 100%; height: 6px; appearance: none; border: 0; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.totp-progress::-webkit-progress-bar { background: var(--surface-2); }
.totp-progress::-webkit-progress-value { background: var(--accent); }
.totp-progress::-moz-progress-bar { background: var(--accent); }
.qr-canvas { align-self: center; width: 232px; height: 232px; border-radius: var(--radius-sm); background: repeating-conic-gradient(#e5e7eb 0 25%, #fff 0 50%) 50% / 16px 16px; }
.qr-actions { justify-content: center; }
.qr-actions .btn { flex: 1; }
.regex-help { margin-top: 1.25rem; }
.regex-examples { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .6rem; }
.regex-example { display: flex; flex-direction: column; gap: .3rem; align-items: flex-start; text-align: left; padding: .7rem .8rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); cursor: pointer; font: inherit; font-size: .85rem; min-width: 0; }
.regex-example:hover { border-color: var(--accent); }
.regex-example:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.regex-example code { max-width: 100%; overflow-wrap: anywhere; font-size: .78rem; color: var(--accent); }
.regex-example span { color: var(--text-muted, var(--muted)); font-size: .78rem; }
.regex-help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 1rem; align-items: start; }
.regex-group summary { cursor: pointer; font-weight: 600; font-size: .9rem; padding: .25rem 0 .5rem; }
.regex-group code { white-space: nowrap; font-size: .8rem; }
.regex-group td:nth-child(2) { font-size: .84rem; }
.crypto-title { overflow-wrap: anywhere; }

/* Admin calculators */
.calc-heading { margin: .25rem 0 0; font-size: .78rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.calc-output { gap: 1.5rem; }
.calc-section { display: flex; flex-direction: column; gap: .75rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.calc-section:last-child { padding-bottom: 0; border-bottom: 0; }
.calc-strong { color: var(--accent); font-weight: 650; font-size: .9rem !important; }
.calc-split-bar { height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.calc-split-bar span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.disk-row { display: flex; flex-wrap: wrap; gap: .35rem; }
.disk { display: grid; place-items: center; width: 2.1rem; height: 2.6rem; border-radius: 6px; font: 600 .72rem var(--font-mono); border: 1px solid var(--border); background: var(--surface-2); }
.disk-data { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.disk-mirror { background: var(--surface-3); color: var(--text); }
.disk-parity { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.calc-bars { display: flex; flex-direction: column; gap: .4rem; }
.calc-bar-row { display: grid; grid-template-columns: 3.5rem 1fr minmax(5.5rem, auto); align-items: center; gap: .6rem; font-size: .75rem; }
.calc-bar-label, .calc-bar-value { font-family: var(--font-mono); color: var(--muted); }
.calc-bar-value { text-align: right; }
.calc-bar-track { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.calc-bar-track span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.calc-bar-track span[data-level="warn"] { background: var(--warn); }
.calc-bar-track span[data-level="over"] { background: var(--danger); }
