/* ── Theme tokens (premium dark-first design) ── */
:root {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --bg-0: #ffffff;
    --bg-1: #f9fafb;
    --bg-2: #f3f4f6;
    --bg-input: #ffffff;
    --border: #e5e7eb;
    --border-focus: #4F46E5;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-tertiary: #9ca3af;
    --accent: #4F46E5;
    --accent-hover: #4338ca;
    --accent-text: #ffffff;
    --accent-cyan: #22D3EE;
    --accent-secondary: #A78BFA;
    --text: #111827;
    --bg: #f9fafb;
    --card-bg: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 48px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 999px;
    --row-stripe: #f9fafb;
    --row-hover: #f3f4f6;
    --status-done-bg: #dcfce7;
    --status-done-text: #166534;
    --status-review-bg: #fef9c3;
    --status-review-text: #854d0e;
    --status-failed-bg: #fee2e2;
    --status-failed-text: #991b1b;
    --status-skip-bg: #f3f4f6;
    --status-skip-text: #6b7280;
    --badge-bg: #ede9fe;
    --badge-text: #5b21b6;
    --note-text: #92400e;
}

[data-theme="dark"] {
    --bg-0: #0f1628;
    --bg-1: #0B0F19;
    --bg-2: #141b2e;
    --bg-input: #0d121f;
    --border: rgba(255,255,255,0.1);
    --border-focus: #22D3EE;
    --text-primary: #E5E7EB;
    --text-secondary: #9ca3af;
    --text-tertiary: #6b7280;
    --accent: #4F46E5;
    --accent-hover: #6366f1;
    --accent-text: #ffffff;
    --text: #E5E7EB;
    --bg: #0B0F19;
    --card-bg: #0f1628;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 24px rgba(0,0,0,0.4);
    --shadow-lg: 0 12px 48px rgba(0,0,0,0.55);
    --row-stripe: #161b22;
    --row-hover: #1c2128;
    --status-done-bg: rgba(46,160,67,0.15);
    --status-done-text: #7ee787;
    --status-review-bg: rgba(210,153,34,0.15);
    --status-review-text: #d29922;
    --status-failed-bg: rgba(248,81,73,0.15);
    --status-failed-text: #f85149;
    --status-skip-bg: rgba(110,118,129,0.15);
    --status-skip-text: #8b949e;
    --badge-bg: rgba(167,139,250,0.15);
    --badge-text: #A78BFA;
    --note-text: #d29922;
}

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
    font-family: var(--font-sans);
    background: var(--bg-1);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
}

a { color: var(--text-primary); text-decoration: none; }

/* ── Top bar ── */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: var(--bg-0);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
}

.topbar-logo { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.topbar-logo img { height: 36px; width: auto; }
.topbar-logo .logo-light { display: block; }
.topbar-logo .logo-dark { display: none; }
[data-theme="dark"] .topbar-logo .logo-light { display: none; }
[data-theme="dark"] .topbar-logo .logo-dark { display: block; }

.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}
.topbar-link:hover {
    background: var(--bg-2);
    color: var(--text);
}

.theme-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--bg-0);
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    font-size: 16px;
}
.theme-btn:hover { background: var(--bg-2); border-color: var(--border-focus); }
.theme-btn.active { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }

/* ── Layout ── */
.page-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 61px);
    padding: 40px 16px;
}

.page-wide {
    max-width: 1320px;
    margin: 0 auto;
    padding: 28px 24px 48px;
}

/* ── Card ── */
.card {
    width: 100%;
    max-width: 560px;
    background: var(--bg-0);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-lg);
}

.card-wide {
    background: var(--bg-0);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-md);
}

/* ── Typography ── */
.heading-lg { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.01em; color: var(--text-primary); }
.heading-sm { font-size: 0.93rem; font-weight: 600; color: var(--text-primary); }
.text-secondary { font-size: 0.87rem; color: var(--text-secondary); line-height: 1.55; }
.text-mono {
    font-family: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", ui-monospace, monospace;
    font-size: 0.78rem;
    color: var(--text-tertiary);
}

/* ── Form elements ── */
.field { margin-bottom: 20px; }

.field-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.field-input,
.field-select {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.87rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    color: var(--text-primary);
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
    font-family: inherit;
}
.field-input:focus,
.field-select:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}
[data-theme="dark"] .field-input:focus,
[data-theme="dark"] .field-select:focus {
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.file-drop {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    background: var(--bg-1);
}
.file-drop:hover, .file-drop.dragover {
    border-color: var(--accent);
    background: var(--bg-2);
}
.file-drop input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}
.file-drop-icon { font-size: 28px; margin-bottom: 8px; opacity: 0.5; }
.file-drop-text { font-size: 0.87rem; color: var(--text-secondary); }
.file-drop-text strong { color: var(--text-primary); font-weight: 600; }
.file-drop-hint { font-size: 0.78rem; color: var(--text-tertiary); margin-top: 4px; }
.file-drop-name { font-size: 0.87rem; color: var(--text-primary); font-weight: 500; margin-top: 6px; }

.file-error:empty { display: none; }
.file-error {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 14px;
    font-size: 0.83rem;
    font-weight: 500;
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-md);
}
.file-error::before {
    content: "\26A0";
    font-size: 1rem;
    flex-shrink: 0;
}
[data-theme="dark"] .file-error {
    color: #fca5a5;
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.25);
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 0.87rem;
    font-weight: 500;
    font-family: inherit;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s, transform 0.08s;
    outline: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: var(--accent-text);
    border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-full { width: 100%; }

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border);
}
.btn-outline:hover { background: var(--bg-2); }

.btn-sm { padding: 6px 12px; font-size: 0.8rem; border-radius: var(--radius-sm); }

/* ── Stats row ── */
.stats-row { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.stat-card {
    flex: 1;
    min-width: 100px;
    padding: 14px 16px;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-align: center;
}
.stat-value { font-size: 1.4rem; font-weight: 700; color: var(--text-primary); }
.stat-label { font-size: 0.73rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-tertiary); margin-top: 2px; }

/* ── Controls bar ── */
.controls { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.controls-left, .controls-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.search-box {
    padding: 7px 12px;
    font-size: 0.83rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    min-width: 200px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.15s;
}
.search-box:focus { border-color: var(--border-focus); }
.search-box::placeholder { color: var(--text-tertiary); }

.filter-select {
    padding: 7px 10px;
    font-size: 0.83rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    outline: none;
    font-family: inherit;
}

/* ── Table ── */
.table-wrap {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    overflow-x: auto;
}

table { width: 100%; border-collapse: collapse; font-size: 0.83rem; }

thead { background: var(--bg-2); }
th {
    padding: 10px 12px;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

td {
    padding: 10px 12px;
    vertical-align: top;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
}

tbody tr:nth-child(even) { background: var(--row-stripe); }
tbody tr:hover { background: var(--row-hover); }
tbody tr:last-child td { border-bottom: none; }

td input[type="checkbox"], th input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

th.sortable { cursor: pointer; user-select: none; position: relative; padding-right: 18px; }
th.sortable:hover { color: var(--text-primary); }
th.sortable::after { content: "\2195"; position: absolute; right: 4px; opacity: 0.3; font-size: 0.7rem; }
th.sorted-asc::after { content: "\2191"; opacity: 0.8; }
th.sorted-desc::after { content: "\2193"; opacity: 0.8; }

/* ── Badges & pills ── */
.pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}
.pill-done { background: var(--status-done-bg); color: var(--status-done-text); }
.pill-needs_review { background: var(--status-review-bg); color: var(--status-review-text); }
.pill-failed { background: var(--status-failed-bg); color: var(--status-failed-text); }
.pill-skipped { background: var(--status-skip-bg); color: var(--status-skip-text); }
.pill-pending { background: var(--status-skip-bg); color: var(--status-skip-text); }
.pill-processing { background: var(--badge-bg); color: var(--badge-text); }

.badge {
    display: inline-flex;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 500;
    background: var(--badge-bg);
    color: var(--badge-text);
}

.note-text { color: var(--note-text); font-size: 0.78rem; }

/* ── Misc ── */
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

.footer-hint {
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-tertiary);
    margin-top: 16px;
}
.footer-hint code {
    font-family: "SF Mono", "Fira Code", ui-monospace, monospace;
    font-size: 0.73rem;
    background: var(--bg-2);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--border);
}

/* ── Score badges ── */
.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.score-high { background: #dcfce7; color: #15803d; }
.score-mid  { background: #fef9c3; color: #a16207; }
.score-low  { background: #fee2e2; color: #b91c1c; }
[data-theme="dark"] .score-high { background: #166534; color: #bbf7d0; }
[data-theme="dark"] .score-mid  { background: #713f12; color: #fef08a; }
[data-theme="dark"] .score-low  { background: #7f1d1d; color: #fecaca; }

/* ── Insight card ── */
.insight-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 24px;
    padding: 20px 24px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: linear-gradient(135deg, var(--card-bg), var(--bg-2));
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.insight-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
    margin-top: 2px;
}
.insight-body { flex: 1; }
.insight-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}
.insight-text {
    font-size: 0.85rem;
    line-height: 1.65;
    color: var(--text-secondary);
}
.insight-text strong {
    color: var(--text);
}
[data-theme="dark"] .insight-card {
    background: linear-gradient(135deg, var(--card-bg), #131a2e);
    box-shadow: 0 1px 6px rgba(0,0,0,0.2);
}

/* ── Tabs ── */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}
.tab-btn {
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Settings page ── */
.setting-group {
    margin-bottom: 28px;
}
.setting-group-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
}
.setting-description {
    font-size: 0.82rem;
    color: var(--text-tertiary);
    margin-bottom: 12px;
    line-height: 1.5;
}
.prompt-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px 14px;
    font-size: 0.85rem;
    font-family: "SF Mono", "Fira Code", ui-monospace, monospace;
    line-height: 1.6;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    resize: vertical;
}
.prompt-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.2);
}
.api-key-input {
    width: 100%;
    max-width: 500px;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-family: "SF Mono", "Fira Code", ui-monospace, monospace;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
}
.api-key-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.2);
}
.save-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--status-done-text);
    margin-left: 12px;
    opacity: 0;
    transition: opacity 0.3s;
}
.save-status.show { opacity: 1; }

/* ── Admin top nav (Upload / Writter / Dashboard — same layout) ── */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 14px 32px 14px 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
}
[data-theme="light"] .nav {
    border-bottom-color: rgba(15, 23, 42, 0.08);
    background: rgba(248, 250, 252, 0.95);
}
.nav-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}
.nav-brand-imgwrap { display: block; line-height: 0; }
.nav-brand .nav-logo-img { height: 32px; width: auto; }
.nav-brand .logo-light { display: block; filter: brightness(0) invert(1); }
.nav-brand .logo-dark { display: none; }
[data-theme="light"] .nav-brand .logo-light { display: none; }
[data-theme="light"] .nav-brand .logo-dark { display: block; filter: none; }
.nav-tagline {
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.45);
    max-width: 280px;
    line-height: 1.35;
}
[data-theme="light"] .nav-tagline { color: rgba(15, 23, 42, 0.45); }
.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s;
    white-space: nowrap;
}
.nav-link:hover,
.nav-link.active { color: #fff; }
[data-theme="light"] .nav-link { color: rgba(15, 23, 42, 0.6); }
[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link.active { color: #0f172a; }
.nav-link.active { font-weight: 600; color: var(--accent-cyan); }
[data-theme="light"] .nav-link.active { color: var(--accent); }
.nav .theme-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.nav .theme-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}
[data-theme="light"] .nav .theme-btn {
    border-color: rgba(15, 23, 42, 0.15);
    color: rgba(15, 23, 42, 0.6);
}
[data-theme="light"] .nav .theme-btn:hover {
    color: #0f172a;
    background: rgba(15, 23, 42, 0.06);
}
.nav-merchant { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nav-merchant-connect {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%);
    color: #0a0a0a;
    box-shadow: 0 2px 12px rgba(34, 211, 238, 0.35);
    transition: transform 0.15s, filter 0.15s, box-shadow 0.15s;
    white-space: nowrap;
}
.nav-merchant-connect:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(34, 211, 238, 0.45);
}
.nav-merchant-connected { display: none; align-items: center; gap: 10px; flex-wrap: wrap; }
.nav-merchant-connected.visible { display: flex; }
button.nav-merchant-pill {
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.15);
    color: #22d3ee;
    border: 1px solid rgba(34, 211, 238, 0.35);
    cursor: pointer;
}
button.nav-merchant-pill:hover { filter: brightness(1.08); }
[data-theme="light"] button.nav-merchant-pill {
    color: #0e7490;
    border-color: rgba(14, 116, 144, 0.35);
    background: rgba(34, 211, 238, 0.12);
}
.mc-confirm-row { display: flex; gap: 12px; margin-top: 8px; justify-content: stretch; }
.mc-confirm-no {
    flex: 1;
    padding: 12px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
}
.mc-confirm-no:hover { background: rgba(255, 255, 255, 0.06); }
.mc-confirm-yes {
    flex: 1;
    padding: 12px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%);
    color: #0a0a0a;
}
.mc-confirm-yes:hover { filter: brightness(1.05); }
[data-theme="light"] .mc-confirm-no {
    border-color: rgba(15, 23, 42, 0.2);
    color: #0f172a;
}
[data-theme="light"] .mc-confirm-no:hover { background: rgba(15, 23, 42, 0.06); }
.mc-success-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 15, 0.72);
    backdrop-filter: blur(6px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.28s ease;
}
.mc-success-overlay.visible { display: flex; opacity: 1; }
.mc-success-modal {
    background: rgba(18, 22, 32, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 36px 32px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}
[data-theme="light"] .mc-success-modal {
    background: #fff;
    border-color: rgba(15, 23, 42, 0.1);
}
.mc-success-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22d3ee, #06b6d4);
    color: #0a0a0a;
    font-size: 28px;
    line-height: 56px;
    font-weight: 700;
}
.mc-success-modal h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}
[data-theme="light"] .mc-success-modal h3 { color: #0f172a; }
.mc-success-modal p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    margin-bottom: 20px;
}
[data-theme="light"] .mc-success-modal p { color: rgba(15, 23, 42, 0.6); }
.mc-success-gotit {
    width: 100%;
    padding: 12px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%);
    color: #0a0a0a;
}
.mc-success-gotit:hover { filter: brightness(1.05); }

/* Sidebar logos (Writter / Dashboard) — follow html[data-theme] */
.wt-side .logo-light,
.oa-sidebar .oa-brand .logo-light {
    display: block;
    filter: brightness(0) invert(1);
}
.wt-side .logo-dark,
.oa-sidebar .oa-brand .logo-dark {
    display: none;
}
[data-theme="light"] .wt-side .logo-light,
[data-theme="light"] .oa-sidebar .oa-brand .logo-light {
    display: none;
}
[data-theme="light"] .wt-side .logo-dark,
[data-theme="light"] .oa-sidebar .oa-brand .logo-dark {
    display: block;
    filter: none;
}

/* Legacy Settings / Contact: <a class="nav-logo"> without nav-brand */
.nav > a.nav-logo {
    display: flex;
    align-items: center;
}
.nav > a.nav-logo .logo-light {
    display: block;
    filter: brightness(0) invert(1);
}
.nav > a.nav-logo .logo-dark {
    display: none;
}
[data-theme="light"] .nav > a.nav-logo .logo-light {
    display: none;
}
[data-theme="light"] .nav > a.nav-logo .logo-dark {
    display: block;
    filter: none;
}

/* ── Homepage-style nav (public blog — matches marketing header) ── */
.hp-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
[data-theme="light"] .hp-nav {
    background: rgba(248, 250, 252, 0.95);
    border-bottom-color: rgba(15, 23, 42, 0.08);
}
.hp-nav-inner {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 40px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.hp-nav-logo {
    flex-shrink: 0;
    position: relative;
}
.hp-nav-logo img {
    height: 32px;
}
.hp-nav-logo .logo-dark {
    display: none;
    filter: brightness(0) invert(1);
}
.hp-nav-logo .logo-light {
    display: block;
    filter: brightness(0) invert(1);
}
[data-theme="light"] .hp-nav-logo .logo-light {
    display: none;
}
[data-theme="light"] .hp-nav-logo .logo-dark {
    display: block;
    filter: none;
}
.hp-nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    flex: 1;
}
.hp-nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}
.hp-nav-link {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s;
}
.hp-nav-link:hover {
    color: var(--text-primary);
}
.hp-theme-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.hp-theme-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}
[data-theme="light"] .hp-theme-btn:hover {
    background: rgba(15, 23, 42, 0.06);
}
.hp-nav-cta {
    background: var(--text-primary);
    color: var(--bg-1);
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.2s;
}
.hp-nav-cta:hover {
    opacity: 0.9;
}
[data-theme="light"] .hp-nav-cta {
    background: #0f172a;
    color: #fff;
}
.blog-page-with-nav {
    padding-top: 56px;
}
@media (max-width: 1024px) {
    .hp-nav-links {
        display: none;
    }
    .hp-nav-right {
        gap: 12px;
    }
    .hp-nav-inner {
        padding: 0 24px;
    }
}

/* End-of-article CTA (public blog) */
.blog-article-end-cta {
    margin-top: 2.75rem;
    padding: 1.75rem 1.5rem 2rem;
    text-align: center;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: linear-gradient(145deg, rgba(79, 70, 229, 0.14) 0%, rgba(34, 211, 238, 0.08) 55%, rgba(15, 23, 42, 0.2) 100%);
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}
[data-theme="light"] .blog-article-end-cta {
    background: linear-gradient(145deg, rgba(79, 70, 229, 0.08) 0%, rgba(241, 245, 249, 0.95) 100%);
    border-color: rgba(15, 23, 42, 0.1);
}
.blog-article-end-cta-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}
.blog-article-end-cta-sub {
    font-size: 0.92rem;
    color: var(--text-secondary);
    margin: 0 0 1.35rem;
    line-height: 1.55;
    max-width: 42ch;
    margin-left: auto;
    margin-right: auto;
}
.blog-article-end-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    background: var(--text-primary);
    color: var(--bg-1);
    transition: opacity 0.2s, transform 0.15s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
/* Light: solid navy + white label (match product CTAs; beats global `a` / accent colors) */
[data-theme="light"] .blog-article-end-cta a.blog-article-end-cta-btn,
[data-theme="light"] .blog-article-end-cta a.blog-article-end-cta-btn:visited {
    background: #161e2e;
    color: #ffffff;
    border-radius: 14px;
    text-decoration: none;
    box-shadow: 0 10px 28px -14px rgba(22, 30, 46, 0.55);
}
.blog-article-end-cta-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}
[data-theme="light"] .blog-article-end-cta a.blog-article-end-cta-btn:hover {
    color: #ffffff;
    opacity: 0.95;
}

/* Primary is flex + align-items: flex-start — stretch CTAs to reading column width */
.blog-article-primary > .blog-article-end-cta {
    margin-left: 0;
    margin-right: auto;
    width: 100%;
    max-width: 720px;
    box-sizing: border-box;
}

.blog-article-primary .blog-article-mid-cta {
    margin-left: 0;
    margin-right: auto;
    width: 100%;
    max-width: 720px;
    box-sizing: border-box;
}

/* Public blog article: layout, TOC, mid-CTA, typography (scoped to .blog-article-page) */
.blog-layout .blog-center.blog-article-page {
    max-width: min(1180px, 100%);
}

.blog-breadcrumbs {
    max-width: 720px;
    width: 100%;
    margin-bottom: 1.1rem;
    margin-left: 0;
    margin-right: auto;
    padding-left: clamp(4px, 2vw, 12px);
    padding-right: clamp(4px, 2vw, 12px);
    box-sizing: border-box;
}

.blog-breadcrumbs-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.45rem;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.8125rem;
    line-height: 1.45;
}

.blog-breadcrumbs-item a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s ease;
}

.blog-breadcrumbs-item a:hover {
    color: #a5b4fc;
}

[data-theme="light"] .blog-breadcrumbs-item a:hover {
    color: #4338ca;
}

.blog-breadcrumbs-sep {
    color: rgba(100, 116, 139, 0.55);
    font-weight: 400;
    user-select: none;
}

.blog-breadcrumbs-current {
    color: #cbd5e1;
    font-weight: 500;
    min-width: 0;
}

[data-theme="light"] .blog-breadcrumbs-current {
    color: #475569;
}

.blog-article-header {
    max-width: 720px;
    width: 100%;
    margin-bottom: 1.25rem;
    margin-left: 0;
    margin-right: auto;
    padding-left: clamp(4px, 2vw, 12px);
    padding-right: clamp(4px, 2vw, 12px);
    box-sizing: border-box;
}

.blog-article-title {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.03em;
    margin: 0;
    color: var(--text-primary);
}

.blog-article-subtitle {
    font-size: 1.125rem;
    line-height: 1.45;
    margin: 0.5rem 0 0;
    opacity: 0.7;
    color: var(--text-secondary);
}

/* TOC in column 1 spans title + body; reading column left-aligned at one edge */
.blog-article-page-grid {
    display: grid;
    grid-template-columns: minmax(148px, 188px) minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 28px;
    row-gap: 18px;
    align-items: start;
}

.blog-article-head-slot {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.blog-article-primary {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.blog-toc {
    grid-column: 1;
    grid-row: 1 / span 2;
    position: sticky;
    top: 80px;
    align-self: start;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    padding: 14px 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.45);
    box-sizing: border-box;
}

[data-theme="light"] .blog-toc {
    background: rgba(248, 250, 252, 0.9);
}

.blog-toc-label {
    margin: 0 0 10px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.blog-toc-list {
    margin: 0;
    padding: 0 0 0 1.1em;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--text-secondary);
}

.blog-toc-list li {
    margin: 0.4em 0;
}

.blog-toc-list a {
    color: var(--text-secondary);
    text-decoration: none;
    display: inline-block;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}

.blog-toc-list a:hover {
    color: #a5b4fc;
}

[data-theme="light"] .blog-toc-list a:hover {
    color: #4338ca;
}

.blog-toc-list a.blog-toc-active {
    color: #c7d2fe;
    font-weight: 600;
}

[data-theme="light"] .blog-toc-list a.blog-toc-active {
    color: #312e81;
}

.blog-article-mid-cta {
    margin: 2.25rem 0 2.5rem;
    padding: 1.75rem 1.5rem 1.85rem;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: linear-gradient(
        165deg,
        rgba(30, 41, 59, 0.92) 0%,
        rgba(15, 23, 42, 0.65) 45%,
        rgba(49, 46, 129, 0.22) 100%
    );
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 20px 50px -18px rgba(0, 0, 0, 0.55);
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.blog-article-mid-cta::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 16px 0 0 16px;
    background: linear-gradient(180deg, #818cf8 0%, #22d3ee 100%);
    opacity: 0.95;
}

[data-theme="light"] .blog-article-mid-cta {
    border-color: rgba(15, 23, 42, 0.1);
    background: linear-gradient(165deg, #ffffff 0%, #f8fafc 55%, #eef2ff 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 18px 40px -20px rgba(15, 23, 42, 0.12);
}

[data-theme="light"] .blog-article-mid-cta::before {
    opacity: 1;
}

.blog-article-mid-cta-inner {
    text-align: center;
    position: relative;
    z-index: 1;
    padding-left: 0.35rem;
}

.blog-article-mid-cta-head {
    font-size: 1.28rem;
    font-weight: 700;
    margin: 0 0 0.65rem;
    letter-spacing: -0.03em;
    line-height: 1.25;
    color: #f8fafc;
}

[data-theme="light"] .blog-article-mid-cta-head {
    color: #0f172a;
}

.blog-article-mid-cta-lead {
    font-size: 0.9rem;
    color: rgba(203, 213, 225, 0.92);
    margin: 0 0 1.15rem;
    line-height: 1.55;
    max-width: 38rem;
    margin-left: auto;
    margin-right: auto;
}

[data-theme="light"] .blog-article-mid-cta-lead {
    color: #475569;
}

.blog-article-mid-cta-steps {
    list-style: none;
    margin: 0 auto 1.35rem;
    padding: 0;
    max-width: 26rem;
    text-align: left;
    font-size: 0.84rem;
    line-height: 1.45;
    color: rgba(226, 232, 240, 0.95);
    counter-reset: midcta;
}

[data-theme="light"] .blog-article-mid-cta-steps {
    color: #334155;
}

.blog-article-mid-cta-steps li {
    position: relative;
    margin: 0 0 0.55rem;
    padding-left: 1.65rem;
    counter-increment: midcta;
}

.blog-article-mid-cta-steps li::before {
    content: counter(midcta);
    position: absolute;
    left: 0;
    top: 0.1em;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.15rem;
    text-align: center;
    background: rgba(129, 140, 248, 0.25);
    color: #c7d2fe;
    border: 1px solid rgba(129, 140, 248, 0.35);
}

[data-theme="light"] .blog-article-mid-cta-steps li::before {
    background: rgba(79, 70, 229, 0.1);
    color: #4338ca;
    border-color: rgba(79, 70, 229, 0.2);
}

.blog-article-mid-cta-steps li:last-child {
    margin-bottom: 0;
}

.blog-article-mid-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 1.65rem;
    border-radius: 10px;
    font-size: 0.94rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    border: none;
    cursor: pointer;
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    color: #0f172a;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.75) inset,
        0 8px 24px -6px rgba(15, 23, 42, 0.45);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        filter 0.18s ease;
}

.blog-article-mid-cta-btn .blog-article-mid-cta-btn-label {
    text-decoration: none;
}

[data-theme="light"] .blog-article-mid-cta-btn {
    background: #161e2e;
    color: #ffffff;
    border-radius: 14px;
    box-shadow: 0 10px 28px -14px rgba(22, 30, 46, 0.55);
}

.blog-article-mid-cta-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.03);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.8) inset,
        0 14px 32px -10px rgba(15, 23, 42, 0.55);
}

[data-theme="light"] .blog-article-mid-cta-btn:hover {
    filter: brightness(1.05);
    color: #ffffff;
}

.blog-article-mid-cta-btn:focus-visible {
    outline: 2px solid #818cf8;
    outline-offset: 3px;
}

/* Article column: readable width + hierarchy (does not affect Writter review without .blog-article-page) */
.blog-article-page .article-content.writter-article {
    max-width: 720px;
    width: 100%;
    margin-left: 0;
    margin-right: auto;
}

.blog-article-page .writter-article h1 {
    font-size: 1.65rem;
}

.blog-article-page .writter-article h2 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    color: #f1f5f9;
}

[data-theme="light"] .blog-article-page .writter-article h2 {
    color: #0f172a;
}

.blog-article-page .writter-article h3 {
    font-size: 1.2rem;
    margin-top: 1.75rem;
    color: #e2e8f0;
}

[data-theme="light"] .blog-article-page .writter-article h3 {
    color: #1e293b;
}

.blog-article-page .writter-article p {
    font-size: 1rem;
    line-height: 1.7;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

[data-theme="light"] .blog-article-page .writter-article p {
    color: #475569;
}

.blog-article-page .writter-article strong {
    font-weight: 600;
    color: #e2e8f0;
}

[data-theme="light"] .blog-article-page .writter-article strong {
    color: #0f172a;
}

.blog-article-page .writter-article section {
    margin-bottom: 3rem;
}

.blog-article-page .writter-article ul,
.blog-article-page .writter-article ol {
    margin-bottom: 1rem;
}

.blog-article-page .writter-article img,
.blog-article-page .writter-article picture img {
    border-radius: 12px;
    border: 1px solid #1e293b;
    box-shadow: none;
    margin: 1.5rem auto;
}

[data-theme="light"] .blog-article-page .writter-article img,
[data-theme="light"] .blog-article-page .writter-article picture img {
    border-color: rgba(15, 23, 42, 0.12);
}

.blog-article-page .writter-article figcaption {
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

@media (max-width: 960px) {
    .blog-article-page-grid {
        grid-template-columns: 1fr;
        grid-template-rows: none;
    }

    .blog-article-head-slot {
        grid-column: 1;
        grid-row: auto;
    }

    .blog-toc {
        grid-column: 1;
        grid-row: auto;
        position: relative;
        top: 0;
        max-height: none;
    }

    .blog-article-primary {
        grid-column: 1;
        grid-row: auto;
    }
}

/* ── Generated article HTML (Writter review preview + public /blog) ── */
.writter-article {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    padding-left: clamp(4px, 2vw, 12px);
    padding-right: clamp(4px, 2vw, 12px);
    box-sizing: border-box;
    font-size: 1.0625rem;
    line-height: 1.72;
    letter-spacing: 0.01em;
    color: inherit;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.writter-article > *:first-child {
    margin-top: 0;
}

.writter-article a:not(.blog-article-mid-cta-btn) {
    color: #22d3ee;
    text-decoration: underline;
    text-underline-offset: 2px;
}

[data-theme="light"] .writter-article a:not(.blog-article-mid-cta-btn) {
    color: #0284c7;
}

.writter-article .writter-cta a {
    color: #4f46e5;
    font-weight: 600;
}

[data-theme="light"] .writter-article .writter-cta a:not(.blog-article-mid-cta-btn):not(.blog-article-end-cta-btn) {
    color: #4338ca;
}

/* Mid-CTA lives inside .writter-article; prose link rules must not style it as body copy */
.blog-article-page .article-content.writter-article .blog-article-mid-cta a.blog-article-mid-cta-btn {
    text-decoration: none;
    color: #0f172a;
}

[data-theme="light"] .blog-article-page .article-content.writter-article .blog-article-mid-cta a.blog-article-mid-cta-btn,
[data-theme="light"] .blog-article-page .article-content.writter-article .blog-article-mid-cta a.blog-article-mid-cta-btn:visited {
    color: #ffffff;
    text-decoration: none;
}

/* End CTA sits in .blog-article-primary (sibling of .writter-article); still protect from global link color */
[data-theme="light"] .blog-article-primary .blog-article-end-cta a.blog-article-end-cta-btn,
[data-theme="light"] .blog-article-primary .blog-article-end-cta a.blog-article-end-cta-btn:visited {
    color: #ffffff;
    text-decoration: none;
}

.writter-article h1,
.writter-article h2,
.writter-article h3,
.writter-article h4 {
    font-weight: 600;
    line-height: 1.28;
    letter-spacing: -0.02em;
}

.writter-article h1 {
    font-size: 1.65rem;
    margin: 1.15em 0 0.55em;
}

.writter-article h2 {
    font-size: 1.35rem;
    margin: 1.45em 0 0.55em;
}

.writter-article h3 {
    font-size: 1.15rem;
    margin: 1.3em 0 0.45em;
}

.writter-article h4 {
    font-size: 1.05rem;
    margin: 1.2em 0 0.4em;
}

.writter-article p {
    margin: 0 0 1.1em;
}

.writter-article ul,
.writter-article ol {
    margin: 0 0 1.1em;
    padding-left: 1.35em;
}

.writter-article li {
    margin: 0.35em 0;
}

.writter-article li > p {
    margin: 0.35em 0;
}

.writter-article blockquote {
    margin: 1.2em 0;
    padding: 0.65em 0 0.65em 1em;
    border-left: 3px solid rgba(34, 211, 238, 0.45);
    color: rgba(229, 231, 235, 0.9);
}

[data-theme="light"] .writter-article blockquote {
    border-left-color: rgba(79, 70, 229, 0.35);
    color: rgba(15, 23, 42, 0.82);
}

.writter-article img,
.writter-article picture img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.25em auto;
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.22);
}

[data-theme="light"] .writter-article img,
[data-theme="light"] .writter-article picture img {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Inline dimensions from generators should not stretch or squash images */
.writter-article img[width],
.writter-article picture img[width] {
    max-width: 100%;
    height: auto !important;
}

.writter-article figure {
    margin: 1.4em auto;
    max-width: 100%;
}

.writter-article figcaption {
    font-size: 0.82rem;
    color: rgba(148, 163, 184, 0.95);
    margin-top: 0.45em;
    text-align: center;
    line-height: 1.35;
}

[data-theme="light"] .writter-article figcaption {
    color: rgba(71, 85, 105, 0.95);
}

.writter-article video {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.25em auto;
    border-radius: 10px;
}

.writter-article iframe {
    max-width: 100%;
    display: block;
    margin: 1.25em auto;
    border-radius: 10px;
    border: 0;
}

.writter-article table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    margin: 1.4em 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

[data-theme="light"] .writter-article table {
    border-color: rgba(15, 23, 42, 0.12);
}

.writter-article th,
.writter-article td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
    vertical-align: top;
}

[data-theme="light"] .writter-article th,
[data-theme="light"] .writter-article td {
    border-bottom-color: rgba(15, 23, 42, 0.08);
}

.writter-article thead th {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(148, 163, 184, 0.95);
    background: rgba(255, 255, 255, 0.03);
}

[data-theme="light"] .writter-article thead th {
    color: rgba(71, 85, 105, 0.95);
    background: rgba(15, 23, 42, 0.04);
}

.writter-article tbody tr:last-child td {
    border-bottom: none;
}

.writter-article code {
    font-size: 0.9em;
    padding: 0.12em 0.38em;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.07);
}

[data-theme="light"] .writter-article code {
    background: rgba(15, 23, 42, 0.06);
}

.writter-article pre {
    overflow-x: auto;
    margin: 1.1em 0;
    padding: 1em 1.1em;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.5;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .writter-article pre {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.08);
}

.writter-article pre code {
    padding: 0;
    background: none;
    font-size: inherit;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .card { padding: 20px; }
    .field-row { grid-template-columns: 1fr; }
    .controls { flex-direction: column; align-items: stretch; }
    .controls-left, .controls-right { width: 100%; }
    .search-box { width: 100%; min-width: 0; }
    th:nth-child(5), th:nth-child(6), th:nth-child(7),
    td:nth-child(5), td:nth-child(6), td:nth-child(7) { display: none; }
}
