/* ══ My Market Desk — public marketing site (templates/site/*) ══
   Standalone from app.css (the dashboard): light theme, full size. */
:root {
    --blue: #2f6bff;
    --blue-dark: #1f55e0;
    --blue-soft: #eef3ff;
    --ink: #0b1733;
    --ink-2: #334155;
    --ink-3: #64748b;
    --line: #e2e8f0;
    --bg: #f7f8fa;
    --white: #ffffff;
    --green: #16a34a;
    --amber: #f59e0b;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 24px 60px rgba(47, 107, 255, 0.16);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-brand: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--white); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--blue); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--blue) 45%, transparent); outline-offset: 2px;
}
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ── Header ── */
.site-nav { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-nav .container { display: flex; align-items: center; gap: 28px; height: 68px; }
.site-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.site-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.site-brand-name { font-family: var(--font-brand); font-weight: 800; font-size: 19px; letter-spacing: -0.4px; }
.site-brand-sub { font-family: var(--font-brand); font-weight: 600; font-size: 9.5px; letter-spacing: 2.2px; text-transform: uppercase; color: #7a8499; margin-top: 2px; }
.brand-accent { color: var(--blue); }
h1, h2, h3 { font-family: var(--font-brand); }
.site-brand img { width: 36px; height: 36px; border-radius: 22%; }
.site-links { display: flex; gap: 26px; margin: 0 auto 0 12px; padding: 0; list-style: none; }
.site-links a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 15px; }
.site-links a:hover, .site-links a[aria-current="page"] { color: var(--blue); }
.site-actions { display: flex; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px; font-weight: 700; font-size: 15px; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-family: inherit; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(47, 107, 255, 0.28); }
.btn-primary:hover { background: var(--blue-dark); color: #fff; }
.btn-ghost { background: var(--white); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-lg { padding: 14px 24px; font-size: 16px; border-radius: 12px; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 10px; width: 42px; height: 42px; cursor: pointer; }
.menu-toggle svg { width: 22px; height: 22px; stroke: var(--ink); fill: none; stroke-width: 2; stroke-linecap: round; }

/* ── Sections ── */
section { padding: 84px 0; }
.section-alt { background: var(--bg); }
.eyebrow { display: inline-block; margin-bottom: 12px; padding: 4px 12px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-size: 13px; font-weight: 700; letter-spacing: 0.3px; }
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-head h2 { margin: 0 0 12px; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.2; letter-spacing: -0.5px; }
.section-head p { margin: 0; color: var(--ink-3); font-size: 17px; }

/* ── Hero ── */
.hero { padding: 72px 0 64px; background: radial-gradient(1100px 500px at 85% 0%, #dbeafe 0%, transparent 60%), linear-gradient(180deg, #f8fbff 0%, #fff 100%); overflow: hidden; }
.hero .container { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr); gap: 48px; align-items: center; }
.hero h1 { margin: 0 0 18px; font-size: clamp(36px, 4.6vw, 58px); line-height: 1.08; letter-spacing: -1.2px; }
.hero h1 span { color: var(--blue); }
.hero p.lead { margin: 0 0 28px; color: var(--ink-2); font-size: 18px; max-width: 520px; }
/* Hero signup (templates/site/home.html). Replaced .hero-ctas, which no
   page uses any more now that the hero converts in place. */
.hero-signup { display: flex; flex-wrap: wrap; gap: 10px; max-width: 520px; }
.hero-input {
    flex: 1 1 200px;
    min-width: 0;
    padding: 12px 14px;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    background: var(--white);
    color: var(--ink);
    font: inherit;
    font-size: 15px;
}
.hero-input::placeholder { color: var(--ink-3); }
.hero-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.hero-signup .btn { flex: 0 0 auto; }
/* Same look as the one in app.css; the marketing shell only loads site.css. */
.auth-error {
    max-width: 520px;
    margin-bottom: 12px;
    padding: 8px 12px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 14px;
}
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.hero-note { margin-top: 14px; color: var(--ink-3); font-size: 14px; }
.hero-note-top { margin-top: 0; }

/* Both auth forms, side by side, as a full-width row under the hero copy and
   the screenshot — the same grid-column trick .stats uses below. The hero's
   left column is capped at 520px, which is too narrow for two usable forms. */
.hero-auth {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 40px;
}
.auth-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-lg);
}
/* .hero-input is flex: 1 1 200px for the old single-row hero form, where 200px
   was a WIDTH. These cards are column flex, so that basis would become a 200px
   tall input — reset it here rather than touching the shared rule. */
.auth-box .hero-input { flex: 0 0 auto; width: 100%; }
.auth-box-title { margin: 0 0 2px; font-size: 18px; letter-spacing: -0.3px; }
.auth-box-note { margin: 0; color: var(--ink-3); font-size: 13px; }
.auth-box .btn { width: 100%; }
.auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-2);
    font-size: 14px;
    cursor: pointer;
}
.auth-remember input { width: 16px; height: 16px; accent-color: var(--blue); }

.hero-google { grid-column: 1 / -1; display: grid; justify-items: center; gap: 12px; margin-top: 24px; }
/* A rule with the word sitting on it, rather than a bare "or" floating. */
.auth-or-line {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    width: min(100%, 420px);
    color: var(--ink-3);
    font-size: 13px;
}
.auth-or-line::before, .auth-or-line::after { content: ""; height: 1px; background: var(--line); }
.browser { border-radius: 14px; background: var(--white); box-shadow: var(--shadow-lg); border: 1px solid var(--line); overflow: hidden; }
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #f1f5f9; border-bottom: 1px solid var(--line); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; }
.browser-bar span { margin-left: 10px; padding: 2px 10px; border-radius: 6px; background: var(--white); color: var(--ink-3); font-size: 12px; }
.hero .browser { transform: perspective(1600px) rotateY(-6deg) rotateX(2deg); }
@media (prefers-reduced-motion: reduce) { .hero .browser { transform: none; } }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 48px; grid-column: 1 / -1; }
.stat { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.stat strong { display: block; font-size: 28px; color: var(--blue); letter-spacing: -0.5px; }
.stat span { color: var(--ink-3); font-size: 14px; }

/* ── Feature cards & blocks ── */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.card { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); transition: box-shadow 0.2s, transform 0.2s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card h3 { margin: 12px 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--ink-3); font-size: 15px; }
.icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); }
.icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pro-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 5px; background: linear-gradient(135deg, #f59e0b, #f97316); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: 0.4px; vertical-align: middle; }

.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 56px; align-items: center; padding: 40px 0; }
.feature.reverse .feature-text { order: 2; }
.feature h3 { margin: 12px 0 10px; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.2; letter-spacing: -0.4px; }
.feature p { margin: 0 0 16px; color: var(--ink-2); font-size: 16px; }
.checks { margin: 0 0 20px; padding: 0; list-style: none; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 28px; color: var(--ink-2); }
.checks li::before { content: ""; position: absolute; left: 3px; top: 7px; width: 12px; height: 7px; border-left: 2.5px solid var(--green); border-bottom: 2.5px solid var(--green); transform: rotate(-45deg); }
.shot { border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--white); }
.shot-caption { margin-top: 8px; color: var(--ink-3); font-size: 13px; text-align: center; }
.illustration { display: grid; place-items: center; min-height: 280px; border-radius: 14px; border: 1px dashed #bfd2ff; background: linear-gradient(135deg, #eff6ff, #f8fafc); color: var(--blue); text-align: center; padding: 32px; }
.illustration svg { width: 64px; height: 64px; stroke: currentColor; fill: none; stroke-width: 1.4; margin: 0 auto 10px; }
.learn { font-weight: 700; text-decoration: none; }
.learn:hover { text-decoration: underline; }

.sources { padding: 36px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.sources p { margin: 0 0 10px; color: var(--ink-3); font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; }
.sources ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; margin: 0; padding: 0; list-style: none; color: var(--ink-2); font-weight: 700; font-size: 16px; }

.soon { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.soon .card { border-style: dashed; }
.soon .badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #fef3c7; color: #92400e; font-size: 12px; font-weight: 700; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0; padding: 0; list-style: none; }
.chips li { padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); font-size: 14px; color: var(--ink-2); }

.cta-band { padding: 0 0 84px; }
.cta-band .container > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 44px 48px; border-radius: 22px; color: #fff; background: radial-gradient(600px 300px at 90% 10%, rgba(255,255,255,0.18), transparent 60%), linear-gradient(135deg, #1d4ed8, #2563eb 55%, #2f6bff); box-shadow: var(--shadow-lg); }
.cta-band h2 { margin: 0 0 6px; font-size: clamp(24px, 3vw, 34px); }
.cta-band p { margin: 0; opacity: 0.9; }
.cta-band .btn { background: #fff; color: var(--blue-dark); }

/* ── Page header (inner pages) ── */
.page-hero { padding: 64px 0 32px; text-align: center; background: linear-gradient(180deg, #f8fbff, #fff); }
.page-hero h1 { margin: 0 0 12px; font-size: clamp(32px, 4vw, 48px); line-height: 1.12; letter-spacing: -0.8px; }
.page-hero p { max-width: 680px; margin: 0 auto; color: var(--ink-3); font-size: 18px; }

/* ── Pricing ── */
.toggle { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); margin-top: 22px; }
.toggle button { padding: 8px 18px; border: 0; border-radius: 999px; background: none; color: var(--ink-2); font-weight: 700; cursor: pointer; font-family: inherit; }
.toggle button[aria-checked="true"] { background: var(--blue); color: #fff; }
.save { color: var(--green); font-weight: 800; }
.toggle button[aria-checked="true"] .save { color: #fff; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 360px)); justify-content: center; gap: 24px; }
.plan { display: flex; flex-direction: column; padding: 30px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); box-shadow: 0 1px 2px rgba(15,23,42,0.04); }
.plan.pro { border: 2px solid var(--blue); box-shadow: var(--shadow-lg); position: relative; }
.plan.pro .ribbon { position: absolute; top: -13px; right: 24px; padding: 4px 12px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 800; }
.plan h2 { margin: 0 0 6px; font-size: 22px; }
.price { font-size: 42px; font-weight: 800; letter-spacing: -1px; }
.price small { font-size: 16px; color: var(--ink-3); font-weight: 600; letter-spacing: 0; }
.plan .for { margin: 2px 0 20px; color: var(--ink-3); }
.plan .checks { flex: 1; align-content: start; }
.fine { max-width: 720px; margin: 28px auto 0; color: var(--ink-3); font-size: 13px; text-align: center; }
.faq { max-width: 780px; margin: 0 auto; }
.faq details { padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); margin-bottom: 12px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { margin: 10px 0 0; color: var(--ink-2); }
[hidden] { display: none !important; }

/* ── Contact ── */
.contact { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.form { padding: 30px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); box-shadow: var(--shadow); }
.form label { display: block; margin: 0 0 6px; font-weight: 600; font-size: 14px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form input, .form select, .form textarea { width: 100%; margin-bottom: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font: inherit; color: var(--ink); background: var(--white); }
.form textarea { min-height: 150px; resize: vertical; }
.form .hp { position: absolute; left: -5000px; }
.notice { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; font-weight: 600; }
.notice.ok { background: #dcfce7; color: #166534; }
.notice.err { background: #fee2e2; color: #991b1b; }
.info { padding: 28px; border-radius: 18px; background: var(--bg); border: 1px solid var(--line); }
.info h2 { margin: 0 0 14px; font-size: 20px; }
.info dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 16px; margin: 0; }
.info dt { color: var(--ink-3); }
.info dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

/* ── Admin inbox ── */
.inbox { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 14px; }
.inbox th, .inbox td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.inbox th { background: var(--bg); color: var(--ink-3); font-weight: 700; }
.inbox tr.handled td { color: var(--ink-3); }
.inbox .msg { white-space: pre-wrap; max-width: 520px; }
.inbox button { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--white); cursor: pointer; font: inherit; }

/* ── Footer ── */
.site-footer { padding: 48px 0 32px; background: #0b1733; color: #cbd5e1; font-size: 14px; }
.site-footer .container { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px; }
.site-footer a { color: #e2e8f0; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer h3 { margin: 0 0 10px; color: #fff; font-size: 15px; }
.site-footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.site-footer .brand-line { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; color: #fff; font-family: var(--font-brand); font-weight: 800; font-size: 18px; letter-spacing: -0.3px; }
.site-footer .brand-line img { width: 32px; height: 32px; border-radius: 22%; }
.site-footer .legal { grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid #1e293b; color: #94a3b8; font-size: 13px; }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .hero .container, .feature, .contact { grid-template-columns: 1fr; }
    .feature.reverse .feature-text { order: 0; }
    .hero .browser { transform: none; }
    .cards { grid-template-columns: repeat(2, 1fr); }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .soon { grid-template-columns: 1fr; }
    .plans { grid-template-columns: minmax(0, 480px); }
}
@media (max-width: 860px) {
    .hero-signup .hero-input, .hero-signup .btn { flex: 1 1 100%; }
    /* One card above the other, at the same breakpoint the hero itself stacks. */
    .hero-auth { grid-template-columns: 1fr; margin-top: 28px; }
    .menu-toggle { display: inline-grid; place-items: center; }
    .site-links, .site-actions { display: none; }
    .site-nav.open .container { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 12px; }
    .site-nav.open .site-links { display: flex; flex-direction: column; gap: 14px; width: 100%; margin: 8px 0; }
    .site-nav.open .site-actions { display: flex; width: 100%; }
    .site-nav.open .site-actions .btn { flex: 1; }
}
@media (max-width: 640px) {
    section { padding: 60px 0; }
    .cards, .plans { grid-template-columns: 1fr; }
    .form .row { grid-template-columns: 1fr; }
    .site-footer .container { grid-template-columns: 1fr; }
    .cta-band .container > div { padding: 32px 24px; }
}

/* Public calendar pages and guides (api/seo.py) */
.cal-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; }
.cal-tabs a { display: inline-block; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 600; }
.cal-tabs a[aria-current="page"] { border-color: var(--blue); color: var(--blue); }
.cal-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.cal-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.cal-table th, .cal-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.cal-table th { font-size: 13px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.04em; background: var(--bg); }
.cal-table tr.past td { color: var(--ink-3); }
.cal-table td.when { white-space: nowrap; font-weight: 600; }
.cal-notes { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; color: var(--ink-3); font-size: 15px; }
.cal-cta { margin: 32px 0 0; padding: 22px 24px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.guide { max-width: 760px; margin: 0 auto; font-size: 17px; line-height: 1.7; }
.guide h2 { margin: 36px 0 10px; font-size: 24px; }
.guide .meta { color: var(--ink-3); font-size: 14px; }
