/*
 * The hub's one stylesheet: white pages, the Inter font, the
 * University crest and programme logo across the top over a blue rule, a bold uppercase menu, page titles in a
 * white bar with a pale blue left edge, and pale blue rounded buttons. Course colours come from the courses table.
 */

@font-face { font-family: "Inter"; src: url("../fonts/Inter-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Medium.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-SemiBold.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Bold.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-ExtraBold.woff") format("woff"); font-weight: 800; font-display: swap; }

:root {
    --ink: #111827;
    --title: #12233b;
    --muted: #5b6472;
    --line: #e5e7eb;
    --paper: #ffffff;
    --page: #f6f7f9;
    --brand: #111e50;
    --brand-deep: #1d3f8f;
    --accent: #3f68c8;
    --soft: #a2bffe;
    --soft-ink: #13306e;
    --ok: #00402b;
    --ok-bg: #e6fff5;
    --warn: #7a4b00;
    --warn-bg: #fff6d9;
    --bad: #ab2030;
    --bad-bg: #fdecea;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .04);
    --font: Inter, Tahoma, Geneva, "DejaVu Sans", sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: #fff;
    color: var(--ink);
    font: 15px/1.5 var(--font);
}

a { color: var(--brand-deep); }

h1 { font-size: 1.7rem; margin: 0 0 .7rem; color: var(--title); }
h2 { font-size: 1.2rem; margin: 1.5rem 0 .6rem; color: var(--ink); }
h3 { font-size: 1.05rem; margin: 1rem 0 .4rem; }
p.lead { color: var(--muted); margin: 0 0 1.1rem; font-size: .92rem; }

/* ---------------------------------------------------------------- header: crest, programme logo, blue rule, menu */

.safe-banner {
    background: var(--bad);
    color: #fff;
    text-align: center;
    font-weight: 700;
    font-size: .92rem;
    padding: .5rem 16px;
}
.safe-banner a { color: #fff; }

.brand-bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 32px 14px; }
.brand-bar a { line-height: 0; }
.brand-crest { display: block; height: 46px; width: auto; }
.brand-logo { display: block; height: 84px; width: auto; max-width: 100%; object-fit: contain; }
.brand-rule { height: 5px; margin: 0 32px; background: var(--accent); }

.topnav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 2px clamp(10px, 1.1vw, 20px);
    padding: 8px 24px 10px;
    border-bottom: 1px solid #ddd;
}
.topnav a {
    color: #222;
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .02em;
    padding: 6px 2px 8px;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    text-transform: uppercase;
}
.topnav a.on, .topnav a:hover { border-bottom-color: var(--soft); color: var(--brand-deep); }
.topnav a.back { font-size: 18px; padding: 4px 6px 8px; text-transform: none; }
.brand-left { display: flex; flex-direction: column; gap: 10px; }
.brand-left .who { display: flex; align-items: center; gap: .6rem; font-size: .78rem; color: var(--muted); line-height: 1.2; }
.brand-left .who button { background: #fff; border: 1px solid #d7dee6; color: #111827; border-radius: 8px; padding: 4px 10px; font: 600 12px var(--font); cursor: pointer; }
@media (max-width: 1200px) { .topnav a { font-size: 15px; } }

main { padding: 12px 24px 48px; max-width: 1600px; margin: 0 auto; }

/* Page title: a white bar with a pale blue left edge. */
main > h1:first-of-type {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 71px;
    margin: 0 0 16px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-left: 9px solid var(--soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    font-size: 28px;
    line-height: 1.15;
    font-weight: 800;
    color: var(--title);
}

/* ---------------------------------------------------------------- blocks */

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.2rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow);
}
.card > h2:first-of-type { margin-top: 0; }

.notice { border-radius: 8px; padding: .75rem 1rem; margin-bottom: 1rem; font-size: .92rem; }
.notice.ok { background: var(--ok-bg); color: var(--ok); border: 1px solid #b6efd8; }
.notice.bad { background: var(--bad-bg); color: var(--bad); border: 1px solid #f3c2c7; }
.notice.warn { background: #fdf0ed; color: #6b2a1d; border: 1px solid #e0b4a8; }
.notice ul { margin: .25rem 0 0; padding-left: 1.2rem; }

.roundel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    min-width: 2.6rem;
    border-radius: 50%;
    font-size: .6rem;
    font-weight: 900;
    letter-spacing: .02em;
    background: radial-gradient(circle at 32% 28%, var(--tile), var(--tile-line) 72%);
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(16, 24, 40, .28);
    vertical-align: middle;
}

/* ---------------------------------------------------------------- tiles on the landing pages */

.tl { --tw: clamp(190px, calc((min(100vw, 1500px) - 140px) / 5), 280px); display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; margin: 6px auto 22px; }
.tl-tile {
    flex: 0 0 var(--tw);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fff;
    border: 1px solid #e6e9ee;
    border-radius: 16px;
    padding: 18px 14px 16px;
    box-shadow: 0 2px 6px rgba(16, 24, 40, .06), 0 8px 22px rgba(16, 24, 40, .06);
    text-decoration: none;
    color: #111827;
    transition: transform .12s, box-shadow .12s;
}
.tl-tile:hover { transform: translateY(-3px); box-shadow: 0 4px 10px rgba(16, 24, 40, .08), 0 14px 30px rgba(16, 24, 40, .10); }
.tl-ico {
    width: clamp(70px, 5.9vw, 88px);
    height: clamp(70px, 5.9vw, 88px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 32% 28%, var(--a), var(--b) 72%);
    box-shadow: 0 2px 6px rgba(16, 24, 40, .18);
    margin: 0 0 12px;
    color: var(--t);
    font-weight: 800;
    font-size: 20px;
    letter-spacing: .02em;
}
.tl-ico svg { width: 56%; height: 56%; fill: none; stroke: var(--t); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.tl-tile h2 { margin: 0 0 6px; font-size: clamp(19px, 1.5vw, 23px); line-height: 1.2; font-weight: 600; }
.tl-tile p { margin: 0 0 14px; font-size: 15px; line-height: 1.4; color: #344054; flex: 1; }
.tl-btn {
    display: inline-block;
    min-width: 62%;
    padding: 9px 18px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 600;
    background: color-mix(in srgb, var(--a), var(--b));
    color: var(--t);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .15);
}
@media (max-width: 640px) { .tl { --tw: 100%; } }

.hd-rule { display: flex; align-items: center; gap: 18px; margin: 4px 0 12px; color: #111827; font-size: 18px; font-weight: 600; letter-spacing: .06em; }
.hd-rule::before, .hd-rule::after { content: ''; flex: 1; height: 1px; background: #cfd5dd; }
.hd-week { background: #fff; border: 1px solid #e6e9ee; border-radius: 14px; padding: 12px 16px 14px; box-shadow: 0 2px 6px rgba(16, 24, 40, .05); }
.hd-week h3 { margin: 0 0 8px; font-size: 20px; font-weight: 700; }
.hd-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.hd-day { border: 1px solid #e3e8ef; border-radius: 10px; min-height: 70px; padding: 8px 10px; }
.hd-day.today { border: 2px solid var(--accent); padding: 7px 9px; }
.hd-day .dn { font-size: 14px; color: #475467; }
.hd-day .dd { font-size: 15px; font-weight: 700; margin: 0 0 6px; }
.hd-day .rs { display: flex; flex-wrap: wrap; gap: 6px; }
.hd-day .roundel { text-decoration: none; color: inherit; }
@media (max-width: 640px) { .hd-days { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.tile { background: #fff; border: 1px solid var(--line); border-left: 9px solid var(--tile, var(--soft)); border-radius: var(--radius); padding: 1rem; }
.tile .code { display: inline-flex; align-items: center; justify-content: center; min-width: 3.2rem; height: 3.2rem; border-radius: 50%; background: var(--tile); border: 3px solid var(--tile-line); font-weight: 700; font-size: .85rem; }
.tile h3 { margin: .6rem 0 .15rem; font-size: 1rem; }
.tile p { margin: 0; color: var(--muted); font-size: .88rem; }

/* ---------------------------------------------------------------- tables */

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .5rem .7rem; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: .9rem; }
th { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
tbody tr:nth-child(even) { background: rgba(0, 0, 0, .02); }
tr.add td:first-child { border-left: 4px solid #3cf7c5; }
tr.update td:first-child { border-left: 4px solid var(--accent); }
tr.error td:first-child { border-left: 4px solid var(--bad); }
tr.same { color: var(--muted); }
td.actions { white-space: nowrap; text-align: right; }

.counts { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.counts span { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .2rem .8rem; font-size: .85rem; }

/* ---------------------------------------------------------------- forms and buttons */

.toolbar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: end; margin-bottom: 1rem; }
.toolbar .grow { flex: 1; min-width: 180px; }

label { display: block; font-size: .8rem; font-weight: 600; margin-bottom: .25rem; color: #344054; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=file], select, textarea {
    width: 100%;
    padding: .5rem .6rem;
    border: 1px solid #d7dee6;
    border-radius: 6px;
    font: inherit;
    background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--soft); outline-offset: 0; border-color: var(--accent); }
input[type=color] { width: 3rem; height: 2.2rem; padding: 0; border: 1px solid #d7dee6; border-radius: 6px; }
textarea { min-height: 6rem; }
.field { margin-bottom: 1rem; }
.field .hint, .hint { color: var(--muted); font-size: .84rem; }
.field .hint { margin-top: .2rem; }
.field .error { color: var(--bad); font-size: .85rem; margin-top: .2rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 1.25rem; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--soft);
    color: var(--soft-ink);
    border: 1px solid var(--soft);
    border-radius: 8px;
    padding: 9px 15px;
    font: 700 13px/1.2 var(--font);
    letter-spacing: .03em;
    text-decoration: none;
    cursor: pointer;
}
.btn:hover { filter: brightness(.95); }
.btn.secondary { background: #fff; color: #111827; border-color: #d7dee6; }
.btn.danger { background: #fff; color: var(--bad); border-color: #e7b3b9; }
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.inline { display: inline; }

.subnav { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.subnav a { padding: .4rem .95rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; text-decoration: none; color: #222; font-weight: 600; font-size: .88rem; }
.subnav a.on { background: var(--brand); color: #fff; border-color: var(--brand); }

.pagination { display: flex; gap: .5rem; margin-top: 1rem; align-items: center; }

/* ---------------------------------------------------------------- sign-in pages */

.auth { max-width: 420px; margin: 6vh auto; padding: 0 16px; }
.auth .card { padding: 1.75rem; border-left: 9px solid var(--soft); }
.auth h1 { font-size: 1.3rem; margin-bottom: 1rem; }
.codes { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.05rem; columns: 2; }
.secret { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.1rem; letter-spacing: .05em; }
#qr svg, #qr img { width: 200px; height: 200px; }

@media (max-width: 640px) {
    .brand-bar { padding: 10px 16px; } .brand-logo { height: 46px; } .brand-crest { height: 28px; } .brand-rule { margin: 0 16px; }
    main { padding: 10px 14px 32px; }
    main > h1:first-of-type { font-size: 22px; min-height: 0; }

    /* Tables marked "stack" become one small card per row on a phone. */
    table.stack thead { display: none; }
    table.stack tr { display: block; padding: .6rem 0; border-bottom: 1px solid var(--line); }
    table.stack td { display: flex; gap: .75rem; border: 0; padding: .1rem 0; }
    table.stack td.title { font-weight: 600; }
    table.stack td[data-label]::before { content: attr(data-label); color: var(--muted); min-width: 4.5rem; font-size: .85rem; }
    table.stack td:empty { display: none; }
    table.stack td.actions { justify-content: flex-start; padding-top: .3rem; }
    .hide-small { display: none; }
    h1 { font-size: 1.35rem; }
}

/* ---------------------------------------------------------------- evidence */

.reply { border-bottom: 1px solid var(--line); padding: .75rem 0; }
.reply:last-child { border-bottom: 0; }
.reply p { margin: .2rem 0; }
.reply blockquote { margin: .5rem 0; padding: .5rem .8rem; background: var(--page); border-left: 4px solid var(--accent); white-space: pre-line; }
.buttons { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .75rem 0; }

/* ---------------------------------------------------------------- letter editor */

.editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.editor-preview { position: sticky; top: 1rem; }
.preview-frame-wrap { background: #f4f6f9; border: 1px solid var(--line); border-radius: 8px; overflow: auto; }
.preview-frame-wrap iframe { display: block; width: 100%; height: 70vh; border: 0; margin: 0 auto; background: #f4f6f9; transition: width .2s; }
.preview-subject { margin: .5rem 0; word-break: break-word; }
.inline-label { display: inline; margin: 0; font-weight: 600; }
.section-card { border-left: 4px solid var(--accent); }
.section-card .section-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.section-card .section-head strong { font-size: .95rem; }
.section-card .section-tools { display: flex; gap: .25rem; }
.section-card .section-tools button { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: .15rem .5rem; cursor: pointer; font: inherit; }
.section-card .section-tools button:hover { border-color: var(--accent); }
.section-card .auto { color: var(--muted); font-size: .88rem; margin: 0; }
.btn.on { background: var(--brand); color: #fff; border-color: var(--brand); }
#save-message .notice, #preview-problems .notice { margin-bottom: .75rem; }

@media (max-width: 900px) {
    .editor { grid-template-columns: 1fr; }
    .editor-preview { position: static; }
}
label.check { display: flex; gap: .4rem; align-items: center; font-weight: normal; margin-top: .4rem; }
label.check input { width: auto; }

/* ---------------------------------------------------------------- availability */

.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .35rem .75rem; max-height: 26rem; overflow-y: auto; padding: .25rem; border: 1px solid var(--line); border-radius: 8px; }
.pick { display: grid; grid-template-columns: auto 1fr; gap: 0 .5rem; align-items: center; font-weight: normal; padding: .35rem .4rem; border-radius: 6px; margin: 0; cursor: pointer; }
.pick:hover { background: var(--page); }
.pick input { width: auto; grid-row: span 2; }
.pick small { color: var(--muted); grid-column: 2; }
.pick[hidden] { display: none; }
.warn-text { color: var(--warn); }
.ok-text { color: var(--ok); }
.bad-text { color: var(--bad); }
.inline-details { display: inline-block; position: relative; }
.inline-details summary { list-style: none; }
.inline-details summary::-webkit-details-marker { display: none; }
.inline-details[open] form { position: absolute; right: 0; z-index: 5; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .75rem; width: 18rem; display: grid; gap: .4rem; box-shadow: 0 6px 20px rgba(0, 0, 0, .08); text-align: left; }
.counts span:first-child { font-weight: 600; }
.date-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .75rem; }
.chip { display: inline-flex; gap: .35rem; align-items: center; padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 999px; font-weight: normal; margin: 0; cursor: pointer; background: #fff; }
.chip input { width: auto; }
.chip:has(input:checked) { background: var(--brand); color: #fff; border-color: var(--brand); }
.date-col { text-align: center; white-space: nowrap; }
.muted-text { color: var(--muted); }
fieldset.date-answer { border: 1px solid var(--line); border-radius: 8px; padding: .5rem .9rem .7rem; margin: 0 0 .75rem; }
fieldset.date-answer legend { font-weight: 600; padding: 0 .3rem; }
@media (max-width: 640px) { .date-col { text-align: left; } }
.done-mark { width: 3rem; height: 3rem; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 700; margin: 0 0 .5rem; }
.answer-summary { list-style: none; padding: 0; margin: 0 0 1rem; }
.answer-summary li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }

/* ---------------------------------------------------------------- sessions */

.people-table input[type=text] { min-width: 9rem; }
.people-table input.pos { width: 3.5rem; }
.status-chip { display: inline-block; padding: .1rem .6rem; border-radius: 999px; font-size: .82rem; font-weight: 600; white-space: nowrap; }
.tone-good { background: var(--ok-bg); color: var(--ok); }
.tone-waiting { background: var(--page); color: var(--muted); border: 1px solid var(--line); }
.tone-attention { background: var(--bad-bg); color: var(--bad); }
.ok-chip { background: var(--ok-bg) !important; color: var(--ok); border-color: #b9e3c8 !important; }
.bad-chip { background: var(--bad-bg) !important; color: var(--bad); border-color: #f3c2c7 !important; }
@media (max-width: 640px) { dl.facts { grid-template-columns: 1fr; } dl.facts dd { margin-bottom: .4rem; } }

/* ---------------------------------------------------------------- PCB */

.venue-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 1.25rem; }
.venue .place { border-top: 1px solid var(--line); padding-top: .75rem; }
.brief-list { display: grid; gap: .5rem; margin-bottom: 1rem; }
.brief-row { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.brief-upload { display: flex; gap: .5rem; align-items: center; }
.brief-upload input[type=file] { width: auto; max-width: 15rem; }

/* ---------------------------------------------------------------- Page sub-headings */

main > h1 .page-sub { flex: 1 1 260px; color: #6b7280; font-size: 13px; font-weight: 500; line-height: 1.4; }
.card > form > h2:first-of-type { margin-top: 0; }

/* The board: the same columns on every day's card, so they line up down the page. */
table.board-table { table-layout: fixed; }
table.board-table th:nth-child(1) { width: 30%; }
table.board-table th:nth-child(2) { width: 12%; }
table.board-table th:nth-child(3) { width: 26%; }
table.board-table th:nth-child(5) { width: 8%; }

/* Numbered steps on the OSCE planner: plan, briefs, check and send. */
.step-no { display: inline-flex; align-items: center; justify-content: center; width: 1.6em; height: 1.6em; margin-right: .35em; border-radius: 50%; background: var(--brand, #1f3a68); color: #fff; font-size: .8em; vertical-align: .1em; }

/* ---------------------------------------------------------------- OSCE Check Letters: the list beside the letter */
.good-text { color: var(--good, #1a7f37); }
.check-letters { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 1.25rem; align-items: start; margin-top: 1rem; }
.check-list tr.selected td { background: #eef3ff; }
.check-list tr.selected td.title a { font-weight: 700; }
.check-list td.title a { text-decoration: none; }
.letter-pane { position: sticky; top: 1rem; border: 1px solid var(--line); border-radius: 10px; padding: 1rem; background: var(--page); }
.pane-nav { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.envelope { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .3rem 1rem; margin: 0 0 .8rem; font-size: .92rem; }
.envelope dt { color: #6b7280; }
.envelope dd { margin: 0; overflow-wrap: anywhere; }
.envelope dd a { display: inline-block; margin-right: .8rem; }
.pane-field { margin: .8rem 0; }
.pane-field label { display: block; font-size: .85rem; color: #6b7280; margin-bottom: .2rem; }
.inline-row { display: flex; gap: .4rem; align-items: center; }
.inline-row input { flex: 1 1 auto; min-width: 0; }
.letter-frame { width: 100%; height: 900px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.pane-after { display: grid; gap: .5rem; margin-top: .8rem; }
.days-preview { width: 100%; height: 760px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
details.card > summary { cursor: pointer; font-weight: 600; font-size: 1.1rem; }
@media (max-width: 1100px) { .check-letters { grid-template-columns: 1fr; } .letter-pane { position: static; } }

.site-foot { max-width: 1400px; margin: 2rem auto 1.5rem; padding: 0 16px; color: #8a919c; font-size: 12px; text-align: right; }

/* ---------------------------------------------------------------- Planners (OSCE days, PCB Thursdays), as the old hub laid them out */
.op-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr); gap: 1.25rem; align-items: start; }
.op-sticky { position: sticky; top: 1rem; }
.op-breakdown { max-height: 75vh; overflow: auto; }
.op-bd { width: 100%; border-collapse: collapse; font-size: .9rem; }
.op-bd th, .op-bd td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.op-bd th { border-bottom: 2px solid #111e50; font-size: .85rem; }
.op-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.op-head-l { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.op-head h3 { margin: 0; font-size: 1.15rem; }
.op-state { font-size: .85rem; font-weight: 700; }
.op-state.unsaved { color: #b45309; }
.op-state.saved { color: #00402b; }
.op-open { background: #fffbe0; border-color: #fff386; color: #4c3e00; }
.op-grid { border-collapse: collapse; width: 100%; font-size: .92rem; margin-top: .6rem; }
.op-grid th, .op-grid td { border: 1px solid var(--line); padding: 0; }
.op-grid th.n { width: 34px; background: #f7f8fa; color: #667085; font-weight: 700; text-align: center; }
.op-grid input { border: 0; border-radius: 0; padding: 7px 8px; font-size: .92rem; width: 100%; min-width: 8rem; background: transparent; box-sizing: border-box; }
.op-grid input.h1 { font-weight: 700; background: #eef3ff; }
.op-grid input.h2, .op-grid input.h3 { color: #475467; background: #f9fafb; }
.op-grid input:focus { outline: 2px solid #a2bffe; background: #fff; }
.op-grid input.notsaid { background: #fffbe0; }
.op-grid input.unknown { background: #fff4e5; }
.op-grid input.twice { background: #fdecec; }
.op-grid input.closed { font-weight: 700; }
.op-grid .op-place { padding: 6px 8px; white-space: nowrap; font-size: .88rem; }
.op-grid .op-plays { padding: 6px 8px; font-size: .82rem; color: #475467; }
.op-res-label { display: block; font-weight: 700; font-size: .9rem; margin: .7rem 0 .25rem; }
.op-res { width: 100%; }
.op-letters { margin: .7rem 0 0; padding: .6rem .8rem; border-radius: 8px; background: #f7f8fa; font-size: .92rem; }
.op-todo { color: #1d3f8f; }
.op-gone { color: #7a1424; }
.op-steps { margin: 0 0 .9rem 1.2rem; padding: 0; }
.op-steps li { margin: 0 0 .25rem; }
.who-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 1.25rem; align-items: start; }
.who-list { width: 100%; border-collapse: collapse; font-size: .9rem; }
.who-list th, .who-list td { padding: 5px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.who-list tr.placed td { color: #8a919c; }
@media (max-width: 1100px) { .op-layout { grid-template-columns: 1fr; } .op-sticky { position: static; } .who-days { grid-template-columns: 1fr; } }
/* PCB planner: venues across, places down */
.pcb-places th.venue { background: #eef3ff; padding: 7px 8px; text-align: left; font-weight: 700; }
.pcb-places th.n.op-place { width: 15rem; text-align: left; color: #1d2939; font-weight: 400; white-space: normal; text-transform: none; letter-spacing: 0; }
.pcb-places th.n.op-place .op-plays { display: block; padding: 2px 0 0; }
.pcb-places td.none { text-align: center; color: #98a2b3; background: #f9fafb; }
/* CSFC / CTU planner: one row per person */
.cp-grid th.h { background: #eef3ff; padding: 7px 8px; text-align: left; font-weight: 700; }
.cp-grid td.n { width: 34px; background: #f7f8fa; color: #667085; font-weight: 700; text-align: center; }
.cp-grid input.i { color: #475467; }
.op-head .op-where { font-size: .85rem; color: #667085; }
.brief-choose { flex-direction: column; align-items: stretch; gap: .4rem; }
/* Major Incident planner */
.mi-grid td.narrow input, .mi-grid td.narrow select { min-width: 3.5rem; width: 4.5rem; }
.mi-grid td.tick, .mi-grid td.brief { text-align: center; width: 2.6rem; }
.mi-grid td.tick input { width: auto; min-width: 0; margin: 0 auto; }
.mi-grid select { border: 0; background: transparent; padding: 7px 4px; }
@media print {
    header, nav, .subnav, .safe-banner, .site-foot, .no-print, .flash, .notice { display: none !important; }
    body { background: #fff; }
    .card { border: 0; box-shadow: none; padding: 0; page-break-inside: auto; }
    .print-section + .print-section { break-before: page; }
    table.print-list { font-size: 11pt; }
    table.print-list td.sign { min-width: 9rem; }
}
/* A phantom copy of the hub says so on every page. */
.phantom-banner { background: #5b2a86; }
