/* ==========================================================================
   rwecomp.com
   A hand-written stylesheet -- no framework, no build step, no web fonts.

   Design notes: a light, open ground with plenty of air. Colour carries
   meaning rather than decoration -- each of the four temperaments owns a hue,
   and that hue follows its types everywhere they appear. Cards float on a
   tinted page rather than sitting in boxes with hard borders. Anything the
   user should press is a filled pill; everything else stays quiet.
   ========================================================================== */

:root {
    /* -- Ground and ink ------------------------------------------------- */
    --page:         #f4f6fb;
    --surface:      #ffffff;
    --surface-2:    #f8f9fd;
    --surface-3:    #eef1f8;

    /* Kept under their old names because views reference them inline. */
    --ink:          #ffffff;
    --ink-2:        #ffffff;   /* opaque dropdown ground */
    --ink-3:        #e8ecf5;   /* meter troughs */

    --line:         #e2e7f0;
    --line-soft:    #eef1f7;

    --text:         #232a3d;
    --text-dim:     #5b6780;
    --text-faint:   #8d97ad;

    /* -- Brand ---------------------------------------------------------- */
    --brand:        #5b4df0;
    --brand-dark:   #4436d6;
    --brand-soft:   #eeecff;
    --accent:       #5b4df0;   /* inline highlights read as brand */
    --accent-dark:  #4436d6;
    --coral:        #ff5e7a;
    --coral-soft:   #ffeef1;

    /* -- The four temperaments ------------------------------------------ */
    --nt:           #6d4aff;   --nt-soft: #efeaff;   /* Analysts   */
    --nf:           #e5566d;   --nf-soft: #ffedf0;   /* Idealists  */
    --sj:           #2e86de;   --sj-soft: #e7f2fd;   /* Guardians  */
    --sp:           #f5a623;   --sp-soft: #fff4e0;   /* Explorers  */

    /* -- Semantic ------------------------------------------------------- */
    --good:         #0ca678;   --good-soft: #e3f7f0;
    --warn:         #e8930c;   --warn-soft: #fff3df;
    --bad:          #e03131;   --bad-soft:  #ffecec;
    --cool:         #2e86de;
    --violet:       #6d4aff;

    /* -- Shape ---------------------------------------------------------- */
    --radius-sm:    9px;
    --radius:       14px;
    --radius-lg:    22px;
    --pill:         999px;

    --shadow-sm:    0 1px 2px rgba(30, 41, 71, .06),
                    0 2px 6px rgba(30, 41, 71, .05);
    --shadow:       0 2px 4px rgba(30, 41, 71, .05),
                    0 8px 24px rgba(30, 41, 71, .07);
    --shadow-lg:    0 4px 8px rgba(30, 41, 71, .05),
                    0 18px 48px rgba(30, 41, 71, .12);

    --measure:      66ch;
    --wrap:         1140px;

    /* Wordmark only. Falls back to the system stack if Google Fonts
       is blocked or slow -- the header still reads correctly. */
    --display: "Quicksand", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
            "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--text);
    font: 16px/1.65 var(--sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img, svg { max-width: 100%; }
img { height: auto; }

/* ---- Typography --------------------------------------------------------- */

h1, h2, h3, h4 {
    margin: 0 0 .6rem;
    line-height: 1.15;
    letter-spacing: -.025em;
    font-weight: 800;
    color: var(--text);
}

h1 { font-size: clamp(2rem, 1.35rem + 2.6vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 1.15rem + 1.5vw, 2.15rem); }
h3 { font-size: 1.2rem;  font-weight: 750; letter-spacing: -.015em; }
h4 { font-size: 1.02rem; font-weight: 700; letter-spacing: -.01em; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

strong, b { font-weight: 700; }

.lede {
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--text-dim);
    max-width: var(--measure);
}

.small  { font-size: .875rem; }
.dim    { color: var(--text-dim); }
.faint  { color: var(--text-faint); }
.center { text-align: center; }
.right  { text-align: right; }
.nowrap { white-space: nowrap; }

.mono {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: .92em;
}

.num {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---- Layout ------------------------------------------------------------- */

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 1.25rem;
}

.wrap-narrow {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

main { flex: 1 0 auto; }

.section       { padding-top: 3.5rem;  padding-bottom: 3.5rem; }
.section-tight { padding-top: 1.75rem; padding-bottom: 1.75rem; }

.divider {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 2rem 0;
}

.grid   { display: grid; gap: 1.1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

.row {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
}

.row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.stack > * + * { margin-top: 1rem; }

.mt-0 { margin-top: 0 !important; }
.mt-2 { margin-top: .85rem; }
.mt-3 { margin-top: 1.6rem; }
.mb-0 { margin-bottom: 0 !important; }

/* ---- Header ------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}

.site-header .wrap {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-height: 66px;
}

.brand {
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -.03em;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    flex: none;
}

.brand:hover { text-decoration: none; }
.brand svg { margin-right: .5rem; }
.brand-text {
    white-space: nowrap;
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.32rem;
    letter-spacing: -.005em;
}

/* "me" in ink, "fully" in brand -- the split reads as the name's sense. */
.brand-text span { color: var(--brand); }

.brand-mark {
    width: 30px; height: 30px;
    flex: none;
    border-radius: 9px;
}

.nav {
    display: flex;
    align-items: center;
    gap: .3rem;
    margin-left: auto;
    flex-wrap: wrap;
}

.nav a {
    color: var(--text-dim);
    font-size: .925rem;
    font-weight: 550;
    padding: .45rem .7rem;
    border-radius: var(--pill);
    transition: color .13s, background .13s;
}

.nav a:hover {
    color: var(--text);
    background: var(--surface-3);
    text-decoration: none;
}

.nav a.active { color: var(--brand); background: var(--brand-soft); }

/* Buttons keep their own colours inside the nav. */
.nav a.btn-primary   { color: #fff; background: var(--brand); }
.nav a.btn-primary:hover { color: #fff; background: var(--brand-dark); }
.nav a.btn-secondary { color: var(--text); background: var(--surface); }
.nav a.btn-danger    { color: #fff; background: var(--bad); }

.nav-toggle {
    display: none;
    margin-left: auto;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    border-radius: var(--pill);
    padding: .4rem .9rem;
    font: inherit;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
}

/* ---- Footer ------------------------------------------------------------- */

.site-footer {
    margin-top: 4rem;
    padding: 2rem 0;
    background: var(--surface);
    border-top: 1px solid var(--line);
    color: var(--text-faint);
    font-size: .875rem;
}

.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--brand); }

/* ---- Buttons ------------------------------------------------------------ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .62rem 1.3rem;
    border-radius: var(--pill);
    border: 1px solid transparent;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: .95rem;
    font-weight: 650;
    line-height: 1.3;
    cursor: pointer;
    text-decoration: none;
    transition: background .14s, border-color .14s, color .14s,
                transform .14s, box-shadow .14s;
    white-space: nowrap;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 1px 2px rgba(91, 77, 240, .3), 0 6px 18px rgba(91, 77, 240, .28);
}

.btn-primary:hover {
    background: var(--brand-dark);
    box-shadow: 0 2px 4px rgba(91, 77, 240, .3), 0 10px 26px rgba(91, 77, 240, .34);
}

.btn-secondary {
    background: var(--surface);
    border-color: var(--line);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover { border-color: #cfd6e4; }

.btn-ghost {
    background: transparent;
    color: var(--text-dim);
    border-color: transparent;
}

.btn-ghost:hover { background: var(--surface-3); color: var(--text); }

.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover { background: #c92a2a; }

.btn-sm    { padding: .38rem .85rem; font-size: .86rem; }
.btn-lg    { padding: .82rem 1.8rem; font-size: 1.03rem; }
.btn-block { display: flex; width: 100%; }

.btn[disabled],
.btn.is-disabled {
    opacity: .5;
    pointer-events: none;
    box-shadow: none;
}

/* ---- Cards and panels --------------------------------------------------- */

.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.card-tight { padding: 1.05rem; border-radius: var(--radius); }

.card-link {
    display: block;
    color: inherit;
    transition: transform .16s, box-shadow .16s;
}

.card-link:hover {
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.panel {
    background: var(--surface-2);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    padding: 1rem 1.15rem;
}

.empty {
    text-align: center;
    padding: 2.75rem 1.5rem;
    color: var(--text-dim);
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* ---- Badges ------------------------------------------------------------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .2rem .62rem;
    border-radius: var(--pill);
    background: var(--surface-3);
    color: var(--text-dim);
    font-size: .76rem;
    font-weight: 650;
    letter-spacing: .01em;
    white-space: nowrap;
}

.badge-accent { background: var(--brand-soft); color: var(--brand-dark); }
.badge-cool   { background: var(--sj-soft);    color: #1c6bb8; }
.badge-good   { background: var(--good-soft);  color: #08795a; }
.badge-warn   { background: var(--warn-soft);  color: #b06f05; }
.badge-bad    { background: var(--bad-soft);   color: #b02525; }

/* ---- Forms -------------------------------------------------------------- */

.field { margin-bottom: 1.1rem; }

.field label {
    display: block;
    font-size: .885rem;
    font-weight: 650;
    margin-bottom: .35rem;
    color: var(--text);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="date"],
.field input[type="time"],
.field input[type="number"],
.field input[type="search"],
.field select,
.field textarea {
    width: 100%;
    padding: .6rem .85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: .96rem;
    transition: border-color .13s, box-shadow .13s;
}

.field textarea { min-height: 110px; resize: vertical; }

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(91, 77, 240, .15);
}

.field input::placeholder,
.field textarea::placeholder { color: var(--text-faint); }

.field-hint  { font-size: .82rem; color: var(--text-faint); margin-top: .3rem; }
.field-error { font-size: .82rem; color: var(--bad); margin-top: .3rem; font-weight: 600; }

.has-error input,
.has-error select,
.has-error textarea { border-color: var(--bad); }

.check {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    font-size: .92rem;
}

.check input { margin-top: .25rem; flex: none; accent-color: var(--brand); }

/* ---- Flash messages ----------------------------------------------------- */

.flash {
    padding: .8rem 1.1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: .93rem;
    font-weight: 550;
    border: 1px solid transparent;
}

.flash-success { background: var(--good-soft); color: #08795a; border-color: #b9ead9; }
.flash-error   { background: var(--bad-soft);  color: #b02525; border-color: #f5c9c9; }
.flash-info    { background: var(--sj-soft);   color: #1c6bb8; border-color: #c5e0f8; }

/* ---- Meters and bars ---------------------------------------------------- */

.meter {
    height: 9px;
    border-radius: var(--pill);
    background: var(--ink-3);
    overflow: hidden;
}

.meter > span {
    display: block;
    height: 100%;
    border-radius: var(--pill);
    background: var(--cool);
    transition: width .5s cubic-bezier(.2, .8, .3, 1);
}

.meter-accent > span { background: var(--brand); }
.meter-good > span   { background: var(--good); }
.meter-warn > span   { background: var(--warn); }
.meter-bad > span    { background: var(--bad); }

.progress-bar .meter { margin-top: .4rem; }

/* A two-ended bar for a dichotomy: the marker sits where the person scored. */
.dichotomy { margin-bottom: 1.4rem; }

.dichotomy-labels {
    display: flex;
    justify-content: space-between;
    font-size: .86rem;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: .4rem;
}

.dichotomy-track {
    position: relative;
    height: 10px;
    border-radius: var(--pill);
    background: linear-gradient(90deg,
        rgba(46, 134, 222, .3) 0%,
        var(--ink-3) 42%,
        var(--ink-3) 58%,
        rgba(245, 166, 35, .35) 100%);
}

.dichotomy-marker {
    position: absolute;
    top: 50%;
    width: 20px;
    height: 20px;
    margin-left: -10px;
    border-radius: 50%;
    background: var(--surface);
    border: 3px solid var(--brand);
    transform: translateY(-50%);
    box-shadow: var(--shadow-sm);
}

.marker-b { border-color: var(--coral); }

/* ---- Score ring --------------------------------------------------------- */

.score-ring {
    display: grid;
    place-items: center;
    position: relative;
    width: 168px;
    height: 168px;
}

.score-ring svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.score-ring .score-value {
    position: absolute;
    text-align: center;
    line-height: 1.1;
}

.score-ring .score-number {
    font-size: 2.7rem;
    font-weight: 800;
    letter-spacing: -.04em;
}

.score-ring .score-label {
    font-size: .72rem;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: .1em;
    font-weight: 650;
}

/* ---- Stats -------------------------------------------------------------- */

.stat {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.05rem 1.15rem;
    box-shadow: var(--shadow-sm);
}

.stat-label {
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-faint);
    font-weight: 700;
}

.stat-value {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -.03em;
    margin-top: .15rem;
    font-variant-numeric: tabular-nums;
}

.stat-delta { font-size: .82rem; color: var(--text-dim); }

/* ---- Assessment --------------------------------------------------------- */

.question {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.6rem;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    transition: box-shadow .18s;
}

.question.answered { box-shadow: var(--shadow-sm), inset 3px 0 0 var(--good); }

.question-number {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-faint);
    font-weight: 700;
    margin-bottom: .4rem;
}

.scale {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    margin-top: 1.1rem;
}

.scale-anchor {
    font-size: .88rem;
    color: var(--text-dim);
    font-weight: 600;
}

.scale-anchor.right { text-align: right; }

.scale-options { display: flex; gap: .5rem; align-items: center; }

.scale-options input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.scale-options label {
    display: grid;
    place-items: center;
    cursor: pointer;
    margin: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--line);
    background: var(--surface);
    transition: border-color .13s, background .13s, transform .13s;
}

.scale-options label:hover {
    border-color: var(--brand);
    transform: scale(1.08);
}

.scale-options input:checked + label {
    background: var(--brand);
    border-color: var(--brand);
    transform: scale(1.14);
    box-shadow: 0 3px 10px rgba(91, 77, 240, .35);
}

.scale-options input:focus-visible + label {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.scale-options .dot-1 { width: 36px; height: 36px; }
.scale-options .dot-2 { width: 30px; height: 30px; }
.scale-options .dot-3 { width: 23px; height: 23px; }

/* ---- Type identity ------------------------------------------------------ */

.type-code {
    font-weight: 800;
    letter-spacing: .06em;
    font-variant-numeric: tabular-nums;
}

/* Each temperament owns a hue, applied by a modifier on the card or badge. */
.t-nt { --tone: var(--nt); --tone-soft: var(--nt-soft); }
.t-nf { --tone: var(--nf); --tone-soft: var(--nf-soft); }
.t-sj { --tone: var(--sj); --tone-soft: var(--sj-soft); }
.t-sp { --tone: var(--sp); --tone-soft: var(--sp-soft); }

.tone-text { color: var(--tone, var(--brand)); }
.tone-bg   { background: var(--tone-soft, var(--brand-soft)); }

.badge-tone {
    background: var(--tone-soft, var(--brand-soft));
    color: var(--tone, var(--brand));
    filter: saturate(1.3) brightness(.82);
}

/* A type card: sigil, code, name, tagline. */
.type-card {
    display: flex;
    flex-direction: column;
    gap: .55rem;
    padding: 1.3rem 1.15rem;
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    text-align: center;
    color: inherit;
    position: relative;
    overflow: hidden;
    transition: transform .16s, box-shadow .16s;
}

.type-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: var(--tone, var(--brand));
}

.type-card:hover {
    text-decoration: none;
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.type-card .sigil {
    width: 74px;
    height: 74px;
    margin: .35rem auto .15rem;
}

.type-card .type-code {
    font-size: 1.02rem;
    color: var(--tone, var(--brand));
}

.type-card .type-name {
    font-weight: 750;
    font-size: 1.02rem;
    letter-spacing: -.015em;
}

.type-card .type-tagline {
    font-size: .84rem;
    color: var(--text-dim);
    line-height: 1.45;
}

/* The four letters of a type, always four across until it is genuinely tight. */
.letter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .7rem;
}

@media (max-width: 640px) {
    .letter-grid { grid-template-columns: repeat(2, 1fr); }
}

/* The hero identity block on a result or type page. */
.type-hero {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    flex-wrap: wrap;
    padding: 1.9rem;
    border-radius: var(--radius-lg);
    background: var(--tone-soft, var(--brand-soft));
    box-shadow: var(--shadow-sm);
}

.type-hero .sigil { width: 118px; height: 118px; flex: none; }
.type-hero h1 { margin-bottom: .25rem; }

/* ---- Chart -------------------------------------------------------------- */

.placement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: .6rem;
}

.placement {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem .85rem;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: var(--surface);
}

.placement-glyph {
    font-size: 1.4rem;
    color: var(--brand);
    width: 1.7rem;
    text-align: center;
    flex: none;
}

.placement-body {
    font-size: .76rem;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: .07em;
    font-weight: 650;
}

.placement-sign { font-weight: 700; }

.element-fire  { color: #e8663f; }
.element-earth { color: #4b9e52; }
.element-air   { color: #2e9fc7; }
.element-water { color: #6d4aff; }

.chart-wheel {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    display: block;
}

/* ---- Locked / paywall --------------------------------------------------- */

.locked {
    position: relative;
    border: 2px dashed #d9dfec;
    border-radius: var(--radius-lg);
    padding: 2.2rem 1.5rem;
    text-align: center;
    background: var(--surface-2);
}

.locked-preview {
    filter: blur(5px);
    opacity: .5;
    pointer-events: none;
    user-select: none;
}

.price {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1.05;
}

.price small {
    font-size: .92rem;
    font-weight: 500;
    color: var(--text-faint);
    letter-spacing: 0;
}

/* ---- Pricing ------------------------------------------------------------ */

.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 1.25rem;
    align-items: start;
}

.plan {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: .85rem;
    height: 100%;
}

.plan-featured {
    box-shadow: 0 0 0 2px var(--brand), var(--shadow-lg);
}

.plan-flag {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--brand);
    color: #fff;
    font-size: .72rem;
    font-weight: 750;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: .28rem .85rem;
    border-radius: var(--pill);
    white-space: nowrap;
}

.plan-name {
    font-size: 1.12rem;
    font-weight: 750;
    letter-spacing: -.02em;
}

.plan-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .5rem;
    font-size: .92rem;
}

.plan-list li {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    color: var(--text-dim);
    line-height: 1.5;
}

.plan-list li::before {
    content: "";
    flex: none;
    width: 17px;
    height: 17px;
    margin-top: .21rem;
    border-radius: 50%;
    background: var(--good-soft)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.6 6.2l2.3 2.3 4.5-4.7' fill='none' stroke='%230ca678' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
        center / 12px 12px no-repeat;
}

.plan-list li.no::before {
    background: var(--surface-3)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3.2 3.2l5.6 5.6M8.8 3.2l-5.6 5.6' fill='none' stroke='%238d97ad' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E")
        center / 12px 12px no-repeat;
}

.plan-list li.no { color: var(--text-faint); }

/* Monthly / yearly switch. */
.billing-switch {
    display: inline-flex;
    padding: 4px;
    border-radius: var(--pill);
    background: var(--surface-3);
    gap: 2px;
}

.billing-switch button {
    border: 0;
    background: transparent;
    font: inherit;
    font-size: .9rem;
    font-weight: 650;
    color: var(--text-dim);
    padding: .45rem 1.15rem;
    border-radius: var(--pill);
    cursor: pointer;
    transition: background .14s, color .14s, box-shadow .14s;
}

.billing-switch button[aria-pressed="true"] {
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

.unlock-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
    gap: .9rem;
}

.unlock {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    padding: 1.05rem 1.15rem;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.unlock .icon { flex: none; width: 38px; height: 38px; }
.unlock-price { font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }

/* ---- Hero and marketing blocks ------------------------------------------ */

.hero {
    position: relative;
    overflow: hidden;
    padding-top: 3.5rem;
    padding-bottom: 3rem;
    background:
        radial-gradient(900px 420px at 12% -8%,  rgba(109, 74, 255, .13), transparent 62%),
        radial-gradient(760px 400px at 88% 4%,   rgba(255, 94, 122, .12), transparent 60%),
        radial-gradient(680px 380px at 50% 108%, rgba(46, 134, 222, .10), transparent 62%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 2.5rem;
    align-items: center;
}

.hero h1 { margin-bottom: .9rem; }

.hero-art { width: 100%; height: auto; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-size: .78rem;
    font-weight: 750;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--brand);
    background: var(--brand-soft);
    padding: .32rem .8rem;
    border-radius: var(--pill);
    margin-bottom: 1rem;
}

/* A numbered or icon-led explanation step. */
.step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.step .icon { flex: none; width: 46px; height: 46px; }
.step h3 { margin-bottom: .2rem; }

.feature-icon {
    width: 52px;
    height: 52px;
    margin-bottom: .85rem;
}

/* A soft tinted band to break up long pages. */
.band {
    background: var(--surface);
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
}

.band-tint {
    background: linear-gradient(180deg, var(--surface-2), var(--page));
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
}

/* ---- Tables ------------------------------------------------------------- */

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

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

th, td {
    text-align: left;
    padding: .62rem .7rem;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: middle;
}

th {
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-faint);
    font-weight: 700;
    white-space: nowrap;
}

tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }

/* ---- Admin -------------------------------------------------------------- */

.admin-layout {
    display: grid;
    grid-template-columns: 216px 1fr;
    gap: 2rem;
    align-items: start;
}

.admin-nav { position: sticky; top: 84px; }

.admin-nav a {
    display: block;
    padding: .48rem .75rem;
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    font-size: .92rem;
    font-weight: 550;
}

.admin-nav a:hover {
    background: var(--surface-3);
    color: var(--text);
    text-decoration: none;
}

.admin-nav a.active {
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-weight: 700;
}

.nav-group {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--text-faint);
    font-weight: 700;
    margin: 1.15rem 0 .35rem .75rem;
}

/* ---- Responsive --------------------------------------------------------- */

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; gap: 1.75rem; }
    .hero-art  { max-width: 420px; margin: 0 auto; }
    .admin-layout { grid-template-columns: 1fr; gap: 1.25rem; }
    .admin-nav { position: static; }
    .admin-nav ul { display: flex; flex-wrap: wrap; gap: .25rem; }
}

@media (max-width: 1024px) {
    .nav-toggle { display: block; }

    .nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: .15rem;
        padding: .5rem 0 .9rem;
    }

    .nav.open { display: flex; }
    .nav a { padding: .6rem .8rem; border-radius: var(--radius-sm); }
    .site-header .wrap { flex-wrap: wrap; }
}

/* Tightening for genuinely small screens, not merely narrow laptops. */
@media (max-width: 780px) {
    .section { padding-top: 2.5rem; padding-bottom: 2.5rem; }
    .card { padding: 1.25rem; }
    .type-hero { padding: 1.35rem; gap: 1.1rem; }
    .type-hero .sigil { width: 84px; height: 84px; }
}

@media (max-width: 620px) {
    .scale { grid-template-columns: 1fr; gap: .5rem; }
    .scale-anchor.right { text-align: left; }
    .scale-options { justify-content: space-between; width: 100%; }
    .question { padding: 1.15rem; }
    h1 { font-size: 1.95rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

@media print {
    .site-header, .site-footer, .nav, .btn { display: none !important; }
    body { background: #fff; }
    .card, .panel { box-shadow: none; border: 1px solid #ddd; }
}

/* ---- Dashboard ---------------------------------------------------------- */

/* Hero: one card per thing the site knows about you. */
.identity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: .9rem;
}

.identity-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .3rem;
    text-align: center;
    padding: 1.15rem .8rem 1.05rem;
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    color: inherit;
    position: relative;
    overflow: hidden;
    transition: transform .16s, box-shadow .16s;
}

.identity-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: var(--tone, var(--brand));
}

.identity-card:hover {
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.identity-card .sigil { width: 78px; height: 78px; margin-bottom: .15rem; }

.identity-label {
    font-weight: 750;
    letter-spacing: -.01em;
    color: var(--tone, var(--brand));
}

.identity-value {
    font-size: .84rem;
    color: var(--text-dim);
    line-height: 1.4;
}

/* An assessment not yet taken is present but plainly unfinished. */
.identity-card.is-empty { box-shadow: inset 0 0 0 1px var(--line); background: var(--surface-2); }
.identity-card.is-empty::before { background: var(--line); }
.identity-card.is-empty .identity-label { color: var(--text-faint); }
.identity-card.is-empty .sigil { opacity: .55; }

/* Main column plus a rail that stays put while the page scrolls. */
.dash-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 1.25rem;
    align-items: start;
}

.dash-main > * + * { margin-top: 1rem; }
.dash-rail { position: sticky; top: 84px; }

.rail-step {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: .55rem .6rem;
    border-radius: var(--radius-sm);
    color: inherit;
    transition: background .13s;
}

.rail-step:hover { background: var(--surface-3); text-decoration: none; }

.rail-step-dot {
    flex: none;
    width: 10px;
    height: 10px;
    margin-top: .35rem;
    border-radius: 50%;
    border: 2px solid var(--brand);
}

.rail-link {
    display: block;
    padding: .48rem .6rem;
    border-radius: var(--radius-sm);
    font-size: .92rem;
    font-weight: 550;
    color: var(--text-dim);
}

.rail-link:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }

@media (max-width: 980px) {
    .dash-layout { grid-template-columns: 1fr; }
    .dash-rail { position: static; }
}

/* A friend row: identity, today, and what the algorithm noticed, in one place. */
.friend-row {
    display: block;
    padding: .85rem 1rem;
    margin-bottom: .6rem;
    border-radius: var(--radius);
    background: var(--surface-2);
    border: 1px solid var(--line-soft);
    color: inherit;
    transition: border-color .14s, transform .14s, box-shadow .14s;
}

.friend-row:hover {
    text-decoration: none;
    border-color: #cfd6e4;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* The affordance, not a second link -- the whole row is the anchor. */
.friend-dive {
    font-size: .82rem;
    font-weight: 650;
    color: var(--brand);
    white-space: nowrap;
    opacity: .75;
    transition: opacity .14s;
}

.friend-row:hover .friend-dive { opacity: 1; }

/* The noticed line sits under a rule, as a separate kind of observation. */
.friend-noticed {
    margin-top: .55rem;
    padding-top: .55rem;
    border-top: 1px solid var(--line);
}

@media (max-width: 520px) {
    .friend-dive { display: none; }
}
