/*
 * Editorial design system — "Morning Briefing"
 * Shared stylesheet for Job Agent public pages (signup, login, legal, etc.).
 * Single source of truth: edit here, not per-template, to avoid visual drift.
 * Extracted verbatim from the signup page (issue: shared editorial CSS).
 */
:root {
    --paper: #f6f1e7;
    --paper-2: #efe7d6;
    --paper-input: #fffdf8;
    --ink: #1c1813;
    --soft: #5c5447;
    --muted: #8a8073;
    --rule: #d8cdb8;
    --rule-strong: #1c1813;
    --accent: #7c2d2d;
    --accent-hover: #5e2020;
    --error-bg: #f4dada;
    --error-text: #5e2020;
    --error-border: #e0b4b4;
    /* Serif for display, system sans for body — editorial but modern. */
    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: var(--sans);
    background: var(--paper);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
/* Base link color — keeps prose links on-palette (oxblood, not browser blue).
   Button-style links (.btn, .google-btn) set their own color and win on specificity. */
a { color: var(--accent); }
.container {
    max-width: 760px;
    margin: 40px auto;
    padding: 0 24px 64px;
}
@media (max-width: 600px) {
    .container { margin: 24px auto; padding: 0 18px 48px; }
}
/* Narrow variant for centered form/confirmation pages (login, success) */
.container.narrow { max-width: 460px; }

/* Masthead */
.masthead {
    border-top: 3px solid var(--rule-strong);
    border-bottom: 1px solid var(--rule-strong);
    padding: 14px 0 11px;
    text-align: center;
}
.masthead h1 {
    font-family: var(--serif);
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink);
}
.masthead .dateline {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--rule);
    font-size: 0.66rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--soft);
}
@media (max-width: 480px) {
    .masthead h1 { font-size: 1.7rem; }
    .masthead .dateline { font-size: 0.58rem; letter-spacing: 0.1em; }
}

/* Hero */
.hero { text-align: center; padding: 28px 0 22px; border-bottom: 1px solid var(--rule); }
.hero .headline {
    font-family: var(--serif);
    font-size: 2.5rem;
    line-height: 1.08;
    font-weight: 700;
    color: var(--ink);
}
.hero .subtitle { color: var(--soft); font-size: 1.05rem; font-style: italic; margin-top: 10px; }
@media (max-width: 480px) { .hero .headline { font-size: 1.7rem; } }

.alert {
    padding: 12px 16px;
    border-radius: 2px;
    margin: 22px 0 0;
    font-size: 0.9rem;
}
.alert-error { background: var(--error-bg); color: var(--error-text); border: 1px solid var(--error-border); }

/* Sample matches table */
.matches { padding: 26px 0 4px; }
.matches-head { display: flex; justify-content: space-between; align-items: baseline;
    border-bottom: 2px solid var(--rule-strong); padding-bottom: 6px; margin-bottom: 2px; }
.matches-head .meta { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--soft); font-style: italic; }
table.matches-table { width: 100%; border-collapse: collapse; }
table.matches-table th { font-family: var(--serif); font-size: 0.64rem; font-weight: 700;
    letter-spacing: 0.12em; text-transform: uppercase; color: var(--soft); text-align: left;
    padding: 9px 8px; border-bottom: 1px solid var(--rule); }
table.matches-table th.num, table.matches-table td.num { text-align: right; white-space: nowrap; }
table.matches-table td { padding: 11px 8px; border-bottom: 1px solid var(--rule);
    vertical-align: top; font-size: 0.98rem; }
table.matches-table tr:last-child td { border-bottom: none; }
.matches-table .role .loc { display: block; font-size: 0.78rem; color: var(--soft);
    font-style: italic; margin-top: 2px; }
.matches-table td.grade { font-family: var(--serif); font-weight: 700; color: var(--accent); }
.matches-table td.conn { font-weight: 700; color: var(--ink); }
.matches-table td.conn .who { display: block; font-size: 0.68rem; color: var(--soft);
    font-weight: 400; font-style: italic; }
.matches-cap { font-size: 0.82rem; color: var(--muted); margin-top: 8px; font-style: italic; }
@media (max-width: 480px) {
    .matches-table .hide-sm { display: none; }
    table.matches-table td, table.matches-table th { padding: 9px 5px; font-size: 0.9rem; }
}

.kicker {
    font-family: var(--serif);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 10px;
}

/* Letter */
.letter { padding: 24px 0 8px; }
.letter p { font-size: 1.04rem; margin-bottom: 14px; color: var(--ink); }
.letter p.greeting { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; }
.letter p.greeting::first-letter {
    font-family: var(--serif);
    font-size: 3.1rem;
    line-height: 0.8;
    float: left;
    padding: 4px 10px 0 0;
    color: var(--accent);
    font-weight: 700;
}
.letter ul.bullets { list-style: none; margin: 16px 0 18px; padding: 0; }
.letter ul.bullets li {
    font-size: 1.0rem;
    margin-bottom: 12px;
    padding: 0 0 12px 26px;
    position: relative;
    border-bottom: 1px dotted var(--rule);
}
.letter ul.bullets li:last-child { border-bottom: none; }
.letter ul.bullets li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 9px;
    width: 7px;
    height: 7px;
    background: var(--accent);
    transform: rotate(45deg);
}
.letter .signoff { color: var(--soft); margin-bottom: 4px; }
.letter .signoff.name { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--ink); }

/* Request access / generic form card */
.access {
    margin-top: 26px;
    background: var(--paper-2);
    border: 1px solid var(--rule);
    padding: 26px;
}
label {
    display: block;
    font-family: var(--serif);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--soft);
    margin-bottom: 8px;
}
input[type="email"] {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #c8bca4;
    border-radius: 2px;
    font-size: 1rem;
    font-family: var(--sans);
    color: var(--ink);
    background: var(--paper-input);
    margin-bottom: 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input[type="email"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(124, 45, 45, 0.12);
}
.submit-btn, .magic-btn {
    display: block;
    width: 100%;
    padding: 14px 16px;
    background: var(--accent);
    color: var(--paper);
    border: none;
    border-radius: 2px;
    font-size: 0.92rem;
    font-weight: 600;
    font-family: var(--serif);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s ease;
}
.submit-btn:hover, .magic-btn:hover { background: var(--accent-hover); }
.submit-btn:active, .magic-btn:active { background: #4a1818; }
.access .note { margin-top: 12px; font-size: 0.84rem; color: var(--soft); font-style: italic; text-align: center; }

/* Bot-detection field: off-screen, not display:none (bots skip those). */
.hp-field { position: absolute; left: -9999px; top: -9999px; height: 0; width: 0; opacity: 0; }

.footer-note { margin-top: 18px; font-size: 0.84rem; color: var(--muted); text-align: center; }
.footer-note a { color: var(--accent); }
.footer-note + .footer-note { margin-top: 6px; }

/* ===== Phase 2 components (login + success/pending pages) ===== */

/* Centered subtitle under the masthead on simple pages */
.subtitle { text-align: center; color: var(--soft); font-size: 1.0rem; font-style: italic;
    margin-top: 10px; }

/* Generic content card (same surface as .access, semantic alias) */
.card { background: var(--paper-2); border: 1px solid var(--rule); padding: 28px; }

/* Success / status alert variant (complements .alert-error) */
.alert-success { background: #e3ecdf; color: #3a5237; border: 1px solid #c4d4bd; }

/* Secondary button — e.g. "Sign in with Google" (paper, ruled) */
.btn-secondary, .google-btn {
    display: block; width: 100%; padding: 13px 16px;
    background: var(--paper-input); color: var(--ink);
    border: 1px solid #c8bca4; border-radius: 2px;
    font-family: var(--serif); font-size: 0.92rem; font-weight: 600;
    letter-spacing: 0.04em; text-transform: uppercase;
    text-align: center; text-decoration: none; cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.btn-secondary:hover, .google-btn:hover { background: #f3ece0; border-color: var(--soft); }

/* "or" divider with hairline rules */
.divider { display: flex; align-items: center; margin: 20px 0; color: var(--muted);
    font-family: var(--serif); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; }
.divider::before, .divider::after { content: ""; flex: 1; border-bottom: 1px solid var(--rule); }
.divider span { padding: 0 12px; }

/* Status banner (e.g. "Under review") — accent left rule */
.banner { border: 1px solid var(--rule); border-left: 3px solid var(--accent);
    background: var(--paper-input); padding: 14px 16px; margin-bottom: 18px; font-size: 0.95rem; }
.banner strong { color: var(--ink); }

/* Inline link styled as a primary button (CTA on content pages) */
.btn { display: inline-block; padding: 12px 22px; background: var(--accent); color: var(--paper);
    border-radius: 2px; text-decoration: none; font-family: var(--serif); font-size: 0.88rem;
    font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; transition: background 0.15s ease; }
.btn:hover { background: var(--accent-hover); }

/* Next-steps box (optional tips) */
.next-steps { border: 1px solid var(--rule); background: var(--paper-input); padding: 18px 20px;
    margin-top: 20px; }
.next-steps h3 { font-family: var(--serif); font-size: 0.9rem; color: var(--ink);
    margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.08em; }
.next-steps ul { margin: 0; padding-left: 20px; }
.next-steps li { margin-bottom: 10px; color: var(--soft); font-size: 0.92rem; }

/* Centered message blocks (success/confirmation pages) */
.message { color: var(--soft); margin-bottom: 14px; }
.message .email { font-weight: 700; color: var(--ink); font-family: var(--serif); }
.actions { margin-top: 22px; text-align: center; }
.note { font-size: 0.84rem; color: var(--muted); margin-top: 18px; text-align: center; }
.text-center { text-align: center; }

/* Numbered steps timeline (serif circles) — e.g. "what happens next" */
ol.steps { list-style: none; counter-reset: step; margin: 16px 0 4px; padding: 0; }
ol.steps li { counter-increment: step; position: relative; padding: 2px 0 16px 46px;
    border-bottom: 1px dotted var(--rule); margin-bottom: 14px; font-size: 1.0rem; color: var(--soft); }
ol.steps li:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
ol.steps li strong { color: var(--ink); }
ol.steps li::before { content: counter(step); position: absolute; left: 0; top: 0;
    width: 32px; height: 32px; border: 1.5px solid var(--accent); color: var(--accent);
    border-radius: 50%; font-family: var(--serif); font-weight: 700; font-size: 0.95rem;
    text-align: center; line-height: 30px; }

/* Compact add-on list (optional extras inside a card) */
.addons { list-style: none; margin: 14px 0 0; padding: 0; }
.addons li { padding: 0 0 12px 0; margin-bottom: 12px; border-bottom: 1px dotted var(--rule);
    font-size: 0.95rem; color: var(--soft); }
.addons li:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.addons li strong { color: var(--ink); }

/* ===== Legal / prose pages (privacy, terms) ===== */
.back-link { display: inline-block; margin-bottom: 28px; color: var(--accent);
    text-decoration: none; font-family: var(--serif); font-size: 0.78rem;
    letter-spacing: 0.08em; text-transform: uppercase; }
.back-link:hover { text-decoration: underline; }
.container > h1 { font-family: var(--serif); font-size: 2.2rem; font-weight: 700;
    color: var(--ink); margin-bottom: 6px; }
.container > .meta { color: var(--muted); font-size: 0.85rem; font-style: italic;
    margin-bottom: 28px; }
.card h2 { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; color: var(--ink);
    margin: 30px 0 10px; padding-bottom: 7px; border-bottom: 1px solid var(--rule); }
.card h2:first-child { margin-top: 0; }
.card p { margin-bottom: 12px; color: var(--ink); }
.card ul { margin: 8px 0 14px; padding-left: 22px; }
.card li { margin-bottom: 6px; color: var(--ink); }
.contact-block { margin-top: 32px; padding: 18px 22px; background: var(--paper-input);
    border-left: 3px solid var(--accent); }
.contact-block p { margin-bottom: 0; }

/* ===== Account page ===== */
.field { display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
    padding: 12px 0; border-bottom: 1px dotted var(--rule); }
.field:last-child { border-bottom: none; }
.field-label { font-family: var(--serif); font-size: 0.72rem; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--soft); }
.field-value { color: var(--ink); font-size: 1rem; }
.flash { padding: 12px 16px; border: 1px solid var(--rule); margin-bottom: 16px; font-size: 0.92rem; }
.flash-success { background: #e3ecdf; color: #3a5237; border-color: #c4d4bd; }
.flash-info { background: var(--paper-input); color: var(--soft); border-left: 3px solid var(--accent); }
.cta { display: inline-block; padding: 12px 22px; background: var(--accent); color: var(--paper);
    border: none; border-radius: 2px; text-decoration: none; cursor: pointer; font-family: var(--serif);
    font-size: 0.88rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
    transition: background 0.15s ease; }
.cta:hover { background: var(--accent-hover); }
.cta.danger { background: transparent; color: #9a3030; border: 1px solid #c98c8c; }
.cta.danger:hover { background: var(--error-bg); }
.danger-card { border-color: #e0b4b4; }
.muted { color: var(--muted); font-size: 0.88rem; }
.status-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.7rem;
    font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.status-active, .status-trialing { background: #e3ecdf; color: #3a5237; }
.status-canceled, .status-past_due, .status-unpaid { background: var(--error-bg); color: var(--error-text); }
.status-incomplete, .status-incomplete_expired { background: #f3e8cf; color: #7a5a1e; }
