/* Teacher tools and printables. Builds on each page's own variables (--brand, --line, --muted, --soft, --text). */
.tool-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px 18px;align-items:end;margin:18px 0 6px;padding:20px;border:1px solid var(--line);border-radius:18px;background:#f8faff}
.tool-field{min-width:0}
.tool-field label{display:block;font-weight:800;font-size:14px;margin:0 0 8px;color:var(--text)}
.tool-field select,.tool-field input{width:100%;min-height:50px;padding:10px 14px;font:inherit;font-size:16px;color:var(--text);background:#fff;border:1px solid #cfd8ea;border-radius:14px;box-shadow:0 1px 2px rgba(25,36,80,.04)}
.tool-field select{appearance:none;-webkit-appearance:none;padding-right:42px;cursor:pointer;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%232657d9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 16px center}
.tool-field select:hover,.tool-field input:hover{border-color:#bdd0ff}
.tool-field select:focus,.tool-field input:focus,.tool-field textarea:focus{outline:3px solid #c9d8ff;outline-offset:0;border-color:var(--brand)}
.tool-field label.tool-check,label.tool-check{display:flex;align-items:center;gap:12px;margin:0;min-height:50px;padding:10px 14px;font-weight:700;font-size:15px;color:var(--text);background:#fff;border:1px solid #cfd8ea;border-radius:14px;cursor:pointer}
label.tool-check:hover{border-color:#bdd0ff;background:#f8fbff}
.tool-field label.tool-check input,label.tool-check input{flex:0 0 auto;width:20px;height:20px;min-height:0;margin:0;padding:0;border:0;box-shadow:none;accent-color:var(--brand);cursor:pointer}
.tool-actions{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0 0}
.tool-btn{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:12px 20px;font:inherit;font-weight:800;font-size:15px;line-height:1.2;color:#fff;background:var(--brand);border:1px solid var(--brand);border-radius:14px;cursor:pointer;text-decoration:none;box-shadow:0 6px 16px rgba(38,87,217,.18);transition:background-color .15s,border-color .15s,box-shadow .15s}
.tool-btn:hover{text-decoration:none;background:#1f4bc2;border-color:#1f4bc2}
.tool-btn:focus-visible{outline:3px solid #c9d8ff;outline-offset:2px}
.tool-btn.ghost{background:#fff;color:var(--brand);border:1px solid #cfd8ea;box-shadow:none}
.tool-btn.ghost:hover{background:#f8fbff;border-color:#bdd0ff}
.tool-form+.tool-actions{margin-top:16px}
.tool-actions+label.tool-check{margin-top:12px}
.tool-result{margin-top:22px;padding:22px;border:1px solid #dbe5ff;border-radius:20px;background:var(--soft)}
.tool-result h3{margin:0 0 8px;font-size:22px}
.tool-big{font-size:clamp(28px,5vw,44px);font-weight:900;line-height:1.15;margin:0 0 8px;color:var(--brand)}
.tool-result p{margin:0 0 8px;line-height:1.6;color:var(--text)}
.tool-note{font-size:14px;line-height:1.6;color:var(--muted);margin:12px 0 0}
.tool-prose p,.tool-prose li{font-size:17px;line-height:1.7;color:#4b5568}
.tool-prose ul,.tool-prose ol{padding-left:22px;margin:0 0 16px}
.tool-prose h3{margin:22px 0 8px;font-size:21px}
.tool-prose strong{color:var(--text)}
.tool-note{margin-top:18px}
/* hub cards: the owner's reference style, one card per line, matching the state and year cards */
.tool-cards{display:grid;grid-template-columns:1fr;gap:14px;margin-top:18px}
.tool-card{display:block;width:100%;min-height:124px;border:1px solid var(--line);border-radius:18px;padding:20px;background:#fff;color:var(--text)}
.tool-card:hover{border-color:#bdd0ff;background:#f8fbff;text-decoration:none}
.tool-card strong{display:block;font-size:20px;margin-bottom:8px;color:var(--brand)}
.tool-card span{display:block;color:var(--muted);line-height:1.55}
.footer-links{flex-direction:row;flex-wrap:wrap;justify-content:center;align-items:center;gap:12px}

/* tables */
.tool-table{width:100%;border-collapse:collapse;margin-top:14px;font-size:15px}
.tool-table th,.tool-table td{border:1px solid var(--line);padding:9px 10px;text-align:left;vertical-align:top}
.tool-table th{background:#f4f6fb;font-size:13px;text-transform:uppercase;letter-spacing:.04em}
.tool-table tr.is-now td{background:#fff7e6;font-weight:700}
.tool-scroll{overflow-x:auto}

/* term planner grid */
.planner-term{margin-top:26px}
.planner-term h3{margin:0 0 4px;font-size:22px}
.planner-grid{width:100%;min-width:640px;border-collapse:collapse;table-layout:fixed;font-size:14px}
.planner-grid th,.planner-grid td{border:1px solid #cfd7e6;padding:6px 8px;vertical-align:top;height:58px}
.planner-grid th{background:#f4f6fb;height:auto;font-size:12px;text-transform:uppercase;letter-spacing:.04em}
.planner-grid th.wk,.planner-grid td.wk{width:74px;font-weight:800;background:#f4f6fb}
.planner-grid td .d{display:block;font-weight:700;color:var(--text)}
.planner-grid td .h{display:block;font-size:12px;line-height:1.3;margin-top:2px}
.planner-grid td.out{background:#f1f2f5;color:#9aa3b2}
.planner-grid td.out .d{color:#9aa3b2;font-weight:400}
.planner-grid td.ph{background:#ffe9e6}
.planner-grid td.ph .h{color:#a3271b;font-weight:700}
.planner-grid td.local{background:#fff7e6}
.planner-grid td.local .h{color:#8a5a00}
.planner-grid td.is-today{outline:3px solid var(--brand);outline-offset:-3px}
.planner-break{margin:10px 0 0;padding:10px 14px;border-radius:12px;background:#f2fff9;border:1px solid #bdebd7;color:#0f6b4c;font-weight:700;font-size:15px}
.legend{display:flex;flex-wrap:wrap;gap:8px 18px;margin:14px 0 0;font-size:14px;color:var(--muted)}
.legend i{display:inline-block;width:14px;height:14px;border-radius:4px;border:1px solid #cfd7e6;vertical-align:-2px;margin-right:6px}

/* year calendar (printable) */
.cal-sheet{background:#fff;border:1px solid var(--line);border-radius:18px;padding:22px;margin-top:20px;overflow-x:auto}
@media print{.cal-sheet{overflow:visible}.tool-form,.tool-actions,label.tool-check,.ct-presets{display:none!important}}
.cal-sheet h3{margin:0 0 2px;font-size:24px}
.cal-sub{margin:0 0 14px;color:var(--muted);font-size:14px}
.cal-months{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.cal-month{border:1px solid #cfd7e6;border-radius:10px;padding:8px}
.cal-month h4{margin:0 0 6px;font-size:14px;text-align:center}
.cal-month table{min-width:0;width:100%;border-collapse:collapse;table-layout:fixed;font-size:12px}
.cal-month th{font-size:10px;color:var(--muted);font-weight:700;padding:2px 0}
.cal-month td{text-align:center;padding:3px 0;border-radius:4px}
.cal-month td.t{background:#dfe9ff}
.cal-month td.b{background:#d9f5e7}
.cal-month td.p{background:#ffd3cd;font-weight:800}
.cal-month td.s{box-shadow:inset 0 0 0 2px #2657d9;font-weight:800}
.cal-terms{display:grid;grid-template-columns:1fr 1fr;gap:6px 24px;margin:16px 0 0;font-size:14px;line-height:1.5}
.cal-terms strong{display:inline-block;min-width:150px}
.cal-foot{margin:14px 0 0;font-size:12px;color:var(--muted);line-height:1.5}
@media(max-width:900px){.cal-months{grid-template-columns:repeat(3,1fr)}}
@media(max-width:620px){.cal-months{grid-template-columns:repeat(2,1fr)}.cal-terms{grid-template-columns:1fr}.hero{grid-template-columns:1fr!important}}

/* printing: only the result is printed */
@media print{
  @page{size:A4 portrait;margin:10mm}
  body{background:#fff!important}
  .site-header,.footer,.hero,.breadcrumb,.no-print,.adsbygoogle,ins,.td-promo-section{display:none!important}
  .section{max-width:none;margin:0;padding:0}
  .section-card{border:0!important;box-shadow:none!important;padding:0!important}
  .tool-result,.cal-sheet{border:0;padding:0;margin:0;background:#fff}
  .planner-grid{min-width:0;font-size:11px}
  .planner-grid th,.planner-grid td{height:44px;padding:4px 5px}
  .planner-term{break-inside:avoid;margin-top:14px}
  .planner-grid td.ph,.planner-grid td.local,.planner-grid td.out,.planner-grid th,.cal-month td.t,.cal-month td.b,.cal-month td.p{-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .cal-months{grid-template-columns:repeat(4,1fr);gap:8px}
  .cal-month td{padding:2px 0}
  a{color:inherit;text-decoration:none}
}

/* ---------- classroom tools ---------- */
.tool-field textarea{width:100%;min-height:190px;padding:12px 14px;font:inherit;font-size:16px;line-height:1.5;color:var(--text);background:#fff;border:1px solid #cfd8ea;border-radius:14px;resize:vertical}
.tool-msg{margin:14px 0 0;font-weight:700;color:var(--text);min-height:1.4em}
.tool-two{display:grid;grid-template-columns:minmax(220px,1fr) 2fr;gap:22px;align-items:start;margin-top:18px}
@media(max-width:800px){.tool-two{grid-template-columns:1fr}}

/* countdown timer */
.ct-stage{margin-top:20px;padding:34px 20px;border-radius:24px;background:#12213f;color:#fff;text-align:center;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:14px}
.ct-display{font-size:clamp(72px,22vw,300px);font-weight:900;line-height:1;font-variant-numeric:tabular-nums;letter-spacing:-2px}
.ct-stage.is-warn{background:#8a5a00}
.ct-stage.is-done{background:#a3271b}
.ct-status{font-size:18px;font-weight:700;opacity:.9;min-height:1.4em}
.ct-controls{display:flex;flex-wrap:wrap;gap:10px;justify-content:center}
.ct-stage .tool-btn{background:#fff;color:#12213f;font-size:17px;min-width:110px}
.ct-stage .tool-btn.ghost{background:transparent;color:#fff;border-color:rgba(255,255,255,.5)}
.ct-stage:fullscreen{border-radius:0;padding:4vh 4vw}
.ct-stage:fullscreen .ct-display{font-size:min(34vw,62vh)}
.ct-presets{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}

/* name picker */
.np-result{margin:18px 0 6px;padding:30px 16px;border-radius:22px;background:var(--soft);border:2px solid #dbe5ff;text-align:center;font-size:clamp(34px,8vw,84px);font-weight:900;line-height:1.1;color:var(--brand);overflow-wrap:anywhere;min-height:1.6em}
.np-result.is-spinning{color:#9aa3b2}
.np-result.is-picked{background:#f2fff9;border-color:#bdebd7;color:#0f6b4c}
.np-history{margin:10px 0 0;padding:0;list-style:none;display:flex;flex-wrap:wrap;gap:8px;font-size:14px}
.np-history li{padding:6px 12px;border-radius:999px;background:#f4f6fb;border:1px solid var(--line)}

/* group maker */
.gm-groups{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:14px;margin-top:18px}
.gm-group{border:1px solid #cfd7e6;border-radius:16px;padding:14px 16px;background:#fff;break-inside:avoid}
.gm-group h3{margin:0 0 8px;font-size:18px;color:var(--brand)}
.gm-group ul{margin:0;padding-left:20px;line-height:1.7}

/* seating chart */
.sc-chart h3{margin:0 0 10px;font-size:22px}
.sc-front{margin:0 auto 14px;max-width:340px;padding:8px;border-radius:10px;background:#12213f;color:#fff;text-align:center;font-weight:800;font-size:14px}
.sc-grid{display:grid;gap:10px}
.sc-desk{min-height:64px;padding:8px 6px;border:2px solid #cfd7e6;border-radius:12px;background:#fff;font:inherit;font-weight:700;font-size:15px;line-height:1.25;color:var(--text);cursor:pointer;overflow-wrap:anywhere}
.sc-desk.is-empty{color:#9aa3b2;font-weight:400;border-style:dashed;background:#f7f8fb}
.sc-desk.is-selected{border-color:var(--brand);background:var(--soft);outline:3px solid #c9d8ff}

/* bingo */
.bg-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:18px;margin-top:18px}
.bg-card{border:2px solid #12213f;border-radius:14px;padding:14px;background:#fff;break-inside:avoid}
.bg-card h3{margin:0 0 10px;text-align:center;font-size:22px;letter-spacing:.04em}
.bg-grid{display:grid;border-top:2px solid #12213f;border-left:2px solid #12213f}
.bg-cell{border-right:2px solid #12213f;border-bottom:2px solid #12213f;aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;text-align:center;padding:4px;font-weight:700;font-size:15px;line-height:1.15;overflow-wrap:anywhere}
.bg-size-3 .bg-cell{font-size:18px}
.bg-size-5 .bg-cell{font-size:13px}
.bg-cell.is-free{background:#eef3ff;font-weight:900;letter-spacing:.06em}
.bg-calls ol{columns:3;margin:0;padding-left:24px;line-height:1.7;font-size:14px}
.bg-calls p{margin:0 0 8px;font-size:14px;color:var(--muted)}

@media print{
  .tool-msg{display:none!important}
  .gm-groups{grid-template-columns:repeat(3,1fr)}
  .sc-desk{border-color:#555;min-height:70px}
  .sc-desk.is-empty{color:#fff}
  .bg-cards{display:block}
  .bg-card{width:100%;max-width:170mm;margin:0 auto 10mm;break-after:page;page-break-after:always}
  .bg-size-5 .bg-cell{font-size:15px}
  .bg-cell.is-free,.sc-front{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}

[hidden]{display:none!important}

/* ---------- printables ---------- */
.rc-line{margin:0 0 14px;font-size:17px;line-height:1.7;color:var(--text)}
/* year at a glance */
.yg-table{width:100%;min-width:760px;border-collapse:collapse;table-layout:fixed;font-size:11px}
.yg-table th,.yg-table td{border:1px solid #cfd7e6;text-align:center;padding:5px 0;height:26px}
.yg-table th{background:#f4f6fb;font-size:10px}
.yg-table th.yg-m{width:38px;font-size:12px}
.yg-table td.t{background:#dfe9ff}.yg-table td.w{background:#f1f4fb;color:#8a94a8}.yg-table td.b{background:#d9f5e7}.yg-table td.p{background:#ffd3cd;font-weight:800}
.yg-table td.x{background:#eceef2;border-color:#eceef2}
.yg-table td.s{box-shadow:inset 0 0 0 2px #2657d9;font-weight:800}
/* planner tables */
.pl-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:14px}
.pl-table th,.pl-table td{border:1px solid #8793ab;padding:6px 8px;vertical-align:top;text-align:left}
.pl-table thead th{background:#f4f6fb}
.pl-table th.pl-side{width:84px;background:#f4f6fb;font-size:13px}
.pl-weekly td{height:74px}.pl-weekly tr.pl-notes td{height:96px}
.pl-overview td{height:52px}.pl-overview th.pl-side{width:52px;text-align:center}.pl-overview td.pl-dates{width:150px;font-size:13px}
.pl-day{display:block;font-weight:800}.pl-date{display:block;font-weight:400;font-size:13px}.pl-hol{display:block;font-size:11px;font-weight:700;color:#a3271b;line-height:1.3}
/* countdown */
.cd-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(74px,1fr));gap:8px}
.cd-grid.is-small{grid-template-columns:repeat(auto-fill,minmax(56px,1fr));gap:6px}
.cd-box{aspect-ratio:1/1;border:2px solid #12213f;border-radius:12px;display:flex;align-items:center;justify-content:center;font-weight:900;font-size:26px;background:#fff}
.cd-grid.is-small .cd-box{font-size:19px;border-radius:9px}
.cd-box.cd-done{grid-column:span 2;aspect-ratio:auto;background:#d9f5e7;font-size:20px}
/* reward and chore charts */
.rc-stars{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;margin:6px 0 18px}
.rc-stars.is-small{grid-template-columns:repeat(6,1fr);gap:8px}
.rc-star{position:relative;border:2px solid #12213f;border-radius:14px;aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;background:#fff}
.rc-num{position:absolute;top:6px;left:9px;font-size:13px;font-weight:800;color:#5d667a}
.rc-shape{font-size:clamp(34px,7vw,64px);line-height:1;color:#12213f}
.rc-chores td{height:48px}.rc-chores th.rc-job{width:34%;font-weight:700;background:#fff}.rc-chores thead th{text-align:center}
/* handwriting */
.hw-row{display:block;width:100%;height:auto;margin:0 0 4px}
/* maths drill */
.md-sheet+.md-sheet{margin-top:34px;padding-top:24px;border-top:2px dashed #cfd7e6}
.md-grid{list-style:decimal;margin:0;padding:0 0 0 30px;columns:3;column-gap:34px;font-size:19px;line-height:2.5;font-variant-numeric:tabular-nums}
.md-grid.is-small{columns:4;font-size:16px;line-height:2.25}
.md-grid li{break-inside:avoid;padding-left:4px}
.md-blank{display:inline-block;width:58px;border-bottom:1.5px solid #333;vertical-align:baseline}
.md-ans{font-weight:800;color:#a3271b}
/* maze and colouring */
.mz-svg{display:block;width:100%;max-width:620px;height:auto;margin:0 auto}
.cp-svg{display:block;width:100%;max-width:640px;height:auto;margin:0 auto}
@media(max-width:620px){.md-grid,.md-grid.is-small{columns:2}.rc-stars,.rc-stars.is-small{grid-template-columns:repeat(4,1fr)}}

@media print{
  .yg-table{min-width:0}
  .yg-table td.t,.yg-table td.w,.yg-table td.b,.yg-table td.p,.yg-table td.x,.yg-table th,.pl-table th,.cd-box.cd-done{-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .pl-weekly td{height:23mm}.pl-weekly tr.pl-notes td{height:26mm}
  .pl-overview td{height:13mm}
  .cd-grid{grid-template-columns:repeat(8,1fr)}.cd-grid.is-small{grid-template-columns:repeat(10,1fr)}
  .rc-stars{grid-template-columns:repeat(5,1fr)}.rc-stars.is-small{grid-template-columns:repeat(6,1fr)}
  .rc-shape{font-size:44px}
  .md-sheet+.md-sheet{break-before:page;page-break-before:always;border-top:0;margin-top:0;padding-top:0}
  .md-grid{columns:3}.md-grid.is-small{columns:4}
  .mz-svg{max-width:175mm;max-height:235mm}.cp-svg{max-width:180mm}
  .rc-chores td{height:15mm}
}

/* ---------- print: no browser date, title, web address or page numbers (Chrome and Edge) ---------- */
@page{@top-left{content:""}@top-center{content:""}@top-right{content:""}@bottom-left{content:""}@bottom-center{content:""}@bottom-right{content:""}}

/* ---------- Download PDF: the hidden copy of the sheet that is photographed into the PDF ---------- */
.pdf-stage{position:absolute;left:0;top:0;z-index:-1;opacity:0;pointer-events:none;background:#fff;color:#182033;padding:0}
.pdf-stage .cal-sheet,.pdf-stage .tool-result,.pdf-stage>div{border:0!important;border-radius:0;box-shadow:none;margin:0!important;padding:0!important;background:#fff!important;overflow:visible}
.pdf-stage [hidden]{display:none!important}
.pdf-stage .planner-grid{min-width:0}
.pdf-stage .planner-term{margin-top:0;padding-bottom:4px}
.pdf-stage .cal-months{grid-template-columns:repeat(4,1fr)}
.pdf-stage .cal-terms{grid-template-columns:1fr 1fr}
.pdf-stage .yg-table{min-width:0}
.pdf-stage .gm-groups{grid-template-columns:repeat(3,1fr)}
.pdf-stage .sc-desk{border-color:#555}
.pdf-stage .sc-desk.is-empty{color:#fff;background:#fff}
.pdf-stage .bg-cards{display:block}
.pdf-stage .bg-card{width:640px;max-width:100%;margin:0 auto}
.pdf-stage .bg-size-5 .bg-cell{font-size:18px}
.pdf-stage .bg-size-4 .bg-cell{font-size:20px}
.pdf-stage .bg-size-3 .bg-cell{font-size:24px}
.pdf-stage .bg-calls{width:640px;max-width:100%;margin:0 auto}
.pdf-stage .cd-grid{grid-template-columns:repeat(8,1fr)}
.pdf-stage .cd-grid.is-small{grid-template-columns:repeat(10,1fr)}
.pdf-stage .rc-stars{grid-template-columns:repeat(5,1fr)}
.pdf-stage .rc-stars.is-small{grid-template-columns:repeat(6,1fr)}
.pdf-stage .rc-shape{font-size:52px}
.pdf-stage .md-sheet+.md-sheet{border-top:0;margin-top:0;padding-top:0}
.pdf-stage .md-grid{columns:3}
.pdf-stage .md-grid.is-small{columns:4}
.pdf-stage .mz-svg,.pdf-stage .cp-svg{max-width:none}
.pdf-stage .tool-scroll{overflow:visible}
.pdf-note{color:#a3271b}

/* ---------- holiday overlap finder ---------- */
.ho-states{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px;grid-column:1/-1}
.ho-chart{margin:18px 0 6px;padding:14px 16px;border:1px solid var(--line);border-radius:14px;background:#fff}
.ho-row{display:grid;grid-template-columns:52px 1fr;align-items:center;gap:10px;margin:0 0 8px}
.ho-row:last-child{margin-bottom:0}
.ho-label{font-weight:800;font-size:13px;color:var(--text)}
.ho-track{position:relative;height:22px;border-radius:6px;background:#eef1f7;overflow:hidden}
.ho-months .ho-track{background:transparent;height:16px;overflow:visible}
.ho-month{position:absolute;top:0;font-size:11px;font-weight:700;color:var(--muted);border-left:1px solid #cfd8ea;padding-left:3px;height:16px;line-height:16px}
.ho-bar{position:absolute;top:0;bottom:0;border-radius:4px}
.ho-bar.is-hol{background:#9fe0c2}
.ho-bar.is-all{background:var(--brand)}
.ho-all .ho-label{color:var(--brand)}
.ho-all .ho-track{background:#e6ecfb}

/* ---------- live holiday countdown ---------- */
.hc-stage{margin-top:18px;padding:34px 24px 28px;border-radius:24px;background:linear-gradient(135deg,#1d3f9e 0%,#2657d9 55%,#7b4df4 100%);color:#fff;text-align:center}
.hc-stage.is-hols{background:linear-gradient(135deg,#0f6b4c 0%,#0f8a5f 55%,#17a398 100%)}
.hc-headline{margin:0;font-weight:800;font-size:17px;opacity:.92}
.hc-big{display:block;font-size:clamp(84px,20vw,220px);font-weight:900;line-height:1;margin:14px 0 4px;font-variant-numeric:tabular-nums;letter-spacing:-2px}
.hc-unit{display:block;font-size:clamp(22px,4vw,36px);font-weight:800}
.hc-sub{margin:8px auto 0;max-width:640px;font-size:18px;line-height:1.5;opacity:.92}
.hc-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;max-width:760px;margin:24px auto 0}
.hc-tile{background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.28);border-radius:16px;padding:14px 12px}
.hc-tile-v{display:block;font-size:24px;font-weight:900;line-height:1.2}
.hc-tile-l{display:block;font-size:13px;font-weight:700;opacity:.88;margin-top:2px}
.hc-progress{display:block;max-width:760px;margin:22px auto 0;text-align:left}
.hc-progress-label{display:block;font-size:14px;font-weight:700;margin-bottom:8px;opacity:.92}
.hc-progress-track{display:block;height:12px;border-radius:999px;background:rgba(255,255,255,.22);overflow:hidden}
.hc-progress-fill{display:block;height:100%;border-radius:999px;background:#ffd166}
.hc-stage .tool-btn{margin-top:22px;background:#fff;color:#1d3f9e;border-color:#fff;box-shadow:none}
.hc-stage .tool-btn:hover{background:#eef3ff}
.hc-stage:fullscreen{display:flex;flex-direction:column;justify-content:center;border-radius:0;padding:4vh 4vw}
.hc-stage:fullscreen .hc-big{font-size:min(30vw,48vh)}
.hc-stage:fullscreen .hc-unit{font-size:min(6vw,7vh)}
.hc-stage:fullscreen .hc-sub{font-size:min(3vw,3.4vh);max-width:none}

/* ---------- certificates ---------- */
.ce-cert{position:relative;container-type:inline-size;width:100%;aspect-ratio:297/210;margin:0 0 22px;background:#fffdf8;color:#1f2533;overflow:hidden;box-shadow:0 2px 10px rgba(25,36,80,.08);border:1px solid #e3e0d6;break-inside:avoid}
.ce-cert:last-child{margin-bottom:0}
.ce-deco{position:absolute;inset:0;width:100%;height:100%}
.ce-body{position:absolute;inset:10% 12% 8%;display:flex;flex-direction:column;align-items:center;text-align:center}
.ce-cert .ce-kicker{margin:0;font-family:Georgia,'Times New Roman',serif;font-size:3.2cqw;letter-spacing:.32em;text-transform:uppercase;color:var(--ce-main)}
.ce-cert .ce-title{margin:.4cqw 0 0;font-family:Georgia,'Times New Roman',serif;font-size:6.4cqw;line-height:1.08;font-weight:700;color:var(--ce-main);letter-spacing:.02em}
.ce-cert .ce-pre{margin:auto 0 0;font-size:1.9cqw;color:#5d667a;letter-spacing:.06em;text-transform:uppercase}
.ce-cert .ce-name{margin:1.6cqw 0 0;padding:0 4cqw .8cqw;font-family:Georgia,'Times New Roman',serif;font-style:italic;font-size:6.2cqw;line-height:1.1;color:#1f2533;border-bottom:.25cqw solid var(--ce-accent);max-width:100%;overflow-wrap:anywhere}
.ce-cert .ce-reason{margin:2.6cqw 0 0;font-size:2.5cqw;line-height:1.4;color:#2c3445;max-width:88%}
.ce-cert .ce-school{margin:1.6cqw 0 0;font-size:1.9cqw;font-weight:700;color:var(--ce-main)}
.ce-cert .ce-sigs{margin-top:auto;padding-top:3cqw;width:100%;display:flex;justify-content:space-between;gap:30cqw}
.ce-ribbon .ce-sigs{gap:34cqw}
.ce-sig{flex:1;display:flex;flex-direction:column;align-items:center}
.ce-line{display:block;width:100%;min-height:2.6cqw;padding-bottom:.5cqw;border-bottom:.18cqw solid #1f2533;font-size:1.9cqw;font-family:Georgia,'Times New Roman',serif}
.ce-cap{display:block;margin-top:.6cqw;font-size:1.5cqw;text-transform:uppercase;letter-spacing:.12em;color:#5d667a}
.ce-simple{background:#fff}

/* ---------- word search ---------- */
.ws-sheet+.ws-sheet{margin-top:34px;padding-top:24px;border-top:2px dashed #cfd7e6}
.ws-sheet h3{margin:0 0 4px;font-size:26px;text-align:center}
.ws-name{margin:0 0 16px;text-align:center;color:var(--muted);font-size:15px}
.ws-grid{margin:0 auto;border-collapse:collapse;min-width:0;width:auto;table-layout:fixed;border:2px solid #12213f}
.ws-grid td{width:38px;height:38px;padding:0;text-align:center;vertical-align:middle;border:1px solid #d5dbe8;font-weight:800;font-size:21px;font-family:'Courier New',monospace;color:#12213f}
.ws-n15 td{width:32px;height:32px;font-size:18px}
.ws-n18 td{width:28px;height:28px;font-size:16px}
.ws-grid td.is-ans{background:#ffd9a8;color:#7a3c00}
.ws-find{margin:18px 0 8px;font-weight:800;text-align:center}
.ws-list{list-style:none;margin:0 auto;padding:0;max-width:640px;columns:3;column-gap:24px;font-size:17px;line-height:1.9}
.ws-list li{break-inside:avoid;padding-left:24px;position:relative}
.ws-list li::before{content:"";position:absolute;left:0;top:.45em;width:13px;height:13px;border:1.5px solid #12213f;border-radius:3px}
@media(max-width:620px){.ws-grid td{width:7.4vw;height:7.4vw;font-size:4.2vw}.ws-list{columns:2}}

@media print{
  .ho-chart,.ho-bar,.ho-track,.ce-cert,.ws-grid td.is-ans{-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .ce-cert{width:277mm;height:190mm;aspect-ratio:auto;margin:0 auto;box-shadow:none;border:0;break-after:page;page-break-after:always}
  .ce-cert:last-child{break-after:auto;page-break-after:auto}
  .ws-sheet+.ws-sheet{break-before:page;page-break-before:always;border-top:0;margin-top:0;padding-top:0}
  .ws-grid td{width:9.5mm;height:9.5mm}
  .ws-n15 td{width:8.6mm;height:8.6mm}
  .ws-n18 td{width:7.4mm;height:7.4mm}
  .ws-list{columns:3}
}

/* Download PDF copies */
.pdf-stage .ce-cert{margin:0;box-shadow:none;border:0}
.pdf-stage .ws-sheet+.ws-sheet{border-top:0;margin-top:0;padding-top:0}
.pdf-stage .ws-grid td{width:44px;height:44px;font-size:24px}
.pdf-stage .ws-n15 td{width:40px;height:40px;font-size:21px}
.pdf-stage .ws-n18 td{width:35px;height:35px;font-size:18px}
.pdf-stage .ws-list{columns:3}
@media print{
  #ho-output .tool-big{font-size:26px;margin:4px 0}
  #ho-output .ho-chart{margin:8px 0 4px;padding:8px 10px}
  #ho-output .ho-row{margin-bottom:4px}
  #ho-output .ho-track{height:16px}
  #ho-output .tool-table{font-size:11px;margin-top:8px}
  #ho-output .tool-table th,#ho-output .tool-table td{padding:4px 6px}
  #ho-output .legend{margin-top:6px;font-size:11px}
}

/* ---------- leave planner ---------- */
.lp-group{grid-column:1/-1;border-top:1px solid var(--line);padding-top:14px}
.lp-group h3{margin:0 0 4px;font-size:17px}
.lp-group .tool-note{margin:0 0 10px}
.lp-add{display:flex;flex-wrap:wrap;gap:10px;align-items:end}
.lp-add .tool-field{flex:1 1 170px}
.lp-add .tool-btn{min-height:50px}
.lp-chips{list-style:none;margin:10px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.lp-chip{display:inline-flex;align-items:center;gap:6px;padding:6px 6px 6px 12px;border-radius:999px;background:#fff;border:1px solid #cfd8ea;font-size:14px;font-weight:700}
.lp-chip-x{width:26px;height:26px;border:0;border-radius:50%;background:#eef1f7;color:#5d667a;font-size:16px;line-height:1;cursor:pointer}
.lp-chip-x:hover{background:#ffe1dc;color:#a3271b}
.lp-sfd-pub{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:8px;margin-bottom:12px}
.lp-sfd-pub label.tool-check{min-height:44px;font-size:14px}
.lp-small{font-size:13px;color:var(--muted);font-weight:400}
.lp-table td{vertical-align:top}
.lp-cal{margin-top:18px}
.lp-cal td.lp-leave,.legend i.lp-leave{background:#2657d9;color:#fff;font-weight:800}
.lp-cal td.lp-booked,.legend i.lp-booked{background:#7b4df4;color:#fff;font-weight:800}
.lp-cal td.lp-ph,.legend i.lp-ph{background:#ffd3cd;font-weight:800}
.lp-cal td.lp-hol,.legend i.lp-hol{background:#d9f5e7}
.lp-cal td.lp-sfd,.legend i.lp-sfd{background:#ffd98a;color:#6b4500;font-weight:800}
.lp-cal td.lp-we,.legend i.lp-we{background:#eef1f7;color:#8a94a8}
@media print{
  .lp-cal td.lp-leave,.lp-cal td.lp-booked,.lp-cal td.lp-ph,.lp-cal td.lp-hol,.lp-cal td.lp-sfd,.lp-cal td.lp-we,.legend i{-webkit-print-color-adjust:exact;print-color-adjust:exact}
  #lp-output .tool-big{font-size:28px;margin:4px 0}
  #lp-output .lp-cal{break-before:page;page-break-before:always;margin-top:0}
  #lp-output .tool-table{font-size:12px}
  #lp-output .tool-table th,#lp-output .tool-table td{padding:5px 7px}
}
