/* ============================================================
   ArticleForge — Design System v2
   Clean, crisp, modern. Inter everywhere, navy ink + brass accent,
   hairline borders, soft layered shadows, fluid on every screen size.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --ink-900: #0f1424;
    --ink-800: #161d33;
    --ink-700: #1f2847;
    --ink-600: #2b3659;
    --paper: #f5f7fb;
    --paper-dim: #dfe4ee;
    --line: #e5e9f2;
    --brass: #c08a3e;
    --brass-bright: #dba758;
    --brass-soft: #fbf3e4;
    --stamp-red: #b3402f;
    --teal: #2f6f6b;
    --ok: #1f8f55;
    --warn: #a86f12;
    --err: #b3402f;
    --text-main: #1a2033;
    --text-muted: #667085;
    --radius: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.06);
    --shadow: 0 2px 4px -2px rgba(16, 24, 40, 0.06), 0 10px 24px -6px rgba(16, 24, 40, 0.10);
    --font-head: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
    font-size: 15px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}
html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    color: var(--text-main);
    background: var(--paper);
    line-height: 1.55;
}
img, video { max-width: 100%; }

h1, h2, h3, h4 {
    font-family: var(--font-head);
    color: var(--ink-900);
    margin: 0 0 0.5em;
    letter-spacing: -0.02em;
    line-height: 1.25;
    font-weight: 700;
}
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1.02rem; }
h4 { font-size: 0.95rem; }
p { margin: 0 0 0.8em; }

a { color: var(--brass); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: #a9772f; }

.muted { color: var(--text-muted); }
.center { text-align: center; }
::selection { background: rgba(192, 138, 62, 0.28); }

/* ---------- Guest / auth pages ---------- */
.guest-body {
    background: radial-gradient(1200px 520px at 15% -10%, #243061 0%, rgba(36, 48, 97, 0) 60%), var(--ink-900);
    min-height: 100vh;
}
.guest-wrap { width: 100%; max-width: 440px; padding: 24px; }
.guest-brand { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 24px; }
.brand-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; flex: none;
    background: linear-gradient(145deg, var(--brass-bright), var(--brass));
    color: var(--ink-900);
    font-weight: 800; font-size: 0.85rem; letter-spacing: -0.02em;
    border-radius: 10px;
    box-shadow: 0 0 0 4px rgba(192, 138, 62, 0.22);
}
.brand-name { color: #fff; font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em; }
.auth-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: inset 0 4px 0 var(--brass), 0 20px 50px -12px rgba(0, 0, 0, 0.45);
}
.auth-card h1 { font-size: 1.45rem; margin-bottom: 6px; }
.auth-card > .muted { font-size: 0.92rem; margin-bottom: 18px; }
.guest-foot { text-align: center; margin-top: 16px; color: #b8bfd6; font-size: 0.85rem; }

/* ---------- Forms ---------- */
form label {
    display: block;
    margin-bottom: 16px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #344054;
}
input, select, textarea {
    width: 100%;
    margin-top: 6px;
    padding: 10px 12px;
    border: 1px solid #d5dbe8;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 400;
    background: #fff;
    color: var(--text-main);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input::placeholder, textarea::placeholder { color: #98a2b3; }
input:hover, select:hover, textarea:hover { border-color: #b9c2d6; }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--brass);
    box-shadow: 0 0 0 4px rgba(192, 138, 62, 0.16);
}
input[type="checkbox"], input[type="radio"] { width: auto; margin: 0 6px 0 0; accent-color: var(--brass); }
input[type="file"] { padding: 8px; background: #fafbfd; }
textarea { resize: vertical; min-height: 100px; line-height: 1.5; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.88rem;
    line-height: 1.2;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid rgba(192, 138, 62, 0.35); outline-offset: 2px; }
.btn[disabled], .btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--brass); color: #1a1405; box-shadow: 0 1px 2px rgba(120, 80, 20, 0.25); }
.btn-primary:hover { background: var(--brass-bright); color: #1a1405; }
.btn-secondary { background: #fff; color: var(--text-main); border-color: #d5dbe8; }
.btn-secondary:hover { background: #f3f5fa; color: var(--text-main); }
.btn-danger { background: var(--stamp-red); color: #fff; }
.btn-danger:hover { background: #983727; color: #fff; }
.btn-block { display: flex; width: 100%; margin-top: 8px; }
.btn-sm { padding: 6px 12px; font-size: 0.78rem; border-radius: 8px; }

/* ---------- Alerts ---------- */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    border: 1px solid transparent;
}
.alert ul { margin: 0; padding-left: 20px; }
.alert-success { background: #ecf8f1; color: #176b41; border-color: #cbeedb; box-shadow: inset 4px 0 0 var(--ok); }
.alert-error { background: #fdf0ee; color: #96301f; border-color: #f7d4cd; box-shadow: inset 4px 0 0 var(--err); }
.alert-warning { background: #fdf6e8; color: #8a5a0b; border-color: #f5e3bd; box-shadow: inset 4px 0 0 #d79a2b; }
.alert-info { background: #eef3fb; color: var(--ink-700); border-color: #d9e4f5; box-shadow: inset 4px 0 0 #5b7fc0; }

/* ---------- App shell ---------- */
.app-shell { position: relative; min-height: 100vh; }

/* App bar (top). Admin keeps the dark variant; user pages use .appbar */
.mobile-topbar {
    display: flex; align-items: center; gap: 12px;
    position: sticky; top: 0; z-index: 60;
    background: var(--ink-900); color: #fff;
    padding: 12px 16px;
}
.hamburger-btn {
    background: none; border: none; color: #fff;
    font-size: 22px; line-height: 1; cursor: pointer; padding: 4px 6px;
}
.mobile-topbar-title { font-weight: 600; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mobile-topbar.appbar {
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    backdrop-filter: saturate(180%) blur(10px);
    color: var(--ink-900);
    border-bottom: 1px solid var(--line);
    padding: 9px 16px;
    min-height: 56px;
}
.appbar .hamburger-btn {
    width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
    background: #fff; border: 1px solid var(--line); border-radius: 10px;
    color: var(--ink-900); font-size: 18px; padding: 0;
}
.appbar .hamburger-btn:hover { background: var(--paper); }
.appbar-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink-900); min-width: 0; }
.appbar-brand:hover { color: var(--ink-900); }
.appbar-brand .brand-mark { width: 30px; height: 30px; font-size: 0.75rem; box-shadow: none; border-radius: 9px; }
.appbar-name { font-weight: 700; font-size: 1rem; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.user-chip { display: inline-flex; align-items: center; gap: 8px; color: var(--text-main); font-size: 0.85rem; font-weight: 500; }
.user-avatar {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--ink-800); color: var(--brass-bright);
    font-weight: 700; font-size: 0.85rem;
}
.btn-logout {
    display: inline-flex; align-items: center; padding: 7px 14px; border-radius: 999px;
    background: var(--ink-800); color: #fff !important; font-size: 0.8rem; font-weight: 600;
    transition: background 0.15s ease;
}
.btn-logout:hover { background: var(--stamp-red); color: #fff !important; }

.sidebar {
    position: fixed; top: 0; left: -300px;
    width: 264px; height: 100vh; flex-shrink: 0;
    background: linear-gradient(180deg, #141b34 0%, #0d1226 100%);
    color: #fff;
    display: flex; flex-direction: column;
    overflow-y: auto;
    padding: 20px 14px;
    z-index: 80;
    transition: left 0.25s ease;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.4);
}
.app-shell.sidebar-open .sidebar { left: 0; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(10, 12, 25, 0.55); z-index: 70; }
.app-shell.sidebar-open .sidebar-overlay { display: block; }
.sidebar .guest-brand { justify-content: flex-start; margin-bottom: 22px; padding: 0 6px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.side-nav a {
    color: #b9c0da;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}
.side-nav a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.side-nav a.active { background: rgba(192, 138, 62, 0.16); color: #fff; box-shadow: inset 3px 0 0 var(--brass); }
.side-back { color: #94a0c4; font-size: 0.82rem; margin: 0 6px 8px; display: inline-block; }
.side-back:hover { color: #fff; }
.side-site-name {
    color: #fff; font-weight: 700; font-size: 1rem;
    margin: 0 6px 10px; padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    word-break: break-word;
}
.side-foot { margin-top: auto; padding: 16px 6px 0; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.plan-pill {
    display: inline-block;
    background: rgba(192, 138, 62, 0.16);
    color: var(--brass-bright);
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.03em;
    padding: 4px 11px; border-radius: 999px; margin-bottom: 10px;
}
.side-logout { display: block; color: #b9c0da; font-size: 0.85rem; }
.side-logout:hover { color: #fff; }

.content { padding: 22px 18px 64px; max-width: 1200px; margin: 0 auto; }
@media (min-width: 700px) { .content { padding: 30px 36px 72px; } }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.topbar-pro h1 { margin: 0; font-size: 1.6rem; letter-spacing: -0.03em; white-space: nowrap; }
.topbar-user { display: flex; align-items: center; gap: 10px; flex-shrink: 0; color: var(--text-muted); font-size: 0.9rem; }

/* ---------- Cards / grids ---------- */
.card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    overflow-x: auto;
}
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.grid { display: grid; gap: 16px; margin-bottom: 20px; }
.grid > .card { margin-bottom: 0; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-2, .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 440px) { .grid-4 { grid-template-columns: 1fr 1fr; gap: 12px; } }

.stat-card { text-align: left; padding: 18px 20px; position: relative; }
.stat-card::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brass); }
.stat-value { font-size: 1.75rem; font-weight: 700; color: var(--ink-900); letter-spacing: -0.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--text-muted); font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; }

.site-card {
    display: block;
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    padding: 20px;
    box-shadow: inset 4px 0 0 var(--brass), var(--shadow-sm);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.site-card:hover { box-shadow: inset 4px 0 0 var(--brass), var(--shadow); transform: translateY(-2px); }
.site-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.site-card .url { color: var(--text-muted); font-size: 0.83rem; word-break: break-all; }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; }
thead th {
    text-align: left;
    background: #f8fafc;
    color: var(--text-muted);
    font-size: 0.7rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.06em;
    padding: 11px 14px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
thead th:first-child { border-top-left-radius: 10px; }
thead th:last-child { border-top-right-radius: 10px; }
tbody td { padding: 13px 14px; border-bottom: 1px solid #eef1f6; font-size: 0.88rem; vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fafbfe; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.8; }
.badge-active, .badge-published, .badge-connected { background: #e8f7ef; color: #17784a; }
.badge-paused, .badge-untested, .badge-queued, .badge-generated, .badge-generating, .badge-publishing { background: #fdf3df; color: #94620c; }
.badge-failed, .badge-suspended { background: #fdecea; color: #a5321f; }

/* ---------- Misc ---------- */
.page-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.empty-state { text-align: center; padding: 44px 20px; color: var(--text-muted); font-size: 0.92rem; }
.inline-form { display: flex; gap: 10px; align-items: flex-end; }
.tag { display: inline-block; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; font-size: 0.76rem; margin: 2px; }
code, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85em; background: var(--paper); padding: 2px 6px; border-radius: 5px; }

/* ---------- Ads (managed in Admin -> Ads) ---------- */
.ad { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px 16px; font-size: 1rem; text-align: center; box-shadow: inset 0 3px 0 var(--brass), var(--shadow-sm); transition: box-shadow 0.2s ease; }
.ad:hover { box-shadow: inset 0 3px 0 var(--brass), var(--shadow); }
.ad a { color: inherit; text-decoration: none; }
.ad-label { display: inline-block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); background: var(--paper); border-radius: 999px; padding: 1px 8px; margin-bottom: 6px; }
.ad img { display: block; max-width: 100%; height: auto; margin: 0 auto 8px; border-radius: 8px; }
.ad-text { display: block; font-weight: 700; font-size: 1.15em; line-height: 1.4; color: var(--ink-900); word-break: break-word; margin-bottom: 8px; }
.ad-video { position: relative; padding-top: 56.25%; margin-bottom: 6px; }
.ad-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 8px; }
.ad video { width: 100%; border-radius: 8px; margin-bottom: 6px; }
.ad-video-link { display: inline-block; font-size: 1.05rem; font-weight: 600; color: var(--brass); text-decoration: underline !important; }

/* Top strip, next to the page title */
.ad-top { flex: 1; max-width: 920px; margin: 0 0 0 auto; padding: 16px 24px; min-height: 90px; font-size: 1.1rem; box-shadow: inset 3px 0 0 var(--brass), var(--shadow-sm); display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.ad-top:hover { box-shadow: inset 3px 0 0 var(--brass), var(--shadow); }
.ad-top .ad-label, .ad-top .ad-text { margin: 0; }
.ad-top img { max-height: 110px; width: auto; margin: 0; }
.ad-top a { display: inline-flex; align-items: center; gap: 8px; }

/* Left / right: cards on normal screens, floated into the page margins on wide ones */
.ad-side-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.ad-side-wrap:has(> .ad:only-child) { grid-template-columns: 1fr; }
@media (min-width: 1750px) {
    .ad-side-wrap { display: block; margin: 0; height: 0; }
    .ad-side { position: fixed; top: 110px; width: 240px; max-height: calc(100vh - 130px); overflow-y: auto; z-index: 5; }
    .ad-left { left: calc(50% - 600px - 260px); }
    .ad-right { left: calc(50% + 600px + 20px); }
}

/* ---------- Main (login / register) page ---------- */
.guest-hero-area { padding: 0 20px 56px; }
.guest-nav { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 20px 0; gap: 12px; }
.guest-nav .guest-brand { margin: 0; justify-content: flex-start; }
.guest-nav-links { display: flex; align-items: center; gap: 18px; }
.guest-nav-links .nav-link { color: #c3cadf; font-size: 0.88rem; font-weight: 500; white-space: nowrap; }
.guest-nav-links .nav-link:hover { color: #fff; }
.guest-nav-links .nav-cta { background: var(--brass); color: #1a1405; padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 0.85rem; white-space: nowrap; }
.guest-nav-links .nav-cta:hover { background: var(--brass-bright); color: #1a1405; }
.guest-top-ad { max-width: 1100px; margin: 0 auto 22px; }
.guest-top-ad .ad-top { margin: 0; max-width: none; }

.guest-main { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr 440px; gap: 56px; align-items: center; }
.guest-main.is-compact { grid-template-columns: 1fr; justify-items: center; }
.guest-main .guest-wrap { width: 100%; max-width: 440px; padding: 0; justify-self: end; }
.guest-main.is-compact .guest-wrap { justify-self: center; }

.guest-hero { color: #fff; }
.hero-badge { display: inline-block; background: rgba(192, 138, 62, 0.16); color: var(--brass-bright); border: 1px solid rgba(192, 138, 62, 0.38); border-radius: 999px; padding: 5px 14px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 18px; }
.guest-hero h2 { color: #fff; font-size: 2.6rem; line-height: 1.08; letter-spacing: -0.035em; font-weight: 800; margin: 0 0 16px; }
.guest-hero h2 span { color: var(--brass-bright); }
.guest-hero .lead { color: #c3cadf; font-size: 1.02rem; line-height: 1.65; max-width: 520px; margin: 0 0 22px; }
.hero-points { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
.hero-points li { color: #e4e8f4; display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; }
.hero-points li::before { content: "\2713"; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--brass); color: var(--ink-900); font-weight: 800; font-size: 0.7rem; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-chips span { background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.13); color: #d9deee; border-radius: 999px; padding: 5px 12px; font-size: 0.75rem; font-weight: 500; }

.guest-below { background: var(--paper); padding: 72px 20px 80px; }
.guest-section { max-width: 1100px; margin: 0 auto 72px; }
.guest-section:last-child { margin-bottom: 0; }
.section-head { text-align: center; margin-bottom: 34px; }
.section-head .eyebrow { color: var(--brass); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; }
.section-head h3 { font-size: 1.8rem; letter-spacing: -0.03em; margin: 8px 0 8px; }
.section-head p { color: var(--text-muted); max-width: 560px; margin: 0 auto; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-sm); transition: box-shadow 0.2s ease, transform 0.2s ease; }
.feature-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.feature-icon { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; font-size: 1.35rem; background: var(--brass-soft); border-radius: 12px; margin-bottom: 14px; }
.feature-card h4 { font-size: 1rem; margin: 0 0 6px; }
.feature-card p { margin: 0; color: var(--text-muted); font-size: 0.88rem; line-height: 1.6; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step { background: linear-gradient(160deg, var(--ink-700), var(--ink-900)); border-radius: var(--radius-lg); padding: 22px; }
.step-num { width: 32px; height: 32px; border-radius: 50%; background: var(--brass); color: var(--ink-900); font-weight: 800; font-size: 0.9rem; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.step h4 { color: #fff; margin: 0 0 6px; font-size: 1rem; }
.step p { margin: 0; color: #aeb7d4; font-size: 0.86rem; line-height: 1.55; }

.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.plan-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-sm); position: relative; display: flex; flex-direction: column; }
.plan-card.is-popular { border: 2px solid var(--brass); box-shadow: var(--shadow); }
.plan-pop { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--brass); color: var(--ink-900); font-size: 0.66rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
.plan-price { font-size: 2.2rem; color: var(--ink-900); font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; }
.plan-price small { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; letter-spacing: 0; }
.plan-list { list-style: none; padding: 0; margin: 18px 0 22px; display: grid; gap: 9px; font-size: 0.88rem; flex: 1; }
.plan-list li::before { content: "\2713  "; color: var(--ok); font-weight: 800; }

.refer-banner { background: linear-gradient(120deg, var(--ink-800), var(--ink-600)); color: #fff; border-radius: var(--radius-lg); padding: 28px 32px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.refer-banner h3 { color: #fff; margin: 0 0 6px; font-size: 1.4rem; }
.refer-banner p { margin: 0; color: #c3cadf; max-width: 560px; }

.faq-list { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.faq-list details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow-sm); }
.faq-list summary { cursor: pointer; font-weight: 600; color: var(--ink-900); }
.faq-list details[open] summary { color: var(--brass); }
.faq-list details p { margin: 10px 0 0; color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; }

.guest-footer { background: var(--ink-900); color: #9aa3c2; text-align: center; padding: 26px 20px; font-size: 0.82rem; }

/* Side ads on the main page: stacked under the card, floated into the margins on very wide screens */
.guest-wrap .ad-side-wrap { margin: 16px 0 0; }
@media (min-width: 1650px) {
    .guest-wrap .ad-side-wrap { display: block; margin: 0; height: 0; }
    .guest-wrap .ad-side { position: fixed; top: 120px; width: 240px; max-height: calc(100vh - 140px); overflow-y: auto; z-index: 5; }
    .guest-wrap .ad-left { left: calc(50% - 550px - 260px); }
    .guest-wrap .ad-right { left: calc(50% + 550px + 20px); }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1000px) {
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .app-shell { overflow-x: hidden; }
    .side-nav a { white-space: normal; }
    .content { max-width: 100%; }

    .topbar { flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
    .topbar-pro h1 { font-size: 1.35rem; }
    .ad-top { flex-basis: 100%; max-width: none; margin: 0; order: 3; }

    .page-actions { flex-direction: column; align-items: stretch; gap: 10px; }
    .inline-form { flex-direction: column; align-items: stretch; }

    .guest-main { grid-template-columns: 1fr; gap: 28px; }
    .guest-main .guest-wrap { justify-self: center; }
    .guest-hero h2 { font-size: 1.95rem; }
    .guest-hero .lead { font-size: 0.97rem; margin-bottom: 0; }
    .hero-points, .hero-chips { display: none; }
    .nav-hide-sm { display: none; }
}
@media (max-width: 700px) {
    input, select, textarea { font-size: 16px; }   /* prevents iOS zoom-on-focus */
    .card { padding: 18px 16px; border-radius: 14px; }
    .card table { min-width: 520px; }
    thead th, tbody td { padding: 10px 12px; }
    .user-name { display: none; }
    .stat-value { font-size: 1.5rem; }
}
@media (max-width: 600px) {
    .feature-grid, .steps { grid-template-columns: 1fr; }
    .guest-hero-area { padding: 0 16px 40px; }
    .guest-below { padding: 48px 16px 56px; }
    .guest-section { margin-bottom: 52px; }
    .section-head h3 { font-size: 1.45rem; }
    .refer-banner { padding: 22px 20px; }
    .auth-card { padding: 24px 20px; }
    .guest-nav { padding: 16px 0; }
    .guest-nav-links { gap: 10px; }
    .guest-nav .guest-brand { gap: 8px; }
    .guest-nav .brand-mark { width: 30px; height: 30px; }
    .guest-nav .brand-name { font-size: 0.95rem; }
    .guest-nav-links .nav-link, .guest-nav-links .nav-cta { font-size: 0.8rem; }
    .guest-nav-links .nav-cta { padding: 7px 12px; }
}
@media (max-width: 340px) {
    .guest-nav .brand-name { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; scroll-behavior: auto !important; }
}

.auth-card p.center { margin: 18px 0 0; font-size: 0.9rem; }
