/* NPP Start Training Centre — NPP Design Guidelines v1.0 + NPP Start Brand Guidelines v1.0.
   Fraunces headlines, DM Sans body, Archivo 800 only for "npp" in the wordmark. Ink + cream + yellow accent; the door is the signature. */

@font-face { font-family: 'Fraunces'; font-weight: 300; font-style: normal; font-display: swap; src: url('/static/fonts/fraunces/fraunces-latin-300-normal.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-weight: 300; font-style: italic; font-display: swap; src: url('/static/fonts/fraunces/fraunces-latin-300-italic.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-weight: 700; font-style: normal; font-display: swap; src: url('/static/fonts/fraunces/fraunces-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-weight: 700; font-style: italic; font-display: swap; src: url('/static/fonts/fraunces/fraunces-latin-700-italic.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-weight: 900; font-style: normal; font-display: swap; src: url('/static/fonts/fraunces/fraunces-latin-900-normal.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-weight: 900; font-style: italic; font-display: swap; src: url('/static/fonts/fraunces/fraunces-latin-900-italic.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 300; font-style: normal; font-display: swap; src: url('/static/fonts/dm-sans/dm-sans-latin-300-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 400; font-style: normal; font-display: swap; src: url('/static/fonts/dm-sans/dm-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 500; font-style: normal; font-display: swap; src: url('/static/fonts/dm-sans/dm-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 600; font-style: normal; font-display: swap; src: url('/static/fonts/dm-sans/dm-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 700; font-style: normal; font-display: swap; src: url('/static/fonts/dm-sans/dm-sans-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 400; font-style: italic; font-display: swap; src: url('/static/fonts/dm-sans/dm-sans-latin-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'Archivo'; font-weight: 800; font-display: swap; src: url('/static/fonts/archivo/archivo-latin-800-normal.woff2') format('woff2'); }

:root {
  --yellow: #F5C200;
  --ink: #111111;
  --soft: #F8F6F1;
  --warm: #E8E4DB;
  --muted: #6B6B6B;
  --white: #FFFFFF;
  --text: #333333;
  --ok: #111111;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(17, 17, 17, .04), 0 8px 24px rgba(17, 17, 17, .05);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #F8F6F1;
  background: var(--soft);
  color: var(--text);
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1.02rem;
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1 0 auto; padding-top: 40px; padding-bottom: 72px; }
img { max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration-color: var(--yellow); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
svg { width: 1.2em; height: 1.2em; vertical-align: -0.22em; flex-shrink: 0; }
code { font-size: .9em; background: var(--warm); padding: 1px 5px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: 880px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.wrap-wide { width: 100%; max-width: 1180px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.narrow { max-width: 680px; }

/* ---------- Header / footer ---------- */
.site-header { background: var(--ink); color: var(--soft); }
.header-inner { max-width: 1180px; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--soft); font-size: 1.45rem; }
.brand-tag { font-family: 'DM Sans', sans-serif; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--yellow); border-left: 1px solid rgba(248, 246, 241, .25); padding-left: 12px; }
.topnav { display: flex; align-items: center; gap: 22px; font-size: .92rem; font-weight: 500; }
.topnav a, .topnav .linkbtn { color: rgba(248, 246, 241, .78); text-decoration: none; }
.topnav a:hover, .topnav .linkbtn:hover { color: var(--soft); }
.site-footer { background: var(--ink); color: rgba(248, 246, 241, .45); font-size: .82rem; padding: 22px 0; }
.site-footer .wrap { max-width: 1180px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: rgba(248, 246, 241, .6); text-decoration: none; }

/* ---------- Logo (Guidelines §4.1, §4.4) ---------- */
.logo { display: inline-flex; align-items: center; line-height: 1; text-decoration: none; }
.logo-npp { font-family: 'Archivo', sans-serif; font-weight: 800; letter-spacing: -.03em; }
.logo-start { font-family: 'Fraunces', serif; font-weight: 700; font-size: .93em; }
.logo-dot { width: .42em; height: .42em; border-radius: 50%; background: var(--yellow); margin: 0 .1em; flex-shrink: 0; transform: translateY(.06em); }

/* ---------- Type ---------- */
h1, h2, h3, .sec-h2 { font-family: 'Fraunces', Georgia, serif; color: var(--ink); line-height: 1.15; }
h1 em, h2 em, h3 em, .sec-h2 em, .page-h1 em, .mod-title em, .side-title em { color: var(--ink); font-style: italic; background: linear-gradient(transparent 62%, rgba(245, 194, 0, .55) 62%); padding: 0 .04em; }
.site-header h1 em { color: var(--yellow); background: none; }
.page-h1 { font-weight: 900; font-size: clamp(2rem, 4.2vw, 3rem); margin: .1em 0 .4em; letter-spacing: -.01em; }
.sec-h2 { font-weight: 900; font-size: clamp(1.5rem, 2.8vw, 2rem); margin: 0; }
.label { font-family: 'DM Sans', sans-serif; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #8A7300; margin: 0 0 .4em; }
.lede { font-size: 1.12rem; color: var(--text); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.crumbs { font-size: .84rem; color: var(--muted); margin: 0 0 20px; }
.crumbs a { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: .98rem; border-radius: 100px; padding: 12px 24px; border: 2px solid transparent; cursor: pointer; text-decoration: none; transition: transform .15s ease, background .15s ease, border-color .15s ease; line-height: 1.2; }
.btn:hover { transform: translateY(-1px); }
.btn-y { background: var(--yellow); color: var(--ink); }
.btn-y:hover { background: #FFD21F; }
.btn-gd { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-gd:hover { background: var(--ink); color: var(--soft); }
.btn-sm { padding: 8px 16px; font-size: .88rem; }
.btn-danger { background: #fff; color: #A3261B; border-color: #A3261B; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; text-decoration-color: var(--yellow); text-underline-offset: 3px; cursor: pointer; }
.linkbtn.danger { text-decoration-color: #A3261B; color: #A3261B; }
form.inline { display: inline; }

/* ---------- Forms ---------- */
.stack { display: flex; flex-direction: column; gap: 8px; }
.stack .btn { align-self: flex-start; margin-top: 12px; }
label { font-weight: 600; color: var(--ink); font-size: .92rem; }
input[type=email], input[type=text], input:not([type]), input[type=date], textarea {
  font: inherit; font-size: 1rem; padding: 12px 14px; border: 1.5px solid var(--warm); border-radius: 10px; background: var(--white); color: var(--ink); width: 100%;
}
input:focus, textarea:focus, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-color: var(--ink); }
.check-inline { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.form-card, .auth-card, .panel { background: var(--white); border: 1px solid var(--warm); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.form-h { font-size: 1.15rem; margin: 18px 0 4px; }

/* ---------- Auth ---------- */
body.auth main { display: flex; align-items: center; }
.auth-card { max-width: 520px; margin: 0 auto; padding: 40px; }
.auth-card .page-h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); }
.auth-icon { display: inline-flex; width: 52px; height: 52px; border-radius: 50%; background: var(--ink); color: var(--yellow); align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 8px; }

.code-form { margin: 18px 0 8px; }
.code-input { font-family: 'Fraunces', Georgia, serif !important; font-size: 1.8rem !important; letter-spacing: .4em; text-align: center; padding: 10px 14px !important; }

/* ---------- Flash ---------- */
.flash { border-radius: 10px; padding: 12px 16px; margin: 0 0 20px; background: var(--white); border: 1px solid var(--warm); border-left: 0; font-size: .95rem; box-shadow: inset 4px 0 0 var(--ink); }
.flash-warn { box-shadow: inset 4px 0 0 var(--yellow); background: #FFFBEA; }
.flash ul { margin: 6px 0 0; padding-left: 20px; }
.wrap > .flash { margin-top: 24px; }

/* ---------- Dashboard ---------- */
.hero { margin-bottom: 36px; }
.course-block { background: var(--white); border: 1px solid var(--warm); border-radius: 18px; padding: 28px; box-shadow: var(--shadow); margin-bottom: 28px; }
.course-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; }
.course-head p { margin: 6px 0 0; }
.progress { height: 8px; background: var(--warm); border-radius: 100px; overflow: hidden; }
.progress span { width: 0; display: block; height: 100%; background: var(--yellow); border-radius: 100px; transition: width .4s ease; }
.module-list { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-direction: column; gap: 10px; }
.section-head { margin: 34px 0 0; padding-top: 22px; border-top: 1px solid var(--warm); }
.section-head:first-of-type { border-top: 0; padding-top: 4px; }
.section-h { font-size: 1.35rem; font-weight: 700; margin: 0; }
.section-head p { margin: 4px 0 0; }
.module-list + .soon-list { margin-top: 10px; }
.soon-list { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 8px; }
.soon-list li { display: flex; gap: 14px; align-items: center; padding: 12px 18px; border: 1px dashed var(--warm); border-radius: 12px; color: var(--muted); font-weight: 500; }
.soon-list li > span:nth-child(2) { flex: 1; }
.mod-link { display: flex; gap: 16px; align-items: flex-start; padding: 16px 18px; border: 1px solid var(--warm); border-radius: 12px; text-decoration: none; color: inherit; background: var(--soft); transition: border-color .15s ease, transform .15s ease; }
a.mod-link:hover { border-color: var(--yellow); transform: translateY(-1px); }
.mod-badge { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; background: var(--white); border: 1.5px solid var(--ink); color: var(--ink); }
.mod-badge.done { background: var(--yellow); border-color: var(--yellow); }
.mod-badge.locked { border-color: var(--warm); color: var(--muted); }
.mod-badge.miss { border-color: var(--muted); color: var(--muted); }
.mod-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mod-title { font-family: 'Fraunces', serif; font-weight: 700; font-size: 1.12rem; color: var(--ink); line-height: 1.3; }
.mod-summary { font-size: .93rem; color: var(--text); }
.mod-meta { font-size: .82rem; color: var(--muted); margin-top: 2px; }
.mod-row.locked .mod-link { background: transparent; border-style: dashed; }
.mod-row.locked .mod-title, .mod-row.locked .mod-summary { color: var(--muted); }
.mod-row.locked .mod-title em { background: none; }
.mod-row.done .mod-link { background: var(--white); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 100px; font-size: .82rem; font-weight: 700; background: var(--warm); color: var(--ink); }
.pill-done { background: var(--yellow); }
.pill-warn { background: #FFF1B8; }
.empty { background: var(--white); border: 1px dashed var(--warm); border-radius: var(--radius); padding: 28px; }

.install-card { display: flex; gap: 16px; align-items: center; background: var(--white); border: 1px solid var(--warm); border-radius: var(--radius); padding: 16px 20px; margin: -12px 0 28px; box-shadow: var(--shadow); }
.install-card[hidden] { display: none; }
.install-card img { border-radius: 14px; flex-shrink: 0; }
.install-card > div { flex: 1; }
.install-card p { margin: 0 0 6px; }
.install-h { font-family: 'Fraunces', serif; font-weight: 700; font-size: 1.08rem; color: var(--ink); }
.install-x { align-self: flex-start; }
.btn-offline { margin-left: 8px; }
.btn-offline[disabled] { opacity: .7; cursor: default; transform: none; }
html.is-app .site-header { padding-top: env(safe-area-inset-top); }
html.is-app .site-footer { padding-bottom: calc(22px + env(safe-area-inset-bottom)); }

/* ---------- Module page ---------- */
.module-hero { margin-bottom: 28px; }
.module-hero .btn { margin-top: 8px; }
.lesson-list { list-style: none; padding: 0; margin: 0; background: var(--white); border: 1px solid var(--warm); border-radius: var(--radius); overflow: hidden; }
.lesson-list li + li { border-top: 1px solid var(--warm); }
.lesson-list a { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 18px; text-decoration: none; color: var(--ink); font-weight: 500; }
.lesson-list a:hover { background: var(--soft); }
.lesson-list a > span:nth-child(2) em { font-style: italic; }

/* ---------- Lesson page ---------- */
.lesson-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 48px; align-items: start; }
.lesson-side { position: sticky; top: 24px; background: var(--white); border: 1px solid var(--warm); border-radius: var(--radius); padding: 20px; }
.side-title { font-family: 'Fraunces', serif; font-weight: 700; font-size: 1.08rem; line-height: 1.3; margin: 0 0 12px; }
.side-title a { text-decoration: none; }
.side-list { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.side-list a { display: flex; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 8px; text-decoration: none; color: var(--text); line-height: 1.35; }
.side-list a:hover { background: var(--soft); }
.side-list .current a { background: var(--soft); color: var(--ink); font-weight: 700; }
.side-n { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--warm); display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; flex-shrink: 0; }
.side-list .current .side-n { border-color: var(--ink); }
.side-list .done .side-n { background: var(--yellow); border-color: var(--yellow); }
.lesson { max-width: 720px; min-width: 0; }
.lesson-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--warm); }

/* ---------- Prose ---------- */
.prose { font-size: 1.06rem; line-height: 1.72; color: var(--text); }
.prose > * + * { margin-top: 1.05em; }
.prose p, .prose ul, .prose ol { margin: 0; }
.prose * + p, .prose * + ul, .prose * + ol { margin-top: 1em; }
.prose h2 { font-size: 1.5rem; font-weight: 700; margin: 1.8em 0 .2em; }
.prose h3 { font-size: 1.18rem; font-weight: 700; margin: 1.5em 0 .1em; }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose li::marker { color: #8A7300; }
.prose table { width: 100%; border-collapse: collapse; font-size: .92rem; background: var(--white); border: 1px solid var(--warm); border-radius: 10px; overflow: hidden; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--warm); vertical-align: top; }
.prose th { background: var(--ink); color: var(--soft); font-weight: 700; font-size: .82rem; letter-spacing: .02em; }
.prose tr:last-child td { border-bottom: 0; }
.lesson-figure { margin: 1.6em 0; }
.lesson-figure img { display: block; border: 1px solid var(--warm); border-radius: 12px; background: var(--white); }
.lesson-figure figcaption { font-size: .85rem; color: var(--muted); margin-top: 8px; }

/* Blocks */
.blk-label { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #8A7300; margin: 0 0 6px !important; display: block; }
.blk-callout { background: var(--ink); color: rgba(248, 246, 241, .82); border-radius: var(--radius); padding: 22px 24px; }
.blk-callout .blk-label { color: var(--yellow); }
.blk-callout strong, .blk-callout p:first-of-type { color: var(--soft); }
.blk-callout a { color: var(--soft); }
.blk-reveal { background: var(--white); border: 1px solid var(--warm); border-radius: var(--radius); overflow: hidden; }
.blk-reveal summary { list-style: none; cursor: pointer; padding: 18px 22px; display: flex; flex-direction: column; gap: 4px; }
.blk-reveal summary::-webkit-details-marker { display: none; }
.reveal-q { font-family: 'Fraunces', serif; font-weight: 700; font-size: 1.1rem; color: var(--ink); line-height: 1.35; }
.reveal-cta { font-size: .85rem; font-weight: 700; color: var(--ink); margin-top: 6px; display: inline-flex; align-items: center; gap: 6px; }
.reveal-cta::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--yellow); }
.blk-reveal[open] .reveal-cta { display: none; }
.reveal-a { padding: 0 22px 20px; border-top: 1px dashed var(--warm); padding-top: 14px; }
.reveal-a > * + * { margin-top: .8em; }
.blk-check { background: var(--white); border: 1px solid var(--warm); border-radius: var(--radius); padding: 20px 22px; }
.check-q { font-family: 'Fraunces', serif; font-weight: 700; font-size: 1.1rem; color: var(--ink); line-height: 1.35; }
.check-opts { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.check-opt { display: flex; gap: 10px; align-items: flex-start; text-align: left; font: inherit; font-size: .98rem; padding: 12px 14px; border: 1.5px solid var(--warm); background: var(--soft); border-radius: 10px; cursor: pointer; color: var(--ink); }
.check-opt:hover:not([disabled]) { border-color: var(--ink); }
.check-mark { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--warm); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--white); }
.check-mark svg { opacity: 0; width: 15px; height: 15px; }
.check-opt.is-correct { border-color: var(--ink); background: #FFF6CF; }
.check-opt.is-correct .check-mark { background: var(--yellow); border-color: var(--yellow); }
.check-opt.is-correct .check-mark svg { opacity: 1; }
.check-opt.is-wrong { opacity: .6; text-decoration: line-through; text-decoration-color: var(--muted); }
.check-opt[disabled] { cursor: default; }
.check-explain { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--warm); font-size: .97rem; }
.check-verdict { font-weight: 700; color: var(--ink); margin: 0 0 4px !important; }
.blk-steps { list-style: none; padding: 0 !important; margin: 1.4em 0; counter-reset: s; }
.blk-steps li { display: flex; gap: 16px; align-items: flex-start; position: relative; padding-bottom: 18px; margin: 0 !important; }
.blk-steps li:not(:last-child)::before { content: ''; position: absolute; left: 17px; top: 36px; bottom: 0; width: 2px; background: var(--warm); }
.step-n { flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--yellow); display: inline-flex; align-items: center; justify-content: center; font-family: 'Fraunces', serif; font-weight: 700; position: relative; z-index: 1; }
.blk-steps li > div { padding-top: 5px; }
.blk-cards { display: grid; gap: 14px; margin: 1.4em 0; }
.cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.blk-cards .card { background: var(--white); border: 1px solid var(--warm); border-radius: 12px; padding: 18px; font-size: .95rem; }
.blk-cards .card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.blk-cards .card > * + * { margin-top: .6em; }
.blk-cards .card ul { padding-left: 1.1em; }
.blk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 1.4em 0; }
.stat { background: var(--white); border: 1px solid var(--warm); border-radius: 12px; padding: 18px; }
.stat p { margin: 0 !important; }
.stat-v { font-family: 'Fraunces', serif; font-weight: 900; font-size: 2.1rem; color: var(--ink); line-height: 1.05; }
.stat-l { font-size: .92rem; color: var(--text); margin-top: 6px !important; }
.stat-s { font-size: .76rem; color: var(--muted); margin-top: 8px !important; }
.blk-quote { margin: 1.4em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--yellow); font-family: 'Fraunces', serif; font-style: italic; font-weight: 300; font-size: 1.3rem; line-height: 1.45; color: var(--ink); }
.blk-quote cite { display: block; font-family: 'DM Sans', sans-serif; font-style: normal; font-weight: 600; font-size: .85rem; color: var(--muted); margin-top: 8px; }
.blk-sources { font-size: .86rem; color: var(--muted); border-top: 1px solid var(--warm); padding-top: 12px; margin-top: 2em !important; }
.blk-sources summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.blk-sources ul { margin-top: 8px; }
.blk-sources a { color: var(--muted); }

.blk-task { background: var(--white); border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 22px 24px; box-shadow: 6px 6px 0 var(--yellow); }
.blk-task .task-h { font-size: 1.2rem; margin: 0 0 8px; }
.blk-task > * + * { margin-top: .8em; }
.blk-task ol { padding-left: 1.3em; }

/* ---------- Quiz ---------- */
.quiz { display: flex; flex-direction: column; gap: 18px; margin-top: 24px; }
.quiz .btn { align-self: flex-start; }
.quiz-q { border: 1px solid var(--warm); background: var(--white); border-radius: var(--radius); padding: 20px 22px 16px; margin: 0; }
.quiz-q legend { font-family: 'Fraunces', serif; font-weight: 700; font-size: 1.12rem; color: var(--ink); line-height: 1.35; padding: 0; float: left; width: 100%; display: flex; gap: 12px; margin-bottom: 12px; }
.q-n { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--yellow); display: inline-flex; align-items: center; justify-content: center; font-size: .85rem; font-family: 'DM Sans', sans-serif; }
.quiz-opt { clear: both; display: flex; gap: 12px; align-items: flex-start; padding: 11px 14px; border: 1.5px solid var(--warm); border-radius: 10px; margin-top: 8px; font-weight: 500; cursor: pointer; background: var(--soft); }
.quiz-opt:hover { border-color: var(--ink); }
.quiz-opt input { margin-top: 5px; accent-color: var(--ink); width: 18px; height: 18px; flex-shrink: 0; }
.quiz-opt:has(input:checked) { border-color: var(--ink); background: #FFF6CF; }
.result { background: var(--ink); color: rgba(248, 246, 241, .78); border-radius: 18px; padding: 32px; margin-bottom: 28px; }
.result .label { color: var(--yellow); }
.result .page-h1 { color: var(--soft); }
.result .page-h1 em { color: var(--yellow); background: none; }
.result .lede { color: rgba(248, 246, 241, .8); }
.result .btn-gd { color: var(--soft); border-color: rgba(248, 246, 241, .5); }
.result .btn-gd:hover { background: var(--soft); color: var(--ink); }
.review { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.review-q { background: var(--white); border: 1px solid var(--warm); border-radius: var(--radius); padding: 18px 22px; }
.review-head { display: flex; gap: 12px; align-items: flex-start; font-family: 'Fraunces', serif; font-weight: 700; color: var(--ink); font-size: 1.05rem; margin: 0 0 10px; line-height: 1.35; }
.review-opts { list-style: none; padding: 0 0 0 46px; margin: 0; font-size: .95rem; }
.review-opts li { padding: 4px 0; color: var(--muted); }
.review-opts .is-answer { color: var(--ink); font-weight: 700; }
.review-opts .is-picked { color: var(--ink); text-decoration: line-through; text-decoration-color: var(--muted); }
.tag { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 100px; background: var(--yellow); color: var(--ink); margin-left: 6px; text-decoration: none; vertical-align: 1px; }
.tag-miss { background: var(--warm); }
.review-explain { margin: 10px 0 0 46px; padding: 10px 14px; background: var(--soft); border-radius: 10px; font-size: .93rem; }

/* ---------- Admin ---------- */
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.panel { margin-bottom: 24px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.panel-h { font-size: 1.3rem; font-weight: 700; margin: 0 0 12px; }
.panel-head .panel-h { margin: 0; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; background: var(--white); }
.table th { text-align: left; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1.5px solid var(--ink); }
.table td { padding: 12px; border-bottom: 1px solid var(--warm); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.td-progress { min-width: 140px; }
.td-progress .progress { display: inline-block; width: 90px; vertical-align: middle; margin-right: 8px; }
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-tile { background: var(--white); border: 1px solid var(--warm); border-radius: var(--radius); padding: 18px 20px; }
.stat-tile p { margin: 0; }
.stat-tile .stat-v { font-size: 2.2rem; }
.stat-tile .stat-l { color: var(--muted); font-size: .85rem; }
.add-members { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--warm); }
.access-grid { display: flex; flex-direction: column; gap: 12px; }
.access-course { border: 1px solid var(--warm); border-radius: 12px; padding: 14px 18px; background: var(--soft); }
.access-course legend { padding: 0 6px; }
.access-mod { display: flex; gap: 10px; align-items: center; font-weight: 500; padding: 4px 0; }
.access-course[data-all-on] .access-mod { opacity: .5; }
.order-list { margin: 12px 0 0; padding: 0; list-style: none; }
.order-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--warm); }
.order-btns { display: flex; gap: 6px; flex-shrink: 0; }
.order-btns .btn[disabled] { opacity: .3; cursor: default; transform: none; }
.danger-zone { border-color: #E9C9C5; }
.outbox-item { background: var(--white); border: 1px solid var(--warm); border-radius: 12px; padding: 14px 18px; margin-bottom: 12px; }
.outbox-item summary { cursor: pointer; }
.outbox-frame { width: 100%; height: 520px; border: 1px solid var(--warm); border-radius: 10px; margin-top: 12px; background: #F8F6F1; }
.outbox-text { white-space: pre-wrap; font-size: .8rem; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .lesson-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .lesson-side { position: static; order: 2; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  main { padding-top: 24px; }
  .wrap, .wrap-wide { padding-left: 16px; padding-right: 16px; }
  .brand { font-size: 1.2rem; gap: 8px; }
  .brand-tag { padding-left: 8px; }
  .topnav { gap: 14px; font-size: .85rem; }
  .topnav a[href="/"] { display: none; }
  .topnav { white-space: nowrap; }
  .course-block, .form-card, .auth-card, .panel { padding: 20px; }
  .cards-2, .cards-3, .cards-4 { grid-template-columns: 1fr; }
  .lesson-nav .btn { padding: 11px 16px; font-size: .92rem; }
  .table { display: block; overflow-x: auto; white-space: nowrap; }
  .review-opts, .review-explain { padding-left: 0; margin-left: 0; }
  .review-opts { padding-left: 0; }
}

/* ---------- The door (NPP Start signature, from the start.npp.agency homepage) ---------- */
.door { position: relative; width: 120px; height: 172px; flex-shrink: 0; }
.door-frame { position: absolute; inset: 0; border: 3px solid rgba(255, 255, 255, .22); border-radius: 60px 60px 6px 6px; background: rgba(255, 255, 255, .03); overflow: hidden; }
.door-light { position: absolute; top: 4px; left: calc(50% - 1px); right: 4px; bottom: 4px; border-radius: 4px 56px 4px 4px; background: linear-gradient(135deg, #fffbe6 0%, var(--yellow) 50%, #fff3aa 100%); opacity: .95; }
.door-panel { position: absolute; top: 4px; left: 4px; width: calc(50% - 4px); bottom: 4px; border-radius: 56px 4px 4px 4px; background: rgba(8, 8, 8, .93); transform-origin: left center; transform: perspective(500px) rotateY(-22deg); transition: transform .9s cubic-bezier(.4, 0, .2, 1); box-shadow: 6px 0 30px rgba(0, 0, 0, .6); }
.door:hover .door-panel, .door.is-open .door-panel { transform: perspective(500px) rotateY(-60deg); }
.door-handle { position: absolute; right: 9px; top: 52%; width: 7px; height: 7px; background: var(--yellow); border-radius: 50%; box-shadow: 0 0 0 2px rgba(8, 8, 8, .9); }
.door-glow { position: absolute; bottom: -36px; left: 50%; transform: translateX(-50%); width: 180px; height: 120px; background: radial-gradient(ellipse, rgba(245, 194, 0, .22) 0%, transparent 70%); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .door-panel { transition: none; } }

/* Dark hero band: where the yellow accent word sits on ink, as on the website */
.band { background: linear-gradient(160deg, #1c1c1c 0%, #0d0d0d 60%, #1a1208 100%); color: rgba(248, 246, 241, .72); border-radius: 22px; padding: 40px; margin-bottom: 32px; display: flex; gap: 40px; align-items: center; justify-content: space-between; overflow: hidden; }
.band .label { color: var(--yellow); }
.band .page-h1 { color: var(--soft); }
.band .page-h1 em { color: var(--yellow); background: none; }
.band .lede { color: rgba(248, 246, 241, .74); margin: 0; }
.band .lede strong { color: var(--soft); }
.band-text { min-width: 0; }

/* Sign-in page: dark, door opening into light */
body.auth { background: #111111 !important; }
body.auth main { padding-top: 56px; }
.auth-wrap { display: grid; grid-template-columns: auto minmax(0, 480px); gap: 64px; align-items: center; justify-content: center; width: 100%; }
.auth-wrap .door { width: 170px; height: 245px; }
.auth-wrap .door-frame { border-radius: 85px 85px 8px 8px; }
.auth-wrap .door-light { border-radius: 4px 80px 4px 4px; }
.auth-wrap .door-panel { border-radius: 80px 4px 4px 4px; }
.auth-wrap .door-handle { right: 12px; width: 9px; height: 9px; }
.auth-wrap .door-glow { width: 240px; height: 170px; bottom: -50px; }
body.auth .site-footer { background: #0b0b0b; }
@media (max-width: 760px) {
  .auth-wrap { grid-template-columns: 1fr; gap: 28px; justify-items: center; }
  .auth-wrap .door { width: 96px; height: 138px; }
  .auth-wrap .door-frame { border-radius: 48px 48px 6px 6px; }
  .auth-wrap .door-light { border-radius: 4px 44px 4px 4px; }
  .auth-wrap .door-panel { border-radius: 44px 4px 4px 4px; }
  .band { padding: 26px 22px; flex-direction: column; align-items: flex-start; gap: 20px; }
  .band .door { display: none; }
}

/* ---------- Pathway ---------- */
.pathway .course-head .label { margin-bottom: 4px; }
.pathway .course-head p { max-width: 62ch; }
.course-cards { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.course-card a { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border: 1px solid var(--warm); border-radius: 12px; background: var(--soft); text-decoration: none; color: inherit; height: 100%; transition: border-color .15s ease, transform .15s ease; }
.course-card a:hover { border-color: var(--yellow); transform: translateY(-1px); }
.course-card.done a { background: var(--white); }
.course-card .progress { margin-top: 8px; height: 6px; }
.course-card .mod-text { flex: 1; }
.pathway-done { margin-top: 16px; }
.next-course { margin-top: 8px; font-weight: 500; }
.access-pathway { background: #FFFBEA; border-color: var(--yellow); }
.sec-h2 a { text-decoration: none; }
@media (max-width: 640px) { .course-cards { grid-template-columns: 1fr; } }

/* Progress widths as classes: the Content-Security-Policy blocks inline style attributes. */
.progress span.pw-0 { width: 0%; }
.progress span.pw-2 { width: 2%; }
.progress span.pw-4 { width: 4%; }
.progress span.pw-6 { width: 6%; }
.progress span.pw-8 { width: 8%; }
.progress span.pw-10 { width: 10%; }
.progress span.pw-12 { width: 12%; }
.progress span.pw-14 { width: 14%; }
.progress span.pw-16 { width: 16%; }
.progress span.pw-18 { width: 18%; }
.progress span.pw-20 { width: 20%; }
.progress span.pw-22 { width: 22%; }
.progress span.pw-24 { width: 24%; }
.progress span.pw-26 { width: 26%; }
.progress span.pw-28 { width: 28%; }
.progress span.pw-30 { width: 30%; }
.progress span.pw-32 { width: 32%; }
.progress span.pw-34 { width: 34%; }
.progress span.pw-36 { width: 36%; }
.progress span.pw-38 { width: 38%; }
.progress span.pw-40 { width: 40%; }
.progress span.pw-42 { width: 42%; }
.progress span.pw-44 { width: 44%; }
.progress span.pw-46 { width: 46%; }
.progress span.pw-48 { width: 48%; }
.progress span.pw-50 { width: 50%; }
.progress span.pw-52 { width: 52%; }
.progress span.pw-54 { width: 54%; }
.progress span.pw-56 { width: 56%; }
.progress span.pw-58 { width: 58%; }
.progress span.pw-60 { width: 60%; }
.progress span.pw-62 { width: 62%; }
.progress span.pw-64 { width: 64%; }
.progress span.pw-66 { width: 66%; }
.progress span.pw-68 { width: 68%; }
.progress span.pw-70 { width: 70%; }
.progress span.pw-72 { width: 72%; }
.progress span.pw-74 { width: 74%; }
.progress span.pw-76 { width: 76%; }
.progress span.pw-78 { width: 78%; }
.progress span.pw-80 { width: 80%; }
.progress span.pw-82 { width: 82%; }
.progress span.pw-84 { width: 84%; }
.progress span.pw-86 { width: 86%; }
.progress span.pw-88 { width: 88%; }
.progress span.pw-90 { width: 90%; }
.progress span.pw-92 { width: 92%; }
.progress span.pw-94 { width: 94%; }
.progress span.pw-96 { width: 96%; }
.progress span.pw-98 { width: 98%; }
.progress span.pw-100 { width: 100%; }

/* ---------- Do: boards and tickets ---------- */
select { font: inherit; font-size: .95rem; padding: 9px 12px; border: 1.5px solid var(--warm); border-radius: 10px; background: var(--white); color: var(--ink); max-width: 100%; }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 100px; background: var(--warm); font-size: .75rem; font-weight: 700; vertical-align: 2px; margin-left: 4px; }
.pri { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-right: 8px; vertical-align: 1px; }
.pri-red { background: #D93B2B; }
.pri-orange { background: #F08C00; }
.pri-green { background: #2E9E5B; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 600; padding: 2px 8px; border-radius: 100px; background: var(--soft); color: var(--text); white-space: nowrap; }
.chip svg, .due svg { width: 13px; height: 13px; }
.chip-warn { background: #FFF1C2; color: #6B5300; }
.due { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 600; padding: 2px 8px; border-radius: 100px; background: var(--soft); white-space: nowrap; }
.due-overdue { background: #FBE3E0; color: #A3261B; }
.due-today, .due-tomorrow { background: #FFF1C2; color: #6B5300; }
.avatars { display: inline-flex; margin-left: auto; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--yellow); font-size: .66rem; font-weight: 700; flex-shrink: 0; }
.avatars .avatar + .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--white); }

.queue-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 8px; }
.queue-grid .panel { padding: 20px; }
.qlist { list-style: none; margin: 0; padding: 0; }
.qlist li { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--warm); }
.qlist li:last-child { border-bottom: 0; }
.qlist a { font-weight: 600; color: var(--ink); text-decoration: none; }
.seg { display: inline-flex; border: 1.5px solid var(--warm); border-radius: 100px; overflow: hidden; }
.seg a { padding: 6px 14px; font-size: .84rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.seg a.on { background: var(--ink); color: var(--soft); }
.group-h { font-size: 1rem; margin: 18px 0 8px; }
.tlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.board-tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.board-tile { display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: 12px; background: var(--soft); border: 1.5px solid var(--warm); text-decoration: none; color: var(--ink); transition: border-color .15s ease, transform .15s ease; }
.board-tile:hover { border-color: var(--ink); transform: translateY(-1px); }
.board-internal { background: var(--white); border-style: dashed; }
.board-kind { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #8A7300; }
.board-name { font-weight: 700; font-size: 1.05rem; }

/* Ticket cards */
.tcard { list-style: none; background: var(--white); border: 1px solid var(--warm); border-left: 4px solid var(--warm); border-radius: 10px; box-shadow: 0 1px 2px rgba(17, 17, 17, .05); }
.tcard-red { border-left-color: #D93B2B; }
.tcard-orange { border-left-color: #F08C00; }
.tcard-green { border-left-color: #2E9E5B; }
.tcard-proposed { opacity: .65; border-style: dashed; }
.tcard.is-draggable { cursor: grab; }
.tcard.is-dragging { opacity: .4; }
.tcard-link { display: flex; flex-direction: column; gap: 8px; padding: 12px 12px 10px; color: var(--ink); text-decoration: none; }
.tcard-board { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.tcard-title { display: flex; align-items: baseline; font-weight: 600; font-size: .95rem; line-height: 1.35; }
.tcard-title .pri { display: none; }
.tlist .tcard-title .pri { display: inline-block; }
.tcard-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* Board */
body.do-board .wrap-wide { max-width: none; }
.kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 16px; align-items: flex-start; scroll-snap-type: x proximity; }
.kcol { flex: 0 0 280px; background: var(--warm); border-radius: 14px; padding: 10px; scroll-snap-align: start; border: 2px solid transparent; transition: border-color .12s ease; }
.kcol.is-over { border-color: var(--ink); }
.kcol-head { display: flex; align-items: center; gap: 6px; padding: 4px 4px 10px; }
.kcol-head h2 { font-size: .92rem; margin: 0; }
.kcol-head .count { background: var(--white); }
.kcol-head .lock svg { width: 15px; height: 15px; color: var(--muted); }
.kcol-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.kadd { margin-top: 8px; }
.kadd summary { cursor: pointer; font-size: .86rem; font-weight: 600; color: var(--muted); padding: 6px 4px; list-style: none; }
.kadd summary::-webkit-details-marker { display: none; }
.kadd summary:hover { color: var(--ink); }
.kadd form { background: var(--white); padding: 10px; border-radius: 10px; }
.kadd input { padding: 9px 11px; }
.kadd .btn { margin-top: 4px; }

/* Board settings */
.col-edit { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; width: 100%; }
.col-edit input:not([type=checkbox]) { flex: 1 1 180px; width: auto; padding: 8px 11px; }
.add-col { margin-top: 14px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }

/* Ticket page */
.ticket-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.ticket-main { background: var(--white); border: 1px solid var(--warm); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); min-width: 0; }
.ticket-head { display: flex; align-items: baseline; gap: 4px; }
.ticket-head .pri { width: 14px; height: 14px; }
.ticket-h1 { font-size: 1.7rem; line-height: 1.2; margin: 0 0 14px; }
.edit-box { margin: 0 0 18px; border: 1.5px dashed var(--warm); border-radius: 12px; padding: 10px 14px; }
.edit-box summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
.edit-box form { margin-top: 10px; }
.ticket-desc { font-size: 1rem; overflow-wrap: anywhere; }
.ticket-desc > * + *, .comments .prose > * + * { margin-top: .7em; }
.do-img { max-width: 100%; max-height: 420px; border-radius: 8px; border: 1px solid var(--warm); display: block; }
.ticket-sec { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--warm); }
.sec-h { font-size: 1.1rem; margin: 0 0 12px; }
.checklist { list-style: none; margin: 0 0 10px; padding: 0; }
.checklist li { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.checklist li > span { flex: 1; }
.checklist li.done > span { text-decoration: line-through; color: var(--muted); }
.tick { width: 24px; height: 24px; border-radius: 6px; border: 2px solid var(--ink); background: var(--white); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.tick svg { width: 16px; height: 16px; }
.done .tick { background: var(--yellow); }
.tick[disabled] { cursor: default; opacity: .6; }
.inline-add { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-add input { flex: 1 1 200px; width: auto; padding: 9px 12px; }
.comments { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.comment-by { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; }
.comments .prose { font-size: .98rem; padding-left: 32px; overflow-wrap: anywhere; }
.add-img { align-self: flex-start; }
textarea.is-drop { border-color: var(--ink); background: #FFFBEA; }
.ticket-side { display: flex; flex-direction: column; gap: 12px; }
.side-block { background: var(--white); border: 1px solid var(--warm); border-radius: 12px; padding: 14px 16px; }
.side-block p { margin: 0; }
.side-label { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px !important; }
.side-form { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
.side-form select, .side-form input { flex: 1 1 140px; width: auto; padding: 8px 10px; }
.side-details { margin-top: 8px; }
.side-details summary { cursor: pointer; }
.side-details form { margin-top: 8px; }
.request-box { margin-top: 10px; padding: 10px; border-radius: 10px; background: #FFF8DC; }
.request-box .btn-row { margin-top: 8px; }
.people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.people li { display: flex; align-items: center; gap: 8px; }
.history summary { cursor: pointer; }
.hist { list-style: none; margin: 8px 0 0; padding: 0; font-size: .82rem; display: flex; flex-direction: column; gap: 6px; }
.approve-row { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.approve-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.approve-form input { width: auto; flex: 1 1 200px; padding: 8px 11px; }
.doer-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
@media (max-width: 860px) {
  .ticket-layout { grid-template-columns: 1fr; }
  .ticket-main { padding: 20px; }
  .kcol { flex-basis: 82vw; }
}
@media (max-width: 520px) {
  .brand-tag { display: none; }
  .topnav { gap: 12px; }
}
.approve-form .check-inline { white-space: nowrap; }

/* ---------- Do: timer and time ---------- */
.timerbar { background: var(--yellow); color: var(--ink); position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 8px rgba(17, 17, 17, .12); }
.timerbar.is-break { background: #CFE8D8; }
.timerbar-idle { background: #FFF1C2; position: static; box-shadow: none; }
.timerbar-inner { display: flex; align-items: center; gap: 14px; min-height: 48px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; font-size: .92rem; }
.timerbar-idle .timerbar-inner a { font-weight: 700; color: var(--ink); }
.tb-phase { font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; background: var(--ink); color: var(--yellow); padding: 3px 9px; border-radius: 100px; }
.is-break .tb-phase { color: #CFE8D8; }
.tb-clock { font-family: 'Fraunces', serif; font-weight: 800; font-size: 1.35rem; font-variant-numeric: tabular-nums; min-width: 3.2em; }
.tb-task { font-weight: 700; color: var(--ink); text-decoration: none; flex: 1 1 200px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-board { font-weight: 500; opacity: .7; }
.tb-total { font-size: .82rem; opacity: .75; }
.tb-stop { background: var(--ink); color: var(--soft); }
.live-dot, .idle-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #2E9E5B; vertical-align: 1px; box-shadow: 0 0 0 3px rgba(46, 158, 91, .2); }
.idle-dot { background: var(--warm); box-shadow: none; }
.now-line { margin: 0 0 6px; }
.timer-start .rhythm { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; font-size: .9rem; cursor: pointer; }
.timer-start .rhythm input { margin-top: 4px; }
.timer-start .btn { margin-top: 4px; }
.training-link { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; color: var(--ink); }
.training-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.push { margin-left: auto; }
.nowrap { white-space: nowrap; }
.week-table td, .week-table th { padding: 9px 10px; }
.week-table tr.off td { color: var(--muted); background: var(--soft); }
.week-table tr.is-today td { box-shadow: inset 0 -2px 0 var(--yellow); }
.week-table tfoot td { border-top: 1.5px solid var(--ink); border-bottom: 0; }
.week-table .short { color: #A3261B; }
.week-nav { display: flex; justify-content: space-between; margin-top: 10px; }
.sessions td { vertical-align: top; }
.void summary { list-style: none; cursor: pointer; }
.void form { margin-top: 6px; }
.add-time { margin-top: 14px; }
.add-time summary { cursor: pointer; }
.add-time form { margin-top: 10px; max-width: 560px; }
.date-pair { display: flex; gap: 10px; flex-wrap: wrap; }
.date-pair label { display: flex; flex-direction: column; gap: 4px; flex: 1 1 140px; }
input[type=time] { font: inherit; font-size: 1rem; padding: 12px 14px; border: 1.5px solid var(--warm); border-radius: 10px; background: var(--white); color: var(--ink); width: 100%; }
.absences { list-style: none; margin: 0 0 16px; padding: 0; }
.absences li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--warm); }
.absences li:last-child { border-bottom: 0; }
.absences .pending { color: #6B5300; font-weight: 600; }
.ab-declined, .ab-cancelled { opacity: .6; }
.ab-forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.ab-form { padding: 16px 18px; box-shadow: none; }
.ab-form summary { cursor: pointer; }
.ab-form form { margin-top: 12px; }
.panel-alert { border-color: var(--yellow); box-shadow: inset 4px 0 0 var(--yellow), var(--shadow); }
.doer-form label { display: flex; flex-direction: column; gap: 4px; }
.doer-form { align-items: flex-end; }
@media (max-width: 640px) {
  .timerbar-inner { gap: 4px 12px; }
  .timerbar-inner form { margin-left: auto; }
  .tb-total { display: none; }
  .tb-task { order: 5; flex-basis: 100%; font-size: .86rem; }
}

/* ---------- Do: notifications and mentions ---------- */
.bell { position: relative; display: inline-flex; align-items: center; }
.bell svg { width: 21px; height: 21px; }
.bell-n { position: absolute; top: -7px; right: -9px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 100px; background: var(--yellow); color: var(--ink); font-size: .68rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.notices { list-style: none; margin: 0; padding: 0; }
.notices li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; padding: 12px 0; border-bottom: 1px solid var(--warm); }
.notices li:last-child { border-bottom: 0; }
.notices li > a, .notices li > span:nth-child(2) { flex: 1 1 260px; color: var(--ink); }
.notices li.unread { background: #FFFBEA; margin: 0 -12px; padding-left: 12px; padding-right: 12px; }
.notices li.unread > a { font-weight: 700; }
.notices .kind-sick .chip, .notices .kind-mention .chip { background: #FFF1C2; color: #6B5300; }
.mention { background: #FFF1C2; color: #6B5300; font-weight: 700; padding: 0 3px; border-radius: 4px; }
.mention-box { list-style: none; margin: -4px 0 0; padding: 4px; background: var(--white); border: 1.5px solid var(--ink); border-radius: 10px; max-width: 360px; box-shadow: var(--shadow); }
.mention-box li { padding: 7px 10px; border-radius: 7px; cursor: pointer; font-size: .9rem; }
.mention-box li span { color: var(--muted); }
.mention-box li.on { background: var(--yellow); }
.mention-box li.on span { color: var(--ink); }
.comments li:target { background: #FFFBEA; border-radius: 10px; box-shadow: 0 0 0 8px #FFFBEA; }
.send-msg { max-width: 640px; margin-bottom: 8px; }

/* ---------- Do: client users ---------- */
.clist { list-style: none; margin: 0; padding: 0; }
.crow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--warm); }
.crow:last-child { border-bottom: 0; }
.crow > a, .crow > span:first-child { flex: 1 1 240px; font-weight: 600; color: var(--ink); text-decoration: none; display: flex; align-items: baseline; }
.crow > a:hover { text-decoration: underline; text-decoration-color: var(--yellow); }
.month-pick { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.client-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--ink); color: var(--soft); border-radius: var(--radius); padding: 18px 22px; margin: 0 0 24px; text-decoration: none; }
.client-card strong { color: var(--yellow); font-size: 1.05rem; }
.client-card svg { width: 24px; height: 24px; flex-shrink: 0; }
.decide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.decide-grid .form-card { padding: 18px; box-shadow: none; display: flex; flex-direction: column; gap: 6px; }
.decide-grid p { margin: 0; }
.decide-grid .btn { align-self: flex-start; margin-top: 8px; }
.chip-client { background: var(--ink); color: var(--yellow); }
.chip-shared { background: #E3F1E8; color: #1E6B3E; }
.share-box { margin-top: 4px; }
.client-list li { flex-wrap: wrap; }
.terms h2 { font-size: 1.15rem; margin: 1.2em 0 .4em; }
.terms ul { padding-left: 1.2em; }
.ticket-solo { grid-template-columns: minmax(0, 860px); }
.inline-add .check-inline { white-space: nowrap; flex: 0 0 auto; }

/* ---------- Brands: npp·agency and Do client users ---------- */
.logo-agency { font-family: 'Fraunces', serif; font-weight: 700; font-size: .93em; }
.do-logo { display: inline-flex; align-items: center; font-family: 'Fraunces', serif; font-weight: 900; line-height: 1; font-size: 1.15em; }
.do-logo-d { letter-spacing: -.02em; }
.do-logo-o { display: inline-block; background: var(--yellow); border-radius: 50%; width: .75em; height: .75em; margin-left: .05em; flex-shrink: 0; }
.board-brand { margin-left: 6px; vertical-align: 2px; }
.brand-chip { display: inline-flex; align-items: center; gap: 4px; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 100px; background: var(--ink); color: var(--yellow); }
.brand-chip-agency { background: var(--yellow); color: var(--ink); }

/* ---------- Do: reports and task types ---------- */
.report-tabs { margin: 0 0 18px; max-width: 100%; overflow-x: auto; }
.report-tabs a { white-space: nowrap; }
.type-block + .type-block { margin-top: 18px; padding-top: 6px; border-top: 1px solid var(--warm); }
.kadd select { width: 100%; }
.short { color: #A3261B; }
.cron-url { font: inherit; font-size: .82rem; width: 100%; padding: 9px 11px; border: 1.5px solid var(--warm); border-radius: 8px; background: var(--soft); }
.cron-panel summary { cursor: pointer; }
.doer-form label.check-inline { flex-direction: row; align-items: center; flex-basis: 100%; gap: 10px; font-weight: 500; }
.doer-form label.check-inline input { width: auto; flex-shrink: 0; }

/* Phones: never wider than the screen. Dropdowns sized to their longest option, long links
   and wide tables used to push pages sideways, so iOS loaded them zoomed out. */
@media (max-width: 860px) {
  .ticket-layout { grid-template-columns: minmax(0, 1fr); }
  .ticket-side, .ticket-main { min-width: 0; }
}
select { min-width: 0; text-overflow: ellipsis; }
.side-form select, .side-form input, .approve-form select, .doer-form select { min-width: 0; max-width: 100%; }
.prose, .comments .prose, .ticket-desc { overflow-wrap: anywhere; }
/* iPhone zooms in (and stays zoomed) when you tap a form field under 16px. */
@media (max-width: 860px) {
  input, select, textarea { font-size: 16px !important; }
}
.tb-wake { background: none; border: 0; font-size: 1.1rem; line-height: 1; padding: 4px; cursor: pointer; border-radius: 8px; }
.tb-wake.is-off { opacity: .35; filter: grayscale(1); }
@media (max-width: 640px) { .tb-wake { order: 4; } }
.tb-skip { background: var(--white); color: var(--ink); border-color: var(--ink); }
@media (max-width: 640px) { .tb-skip { order: 6; } }
[hidden] { display: none !important; }
