/* CSSBay — clean light design system (devbay family, blue accent) */
:root {
    --bg: #f8fafc;
    --bg-soft: #f1f5f9;
    --text: #0f172a;
    --text-dim: #64748b;
    --text-faint: #94a3b8;
    --card: #ffffff;
    --card-strong: #f8fafc;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --accent-1: #2563eb;
    --accent-2: #1d4ed8;
    --accent-3: #60a5fa;
    --accent-soft: rgba(37, 99, 235, 0.08);
    --good: #059669;
    --good-soft: rgba(5, 150, 105, 0.1);
    --warn: #d97706;
    --warn-soft: rgba(217, 119, 6, 0.12);
    --bad: #dc2626;
    --bad-soft: rgba(220, 38, 38, 0.1);
    --radius: 0.625rem;
    --shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
    --shadow-hover: 0 4px 12px 0 rgba(15, 23, 42, 0.08);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC",
            "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

[data-theme="dark"] {
    --bg: #0f172a;
    --bg-soft: #1e293b;
    --text: #f1f5f9;
    --text-dim: #94a3b8;
    --text-faint: #64748b;
    --card: #1e293b;
    --card-strong: #0f172a;
    --border: #334155;
    --border-strong: #475569;
    --accent-1: #60a5fa;
    --accent-2: #7dd3fc;
    --accent-3: #2563eb;
    --accent-soft: rgba(96, 165, 250, 0.14);
    --good: #34d399;
    --good-soft: rgba(52, 211, 153, 0.14);
    --warn: #fbbf24;
    --warn-soft: rgba(251, 191, 36, 0.14);
    --bad: #f87171;
    --bad-soft: rgba(248, 113, 113, 0.14);
    --shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 4px 12px 0 rgba(0, 0, 0, 0.4);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

.container { width: min(1100px, 92vw); margin: 0 auto; }

/* ---------- header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-logo { display: flex; }
.brand-name { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.brand-accent { color: var(--accent-1); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.icon-btn {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 0.5rem;
    background: var(--card); border: 1px solid var(--border);
    color: var(--text-dim); cursor: pointer; transition: all 0.15s ease;
    font-family: inherit;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--card-strong); }
.icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

.lang-select {
    appearance: none; -webkit-appearance: none;
    background: var(--card); border: 1px solid var(--border);
    border-radius: 0.5rem; color: var(--text-dim);
    font-family: inherit; font-size: 0.8rem; font-weight: 600;
    padding: 8px 28px 8px 12px; cursor: pointer; transition: all 0.15s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center;
}
.lang-select:hover { color: var(--text); border-color: var(--border-strong); }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 64px 0 40px; }
.hero-title {
    font-size: clamp(2.2rem, 5.5vw, 3.4rem);
    font-weight: 900; letter-spacing: -0.03em; line-height: 1.15;
}
.grad-text { color: var(--accent-1); }
.hero-sub { max-width: 660px; margin: 18px auto 0; color: var(--text-dim); font-size: 1.05rem; }

/* ---------- tool grid (home) ---------- */
.tool-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px; padding: 32px 0 64px;
}
.section-label { margin-top: 8px; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); }
.tool-card {
    display: flex; flex-direction: column; gap: 6px;
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 22px 20px;
    text-decoration: none; color: var(--text);
    box-shadow: var(--shadow);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.tool-card:hover { border-color: var(--accent-3); box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.tool-card svg { color: var(--accent-1); }
.tool-card h3 { font-size: 1.05rem; font-weight: 700; }
.tool-card p { font-size: 0.9rem; color: var(--text-dim); }

/* ---------- tool page ---------- */
.tool-page { padding: 40px 0 48px; }
.tool-head { margin-bottom: 28px; }
.back-link {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--text-dim); text-decoration: none;
    font-size: 0.9rem; font-weight: 600; margin-bottom: 14px;
}
.back-link:hover { color: var(--accent-1); }
.tool-head h1 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 800; letter-spacing: -0.02em; }
.tool-head p { color: var(--text-dim); margin-top: 4px; }

.tool-layout {
    display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 24px; align-items: start;
}
@media (max-width: 860px) {
    .tool-layout { grid-template-columns: 1fr; }
}

.panel {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 24px;
}
.panel h2 { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); margin-bottom: 18px; }
.panel-head-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.panel-head-row h2 { margin-bottom: 0; }

.extra-section { margin: 24px 0 0; }
.extra-section h2 { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); margin-bottom: 14px; }
.extra-panel { padding: 20px 24px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 0.88rem; font-weight: 600; color: var(--text-dim); margin-bottom: 5px; }
.field .hint { font-size: 0.78rem; color: var(--text-faint); font-weight: 400; margin-left: 4px; }
.input {
    width: 100%; padding: 10px 12px;
    background: var(--card-strong); border: 1px solid var(--border);
    border-radius: 0.5rem; color: var(--text);
    font-family: inherit; font-size: 0.95rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus { outline: none; border-color: var(--accent-1); box-shadow: 0 0 0 3px var(--accent-soft); }
.input[type="number"] { font-variant-numeric: tabular-nums; }
input[type="color"].color-input {
    width: 100%; height: 44px; padding: 4px; cursor: pointer;
    background: var(--card-strong); border: 1px solid var(--border);
    border-radius: 0.5rem;
}
input[type="color"].color-input:focus { outline: none; border-color: var(--accent-1); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-wrap { position: relative; }
.input-wrap .suffix {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    font-size: 0.82rem; font-weight: 600; color: var(--text-faint);
    pointer-events: none;
}
.input-wrap .input { padding-right: 44px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.field-row-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 560px) {
    .field-row-3 { grid-template-columns: 1fr 1fr; }
    .field-row-4 { grid-template-columns: 1fr 1fr; }
}

.select {
    width: 100%; padding: 10px 12px;
    appearance: none; -webkit-appearance: none;
    background: var(--card-strong); border: 1px solid var(--border);
    border-radius: 0.5rem; color: var(--text);
    font-family: inherit; font-size: 0.95rem; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.select:focus { outline: none; border-color: var(--accent-1); box-shadow: 0 0 0 3px var(--accent-soft); }
.select.small { width: auto; min-width: 130px; padding: 8px 30px 8px 10px; font-size: 0.85rem; }

.checkbox-field { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; cursor: pointer; }
.checkbox-field input { width: 18px; height: 18px; accent-color: var(--accent-1); cursor: pointer; flex-shrink: 0; }
.checkbox-field span { font-size: 0.9rem; font-weight: 600; color: var(--text-dim); }

.unit-group {
    display: inline-flex; background: var(--card-strong);
    border: 1px solid var(--border); border-radius: 0.5rem; padding: 3px;
}
.unit-btn {
    border: none; background: transparent; color: var(--text-dim);
    font-family: inherit; font-size: 0.8rem; font-weight: 700;
    padding: 5px 12px; border-radius: 0.4rem; cursor: pointer; transition: all 0.15s ease;
}
.unit-btn.active { background: var(--accent-1); color: #fff; }

/* ---------- results ---------- */
.result-panel { position: sticky; top: 84px; }
@media (max-width: 860px) {
    .result-panel { position: static; }
}
.result-hero {
    text-align: center; padding: 12px 0 18px;
    border-bottom: 1px solid var(--border); margin-bottom: 16px;
}
.result-hero .big {
    font-size: clamp(1.9rem, 4.5vw, 2.6rem);
    font-weight: 900; letter-spacing: -0.03em; line-height: 1.1;
    color: var(--accent-1); font-variant-numeric: tabular-nums;
}
.result-hero .big .unit { font-size: 0.55em; color: var(--text-dim); font-weight: 700; }
.result-hero .big-label { color: var(--text-dim); font-size: 0.95rem; margin-top: 4px; }
.result-rows { display: flex; flex-direction: column; gap: 10px; }
.result-row {
    display: flex; justify-content: space-between; align-items: baseline;
    gap: 12px; padding: 10px 14px; background: var(--card-strong);
    border: 1px solid var(--border); border-radius: 0.5rem;
    font-size: 0.92rem;
}
.result-row .k { color: var(--text-dim); }
.result-row .v { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.result-row.total { background: var(--accent-soft); border-color: var(--accent-3); }
.result-row.total .k { color: var(--text); }
.result-row.total .v { color: var(--accent-2); font-size: 1.05rem; }
.result-actions { display: flex; gap: 10px; margin-top: 18px; }
.btn {
    flex: 1; padding: 10px 16px;
    background: var(--accent-1); color: #fff;
    border: none; border-radius: 0.5rem;
    font-family: inherit; font-size: 0.92rem; font-weight: 700;
    cursor: pointer; transition: background 0.15s ease, transform 0.1s ease;
}
.btn:hover { background: var(--accent-2); }
.btn:active { transform: scale(0.98); }
.btn-ghost {
    flex: 1; padding: 10px 16px;
    background: var(--card); color: var(--text-dim);
    border: 1px solid var(--border); border-radius: 0.5rem;
    font-family: inherit; font-size: 0.92rem; font-weight: 600;
    cursor: pointer; transition: all 0.15s ease;
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-strong); background: var(--card-strong); }
.btn-ghost.full { width: 100%; flex: none; }

/* verdict chips & notes */
.verdict { margin-top: 4px; }
.verdict-badge {
    display: inline-block; padding: 6px 12px; border-radius: 0.5rem;
    font-size: 0.9rem; font-weight: 700;
}
.verdict-badge.ok { background: var(--good-soft); color: var(--good); }
.verdict-badge.mid { background: var(--warn-soft); color: var(--warn); }
.verdict-badge.low { background: var(--bad-soft); color: var(--bad); }
.note-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.note {
    font-size: 0.82rem; color: var(--text-dim);
    background: var(--card-strong); border: 1px dashed var(--border-strong);
    border-radius: 0.5rem; padding: 9px 12px;
}
.note b { color: var(--text); }

.disclaimer {
    margin-top: 20px; padding: 12px 14px;
    font-size: 0.82rem; color: var(--text-faint);
    background: var(--card-strong); border: 1px dashed var(--border-strong);
    border-radius: 0.5rem;
}

/* ---------- reference table ---------- */
.table-scroll { overflow-x: auto; }
.ref-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.ref-table th {
    text-align: left; font-size: 0.75rem; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--text-faint);
    padding: 8px 12px; border-bottom: 1px solid var(--border-strong);
    white-space: nowrap;
}
.ref-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.ref-table tr:last-child td { border-bottom: none; }
.ref-table td.name { font-weight: 600; }
.ref-table .sub { color: var(--text-faint); font-size: 0.78rem; }

/* ---------- diagram (bleed / diagrams) ---------- */
.diagram { width: 100%; max-width: 460px; margin: 0 auto; display: block; }
.diagram text { font-family: var(--font); font-size: 12px; font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; margin-top: 12px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--text-dim); }
.legend-swatch { width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--border-strong); }

/* ---------- CMYK studio ---------- */
.swatch-lg {
    width: 100%; height: 120px; border-radius: 0.75rem;
    border: 1px solid var(--border-strong);
    margin-bottom: 16px;
}
.color-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.color-cell {
    display: flex; justify-content: space-between; align-items: center; gap: 8px;
    background: var(--card-strong); border: 1px solid var(--border);
    border-radius: 0.5rem; padding: 8px 12px; font-size: 0.88rem;
}
.color-cell .ck { color: var(--text-dim); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; }
.color-cell .cv { font-weight: 700; font-family: var(--mono); font-size: 0.82rem; cursor: pointer; }
.color-cell .cv:hover { color: var(--accent-1); text-decoration: underline; }
.tint-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.tint-chip {
    width: 42px; height: 30px; border-radius: 0.4rem;
    border: 1px solid var(--border-strong); cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.tint-chip:hover { transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.tint-labels { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 2px; }
.tint-labels span { width: 42px; text-align: center; font-size: 0.72rem; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.cmyk-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 6px 0 2px; }
.cmyk-bar { height: 10px; border-radius: 3px; border: 1px solid var(--border-strong); }

/* ---------- small helpers ---------- */
.mono { font-family: var(--mono); }
.muted { color: var(--text-dim); }
.tiny { font-size: 0.78rem; color: var(--text-faint); }
.mt { margin-top: 14px; }
.mb0 { margin-bottom: 0; }
details.extra { margin-top: 16px; }
details.extra summary {
    cursor: pointer; font-size: 0.85rem; font-weight: 700;
    color: var(--text-dim); user-select: none;
}
details.extra summary:hover { color: var(--accent-1); }
details.extra .inside { margin-top: 12px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0 40px; margin-top: 24px; }
.footer-inner { display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; }
.footer-tag { color: var(--text-dim); font-size: 0.9rem; }
.footer-meta { color: var(--text-faint); font-size: 0.8rem; }

/* ---------- CSSBay: live preview stage + code output ---------- */
.preview-stage {
    min-height: 230px;
    display: grid; place-items: center;
    background:
        linear-gradient(45deg, var(--bg-soft) 25%, transparent 25%, transparent 75%, var(--bg-soft) 75%),
        linear-gradient(45deg, var(--bg-soft) 25%, var(--card) 25%, var(--card) 75%, var(--bg-soft) 75%);
    background-size: 22px 22px;
    background-position: 0 0, 11px 11px;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 26px;
    overflow: hidden;
}
.preview-box {
    background: var(--card);
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    transition: all 0.12s ease;
}
.preview-text {
    font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em;
    color: var(--text); line-height: 1.3; text-align: center;
}
.preview-chip {
    font-size: 0.75rem; font-weight: 700; color: #fff;
    background: var(--accent-1); border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--mono);
}
.code-wrap { position: relative; margin-top: 16px; }
.code-block {
    background: #0b1220; color: #dbe4f0;
    border: 1px solid #1f2a3d; border-radius: 0.6rem;
    font-family: var(--mono); font-size: 0.83rem; line-height: 1.65;
    padding: 14px 16px; overflow-x: auto;
    white-space: pre; tab-size: 2;
    min-height: 52px; max-height: 300px; overflow-y: auto;
}
[data-theme="dark"] .code-block { background: #0b1220; border-color: #243247; }
.copy-code {
    position: absolute; top: 8px; right: 8px;
    background: #1f2a3d; color: #cbd5e1;
    border: 1px solid #33415c; border-radius: 0.4rem;
    font-family: inherit; font-size: 0.75rem; font-weight: 700;
    padding: 4px 10px; cursor: pointer; transition: all 0.12s ease;
}
.copy-code:hover { background: #2a3852; color: #fff; }
.preview-label {
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--text-faint); margin: 18px 0 8px;
}
.mini-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.mini-row .tag {
    font-size: 0.72rem; font-weight: 600; color: var(--text-dim);
    background: var(--card-strong); border: 1px solid var(--border);
    border-radius: 0.35rem; padding: 2px 8px; font-family: var(--mono);
}
/* gradient stop list */
.stop-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.stop-row {
    display: grid; grid-template-columns: 1fr 74px 40px; gap: 8px;
    align-items: center; background: var(--card-strong);
    border: 1px solid var(--border); border-radius: 0.5rem; padding: 8px;
}
.stop-row .pos-input input { text-align: right; padding-right: 26px; }
.add-btn, .rm-btn {
    border: 1px solid var(--border); background: var(--card);
    border-radius: 0.4rem; font-family: inherit; font-size: 0.85rem; font-weight: 700;
    width: 32px; height: 32px; cursor: pointer; color: var(--text-dim); transition: all 0.12s ease;
}
.add-btn:hover { color: var(--good); border-color: var(--good); }
.rm-btn:hover { color: var(--bad); border-color: var(--bad); }
.chip-presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 14px; }
.chip-preset {
    font-size: 0.78rem; font-weight: 600; color: var(--text-dim);
    background: var(--card-strong); border: 1px solid var(--border);
    border-radius: 999px; padding: 4px 12px; cursor: pointer; font-family: inherit;
    transition: all 0.12s ease;
}
.chip-preset:hover { color: var(--accent-1); border-color: var(--accent-1); }
/* flexbox / grid interactive playground */
.play-stage {
    min-height: 250px; display: block;
    background:
        linear-gradient(45deg, var(--bg-soft) 25%, transparent 25%, transparent 75%, var(--bg-soft) 75%),
        linear-gradient(45deg, var(--bg-soft) 25%, var(--card) 25%, var(--card) 75%, var(--bg-soft) 75%);
    background-size: 22px 22px;
    background-position: 0 0, 11px 11px;
    border: 1px solid var(--border); border-radius: 0.75rem;
    padding: 22px; overflow: hidden;
}
.play-container {
    width: 100%; min-height: 190px; border: 1.5px dashed var(--border-strong);
    border-radius: 0.5rem; background: rgba(148, 163, 184, 0.06);
}
.play-item {
    border-radius: 0.4rem; color: #fff; font-weight: 800;
    font-size: 0.85rem; display: flex; align-items: center; justify-content: center;
    font-family: var(--mono);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.field-row-2x2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .field-row-2x2 { grid-template-columns: 1fr; } }
.preview-stage.no-pad { padding: 0; }
.angle-dial-note { margin-top: -6px; margin-bottom: 12px; }
.field-inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.field-inline .field { flex: 1; margin-bottom: 0; }
.track-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.track-row { display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: center; }
.track-row.has-px { grid-template-columns: 26px 1fr 1fr; }
.track-tag {
    width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
    background: var(--card-strong); border: 1px solid var(--border); border-radius: 0.4rem;
    font-size: 0.75rem; font-weight: 700; color: var(--text-faint); font-family: var(--mono);
}
/* ---------- SeoBay additions ---------- */
.code-btns { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; }
.code-btns .copy-code { position: static; }
.btn-dl {
    background: #1f2a3d; color: #cbd5e1;
    border: 1px solid #33415c; border-radius: 0.4rem;
    font-family: inherit; font-size: 0.75rem; font-weight: 700;
    padding: 4px 10px; cursor: pointer; transition: all 0.12s ease;
}
.btn-dl:hover { background: #2a3852; color: #fff; }
textarea.input {
    width: 100%; padding: 10px 12px; resize: vertical; min-height: 84px;
    background: var(--card-strong); border: 1px solid var(--border);
    border-radius: 0.5rem; color: var(--text);
    font-family: var(--mono); font-size: 0.85rem; line-height: 1.6;
}
textarea.input:focus { outline: none; border-color: var(--accent-1); box-shadow: 0 0 0 3px var(--accent-soft); }
.rule-row, .url-row, .row-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.rule-row-inner {
    display: grid; grid-template-columns: 110px 1fr 36px; gap: 8px; align-items: center;
    background: var(--card-strong); border: 1px solid var(--border);
    border-radius: 0.5rem; padding: 8px;
}
.hlang-row-inner {
    display: grid; grid-template-columns: 90px 1fr 36px; gap: 8px; align-items: center;
    background: var(--card-strong); border: 1px solid var(--border);
    border-radius: 0.5rem; padding: 8px;
}
.url-row-inner {
    display: grid; grid-template-columns: minmax(0,2.2fr) 130px 120px 80px 36px; gap: 8px; align-items: center;
    background: var(--card-strong); border: 1px solid var(--border);
    border-radius: 0.5rem; padding: 8px;
}
@media (max-width: 720px) {
    .url-row-inner { grid-template-columns: 1fr 1fr; }
    .rule-row-inner, .hlang-row-inner { grid-template-columns: 1fr 1fr 36px; }
}
.row-rm {
    border: 1px solid var(--border); background: var(--card); border-radius: 0.4rem;
    font-family: inherit; font-size: 0.9rem; font-weight: 700; width: 32px; height: 32px;
    cursor: pointer; color: var(--text-dim); transition: all 0.12s ease;
}
.row-rm:hover { color: var(--bad); border-color: var(--bad); }
.url-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.url-col .tag2 { font-size: 0.72rem; font-weight: 600; color: var(--text-faint); }
.small-note { font-size: 0.78rem; color: var(--text-faint); margin: 4px 0 10px; }

/* search-result (SERP) preview */
.serp-preview {
    background: var(--card); border: 1px solid var(--border);
    border-radius: 0.75rem; padding: 18px; display: flex; flex-direction: column; gap: 6px;
    max-width: 620px; margin: 0 auto;
}
.serp-site { display: flex; align-items: center; gap: 8px; }
.serp-favicon {
    width: 26px; height: 26px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.9rem; color: #fff; flex-shrink: 0;
}
.serp-url { font-size: 0.82rem; color: var(--text-dim); word-break: break-all; }
.serp-title { font-size: 1.22rem; line-height: 1.35; font-weight: 400; color: #1a0dab; }
[data-theme="dark"] .serp-title { color: #8ab4f8; }
.serp-desc { font-size: 0.9rem; color: var(--text-dim); line-height: 1.5; word-break: break-word; }
.meter-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.meter-bar { flex: 1; height: 6px; border-radius: 3px; background: var(--bg-soft); border: 1px solid var(--border); overflow: hidden; }
.meter-fill { height: 100%; border-radius: 3px; background: var(--good); }
.meter-fill.warn { background: var(--warn); }
.meter-fill.bad { background: var(--bad); }
.meter-label { font-size: 0.76rem; color: var(--text-dim); font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.v-ok { color: var(--good); }
.v-warn { color: var(--warn); }
.v-bad { color: var(--bad); }

/* social/og card preview */
.og-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: 0.75rem; overflow: hidden; max-width: 500px; margin: 0 auto;
    box-shadow: var(--shadow);
}
.og-img {
    width: 100%; height: 190px; object-fit: cover; display: block;
    background: linear-gradient(135deg, #2563eb, #1e40af); color: transparent;
}
.og-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; }
.og-domain { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-faint); font-weight: 700; }
.og-tt { font-size: 1.02rem; font-weight: 800; line-height: 1.3; }
.og-ds { font-size: 0.84rem; color: var(--text-dim); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.stat-pill {
    display: inline-block; padding: 3px 9px; border-radius: 999px;
    font-size: 0.72rem; font-weight: 700;
}
.stat-pill.ok { background: var(--good-soft); color: var(--good); }
.stat-pill.warn { background: var(--warn-soft); color: var(--warn); }
.stat-pill.bad { background: var(--bad-soft); color: var(--bad); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.dl-row { display: flex; gap: 8px; margin-top: 10px; }
.schema-lines { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 14px; }

.faq-block { position: relative; padding: 10px 12px; background: var(--card-strong);
    border: 1px solid var(--border); border-radius: 0.5rem; }
.faq-block .field { margin-bottom: 10px; }
.faq-block .field:last-child { margin-bottom: 0; }
.faq-block .row-rm { position: absolute; top: 10px; right: 10px; }
