/* Interview stories on Peer Compare rows + the owner's dialog (includes/interview_story.html).
   Dark by default like the rest of Peer Compare; light via html[data-theme="light"] / body.light-mode.
   Colours follow the Add salary wizard (add-salary-wizard.css --w-*). */

/* The story itself is in a book serif, so it reads like a person talking, not like the UI around it.
   Newsreader (text cut, SIL OFL, Production Type), the serif of the home page, served from our own
   static files: the browser only fetches it when a story is opened, or the pointer reaches a "Read
   interview story" button (interview-story.js, so the slide open is measured in it). Latin only; anything else
   (↗, ₹) falls back to Georgia. */
@font-face {
    font-family: 'Newsreader Text';
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url('../fonts/Newsreader-Text.woff2') format('woff2');
}
@font-face {
    font-family: 'Newsreader Text';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/Newsreader-Text-Italic.woff2') format('woff2');
}

body.page-peer-compare {
    --st-bg: #141414;
    --st-card: #1a1a1a;
    --st-border: rgba(255, 255, 255, 0.08);
    --st-input: #0f0f0f;
    --st-input-border: rgba(255, 255, 255, 0.14);
    --st-text: #f2f2f2;
    --st-text-2: #c4c4c4;
    --st-muted: #8f8f8f;
    --st-accent: #2f7bff;
    --st-accent-soft: rgba(47, 123, 255, 0.14);
    --st-accent-text: #7fb0ff;
    --st-success: #34c28a;
    --st-success-soft: rgba(52, 194, 138, 0.12);
    --st-danger: #ff6b6b;
}
html[data-theme="light"] body.page-peer-compare,
body.page-peer-compare.light-mode {
    --st-bg: #ffffff;
    --st-card: #fafbfc;
    --st-border: #e7e9ee;
    --st-input: #ffffff;
    --st-input-border: #d6dae1;
    --st-text: #15181e;
    --st-text-2: #454c59;
    --st-muted: #6b7280;
    --st-accent: #1f6fe5;
    --st-accent-soft: rgba(31, 111, 229, 0.08);
    --st-accent-text: #1f6fe5;
    --st-success: #0f8a5f;
    --st-success-soft: rgba(15, 138, 95, 0.09);
    --st-danger: #d93636;
}

/* ── Row button (title line) ── */
.pc-story-btn {
    display: inline-flex; align-items: center; flex: 0 0 auto;
    height: 22px; padding: 0 9px; margin-left: 4px;
    border: 1px solid var(--st-border); border-radius: 999px;
    background: transparent; color: var(--st-muted);
    font: inherit; font-size: 11px; font-weight: 600; line-height: 1; white-space: nowrap;
    cursor: pointer; vertical-align: middle;
    transition: opacity .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.pc-story-btn--has { color: var(--st-success); border-color: transparent; background: var(--st-success-soft); }
.pc-story-btn--has[aria-expanded="true"] { border-color: var(--st-success); }
.pc-story-btn--mine { color: var(--st-accent-text); border-color: transparent; background: var(--st-accent-soft); }
.pc-story-btn--cta { border-color: var(--st-accent); }
span.pc-story-btn { cursor: default; }
.pc-story-btn[hidden] { display: none; }
/* "Ask" is always visible (not hover-only like Share): people don't go looking for it. */
.pc-story-btn--ask[aria-expanded="true"] { color: var(--st-text); border-color: var(--st-input-border); }
.pc-story-btn:hover { color: var(--st-text); border-color: var(--st-input-border); }
.pc-story-btn--has:hover { color: var(--st-success); border-color: var(--st-success); }
.pc-story-btn--mine:hover { color: var(--st-accent-text); border-color: var(--st-accent); }
.pc-story-btn:focus-visible { outline: 2px solid var(--st-accent); outline-offset: 2px; }
/* How many asked, on "Ask how they got it" (everyone sees it) */
.pc-story-btn-n { margin-left: 4px; font-weight: 500; font-variant-numeric: tabular-nums; }
.pc-story-btn-n[hidden] { display: none; }

/* ── Panel under a desktop row / inside a mobile card ── */
/* border-box: interview-story.js slides it open and shut by its full height, padding included */
.pc-story-panel { box-sizing: border-box; padding: 0 20px 16px 76px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
html[data-theme="light"] .pc-story-panel, body.light-mode .pc-story-panel { border-bottom-color: rgba(0, 0, 0, 0.06); }
.pc-story-panel[hidden] { display: none; }
.pc-story-panel--card { padding: 12px 0 0; border-bottom: 0; }

.pc-story {
    display: flex; flex-direction: column; gap: 10px; max-width: 760px;
    padding: 14px 16px; border: 1px solid var(--st-border); border-radius: 12px;
    background: var(--st-card); color: var(--st-text); text-align: left;
}
.pc-story-title { margin: 0; font-size: 13px; font-weight: 700; color: var(--st-text); }
.pc-story-text { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--st-text-2); overflow-wrap: anywhere; }
.pc-story-asks { display: flex; flex-wrap: wrap; gap: 8px; }
.pc-story-ask {
    min-height: 32px; padding: 6px 12px; border-radius: 999px;
    border: 1px solid var(--st-input-border); background: transparent; color: var(--st-text);
    font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
/* A question and how many asked it always stay on one line; the row wraps between questions, so
   two short ones share a line when there's room */
.pc-story-ask[data-story-ask] { display: inline-flex; align-items: center; white-space: nowrap; max-width: 100%; }
/* The question never wraps: cut short with … only if a very narrow screen or a wide font leaves no room */
.pc-story-ask-q { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pc-story-ask:hover:not(:disabled) { border-color: var(--st-accent); color: var(--st-accent-text); }
.pc-story-ask:focus-visible { outline: 2px solid var(--st-accent); outline-offset: 2px; }
.pc-story-ask:disabled { cursor: progress; opacity: .6; }
/* One they asked: marked, and tapping it again withdraws it */
.pc-story-ask.is-asked { border-color: transparent; background: var(--st-success-soft); color: var(--st-success); }
.pc-story-ask.is-asked .pc-story-ask-q::before { content: '✓\00a0'; }
.pc-story-ask.is-asked:hover:not(:disabled) { border-color: var(--st-success); color: var(--st-success); }
/* How many asked this question (everyone sees it) */
.pc-story-ask-n {
    margin-left: 7px; padding-left: 7px; border-left: 1px solid currentColor;
    font-weight: 500; opacity: .75; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.pc-story-ask-n[hidden] { display: none; }
.pc-story-ask--write { border-color: var(--st-accent); color: var(--st-accent-text); }
.pc-story-fine { margin: 0; font-size: 11.5px; line-height: 1.45; color: var(--st-muted); }
.pc-story-fine[hidden] { display: none; }
/* The owner's "Turn off questions" / "Turn questions back on" (interview_story_asks_switch.html) */
.pc-story-switch-btn {
    padding: 0; border: 0; background: none; cursor: pointer; color: var(--st-muted);
    font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px;
}
.pc-story-switch-btn:hover { color: var(--st-text); }
.pc-story-switch-btn:focus-visible { outline: 2px solid var(--st-accent); outline-offset: 2px; }
.pc-story-switch-btn:disabled { opacity: .6; cursor: progress; }
.pc-story-switch [data-story-switch-text]:empty { display: none; }

/* ── Owner dialog ── */
.pc-story-overlay {
    position: fixed; inset: 0; z-index: 1100;
    display: flex; align-items: center; justify-content: center; padding: 20px;
    background: rgba(0, 0, 0, 0.62); backdrop-filter: blur(2px);
}
.pc-story-overlay[hidden] { display: none; }
body.pc-story-open { overflow: hidden; }
.pc-story-dialog {
    position: relative; width: min(600px, 100%); max-height: calc(100vh - 40px); overflow-y: auto;
    padding: 26px 26px 22px; border-radius: 16px; border: 1px solid var(--st-border);
    background: var(--st-bg); color: var(--st-text); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
    font-size: 14px; text-align: left; outline: none;
}
/* One fixed height whatever the step, so switching tabs never moves the box; the buttons sit at the
   bottom (margin-top: auto) and stay pinned while a long step scrolls. The "Thank you" view sizes to fit. */
.pc-story-dialog { display: flex; flex-direction: column; height: min(760px, calc(100vh - 40px)); }
.pc-story-dialog.is-done { height: auto; }
#pcStoryForm { display: flex; flex-direction: column; flex: 1 0 auto; }
.pc-story-x {
    position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: 0; border-radius: 8px;
    background: transparent; color: var(--st-muted); font-size: 24px; line-height: 1; cursor: pointer;
}
.pc-story-x:hover { background: var(--st-card); color: var(--st-text); }
.pc-story-kicker { margin: 0 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--st-success); }
.pc-story-h { margin: 0 0 6px; font-size: 21px; font-weight: 700; letter-spacing: -0.01em; color: var(--st-text); }
.pc-story-lede { margin: 0 0 14px; color: var(--st-text-2); line-height: 1.5; }
.pc-story-asked, .pc-story-state {
    margin: 0 0 14px; padding: 9px 12px; border-radius: 10px; font-size: 13px; line-height: 1.45;
}
.pc-story-asked { background: var(--st-accent-soft); color: var(--st-accent-text); font-weight: 600; }
/* "Turn off questions" sits at the end of that box, quieter than the line itself */
.pc-story-asked .pc-story-switch { font-weight: 500; }
.pc-story-asked .pc-story-switch-btn { color: inherit; opacity: .8; font-weight: 500; white-space: nowrap; }
.pc-story-asked .pc-story-switch-btn:hover { opacity: 1; color: inherit; }
.pc-story-state { background: var(--st-card); border: 1px solid var(--st-border); color: var(--st-text-2); }
.pc-story-asked[hidden], .pc-story-state[hidden], .pc-story-err[hidden], .pc-story-link[hidden] { display: none; }
.pc-story-field { display: flex; flex-direction: column; gap: 7px; margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
.pc-story-field legend, .pc-story-legend { padding: 0; margin: 0 0 7px; font-size: 13px; font-weight: 600; color: var(--st-text); }
label.pc-story-field .pc-story-legend { margin: 0; }
.pc-story-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.pc-story-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-story-chip {
    min-height: 34px; padding: 7px 12px; border-radius: 10px;
    border: 1px solid var(--st-input-border); background: var(--st-input); color: var(--st-text-2);
    font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.pc-story-chip:hover { border-color: var(--st-accent); }
.pc-story-chip[aria-pressed="true"] { border-color: var(--st-accent); background: var(--st-accent-soft); color: var(--st-accent-text); }
.pc-story-chip:focus-visible { outline: 2px solid var(--st-accent); outline-offset: 2px; }
.pc-story-field textarea {
    width: 100%; box-sizing: border-box; min-height: 92px; resize: vertical;
    padding: 10px 12px; border-radius: 10px; border: 1px solid var(--st-input-border);
    background: var(--st-input); color: var(--st-text); font: inherit; font-size: 14px; line-height: 1.5;
}
.pc-story-field textarea::placeholder { color: var(--st-muted); }
.pc-story-field textarea:focus { outline: none; border-color: var(--st-accent); box-shadow: 0 0 0 3px var(--st-accent-soft); }
.pc-story-dialog .pc-story-fine { margin: 2px 0 12px; }
.pc-story-err { margin: 0 0 12px; font-size: 13px; color: var(--st-danger); }
.pc-story-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pc-story-spacer { flex: 1 1 auto; }
.pc-story-primary, .pc-story-secondary {
    height: 42px; padding: 0 18px; border-radius: 10px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.pc-story-primary { border: 0; background: var(--st-accent); color: #fff; }
.pc-story-primary:hover:not(:disabled) { filter: brightness(1.08); }
.pc-story-primary:disabled { opacity: .6; cursor: default; }
.pc-story-secondary { border: 1px solid var(--st-input-border); background: transparent; color: var(--st-text-2); }
.pc-story-secondary:hover { border-color: var(--st-text-2); color: var(--st-text); }
.pc-story-link { border: 0; background: none; padding: 0; font: inherit; font-size: 13px; font-weight: 600; color: var(--st-danger); cursor: pointer; }
.pc-story-done[hidden], #pcStoryForm[hidden] { display: none; }

/* Steps: 1 Getting in · 2 Preparing · 3 Interviews & offer (any can be opened directly) */
.pc-story-steps { display: flex; gap: 6px; margin: 2px 0 18px; padding: 4px; border-radius: 12px; background: var(--st-card); border: 1px solid var(--st-border); }
.pc-story-stepbtn {
    flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px;
    padding: 6px 8px; border: 0; border-radius: 9px; background: transparent; color: var(--st-muted);
    font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.pc-story-stepbtn b {
    display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
    background: var(--st-border); color: var(--st-text-2); font-size: 11px;
}
.pc-story-stepbtn[aria-current="step"] { background: var(--st-bg); color: var(--st-text); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); }
.pc-story-stepbtn[aria-current="step"] b { background: var(--st-accent); color: #fff; }
.pc-story-stepbtn.is-done b { background: var(--st-success-soft); color: var(--st-success); }
/* What people asked: a count on the step's tab, a check once the form answers it (interview-story.js markAsked) */
.pc-story-tabask {
    min-width: 16px; height: 16px; padding: 0 4px; margin-left: -2px; border-radius: 999px; box-sizing: border-box;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--st-accent); color: #fff; font-size: 10px; font-style: normal; font-weight: 700; line-height: 1;
}
.pc-story-tabask.is-answered { background: var(--st-success-soft); color: var(--st-success); }
.pc-story-tabask[hidden] { display: none; }
/* …and "N asked" by the question itself */
.pc-story-askedtag {
    margin-left: 6px; padding: 2px 7px; border-radius: 999px; vertical-align: 1px;
    background: var(--st-accent-soft); color: var(--st-accent-text); font-size: 11px; font-weight: 600; white-space: nowrap;
}
.pc-story-askedtag.is-answered { background: var(--st-success-soft); color: var(--st-success); }
.pc-story-askedtag[hidden] { display: none; }
.pc-story-done-asks { margin: 10px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--st-text); }
.pc-story-done-asks[hidden] { display: none; }
.pc-story-step[hidden] { display: none; }
.pc-story-hint { font-size: 12px; font-weight: 500; color: var(--st-muted); }
legend .pc-story-hint, .pc-story-legend .pc-story-hint { margin-left: 6px; }

/* "Where are you with this job?": N years there · or · Offered */
.pc-story-years { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.pc-story-years-box { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--st-text-2); }
.pc-story-years-box input {
    width: 72px; height: 38px; padding: 0 10px; border-radius: 10px; box-sizing: border-box;
    border: 1px solid var(--st-input-border); background: var(--st-input); color: var(--st-text);
    font: inherit; font-size: 15px; font-weight: 600; text-align: center;
}
.pc-story-years-box input:focus { outline: none; border-color: var(--st-accent); box-shadow: 0 0 0 3px var(--st-accent-soft); }
.pc-story-or { font-size: 12.5px; color: var(--st-muted); }

/* "How many rounds?": − [3] + ; greyed until touched */
.pc-story-stepper {
    display: inline-flex; align-self: flex-start; align-items: stretch; height: 40px; border-radius: 10px; overflow: hidden;
    border: 1px solid var(--st-input-border); background: var(--st-input);
}
.pc-story-stepper-btn {
    width: 40px; border: 0; background: transparent; color: var(--st-text-2);
    font: inherit; font-size: 20px; line-height: 1; cursor: pointer;
}
.pc-story-stepper-btn:hover { background: var(--st-accent-soft); color: var(--st-accent-text); }
.pc-story-stepper input {
    width: 48px; border: 0; border-left: 1px solid var(--st-border); border-right: 1px solid var(--st-border);
    background: transparent; color: var(--st-text); font: inherit; font-size: 16px; font-weight: 700; text-align: center;
    -moz-appearance: textfield; appearance: textfield;
}
.pc-story-stepper input::-webkit-outer-spin-button, .pc-story-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pc-story-stepper input:focus { outline: none; background: var(--st-accent-soft); }
.pc-story-stepper.is-default input { color: var(--st-muted); font-weight: 500; }

/* "What was each round?": Round 1 [What was it? ▾] … */
/* one round per line: reads in order and doesn't go ragged on an odd count */
.pc-story-rounds { display: grid; grid-template-columns: minmax(0, 420px); gap: 8px; }
.pc-story-round { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pc-story-round-n { flex: 0 0 62px; font-size: 12.5px; font-weight: 600; color: var(--st-muted); }
.pc-story-round select { flex: 1 1 auto; min-width: 0; }

/* Selects in the dialog; greyed while still on their first, empty option ("Select type", "What was it?") */
.pc-story-dialog select {
    height: 38px; padding: 0 10px; border-radius: 10px; box-sizing: border-box;
    border: 1px solid var(--st-input-border); background: var(--st-input); color: var(--st-text); font: inherit; font-size: 14px;
}
.pc-story-dialog select:focus { outline: none; border-color: var(--st-accent); box-shadow: 0 0 0 3px var(--st-accent-soft); }
.pc-story-dialog select.is-default { color: var(--st-muted); }
.pc-story-dialog select option { color: var(--st-text); background: var(--st-bg); }

/* One-line inputs and selects in the dialog */
.pc-story-field input[type="text"], .pc-story-res input, .pc-story-res select {
    width: 100%; box-sizing: border-box; height: 38px; padding: 0 11px; border-radius: 10px;
    border: 1px solid var(--st-input-border); background: var(--st-input); color: var(--st-text); font: inherit; font-size: 14px;
}
.pc-story-field input[type="text"]:focus, .pc-story-res input:focus, .pc-story-res select:focus {
    outline: none; border-color: var(--st-accent); box-shadow: 0 0 0 3px var(--st-accent-soft);
}
.pc-story-field input::placeholder, .pc-story-res input::placeholder { color: var(--st-muted); }

/* "What helped" rows */
.pc-story-res-list { display: flex; flex-direction: column; gap: 10px; }
.pc-story-res {
    display: flex; flex-direction: column; gap: 7px; padding: 10px; border-radius: 12px;
    border: 1px solid var(--st-border); background: var(--st-card);
}
.pc-story-res-row { display: flex; gap: 7px; }
.pc-story-res-row .pc-story-res-name { flex: 1 1 auto; min-width: 0; }
.pc-story-res-row .pc-story-res-type { flex: 0 0 150px; width: 150px; }
.pc-story-res-x {
    flex: 0 0 auto; width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent;
    color: var(--st-muted); font-size: 20px; cursor: pointer;
}
.pc-story-res-x:hover { background: var(--st-border); color: var(--st-text); }
.pc-story-res-verdict { align-items: center; }
.pc-story-res-edit { display: flex; flex-direction: column; gap: 7px; }
.pc-story-res-edit[hidden], .pc-story-res-sum[hidden] { display: none; }
/* A folded row: one line, tap to open it again */
.pc-story-res.is-folded { padding: 4px 4px 4px 12px; }
.pc-story-res-sum { display: flex; align-items: center; gap: 4px; }
.pc-story-res-open {
    flex: 1 1 auto; min-width: 0; display: block; padding: 8px 0; border: 0; background: none; text-align: left;
    color: var(--st-text); font: inherit; font-size: 13.5px; cursor: pointer;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pc-story-res-open { display: flex; align-items: center; gap: 10px; }
.pc-story-res-sum-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pc-story-res-edit-hint { flex: 0 0 auto; font-size: 12.5px; font-weight: 600; color: var(--st-accent-text); }
.pc-story-res-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.pc-story-res-done {
    margin-left: auto; height: 30px; padding: 0 14px; border-radius: 8px;
    border: 1px solid var(--st-accent); background: transparent; color: var(--st-accent-text);
    font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.pc-story-res-done:hover { background: var(--st-accent-soft); }
.pc-story-res-sum-name { font-weight: 600; }
.pc-story-res-sum-meta { color: var(--st-muted); }
.pc-story-res-open:hover .pc-story-res-sum-name { color: var(--st-accent-text); }
.pc-story-chip--sm { min-height: 30px; padding: 4px 10px; font-size: 12.5px; }
.pc-story-addres {
    align-self: flex-start; margin-top: 8px; padding: 6px 2px; border: 0; background: none;
    color: var(--st-accent-text); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer;
}
.pc-story-addres[hidden] { display: none; }
.pc-story-quiet {
    height: 42px; padding: 0 12px; border: 0; background: none; color: var(--st-text-2);
    font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.pc-story-quiet:hover { color: var(--st-text); }
.pc-story-quiet[hidden], .pc-story-primary[hidden] { display: none; }
/* The form's buttons stay in view while the step scrolls, so "Next" / "Share now" never hide below the fold. */
#pcStoryForm > .pc-story-actions {
    position: sticky; bottom: -22px; z-index: 2; margin: auto -26px -22px; padding: 12px 26px 22px;
    background: var(--st-bg); border-top: 1px solid var(--st-border);
}
/* "Remove my story": at the end of step 4, editing only, asks before deleting */
.pc-story-remove { margin-top: 4px; padding-top: 12px; border-top: 1px dashed var(--st-border); font-size: 13px; color: var(--st-text-2); }
.pc-story-remove[hidden], .pc-story-remove-confirm[hidden], .pc-story-remove .pc-story-link[hidden] { display: none; }
.pc-story-remove .pc-story-link { color: var(--st-muted); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.pc-story-remove-confirm .pc-story-link { margin-left: 10px; }
.pc-story-link--danger { color: var(--st-danger) !important; }
#pcStoryTip { min-height: 64px; }
.pc-story-field[hidden] { display: none; }

/* ── A published story (interview_story_article.html): a short first-person story ── */
.pc-story--full { max-width: 760px; gap: 14px; padding: 18px 22px 14px; }
.pc-story-tenure { margin: 0; font-size: 12.5px; color: var(--st-muted); }
.pc-story-narrative { display: flex; flex-direction: column; gap: 14px; font-family: 'Newsreader Text', Georgia, 'Times New Roman', serif; }
.pc-story-narrative p { margin: 0; font-size: 17.5px; line-height: 1.62; color: var(--st-text); overflow-wrap: anywhere; }
.pc-story-narrative a { color: var(--st-accent-text); font-weight: 600; text-decoration: none; }
.pc-story-narrative a:hover { text-decoration: underline; }
/* Questions they remember, one per line (story_narrative.build), in italics like a quote */
.pc-story-q { display: block; margin-top: 6px; padding-left: 12px; border-left: 2px solid var(--st-border); font-style: italic; color: var(--st-text-2); }
.pc-story-narrative .pc-story-tipline {
    padding: 10px 14px; border-left: 3px solid var(--st-success); border-radius: 0 8px 8px 0;
    background: var(--st-success-soft); font-style: italic; color: var(--st-text);
}
.pc-story-tipline strong { font-style: normal; font-weight: 600; color: var(--st-success); }
/* The story and, beside it, its facts (story_narrative.facts): the card runs the full width of the
   row, out to the last column; the story keeps a readable line length and the facts take the rest */
.pc-story--full.has-facts { max-width: none; }
.pc-story-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px 32px; align-items: start; }
.has-facts .pc-story-body { grid-template-columns: minmax(0, 760px) minmax(240px, 1fr); }
.pc-story-facts { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 2px 0 2px 26px; border-left: 1px solid var(--st-border); }
.pc-story-fact { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 12px; font-size: 13.5px; line-height: 1.45; }
.pc-story-fact dt { display: flex; align-items: flex-start; gap: 9px; color: var(--st-muted); }
/* One-colour line icons (includes/interview_story_fact_icon.html), white on dark, black on light */
.pc-story-fact-icon { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 1px; color: var(--st-text); }
.pc-story-fact dd { margin: 0; color: var(--st-text); font-weight: 600; overflow-wrap: anywhere; }
.pc-story-fact a { color: var(--st-accent-text); text-decoration: none; }
.pc-story-fact a:hover { text-decoration: underline; }
/* Narrow rows and the phone reading sheet: the facts go under the story */
@media (max-width: 900px) {
    .has-facts .pc-story-body { grid-template-columns: minmax(0, 1fr); }
    .pc-story-facts { padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--st-border); }
}
.pc-story-dialog--read .has-facts .pc-story-body { grid-template-columns: minmax(0, 1fr); }
.pc-story-dialog--read .pc-story-facts { padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--st-border); }
.pc-story--full .pc-story-asks { align-items: center; padding-top: 12px; border-top: 1px solid var(--st-border); }
.pc-story-asks-lbl { margin-right: 2px; font-size: 12.5px; color: var(--st-muted); }
/* Their own live story: what it is on the left, "Edit your story" on the right */
.pc-story-owner { justify-content: space-between; }
.pc-story--full .pc-story-fine { font-size: 11.5px; }

/* Phone card: a teaser, the full story opens in the reading sheet */
.pc-story--teaser .pc-story-teaser-tip {
    margin: 0; font-family: 'Newsreader Text', Georgia, 'Times New Roman', serif; font-style: italic;
    font-size: 16px; line-height: 1.45; color: var(--st-text);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* The reading sheet: sized to the story, not the fixed height of the writing dialog. A bar on top
   (grip on phones, close button) stays put while only the story scrolls under it, and a clear edge
   and a lighter sheet set it apart from the page behind. */
.pc-story-dialog--read {
    height: auto; max-height: min(88vh, 900px); width: min(760px, 100%);
    padding: 0; overflow: hidden; display: flex; flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.16); background: var(--st-card);
}
html[data-theme="light"] .pc-story-dialog--read, body.light-mode .pc-story-dialog--read { border-color: #d6dae1; }
.pc-story-sheet-bar {
    position: relative; flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
    min-height: 44px; border-bottom: 1px solid var(--st-border);
}
.pc-story-sheet-grip { display: none; width: 40px; height: 4px; border-radius: 999px; background: var(--st-input-border); }
.pc-story-sheet-bar .pc-story-x { top: 6px; right: 8px; }
.pc-story-sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px 24px 22px; }
.pc-story-dialog--read .pc-story--full { padding: 0; border: 0; background: none; max-width: none; }
.pc-story-ctx { margin: 0 0 12px; font-size: 12.5px; color: var(--st-muted); }

/* ── "Share your story" line in the Add salary modal, after a save (add-salary-modal.js) ── */
.sbm-wizard .sbw-story-cta {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px;
    padding: 12px 14px; border-radius: var(--w-radius-sm, 10px);
    border: 1px dashed var(--w-accent, #2f7bff); background: var(--w-accent-soft, rgba(47, 123, 255, .14));
}
.sbm-wizard .sbw-story-cta[hidden] { display: none; }
.sbm-wizard .sbw-story-cta-text { flex: 1 1 240px; font-size: 13.5px; line-height: 1.45; color: var(--w-text, #f2f2f2); }
.sbm-wizard .sbw-story-cta-text strong { display: block; }
.sbm-wizard .sbw-story-cta-text span { color: var(--w-muted, #8f8f8f); }
.sbm-wizard .sbw-story-cta-btn {
    height: 40px; padding: 0 16px; border-radius: var(--w-radius-sm, 10px); border: 0;
    background: var(--w-accent, #2f7bff); color: #fff; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer;
}

@media (max-width: 768px) {
    .pc-story-panel { padding: 0 14px 14px; }
    /* Inside a phone card the box lines up with the card's Base / RSU / In-hand row, edge to edge
       (the line above would otherwise indent it 14px on each side) */
    .pc-story-panel.pc-story-panel--card { padding: 12px 0 0; }
    .pc-story-panel--card .pc-story { max-width: none; padding: 14px 10px; }
    /* Phones: each question is a full-width row of one line, how many asked at its right end (wrapped
       pills read badly at this width). Sized so the longest question fits at 360px in Firefox's wider
       Linux fonts too, where it used to wrap and leave rows of uneven height. */
    .pc-story-asks:has(> [data-story-ask]) { flex-direction: column; align-items: stretch; gap: 6px; }
    .pc-story-ask[data-story-ask] {
        display: flex; align-items: center; gap: 6px; width: 100%; min-height: 42px;
        padding: 9px 10px 9px 12px; border-radius: 12px; text-align: left; font-size: 12px;
    }
    .pc-story-ask[data-story-ask] .pc-story-ask-n { flex: none; margin-left: auto; padding-left: 0; border-left: 0; font-size: 11.5px; }
    .pc-story-asks-lbl { margin: 0 0 2px; }
    .pc-story-overlay { align-items: flex-end; padding: 0; }
    .pc-story-dialog { width: 100%; height: 88vh; max-height: 92vh; border-radius: 16px 16px 0 0; padding: 22px 18px 18px; }
    .pc-story-dialog--read {
        height: auto; max-height: 88vh; padding: 0; border-bottom: 0;
        box-shadow: 0 -14px 40px rgba(0, 0, 0, 0.55);
    }
    .pc-story-sheet-grip { display: block; }
    .pc-story-sheet-body { padding: 14px 18px 20px; }
    .pc-story-pair { grid-template-columns: 1fr; }
    .pc-story-actions .pc-story-primary { flex: 1 1 auto; }
    .pc-story-stepbtn { font-size: 11.5px; gap: 5px; padding: 6px 4px; }
    /* four tabs on a phone: numbers for all, the name only on the current one */
    .pc-story-stepbtn:not([aria-current="step"]) span { display: none; }
    .pc-story-stepbtn:not([aria-current="step"]) { flex: 0 0 44px; }
    .pc-story-rounds { grid-template-columns: 1fr; }
    #pcStoryForm > .pc-story-actions { bottom: -18px; margin: auto -18px -18px; padding: 10px 18px 18px; }
    #pcStoryForm > .pc-story-actions { flex-wrap: nowrap; }
    .pc-story-next-name { display: none; }
    .pc-story-res-row { flex-wrap: wrap; }
    .pc-story-res-row .pc-story-res-name { flex: 1 1 calc(100% - 45px); }
    .pc-story-res-row .pc-story-res-type { flex: 1 1 100%; width: 100%; order: 3; }
}
@media (prefers-reduced-motion: reduce) {
    .pc-story-btn { transition: none; }
}
