/* Classfern – Lesson Planner: calm "paper and pencil" look. Teal ink, pencil-yellow highlights, warm paper background. */
:root {
  --bg: #f7f5ef; --surface: #ffffff; --surface-2: #f1ede3; --ink: #1f2a37; --muted: #566170; --line: #e0dacb; --line-2: #cfc7b4;
  --brand: #0e7c6b; --brand-2: #0a6656; --brand-soft: #e3f2ee; --brand-ink: #ffffff; --accent: #f4b63f; --accent-soft: #fdf1d3; --coral: #c6492b;
  --warn-bg: #fff6df; --warn-line: #efd28a; --ok: #1b8a4b;
  --radius: 14px; --shadow: 0 1px 0 rgba(31, 42, 55, .04), 0 10px 28px -18px rgba(31, 42, 55, .35);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --head: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11161a; --surface: #182026; --surface-2: #1f2930; --ink: #e8edf0; --muted: #a2adb6; --line: #2b3741; --line-2: #3a4853;
    --brand: #45c9b1; --brand-2: #6fd8c4; --brand-soft: #173a35; --brand-ink: #062019; --accent: #f4b63f; --accent-soft: #3a3120; --coral: #ff8a6b;
    --warn-bg: #2f2918; --warn-line: #6a5826; --ok: #5bd28f; --shadow: 0 1px 0 rgba(0, 0, 0, .35); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11161a; --surface: #182026; --surface-2: #1f2930; --ink: #e8edf0; --muted: #a2adb6; --line: #2b3741; --line-2: #3a4853;
  --brand: #45c9b1; --brand-2: #6fd8c4; --brand-soft: #173a35; --brand-ink: #062019; --accent: #f4b63f; --accent-soft: #3a3120; --coral: #ff8a6b;
  --warn-bg: #2f2918; --warn-line: #6a5826; --ok: #5bd28f; --shadow: 0 1px 0 rgba(0, 0, 0, .35); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--font); overflow-wrap: break-word; }
[hidden] { display: none !important; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
img, svg, canvas { max-width: 100%; }
h1, h2, h3 { font-family: var(--head); line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.45rem); margin: .2em 0 .25em; }
h2 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.65rem); margin: 1.8em 0 .5em; }
h3 { font-size: 1.15rem; margin: 1.3em 0 .4em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
body.wide main .wrap { max-width: 1600px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: 10px 14px; z-index: 60; }
.skip:focus { left: 8px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header ---------- */
.site-head { background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.head-in { display: flex; align-items: center; gap: 10px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; margin-right: auto; padding: 6px 0; }
.logo svg { width: 36px; height: 36px; flex: none; }
.logo b { font-family: var(--head); font-size: 1.22rem; letter-spacing: -.01em; display: block; line-height: 1.1; }
.logo small { display: block; color: var(--muted); font-size: .78rem; line-height: 1.2; }
.nav { display: flex; gap: 2px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 10px 12px; border-radius: 10px; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover, .nav a[aria-current] { background: var(--brand-soft); color: var(--brand-2); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; font-weight: 600; font-size: .95rem; }
.icon-btn:hover { border-color: var(--line-2); }
.icon-btn svg { width: 20px; height: 20px; flex: none; }
.theme-btn { padding: 0; }
.theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-btn .sun { display: none; } :root:not([data-theme="light"]) .theme-btn .moon { display: block; } }
.menu { position: relative; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { border-color: var(--brand); }
.menu-panel { position: absolute; right: 0; top: calc(100% + 8px); width: min(94vw, 860px); max-height: 80vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 24px 50px -24px rgba(0,0,0,.4); padding: 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px 22px; }
.menu-panel h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 4px; font-family: var(--font); }
.menu-panel h2 a { color: inherit; text-decoration: none; }
.menu-panel ul { list-style: none; margin: 0; padding: 0; }
.menu-panel li a { display: block; padding: 5px 0; color: var(--ink); text-decoration: none; font-size: .95rem; }
.menu-panel li a:hover { color: var(--brand); }
@media (max-width: 900px) { .nav { display: none; } .logo small { display: none; } }
@media (max-width: 380px) { .logo b { font-size: 1.05rem; } .menu-label { display: none; } }

/* ---------- page ---------- */
main { padding: 14px 0 40px; min-height: 60vh; }
.crumbs { font-size: .88rem; color: var(--muted); margin: 6px 0 0; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.crumbs li + li::before { content: "›"; margin-right: 4px; color: var(--line-2); }
.crumbs a { color: var(--muted); }
.lead { font-size: 1.12rem; color: var(--muted); margin: 0 0 16px; max-width: 70ch; }
.prose { max-width: 74ch; }
.prose p, .prose li { max-width: 74ch; }
.prose li + li { margin-top: 4px; }
.quote { background: var(--surface); border-left: 4px solid var(--brand); border-radius: 0 12px 12px 0; padding: 12px 16px; margin: 16px 0; max-width: 74ch; }
.quote p { margin: 0; }
.updated { color: var(--muted); font-size: .9rem; }
.summary { background: var(--brand-soft); border-radius: var(--radius); padding: 6px 18px 10px; margin: 14px 0 20px; }
.summary h2 { margin-top: .7em; font-size: 1.15rem; }
.table-wrap { overflow-x: auto; margin: 12px 0; }
table.data { border-collapse: collapse; width: 100%; font-size: .95rem; background: var(--surface); }
table.data th, table.data td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
table.data th { background: var(--surface-2); }
code { font-size: .9em; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.note { font-size: .92rem; color: var(--muted); }
.license { font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; margin-top: 24px; max-width: 74ch; }

/* buttons */
.btn { font: inherit; font-weight: 650; font-size: .98rem; border-radius: 12px; padding: 10px 16px; min-height: 44px; border: 1px solid var(--brand); cursor: pointer; background: var(--brand); color: var(--brand-ink); line-height: 1.2; display: inline-flex; align-items: center; justify-content: center; gap: 7px; text-decoration: none; }
.btn:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn.soft { background: var(--brand-soft); color: var(--brand-2); border-color: transparent; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #2a1f00; }
.btn.sm { padding: 8px 12px; font-size: .9rem; }
.btn.big { padding: 14px 24px; font-size: 1.1rem; min-height: 54px; border-radius: 14px; }
.btn.danger:hover { color: var(--coral); border-color: var(--coral); }
.btn[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.btn:disabled { opacity: .5; cursor: default; }
a.btn { color: var(--brand-ink); }
a.btn.ghost { color: var(--ink); }

/* inputs */
input[type=text], input[type=date], input[type=number], input[type=search], input:not([type]), select, textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 11px; min-height: 44px; width: 100%; }
textarea { resize: vertical; line-height: 1.5; min-height: 70px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%23778' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; padding-right: 36px; }
label { font-weight: 650; }
.field { display: grid; gap: 4px; }
.field label { font-size: .9rem; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; min-height: 44px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }

/* privacy and pupil-data notices */
.privacy { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--muted); background: var(--surface-2); border-radius: 10px; padding: 9px 12px; margin: 10px 0; }
.privacy svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--brand); }
.privacy strong { color: var(--ink); }
.pupil-warn { font-size: .88rem; background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--ink); border-radius: 8px; padding: 6px 10px; margin: 6px 0; display: inline-block; }

/* ---------- tool card ---------- */
.tool { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 16px; margin: 6px 0 22px; position: relative; }
@media (min-width: 720px) { .tool { padding: 22px 24px; } }
.tool-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; justify-content: space-between; }
.fmt-pick { flex: 1 1 280px; max-width: 440px; }
.fmt-pick select { font-weight: 650; border-color: var(--brand); }
.tool-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.lp-head { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 14px 0 6px; }
.lp-head .wide { grid-column: span 4; }
.lp-head .wide input { font-size: 1.15rem; font-weight: 650; }
@media (max-width: 720px) { .lp-head { grid-template-columns: 1fr 1fr; } .lp-head .wide { grid-column: span 2; } }
.lp-group { margin: 22px 0 4px; font-size: .82rem; text-transform: uppercase; letter-spacing: .07em; color: var(--brand); font-family: var(--font); border-bottom: 2px solid var(--brand-soft); padding-bottom: 4px; }
.lp-sec { padding: 12px 0; border-top: 1px dashed var(--line); }
.lp-group + .lp-sec { border-top: 0; }
.lp-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.lp-sec-head label, .lp-sec-head .lbl { font-weight: 700; font-size: 1.02rem; }
.mins { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .9rem; }
.mins input { width: 74px; text-align: center; }
.hint { margin: 2px 0 6px; color: var(--muted); font-size: .9rem; }
ol.tl { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; counter-reset: s; }
ol.tl li { display: grid; grid-template-columns: 30px 82px 1fr 44px; gap: 8px; align-items: start; counter-increment: s; }
ol.tl li::before { content: counter(s); font-weight: 700; color: var(--brand); background: var(--brand-soft); border-radius: 50%; width: 30px; height: 30px; display: grid; place-items: center; margin-top: 7px; font-size: .9rem; }
ol.tl .tl-m { text-align: center; }
ol.tl textarea { min-height: 44px; }
.tl-x { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 1.4rem; cursor: pointer; line-height: 1; }
.tl-x:hover { color: var(--coral); border-color: var(--coral); }
@media (max-width: 520px) { ol.tl li { grid-template-columns: 26px 64px 1fr 44px; gap: 6px; } ol.tl li::before { width: 26px; height: 26px; } }
.lp-meta-row { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: space-between; align-items: center; font-size: .9rem; color: var(--muted); min-height: 24px; }
.lp-total.over { color: var(--coral); font-weight: 650; }
.lp-hidden { font-size: .9rem; background: var(--accent-soft); border-radius: 8px; padding: 6px 10px; }
.lp-export { position: sticky; bottom: 0; z-index: 5; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(6px); border-top: 1px solid var(--line); margin: 10px -16px -16px; padding: 12px 16px; border-radius: 0 0 18px 18px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (min-width: 720px) { .lp-export { margin: 12px -24px -22px; padding: 12px 24px; } }
.lp-export .label { font-weight: 700; font-size: .9rem; color: var(--muted); margin-right: 4px; }
.lp-export .more { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 720px) { .lp-export { position: static; backdrop-filter: none; } .tool-actions { width: 100%; } .tool-actions .btn { flex: 1 1 calc(50% - 8px); } .lp-export .btn { flex: 1 1 calc(50% - 8px); } .lp-export .label { flex-basis: 100%; } .lp-export .more { margin-left: 0; flex: 1 1 100%; } }

/* dialogs */
dialog { border: 1px solid var(--line); border-radius: 18px; padding: 0; background: var(--surface); color: var(--ink); width: min(96vw, 760px); max-height: 90vh; box-shadow: 0 30px 80px -30px rgba(0,0,0,.5); }
dialog.wide { width: min(98vw, 1180px); }
dialog::backdrop { background: rgba(17, 22, 26, .55); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; flex-wrap: wrap; }
.dlg-head h2 { margin: 0; font-size: 1.25rem; }
.dlg-body { padding: 14px 18px 18px; }
.plans-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.plans-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.plans-list li[aria-current] { border-color: var(--brand); background: var(--brand-soft); }
.plans-list li span { display: block; color: var(--muted); font-size: .88rem; }
.plans-list .empty { color: var(--muted); justify-content: center; }
.row-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.dlg-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.week-grid { display: grid; grid-template-columns: repeat(var(--days, 5), minmax(150px, 1fr)); gap: 10px; overflow-x: auto; }
.wday { background: var(--surface-2); border-radius: 12px; padding: 10px; display: grid; gap: 8px; align-content: start; min-height: 200px; }
.wday h3 { margin: 0; font-size: .95rem; }
.wplan { text-align: left; font: inherit; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 10px; padding: 8px 10px; cursor: pointer; display: grid; gap: 2px; }
.wplan:hover { border-color: var(--brand); }
.wplan span { font-size: .82rem; color: var(--muted); }
.wplan em { font-size: .85rem; font-style: normal; }
@media (max-width: 760px) { .week-grid { grid-template-columns: 1fr; } }

/* toast */
.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 30px); opacity: 0; background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 12px; font-size: .95rem; z-index: 1000; pointer-events: none; transition: .25s; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- rendered plan (worked examples + print) ---------- */
.plan-doc { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; max-width: 860px; box-shadow: var(--shadow); }
.pd-kind { margin: 0; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; color: var(--brand); font-weight: 700; }
.pd-title { margin: 2px 0 12px; font-family: var(--head); font-size: 1.5rem; font-weight: 750; line-height: 1.2; }
.pd-meta { border-collapse: collapse; width: 100%; margin-bottom: 8px; font-size: .95rem; }
.pd-meta th, .pd-meta td { border: 1px solid var(--line); padding: 6px 9px; text-align: left; }
.pd-meta th { background: var(--brand-soft); width: 18%; font-weight: 650; }
.pd-group { margin: 18px 0 0; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; font-size: .82rem; color: var(--brand); border-bottom: 2px solid var(--brand-soft); padding-bottom: 3px; }
.pd-sec h3, .pd-sec h4 { margin: 14px 0 4px; font-size: 1.04rem; font-family: var(--font); }
.pd-sec p { margin: 0 0 5px; }
.pd-min { color: var(--muted); font-weight: 500; font-size: .9em; }
.pd-tl { border-collapse: collapse; width: 100%; font-size: .95rem; }
.pd-tl th, .pd-tl td { border: 1px solid var(--line); padding: 6px 9px; text-align: left; vertical-align: top; }
.pd-tl th { background: var(--brand-soft); }
.pd-tl td:first-child { width: 72px; white-space: nowrap; }
.pd-total { color: var(--muted); font-size: .88rem; margin: 12px 0 0; }
.plan-doc.blank .pd-box { border: 1px solid var(--line); border-radius: 6px; min-height: 80px; }
.plan-doc.blank .pd-tl td { height: 34px; }
.pd-line { display: inline-block; border-bottom: 1px solid var(--line-2); width: 70%; height: 1.2em; }
.example-wrap { margin: 10px 0 8px; }
.print-root { display: none; }

/* ---------- cards / hubs ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 12px 0; }
.card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; min-height: 44px; }
.card:hover { border-color: var(--brand); transform: translateY(-1px); }
.card strong { font-family: var(--head); font-size: 1.05rem; color: var(--ink); display: flex; gap: 8px; align-items: center; }
.card span { color: var(--muted); font-size: .92rem; line-height: 1.45; }
.card .ic { width: 30px; height: 30px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.card .ic svg { width: 18px; height: 18px; }
.pill { display: inline-block; font-size: .75rem; font-weight: 700; background: var(--accent-soft); color: var(--ink); border-radius: 999px; padding: 1px 8px; }
.steps3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 10px 0; padding: 0; list-style: none; counter-reset: st; }
.steps3 li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 14px 54px; position: relative; counter-increment: st; }
.steps3 li::before { content: counter(st); position: absolute; left: 14px; top: 14px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #2a1f00; font-weight: 800; display: grid; place-items: center; }
.faq details { border-top: 1px solid var(--line); padding: 12px 0; max-width: 74ch; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 650; min-height: 32px; }
.faq details p { margin: 8px 0 0; }
.ad-slot { margin: 26px 0 8px; min-height: 110px; border: 1px dashed var(--line-2); border-radius: 12px; display: grid; place-items: center; color: var(--muted); font-size: .8rem; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: var(--brand-soft); border-radius: var(--radius); padding: 16px 18px; margin: 18px 0; }
.cta p { margin: 0; flex: 1 1 260px; font-weight: 600; }

/* ---------- printables (editable sheets) ---------- */
.sheet-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.sheet { background: #fff; color: #1f2a37; border: 1px solid var(--line); border-radius: 6px; padding: 26px 28px; max-width: 900px; margin: 10px auto; box-shadow: 0 10px 30px -20px rgba(0,0,0,.45); }
.sheet.land { max-width: 1100px; }
.sheet h3 { margin: 0 0 4px; font-size: 1.4rem; color: #16323a; }
.sheet .sub { margin: 0 0 12px; color: #5b6472; font-size: .9rem; }
.sheet h4 { margin: 14px 0 4px; font-size: .95rem; color: #0e7c6b; text-transform: uppercase; letter-spacing: .05em; }
.pfields { display: grid; grid-template-columns: repeat(var(--cols, 2), 1fr); gap: 6px 16px; margin: 6px 0; }
.pf { display: flex; gap: 8px; align-items: baseline; border-bottom: 1px solid #c9d1ce; min-height: 34px; }
.pf b { font-size: .85rem; white-space: nowrap; color: #33414f; }
.pf .ed { flex: 1; min-height: 28px; }
.ed { outline: none; white-space: pre-wrap; border-radius: 4px; padding: 3px 4px; min-width: 2em; }
.ed:hover { background: #f4f8f7; }
.ed:focus { background: #eef7f4; box-shadow: 0 0 0 2px #0e7c6b inset; }
.ed:empty::before { content: attr(data-ph); color: #9aa5ad; }
.pbox { border: 1px solid #c9d1ce; border-radius: 6px; padding: 6px 8px; }
.pbox .ed { min-height: var(--h, 90px); }
.ptable { border-collapse: collapse; width: 100%; table-layout: fixed; font-size: .9rem; }
.ptable th, .ptable td { border: 1px solid #c9d1ce; padding: 0; vertical-align: top; text-align: left; }
.ptable th { background: #e6f2ef; padding: 6px 7px; font-size: .82rem; }
.ptable td .ed { min-height: var(--rh, 40px); padding: 5px 6px; }
.ptable th.rl { width: 16%; }
.pcal td { height: 86px; }
.pcal .dn { font-size: .78rem; color: #5b6472; padding: 3px 5px 0; }
.pcal td.off { background: #f6f6f4; }
.pchecks { list-style: none; margin: 0; padding: 0; columns: 2; }
.pchecks li { display: flex; gap: 8px; align-items: baseline; border-bottom: 1px solid #e3e7e6; padding: 3px 0; break-inside: avoid; }
.pchecks li::before { content: ""; width: 14px; height: 14px; border: 1.5px solid #5b6472; border-radius: 3px; flex: none; transform: translateY(2px); }
.pchecks .ed { flex: 1; }
@media (max-width: 640px) { .sheet { padding: 16px 12px; } .pfields { grid-template-columns: 1fr; } .pchecks { columns: 1; } .ptable { font-size: .8rem; } .sheet-scroll { overflow-x: auto; } .sheet-scroll .ptable { min-width: 560px; } }
.sheet-scroll { max-width: 100%; }

/* ---------- footer ---------- */
.site-foot { background: var(--surface); border-top: 1px solid var(--line); padding: 26px 0 30px; font-size: .93rem; }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 18px 24px; }
.foot-cols h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 6px; font-family: var(--font); }
.foot-cols ul { list-style: none; margin: 0; padding: 0; }
.foot-cols li a { display: inline-block; padding: 4px 0; color: var(--ink); text-decoration: none; }
.foot-cols li a:hover { color: var(--brand); text-decoration: underline; }
.foot-legal ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 18px 0 8px; padding: 14px 0 0; border-top: 1px solid var(--line); }
.foot-legal a { color: var(--ink); display: inline-block; padding: 4px 0; }
.foot-sister, .foot-note { color: var(--muted); margin: 8px 0 0; }

/* consent bar (same behaviour as the other sites) */
.ci-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; background: var(--surface); color: var(--ink); border-top: 1px solid var(--line); box-shadow: 0 -10px 30px -18px rgba(0,0,0,.45); font-size: .95rem; }
.ci-bar:focus { outline: none; }
.ci-bar:focus-visible { outline: 3px solid var(--brand); outline-offset: -3px; }
.ci-in { max-width: 1120px; margin: 0 auto; padding: 12px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.ci-in p { flex: 1 1 320px; margin: 0; }
.ci-btns { display: flex; gap: 10px; flex: 0 0 auto; }
.ci-btns .btn { min-width: 112px; }
@media (max-width: 560px) { .ci-btns { flex: 1 1 100%; } .ci-btns .btn { flex: 1 1 0; min-width: 0; } }

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

/* ---------- print ---------- */
@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #f3f3f3; --ink: #000; --muted: #444; --line: #bbb; --line-2: #999; --brand: #0b5e51; --brand-soft: #e6f2ef; color-scheme: light; }
  body { background: #fff; color: #000; font-size: 11pt; line-height: 1.4; }
  html.printing body > *:not(.print-root) { display: none !important; }
  html.printing .print-root { display: block; }
  html:not(.printing) .site-head, html:not(.printing) .site-foot, html:not(.printing) .ad-slot, html:not(.printing) .crumbs, html:not(.printing) .tool-top,
  html:not(.printing) .lp-export, html:not(.printing) .ci-bar, html:not(.printing) .toast, html:not(.printing) .no-print, html:not(.printing) .faq, html:not(.printing) .cards, html:not(.printing) dialog { display: none !important; }
  .plan-doc { border: 0; box-shadow: none; padding: 0; max-width: none; border-radius: 0; }
  .pd-sec, .pd-tl tr, .pd-meta { break-inside: avoid; }
  .pd-sec h3, .pd-sec h4 { break-after: avoid; }
  .sheet { box-shadow: none; border: 0; padding: 0; margin: 0; max-width: none; }
  .sheet + .sheet { break-before: page; }
  .ed:empty::before { content: ""; }
  .ed:hover, .ed:focus { background: none; box-shadow: none; }
  .week-print .pd-tl td { height: 150mm; width: 20%; font-size: 10pt; }
  a { color: #000; text-decoration: none; }
}

/* ---------- Classfern look (20 Oct 2026): fine paper, logo wordmark, logo-style headings ---------- */
:root {
  --bg: #f8f4ea; --surface: #fffdf8; --surface-2: #f3eee2;
  --head: "Inter Display", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* paper: fine grain + faint long fibres + soft warm light; all inline, no downloads */
  --paper-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .36 0 0 0 0 .26 0 0 0 .095 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  --paper-fibre: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.004 .09' numOctaves='2' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .47 0 0 0 0 .33 0 0 0 .09 -.02'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
  --paper-light: radial-gradient(1200px 700px at 18% -10%, rgba(255, 255, 255, .85), rgba(255, 255, 255, 0) 70%), radial-gradient(1000px 800px at 110% 110%, rgba(196, 176, 134, .12), rgba(196, 176, 134, 0) 70%);
  --shadow: 0 1px 0 rgba(120, 100, 60, .06), 0 1px 2px rgba(80, 64, 32, .06), 0 14px 30px -20px rgba(80, 64, 32, .35);
}
body { background-color: var(--bg); background-image: var(--paper-grain), var(--paper-fibre), var(--paper-light); background-attachment: scroll, scroll, fixed; }
h1, h2, h3 { font-weight: 800; letter-spacing: -.025em; }
h1 em, h2 em { font-family: "Lora", Georgia, "Times New Roman", serif; font-style: italic; font-weight: 700; color: var(--brand); letter-spacing: -.01em; }
.site-head { background: rgba(255, 253, 248, .82); border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 6px 18px -16px rgba(80, 64, 32, .5); }
.logo svg { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 4px 10px -6px rgba(10, 92, 80, .7); }
.logo .wm { display: block; height: 30px; width: auto; margin: 1px 0 3px; }
.logo .wm-dark { display: none; }
.logo small { letter-spacing: .1em; text-transform: uppercase; font-size: .66rem; font-weight: 600; }
:root[data-theme="dark"] .logo .wm-light { display: none; }
:root[data-theme="dark"] .logo .wm-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo .wm-light { display: none; }
  :root:not([data-theme="light"]) .logo .wm-dark { display: block; }
  :root:not([data-theme="light"]) { --paper-grain: none; --paper-fibre: none; --paper-light: none; --surface: #182026; --surface-2: #1f2930; --bg: #11161a; }
  :root:not([data-theme="light"]) .site-head { background: var(--surface); box-shadow: none; }
}
:root[data-theme="dark"] { --paper-grain: none; --paper-fibre: none; --paper-light: none; }
:root[data-theme="dark"] .site-head { background: var(--surface); box-shadow: none; }
@media (max-width: 380px) { .logo .wm { height: 25px; } }
@media print { body { background: #fff; } }
.nav a { white-space: nowrap; padding: 10px 10px; }
.logo .wm { height: 32px; }
@media (max-width: 1060px) { .logo small { display: none; } }

/* risk assessment advice pages: diagrams and the not-legal-advice note (the maker's own styles are in risk.css) */
.ra-fig { margin: 16px 0 20px; max-width: 560px; }
.ra-fig svg { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); }
.ra-fig figcaption { font-size: .88rem; color: var(--muted); margin-top: 6px; }
.ra-legal { font-size: .92rem; color: var(--muted); border-left: 4px solid var(--line-2); padding: 4px 0 4px 12px; margin: 12px 0; max-width: 74ch; }
.tool .ra-legal { border-left: 0; border-top: 1px solid var(--line); padding: 10px 0 0; max-width: none; }
.checks3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin: 10px 0 14px; }
.checks3 > div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.checks3 h3 { margin: 0 0 6px; font-size: 1.05rem; color: var(--brand); }
.checks3 ul { margin: 0; padding-left: 20px; }
.prose table.simple { border-collapse: collapse; width: 100%; margin: 10px 0 16px; font-size: .95rem; }
.prose table.simple th, .prose table.simple td { border: 1px solid var(--line); padding: 7px 9px; text-align: left; vertical-align: top; }
.prose table.simple th { background: var(--brand-soft); }
.sources { font-size: .92rem; }
.sources li + li { margin-top: 6px; }
