/* ==================== Know Your Ikigai — palette ==================== */
:root {
    --bg:            #FBF8F3;   /* warm off-white, rice paper */
    --bg-soft:       #F5EFE4;   /* soft cream, section wash */
    --card:          #FFFFFF;   /* card surface */
    --text:          #2A2A2E;   /* soft charcoal */
    --muted:         #7A6E5D;   /* warm taupe for secondary text */
    --primary:       #3B4A7A;   /* deep indigo — ai-iro */
    --primary-hover: #2E3B63;
    --secondary:     #EE8C6E;   /* sunrise coral */
    --secondary-hover:#DB765A;
    --sage:          #8FA88E;   /* muted sage — growth */
    --sakura:        #F5D8CA;   /* soft sakura peach */
    --olive:         #7E8F55;   /* warm olive — success */
    --border:        #E5DFD3;   /* warm border */
    --track:         #F0E9DA;   /* progress track */
    --shadow:        0 6px 20px rgba(59, 74, 122, 0.08);

    /* Ikigai circle colours */
    --love:     #EE8C6E;
    --good:     #3B4A7A;
    --world:    #8FA88E;
    --paid:     #C79A5E;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Georgia", "Iowan Old Style", -apple-system, "Segoe UI", serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body, .page { font-family: "Georgia", "Iowan Old Style", serif; }
h1, h2, h3, h4, .brand, .btn, .eyebrow, .badge, .hero-badge, label {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", sans-serif;
    letter-spacing: -0.005em;
}

.page {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.15rem 4rem;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem 1.35rem;
    padding: 1.35rem 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}
.brand {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.01em;
    color: var(--text);
    text-decoration: none;
}
.brand span { color: var(--secondary); }

/*
  Flex with a gap rather than margin-left on each link: when the nav wraps,
  margins leave the second row indented and the rows unevenly spaced. The gap
  also spaces the Sign out form correctly, which a margin on `a` never did.
  align-items keeps the button's box from riding the text baseline and
  nudging the row down.
*/
.site-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1.35rem;
}
.site-nav a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.15s;
}
.site-nav a.active, .site-nav a:hover { color: var(--primary); }

/* Below this the brand and nav no longer fit on one line at any font size. */
@media (max-width: 640px) {
    .site-header {
        flex-direction: column;
        align-items: center;
        gap: 0.85rem;
        text-align: center;
    }
    .site-nav {
        justify-content: center;
        gap: 0.5rem 1rem;
    }
    .site-nav a { font-size: 0.9rem; }
}

.site-footer {
    margin-top: 3rem;
    padding-top: 1.35rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.85rem;
    text-align: center;
}
.site-footer a { color: var(--primary); }

/* ==================== Buttons ==================== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.35rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 0.98rem;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 18px rgba(59, 74, 122, 0.2); }
.btn-primary:hover { background: var(--primary-hover); box-shadow: 0 10px 24px rgba(59, 74, 122, 0.3); }
.btn-secondary { background: var(--secondary); color: #fff; box-shadow: 0 6px 18px rgba(238, 140, 110, 0.25); }
.btn-secondary:hover { background: var(--secondary-hover); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-lg { padding: 0.95rem 1.7rem; font-size: 1.05rem; }
.btn-sm { padding: 0.55rem 1rem; font-size: 0.9rem; }

/* ==================== Cards & forms ==================== */
.card {
    background: var(--card);
    padding: 2rem;
    border-radius: 18px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.intake { max-width: 580px; margin: 0 auto; }

h1 { margin: 0 0 0.6rem; font-size: 2rem; line-height: 1.15; letter-spacing: -0.015em; }
h2 { margin: 0 0 0.75rem; font-size: 1.35rem; letter-spacing: -0.01em; }
h3 { margin: 0 0 0.4rem; font-size: 1.05rem; }
.subtitle { color: var(--muted); margin: 0 0 1.5rem; font-size: 1.02rem; }
.hint { color: var(--muted); font-size: 0.88rem; }

.field { margin-bottom: 1.15rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.4rem; font-size: 0.9rem; color: var(--text); }
.field input, .field select, .field textarea {
    width: 100%;
    padding: 0.7rem 0.95rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 74, 122, 0.15);
}
.req { color: var(--secondary); }
.err { color: #a03428; font-size: 0.85rem; margin-top: 0.35rem; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 520px) { .row { grid-template-columns: 1fr; } }

.eyebrow {
    display: inline-block;
    background: var(--sakura);
    color: var(--secondary-hover);
    padding: 0.35rem 0.95rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

/* ==================== Home page ==================== */
.home-body { background: var(--bg); }

.hero {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 2.5rem 0 4rem;
}
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; gap: 2rem; padding: 1rem 0 2.5rem; } }

.hero h1 {
    font-size: clamp(2.1rem, 4.8vw, 3.2rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin: 0 0 1.15rem;
    font-weight: 700;
}
.hero h1 .highlight { color: var(--secondary); font-style: italic; }
.hero .lede { font-size: 1.1rem; color: #4a4238; max-width: 34rem; margin: 0 0 1.75rem; font-family: Georgia, serif; }
.hero em { font-style: italic; color: var(--primary); }
.hero-cta { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.hero-badges { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.hero-badge {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font-size: 0.85rem;
}

/* ==================== Ikigai Venn diagram (inline SVG) ==================== */
.ikigai-visual {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    aspect-ratio: 1;
}
.ikigai-visual svg { width: 100%; height: 100%; }
.ikigai-visual .circle { mix-blend-mode: multiply; opacity: 0.75; }
.ikigai-visual .circle-love  { fill: var(--love); }
.ikigai-visual .circle-good  { fill: var(--good); }
.ikigai-visual .circle-world { fill: var(--world); }
.ikigai-visual .circle-paid  { fill: var(--paid); }
.ikigai-visual .center-label {
    fill: #fff;
    font-family: -apple-system, "Segoe UI", sans-serif;
    font-weight: 700;
    text-anchor: middle;
}
.ikigai-visual .quad-label {
    fill: var(--text);
    font-family: -apple-system, "Segoe UI", sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-anchor: middle;
}

/* ==================== What is ikigai section ==================== */
.what-is {
    padding: 3rem 0;
}
.what-is-inner {
    background: #fff;
    padding: 2.5rem 2.25rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
@media (max-width: 500px) { .what-is-inner { padding: 2rem 1.5rem; } }
.what-is h2 { text-align: center; font-size: 1.6rem; margin-bottom: 0.75rem; }
.what-is .subtitle { text-align: center; margin-bottom: 2rem; }
.circle-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
@media (max-width: 520px) { .circle-grid { grid-template-columns: 1fr; } }
.circle-card {
    padding: 1.25rem 1.35rem;
    border-radius: 14px;
    border-left: 4px solid;
    background: var(--bg-soft);
}
.circle-card h3 { margin: 0 0 0.3rem; font-size: 1rem; letter-spacing: 0; }
.circle-card p { margin: 0; color: var(--muted); font-size: 0.9rem; font-family: Georgia, serif; }
.circle-card.love  { border-color: var(--love); }
.circle-card.good  { border-color: var(--good); }
.circle-card.world { border-color: var(--world); }
.circle-card.paid  { border-color: var(--paid); }

.cultural-note {
    margin-top: 1.5rem; text-align: center; font-size: 0.85rem;
    color: var(--muted); font-family: Georgia, serif; font-style: italic;
    max-width: 46rem; margin-left: auto; margin-right: auto;
}

/* ==================== Empathy ==================== */
.empathy { padding: 3rem 0; }
.empathy-inner {
    padding: 2.75rem 2.5rem;
    border-radius: 20px;
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    background: linear-gradient(140deg, var(--sakura) 0%, #fbe9de 100%);
    box-shadow: var(--shadow);
}
@media (max-width: 500px) { .empathy-inner { padding: 2rem 1.5rem; } }
.empathy h2 { font-size: 1.7rem; margin-bottom: 1rem; }
.empathy h2 em { color: var(--primary); font-style: italic; }
.empathy p { font-size: 1.05rem; color: #5a4a3a; margin: 0.75rem 0; font-family: Georgia, serif; }
.empathy-mantra {
    background: #fff;
    padding: 1.1rem 1.35rem;
    border-radius: 14px;
    color: var(--text) !important;
    font-size: 1.05rem;
    margin-top: 1.5rem !important;
}
.empathy-mantra strong { color: var(--primary); }

/* ==================== How it works ==================== */
.how { padding: 3.5rem 0; }
.section-head { text-align: center; margin-bottom: 2.5rem; }
.section-head h2 { font-size: 1.85rem; margin-top: 0.5rem; }

.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.15rem;
}
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .steps { grid-template-columns: 1fr; } }

.step {
    background: #fff;
    padding: 1.85rem 1.35rem 1.35rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 14px rgba(0,0,0,0.04);
    position: relative;
    transition: transform 0.15s, box-shadow 0.15s;
}
.step:hover { transform: translateY(-3px); box-shadow: 0 14px 26px rgba(59, 74, 122, 0.1); }
.step-num {
    position: absolute; top: -14px; left: 20px;
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(59, 74, 122, 0.3);
}
.step-emoji { font-size: 2rem; margin-bottom: 0.4rem; }
.step h3 { margin: 0.35rem 0 0.35rem; font-size: 1.05rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.55; font-family: Georgia, serif; }

.how-cta { text-align: center; margin-top: 2.5rem; }

/* ==================== Counsellor ==================== */
.counsellor {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    padding: 3.5rem 0;
    align-items: center;
}
@media (max-width: 820px) { .counsellor { grid-template-columns: 1fr; } }
.counsellor-copy h2 { font-size: 1.7rem; margin: 0.5rem 0 1rem; }
.counsellor-copy p { color: var(--muted); margin: 0 0 1rem; font-family: Georgia, serif; font-size: 1rem; }
.counsellor-points { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.75rem; }
.counsellor-points li {
    background: #fff; padding: 0.75rem 1rem; border-radius: 12px;
    display: flex; align-items: center; gap: 0.85rem;
    border: 1px solid var(--border);
    color: var(--text);
}
.counsellor-points span { font-size: 1.35rem; }

.counsellor-form h3 { margin: 0 0 1rem; font-size: 1.15rem; }
.alert { padding: 0.85rem 1.15rem; border-radius: 12px; margin-bottom: 1rem; }
.alert-success { background: #ecf7ea; color: #3f5e2a; border-left: 4px solid var(--olive); }
.alert-error { background: #fdecea; color: #7a2c22; border-left: 4px solid #c76a5a; }

/* Honeypot — invisible to humans, catches form-scraper bots that fill every field */
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }

.btn-link {
    background: none; border: none; padding: 0; cursor: pointer;
    color: var(--primary); text-decoration: underline;
    font-family: inherit; font-size: inherit;
}
.btn-link:hover { color: var(--primary-hover); }


/* ==================== Insights invitation on home page ==================== */
.insights-invite { padding: 3rem 0 2rem; }
.insights-invite-inner {
    background: #fff;
    padding: 2.5rem 2.25rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}
.insights-invite-inner h2 { font-size: 1.75rem; margin: 0.5rem 0 1rem; letter-spacing: -0.01em; }
.insights-invite-inner p {
    font-family: Georgia, serif;
    color: #4a4238;
    font-size: 1.02rem;
    line-height: 1.65;
    margin: 0 0 1rem;
}
.insights-invite-inner .btn { margin-top: 0.5rem; }
@media (max-width: 500px) { .insights-invite-inner { padding: 2rem 1.5rem; } }

/* ==================== Final CTA ==================== */
.final-cta {
    text-align: center;
    padding: 3.5rem 1.5rem;
    background: linear-gradient(135deg, #f2ede2, #ecdcd0);
    border-radius: 20px;
    margin-top: 2rem;
    border: 1px solid var(--border);
}
.final-cta h2 { font-size: 1.9rem; margin: 0 0 0.5rem; }
.final-cta p { color: var(--muted); margin: 0 0 1.5rem; font-family: Georgia, serif; font-size: 1.05rem; }

/* ==================== Hub ==================== */
.hub-header { text-align: center; margin-bottom: 2rem; }
.hub-greeting { color: var(--secondary); font-weight: 600; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 0.35rem; }

.hub-progress { max-width: 420px; margin: 1.1rem auto 0; }
.hub-progress-track { height: 8px; border-radius: 999px; background: var(--track); overflow: hidden; }
.hub-progress-fill { height: 100%; border-radius: 999px; background: var(--olive); transition: width 0.3s; }
.hub-progress-label { display: block; margin-top: 0.45rem; font-size: 0.85rem; color: var(--muted); }
.hub-next { margin-top: 1.15rem; }

.quiz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.15rem;
    margin-bottom: 2rem;
}
.quiz-card {
    background: #fff;
    padding: 1.5rem 1.35rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 14px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    position: relative;
    transition: transform 0.15s, box-shadow 0.15s;
}
.quiz-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(59, 74, 122, 0.1); }
.quiz-card.is-completed { border-color: var(--olive); }
.quiz-card-top { display: flex; justify-content: space-between; align-items: center; }
.quiz-emoji { font-size: 2rem; }
.completed-check {
    background: var(--olive); color: #fff;
    width: 28px; height: 28px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700;
}
.quiz-desc { color: var(--muted); font-size: 0.9rem; margin: 0; font-family: Georgia, serif; }
.circle-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.15rem 0.55rem;
    border-radius: 4px;
    margin-right: 0.35rem;
}
.circle-tag.love { background: rgba(238,140,110,0.15); color: #b8562a; }
.circle-tag.good { background: rgba(59,74,122,0.12); color: var(--primary); }
.circle-tag.world { background: rgba(143,168,142,0.2); color: #4c6248; }
.circle-tag.paid { background: rgba(199,154,94,0.18); color: #7a5723; }

.quiz-meta { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.badge {
    display: inline-block;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    background: var(--track);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
}
.badge.status { background: var(--bg-soft); color: var(--muted); }
.badge-optional { background: rgba(199,154,94,0.18); color: #7a5723; }
.quiz-card.is-optional { border-style: dashed; }
.hub-actions { text-align: center; padding: 1rem; }

/* Report tile — sits as 6th card in the quiz-grid, matches quiz-card structure */
.quiz-card.report-tile {
    background: linear-gradient(160deg, #fefbf7 0%, #fdf1e7 100%);
    border-color: var(--sakura);
    position: relative;
}
.quiz-card.report-tile.is-unlocked {
    background: linear-gradient(160deg, #fff 0%, var(--sakura) 200%);
    border-color: var(--secondary);
    box-shadow: 0 8px 22px rgba(238, 140, 110, 0.2);
}
.quiz-card.report-tile h3 {
    color: var(--primary);
    letter-spacing: -0.01em;
}
.quiz-card.report-tile .quiz-desc { font-size: 0.9rem; }
.report-badge {
    background: rgba(255,255,255,0.9);
    color: var(--muted);
    width: 28px; height: 28px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.9rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    border: 1px solid var(--border);
}
.quiz-card.report-tile.is-unlocked .report-badge {
    background: var(--secondary);
    color: #fff;
    border-color: var(--secondary);
}
.report-badge-status {
    background: rgba(238, 140, 110, 0.12) !important;
    color: var(--secondary-hover) !important;
}
.quiz-card.report-tile.is-unlocked .report-badge-status {
    background: var(--olive) !important;
    color: #fff !important;
}
.deadline-pill-inline {
    display: inline-block;
    background: var(--secondary);
    color: #fff;
    padding: 0.18rem 0.6rem;
    border-radius: 999px;
    font-family: -apple-system, "Segoe UI", sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.btn-disabled {
    background: var(--track) !important;
    color: var(--muted) !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    transform: none !important;
    border: 1px dashed var(--border) !important;
}
.btn-disabled:hover { background: var(--track) !important; transform: none !important; box-shadow: none !important; }

/* Your Reports list on the merged Your Ikigai page */
.your-reports { margin: 0 0 3rem; }
.counselling-block .counsellor-form { max-width: 520px; }
.your-reports h2 { font-size: 1.5rem; letter-spacing: -0.01em; margin: 0 0 0.5rem; }
.your-reports > .subtitle { margin-bottom: 1.5rem; font-family: Georgia, serif; }

.report-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.report-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.1rem 1.3rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.report-row.ready { border-color: var(--olive); background: linear-gradient(#fff, #f6faf3 250%); }
.report-meta { display: flex; flex-direction: column; gap: 0.25rem; }
.report-date { color: var(--muted); font-size: 0.85rem; }
.report-status { font-weight: 600; font-size: 0.9rem; letter-spacing: 0.02em; }
.status-ready { color: var(--olive); }
.status-pending { color: #b78530; }

/* ---- Admin ---- */
.admin-table { width: 100%; border-collapse: collapse; margin: 1rem 0; background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.admin-table th, .admin-table td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.admin-table th { color: var(--muted); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; background: var(--bg-soft); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table .hint { color: var(--muted); font-size: 0.8rem; }
.ready-badge { background: rgba(126,143,85,0.15); color: var(--olive); }
.pending-badge { background: rgba(199,154,94,0.18); color: #7a5723; }

.admin-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; }
.admin-filters a { padding: 0.3rem 0.8rem; border: 1px solid var(--border); border-radius: 999px; font-size: 0.85rem; text-decoration: none; color: var(--muted); background: #fff; }
.admin-filters a.active-filter { background: var(--indigo, #3B4A7A); border-color: var(--indigo, #3B4A7A); color: #fff; font-weight: 600; }

.admin-meta { background: #fff; padding: 1rem 1.25rem; border-radius: 12px; border: 1px solid var(--border); margin: 1rem 0 2rem; }
.admin-meta p { margin: 0 0 0.5rem; font-family: Georgia, serif; }

.admin-collapsible { margin: 1.5rem 0; }
.admin-collapsible summary { cursor: pointer; padding: 0.5rem 0; color: var(--primary); }
.admin-prompt {
    background: #f5f2e9;
    padding: 1rem;
    border-radius: 8px;
    font-family: Menlo, Monaco, monospace;
    font-size: 0.75rem;
    max-height: 400px;
    overflow: auto;
    white-space: pre-wrap;
}

.admin-publish { background: #fff; padding: 1.5rem; border-radius: 14px; border: 1px solid var(--border); margin-top: 1.5rem; }
.admin-publish label { display: block; font-weight: 600; margin: 1rem 0 0.25rem; font-size: 0.9rem; }
.admin-publish input[type=text], .admin-publish textarea {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    background: #fff;
    resize: vertical;
}
.admin-publish textarea { font-family: Menlo, Monaco, monospace; font-size: 0.85rem; }

.report-action .hint { font-size: 0.85rem; }
@media (max-width: 500px) {
    .report-row { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
}

/* ==================== Quiz (focused single-question layout) ==================== */
.quiz-body { background: var(--bg); }
.quiz-page { max-width: 720px; margin: 0 auto; padding: 0 1.15rem 4rem; min-height: 100vh; display: flex; flex-direction: column; }

.quiz-header-min {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.35rem 0; border-bottom: 1px solid var(--border);
}
.quiz-header-actions {
    display: flex; align-items: center; gap: 0.75rem;
}
.save-exit {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    transition: color 0.15s, border-color 0.15s;
}
.save-exit:hover { color: var(--primary); border-color: var(--primary); }

/* Hub steer toward the background module, shown until the three fields are on file. */
.hub-steer {
    margin: 1.25rem 0; padding: 1rem 1.25rem; border: 1px solid var(--border);
    border-left: 3px solid var(--primary); border-radius: 8px; text-align: left;
}
.hub-steer-label {
    display: block; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
    opacity: 0.65; margin-bottom: 0.35rem;
}
.hub-steer p { margin: 0 0 0.75rem; font-size: 0.95rem; }

/* Guest mode has no account to save into — reassurance sits where the link would. */
.save-exit-hint { color: var(--muted); font-size: 0.85rem; }
@media (max-width: 560px) { .save-exit-hint { display: none; } }

/* ===== Guest result teaser (/try/result) ===== */
.try-result { max-width: 640px; margin: 0 auto; padding: 2.5rem 0 4rem; }
.try-top { margin: 0 0 2rem; }
.try-type { margin: 0 0 1.25rem; }
.try-type h2 {
    font-size: 1.25rem; margin: 0 0 0.35rem; color: var(--primary);
    display: flex; align-items: baseline; gap: 0.6rem;
}
.try-type .try-score { font-size: 0.9rem; color: var(--muted); font-weight: 400; }
.try-type p { margin: 0; font-family: Georgia, serif; line-height: 1.65; }
.try-ask {
    margin: 2.5rem 0 0; padding: 1.75rem; border: 1px solid var(--border);
    border-radius: 12px; text-align: center; background: var(--card, transparent);
}
.try-ask h2 { margin: 0 0 0.5rem; font-size: 1.35rem; }
.try-ask p { margin: 0 0 1.25rem; color: var(--muted); }
.try-decline { display: block; margin-top: 1rem; font-size: 0.9rem; color: var(--muted); }

.try-share { margin: 2.25rem 0 0; text-align: center; }
.try-share .hint { margin: 0.6rem 0 0; }
.try-share button:disabled { opacity: 0.65; cursor: default; }

/* Reserve space at the bottom of the page so the fixed nav doesn't cover content */
.quiz-focus { flex: 1; padding: 3rem 0 8rem; display: flex; flex-direction: column; }
.quiz-eyebrow { text-align: center; color: var(--muted); font-size: 0.95rem; margin: 0 0 3rem; letter-spacing: 0.02em; }

.question-list { list-style: none; padding: 0; margin: 0; flex: 1; }
.question { display: none; animation: fade-in 0.35s ease-out; }
@keyframes fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.question-text-large {
    font-family: Georgia, "Iowan Old Style", serif;
    font-size: clamp(1.35rem, 3.2vw, 1.75rem);
    line-height: 1.4;
    text-align: center;
    max-width: 600px;
    margin: 1rem auto 2.5rem;
    color: var(--text);
}

.rating-segments {
    display: flex; align-items: stretch;
    gap: 6px;
    max-width: 520px;
    margin: 0.5rem auto;
}
.rating-seg {
    flex: 1;
    height: 56px;
    border: 2px solid var(--border);
    background: #fff;
    border-radius: 10px;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.rating-seg:hover {
    border-color: var(--primary);
    background: rgba(59, 74, 122, 0.06);
}
.rating-seg:focus-visible { outline: 2px solid var(--secondary); outline-offset: 3px; }
.rating-seg.selected {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 6px 18px rgba(59, 74, 122, 0.3);
    transform: translateY(-1px);
}
@media (max-width: 480px) {
    .rating-segments { gap: 4px; }
    .rating-seg { height: 48px; }
}

.rating-ends {
    display: flex; justify-content: space-between;
    max-width: 420px; margin: 1rem auto 0;
    padding: 0 0.35rem;
    color: var(--muted); font-size: 0.85rem;
    text-transform: uppercase; letter-spacing: 0.06em;
}

.finish-panel {
    text-align: center;
    padding: 3rem 1.5rem;
    max-width: 520px;
    margin: 0 auto;
    animation: fade-in 0.35s ease-out;
}
.finish-panel h2 { font-size: 1.6rem; letter-spacing: -0.01em; margin: 0 0 0.75rem; }
.finish-panel p { color: var(--muted); margin: 0 0 1.5rem; font-family: Georgia, serif; }

/* Legacy: kept for any old templates. New template uses .quiz-nav-fixed. */
.quiz-nav {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem;
    margin-top: auto; padding-top: 2rem;
    border-top: 1px solid var(--border);
}

/* Fixed-to-viewport quiz navigation — Back/Progress/Next stay at same screen coordinates
   regardless of question text length. Solves the "buttons keep moving" complaint. */
.quiz-nav-fixed {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 2rem;
    background: rgba(251, 248, 243, 0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid var(--border);
    z-index: 50;
    max-width: 720px;
    margin: 0 auto;
}
@media (min-width: 720px) {
    .quiz-nav-fixed {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 100%;
        max-width: 720px;
    }
}

.btn-nav {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.15s, border-color 0.15s, opacity 0.15s;
    font-family: inherit;
    /* Fixed min-width so both buttons occupy the same box regardless of state — prevents layout shift */
    min-width: 96px;
    text-align: center;
}
.btn-nav:hover:not(:disabled) { color: var(--primary); border-color: var(--primary); }
.btn-nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    color: var(--muted);
}

.progress-slim { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
.progress-track-slim { width: 100%; max-width: 280px; background: var(--track); height: 4px; border-radius: 999px; overflow: hidden; }
.progress-fill-slim { background: var(--primary); height: 100%; transition: width 0.35s ease-out; width: 0%; }
.progress-label-slim { font-size: 0.8rem; color: var(--muted); letter-spacing: 0.02em; }


/* ==================== Results ==================== */
.results-header { text-align: center; margin-bottom: 2rem; }

/* Progressive venn — unlit circles stay grey until their reflection completes */
.results-venn { max-width: 300px; margin: 1.25rem auto 0.25rem; }
.results-venn .circle.unlit { fill: var(--track); opacity: 0.35; }
.results-venn g.unlit .quad-label { opacity: 0.35; }
.results-venn .circle.lit { opacity: 0.8; }

.confidence { max-width: 540px; margin: 1rem auto; }
.confidence-bar { background: var(--track); border-radius: 999px; height: 10px; overflow: hidden; margin-bottom: 0.65rem; }
.confidence-fill { background: linear-gradient(90deg, var(--secondary), var(--primary)); height: 100%; transition: width 0.4s; }

.result-section {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.15rem;
    border: 1px solid var(--border);
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}
.result-section.partial { background: #fff9ef; border-left: 4px solid var(--sakura); }
.narrative-strip p { margin: 0; }
.narrative-item { white-space: nowrap; }
.narrative-check { color: var(--olive); font-weight: 700; }
.result-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; gap: 0.5rem; }
.partial-badge { background: var(--sakura); color: #8a4b2e; }
.score-list { display: flex; flex-direction: column; gap: 0.75rem; }
.score-row { display: grid; grid-template-columns: 1.2fr 3fr auto; gap: 0.85rem; align-items: center; }
@media (max-width: 480px) { .score-row { grid-template-columns: 1fr; } }
.score-label { font-size: 0.92rem; display: flex; justify-content: space-between; }
.score-verdict { color: var(--muted); font-size: 0.8rem; }
.score-bar { background: var(--track); border-radius: 999px; height: 10px; overflow: hidden; }
.score-fill { background: var(--primary); height: 100%; }
.score-value { font-weight: 700; color: var(--primary); font-size: 0.9rem; }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }

.disclaimer {
    margin-top: 1.5rem;
    padding: 1.15rem 1.35rem;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.6;
    font-family: Georgia, serif;
}
.disclaimer strong { color: var(--text); }

/* ==================== Insights (blog) ==================== */
.insights-index { padding: 1rem 0 3rem; }
.insights-hero { text-align: center; max-width: 640px; margin: 2rem auto 3rem; }
.insights-hero h1 { font-size: clamp(1.7rem, 3.5vw, 2.2rem); line-height: 1.2; margin: 0.5rem 0 1rem; }
.insights-hero .subtitle { font-family: Georgia, serif; font-size: 1.05rem; }

.post-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 1.5rem; }
.post-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.04);
    transition: transform 0.15s, box-shadow 0.15s;
}
.post-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(59, 74, 122, 0.1); }
.post-card-link { display: block; padding: 1.75rem 2rem; text-decoration: none; color: inherit; border-radius: 16px; }
.post-card-meta { display: flex; gap: 0.5rem; color: var(--muted); font-size: 0.85rem; margin-bottom: 0.5rem; }
.post-card h2 { font-size: 1.4rem; margin: 0 0 0.4rem; letter-spacing: -0.01em; color: var(--text); }
.post-card-subtitle { font-family: Georgia, serif; font-style: italic; color: var(--muted); margin: 0 0 0.75rem; }
.post-card-summary { font-family: Georgia, serif; color: #4a4238; margin: 0 0 1rem; line-height: 1.55; }
.post-card-read { color: var(--primary); font-weight: 600; font-size: 0.9rem; }

.insights-post { padding: 1rem 0 3rem; max-width: 720px; margin: 0 auto; }
.back-to-index {
    display: inline-block; color: var(--muted); text-decoration: none;
    font-size: 0.9rem; margin: 1rem 0 2rem;
    transition: color 0.15s;
}
.back-to-index:hover { color: var(--primary); }

.post-header { text-align: center; margin: 2rem 0 3rem; }
.post-header h1 { font-size: clamp(1.8rem, 4.2vw, 2.6rem); line-height: 1.2; letter-spacing: -0.02em; margin: 0.5rem 0 0.75rem; }
.post-subtitle { font-family: Georgia, serif; font-style: italic; color: var(--muted); font-size: 1.15rem; margin: 0; }
.post-meta { color: var(--muted); font-size: 0.9rem; display: flex; gap: 0.5rem; justify-content: center; }

.post-body {
    font-family: Georgia, "Iowan Old Style", serif;
    font-size: 1.1rem;
    line-height: 1.75;
    color: var(--text);
}
.post-body p { margin: 0 0 1.3rem; }
.post-body h2 {
    font-family: -apple-system, "Segoe UI", sans-serif;
    font-size: 1.4rem;
    letter-spacing: -0.01em;
    margin: 2.5rem 0 1rem;
    color: var(--text);
}
.post-body h3 {
    font-family: -apple-system, "Segoe UI", sans-serif;
    font-size: 1.15rem;
    margin: 2rem 0 0.75rem;
    color: var(--text);
}
.post-body a { color: var(--primary); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.post-body a:hover { color: var(--primary-hover); }
.post-body em { font-style: italic; }
.post-body strong { font-weight: 700; color: var(--text); }
.post-body blockquote {
    border-left: 3px solid var(--sakura);
    margin: 1.75rem 0;
    padding: 0.5rem 0 0.5rem 1.5rem;
    color: var(--muted);
    font-style: italic;
}
.post-body ul, .post-body ol { padding-left: 1.5rem; margin: 0 0 1.3rem; }
.post-body li { margin-bottom: 0.5rem; }
.post-body hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem auto; max-width: 100px; }
.post-body code {
    background: var(--bg-soft);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.post-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}
.post-footer .hint { margin: 0 0 0.75rem; }
