/* Hype to Prototype student toolkit. One stylesheet, phone first, no web fonts.
   Colors from the class decks (brief section 10). No inline styles anywhere:
   the Content-Security-Policy would block them. */

:root {
  --navy: #2F3C7E;    /* headings, primary buttons, dark bands */
  --slate: #44506B;   /* body text */
  --coral: #F96167;   /* shapes and large text only: too light for small text */
  --gold: #F0C24B;    /* Ally, the current map step */
  --cream: #FBF3DD;   /* callouts, Ally's box */
  --ice: #CADCFC;     /* secondary on navy */
  --green: #00B050;   /* done: shapes only, too light for small text on white */
  --grey: #596273;    /* empty blanks: still 5:1 on cream */
  --edge: #8A93A8;    /* control borders: 3:1 on white */
  --line: #D5DAE5;    /* quiet dividers */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--slate); font: 17px/1.5 Arial, Helvetica, sans-serif;
  overflow-wrap: break-word; overflow-wrap: anywhere; }   /* a long word or pasted link wraps instead of pushing the page sideways */
h1, h2, h3 { color: var(--navy); line-height: 1.2; margin: 1.2em 0 0.4em; }
h1 { font-size: 30px; margin-top: 0.6em; }
h2 { font-size: 23px; }
h3 { font-size: 19px; }
p { margin: 0.6em 0; }
a { color: var(--navy); }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }

[hidden], .js .js-only[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; padding: 10px 14px; background: #fff; border: 2px solid var(--navy); }
.skip:focus { left: 16px; }
.js-only { display: none !important; }
.js .js-only { display: inline-flex !important; }
.js .nojs-only { display: none; }
.icon { width: 1em; height: 1em; vertical-align: -0.15em; }


/* ---------------------------------------------------------------- header, menu, footer */

.top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--navy); font-weight: bold; text-decoration: none; }
.brand img { width: auto; height: 32px; }
.nickname { padding: 2px 10px; border-radius: 999px; background: var(--cream); color: var(--navy); font-size: 15px; }
.pill { margin: 0; padding: 4px 12px; border-radius: 999px; background: var(--ice); color: var(--navy); font-size: 15px; }
.pill:empty { display: none; }
/* A save problem is pinned to the bottom of the screen, where a student scrolled
   down to the box they're typing in still sees it. */
.pill.pill-warn { position: fixed; z-index: 20; right: 12px; bottom: 12px; left: 12px; max-width: 560px; margin: 0 auto;
  padding: 10px 16px; border: 2px solid var(--coral); border-radius: 12px; background: var(--cream); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); }
.menu { display: flex; flex-wrap: wrap; gap: 0 18px; margin-left: auto; }
.menu a { display: inline-flex; align-items: center; min-height: 44px; }

@media (max-width: 480px) {
  .brand { gap: 8px; font-size: 15px; }
  .brand img { height: 24px; }
  /* one line each for the nickname and the menu, so a tool page starts higher up */
  .nickname { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .menu { flex-wrap: nowrap; gap: 0 12px; margin-left: 0; font-size: 15px; white-space: nowrap; }
  /* on a tool page the map is one row of step letters, the current one gold (Home
     keeps the whole map, with progress) */
  .tool .map { display: flex; gap: 4px; margin: 10px 0; }
  .tool .map-box { flex: 1 1 auto; padding: 4px 2px; border-width: 1px; border-radius: 8px; }
  .tool .map-abbr { font-size: 13px; }
  .tool .map-name, .tool .map-breath { display: none; }
}

main { max-width: 780px; margin: 0 auto; padding: 8px 16px 32px; }
.bottom { padding: 16px; border-top: 1px solid var(--line); font-size: 15px; text-align: center; }
.bottom p { margin: 4px 0; }


/* ---------------------------------------------------------------- buttons, notices, choices */

button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 20px;
  border: 2px solid var(--navy); border-radius: 999px; background: #fff; color: var(--navy); font: inherit; font-weight: bold; text-decoration: none; cursor: pointer; }
.primary, button.primary { background: var(--navy); color: #fff; }
button.danger { border-color: var(--coral); background: var(--cream); }   /* Delete my workbook */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.notice { padding: 10px 14px; border-radius: 8px; background: var(--ice); color: var(--navy); }
.notice-error { background: var(--cream); border: 2px solid var(--coral); }

/* Start's two choices: buttons that open a short form. */
.choice { margin: 16px 0; border: 2px solid var(--navy); border-radius: 14px; }
.choice > summary { display: flex; align-items: center; min-height: 48px; padding: 10px 18px; border-radius: 12px; background: var(--navy); color: #fff; font-weight: bold; cursor: pointer; list-style: none; }
.choice > summary::-webkit-details-marker { display: none; }
.choice[open] > summary { border-radius: 12px 12px 0 0; }
.choice > form { padding: 4px 18px 12px; }
.subtitle { font-size: 20px; color: var(--navy); }
.check label { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; cursor: pointer; }
.check input { width: 24px; height: 24px; margin: 2px 0 0; flex: none; accent-color: var(--navy); }


/* ---------------------------------------------------------------- fields */

.field { margin: 22px 0; }
.field > label, .statement > legend { display: block; color: var(--navy); font-weight: bold; }
.hint { margin: 2px 0 6px; font-size: 15px; }
input[type="text"], input[type="password"], input[type="date"], textarea, select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--edge); border-radius: 8px;
  background: #fff; color: #1F2937; font: inherit; }
input[type="number"] { width: 100%; max-width: 10em; min-height: 44px; padding: 10px 12px; border: 1px solid var(--edge); border-radius: 8px;
  background: #fff; color: #1F2937; font: inherit; }
input[readonly] { border-style: dashed; background: #F4F6FB; color: var(--slate); }
input[type="date"] { max-width: 14em; }
select { max-width: 30em; }
.money-box { display: inline-flex; align-items: center; gap: 6px; }
.money-sign { color: var(--navy); font-weight: bold; }

/* The 1-to-5 scale: five round tap targets between the words for each end */
.scale > legend { display: block; color: var(--navy); font-weight: bold; }
/* The five circles on one row (they fit at 320px), the end words under 1 and 5 */
.scale-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; max-width: 256px; margin-top: 6px; }
.scale-end { order: 2; flex: 1 1 40%; font-size: 14px; }
.scale-end:last-child { text-align: right; }
.scale-point { order: 1; position: relative; display: inline-flex; }
.scale-point input { position: absolute; opacity: 0; width: 44px; height: 44px; margin: 0; cursor: pointer; }
.scale-point span:not(.sr-only) { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border: 1px solid var(--edge); border-radius: 50%; color: var(--navy); font-weight: bold; }
.scale-point input:checked + span { border-color: var(--navy); background: var(--navy); color: #fff; }
.scale-point input:focus-visible + span { outline: 3px solid var(--navy); outline-offset: 2px; }
.choose-none { font-style: italic; }
.prefill { margin: 4px 0 8px; }
textarea { min-height: 96px; resize: vertical; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.statement { padding: 4px 14px 10px; border: 1px solid var(--line); border-radius: 14px; }
.statement > legend { padding: 0 6px; }
.blank { margin: 16px 0; }
.blank > label { display: block; color: var(--navy); font-weight: bold; }

/* Guess / Know: two big tap targets */
.gk { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.gk-choice { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid var(--edge); border-radius: 999px; cursor: pointer; }
.gk-choice input { width: 20px; height: 20px; margin: 0; accent-color: var(--navy); }
.gk-choice:has(input:checked) { border-color: var(--navy); background: var(--navy); color: #fff; }
.gk-choice:has(input:focus-visible) { outline: 3px solid var(--navy); outline-offset: 2px; }


/* Radio buttons, one row each, and single checkboxes */
.choices > legend { display: block; color: var(--navy); font-weight: bold; }
.field label.option { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 8px 0; color: var(--slate); font-weight: normal; cursor: pointer; }
.option strong { color: var(--navy); }
.option input, .field.check input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--navy); }
.field.check label { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; cursor: pointer; color: var(--slate); font-weight: normal; }
.field.check .hint { margin-left: 32px; }

/* Lists: each item a card, numbered, with Remove; Add under the list */
.repeat > legend { display: block; color: var(--navy); font-weight: bold; font-size: 19px; }
.items { margin: 8px 0 0; padding: 0; list-style: none; }
.item > fieldset { margin: 12px 0; padding: 4px 14px 8px; border: 1px solid var(--line); border-radius: 12px; }
.item-label { padding: 0 6px; color: var(--navy); font-weight: bold; }
.item .field { margin: 12px 0; }
.item-tools, .repeat-tools { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.item-tools { justify-content: flex-end; }
.item-tools button { padding: 4px 14px; border-width: 1px; font-weight: normal; }
button:disabled { opacity: 0.45; cursor: not-allowed; }
.item-note { margin: 4px 0; padding: 8px 12px; border-radius: 8px; background: var(--cream); color: var(--navy); }
.item-note:empty { display: none; }
@media (min-width: 760px) {
  .repeat-compact .item > fieldset { display: grid; grid-template-columns: repeat(auto-fit, minmax(10em, 1fr)); gap: 0 12px; align-items: end; }
  .repeat-compact .item-label, .repeat-compact .item-tools { grid-column: 1 / -1; }
}


/* ---------------------------------------------------------------- widgets */

.widget-title { margin-bottom: 4px; color: var(--navy); font-weight: bold; }
.count { margin: 12px 0 20px; }
.count-text { margin: 0 0 4px; color: var(--navy); font-weight: bold; }
.count progress { width: 100%; max-width: 24em; height: 12px; accent-color: var(--navy); }
.ladder, .fishing { margin: 16px 0; padding: 8px 16px; border-left: 6px solid var(--gold); border-radius: 8px; background: var(--cream); }
.ladder-rungs { margin: 0; padding-left: 20px; }
.fishing-line { color: var(--navy); font-size: 19px; }
.says-summary { margin: 12px 0; padding: 10px 14px; border: 2px solid var(--gold); border-radius: 8px; background: var(--cream); color: var(--navy); font-weight: bold; }

/* Class 2 */
.history { margin: 12px 0 4px; color: var(--grey); }
.history-label { font-size: 14px; font-weight: bold; text-transform: uppercase; letter-spacing: 0.5px; }
.history s { color: var(--grey); }
.history-note { font-style: italic; }
.big-mac, .run-by-note { padding: 10px 14px; border: 2px solid var(--gold); border-radius: 8px; background: var(--cream); color: var(--navy); }
.card-sentence { margin: 16px 0; padding: 12px 16px; border-left: 6px solid var(--navy); border-radius: 8px; background: #F4F6FB; color: var(--slate); font-size: 19px; }
.card-sentence .filled { color: var(--navy); font-weight: bold; }
.card-sentence .gap { color: var(--grey); }
.card-lock { margin: 16px 0 24px; padding: 4px 16px 8px; border: 2px solid var(--navy); border-radius: 12px; }
.lock-banner { color: var(--navy); font-weight: bold; }
.lock-tools { display: flex; flex-wrap: wrap; gap: 10px; }
.tally { margin: 12px 0; padding: 4px 16px; border-left: 6px solid var(--navy); background: #F4F6FB; }
.tally-count { color: var(--navy); font-weight: bold; }
.unsaved dl { margin: 8px 0; }
.unsaved dt { margin-top: 8px; font-weight: bold; }
.unsaved dd { margin: 0; white-space: pre-wrap; }
.unsaved summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: bold; }

/* Class 3 */
.yes-no { margin: 14px 0; }
.yes-no > legend { color: var(--slate); font-weight: normal; }
.yes-no-set > legend { display: block; color: var(--navy); font-weight: bold; }
.if-no { margin: 6px 0; padding: 8px 12px; border-radius: 8px; background: var(--cream); color: var(--navy); }
.pulled, .money-math, .story { margin: 16px 0; padding: 4px 16px 8px; border-left: 6px solid var(--navy); border-radius: 8px; background: #F4F6FB; }
.pulled ul, .money-lines { margin: 4px 0; padding-left: 20px; }
.pass-fail, .beat-bot { padding: 10px 14px; border: 2px solid var(--navy); border-radius: 8px; color: var(--navy); font-weight: bold; }
.story-text { color: var(--navy); font-size: 19px; }
.story-count { font-weight: bold; }
.chevrons { display: flex; flex-wrap: wrap; gap: 4px; margin: 16px 0; padding: 0; list-style: none; }
.chevrons li { flex: 1 1 8em; padding: 12px 24px 12px 28px; background: var(--navy); color: #fff; font-weight: bold; text-align: center;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%); }
.chevrons li:first-child { padding-left: 16px; clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%); }
.doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(12em, 1fr)); gap: 12px; margin: 12px 0 24px; padding: 0; list-style: none; }
.door { padding: 4px 14px 8px; border: 2px solid var(--line); border-radius: 12px; }
.door.is-picked { border-color: var(--navy); background: var(--gold); color: var(--navy); }
.door-name { margin-bottom: 0; color: var(--navy); font-size: 19px; font-weight: bold; }
.timer { margin: 16px 0; padding: 8px 16px; border: 2px solid var(--navy); border-radius: 14px; text-align: center; }
.timer-face { margin: 4px 0; color: var(--navy); font: bold 64px/1.1 "Courier New", Courier, monospace; }
.timer.is-done .timer-face { color: var(--coral); }
.timer-tools { display: flex; justify-content: center; gap: 12px; }
.map-loop .map { margin-bottom: 0; }
.loop-arrow { display: none; width: 100%; height: auto; }
@media (min-width: 560px) { .loop-arrow { display: block; } }   /* only where the map is one row (see .map) */
.loop-line, .loop-head { fill: none; stroke: var(--navy); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.canvas-credit { font-size: 14px; }
@media (min-width: 900px) {
  .tool-wide main { max-width: 1120px; }
}
/* The standard Lean Canvas layout, on wide screens and on paper */
@media print, (min-width: 900px) {
  .canvas-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 10px;
    grid-template-areas: "b2 b2 b4 b4 b3 b3 b9 b9 b1 b1" "b2 b2 b8 b8 b3 b3 b5 b5 b1 b1" "b7 b7 b7 b7 b7 b6 b6 b6 b6 b6"; }
  /* each writing box fills its cell, so the tall boxes are tall */
  .canvas-cell { display: flex; padding: 0 10px; border: 1px solid var(--edge); border-radius: 8px; }
  .canvas-cell .field, .canvas-cell .pfield { display: flex; flex: 1; flex-direction: column; }
  .canvas-cell textarea, .canvas-cell .pbox { flex: 1; }
  .canvas-box1 { grid-area: b1; } .canvas-box2 { grid-area: b2; } .canvas-box3 { grid-area: b3; }
  .canvas-box4 { grid-area: b4; } .canvas-box5 { grid-area: b5; } .canvas-box6 { grid-area: b6; }
  .canvas-box7 { grid-area: b7; } .canvas-box8 { grid-area: b8; } .canvas-box9 { grid-area: b9; }
}

/* The elephant plot (drawn as SVG: shapes and words take classes, not inline styles) */
.elephant { margin: 16px 0 24px; }
.plot { display: block; width: 100%; max-width: 520px; height: auto; }
.plot-frame { fill: none; stroke: var(--navy); stroke-width: 1.5; }
.plot-elephant { fill: var(--coral); fill-opacity: 0.22; }
.plot-mid { stroke: var(--edge); stroke-width: 1; stroke-dasharray: 4 4; }
.plot-axis { fill: none; stroke: var(--navy); stroke-width: 2; }
.plot-label { fill: var(--slate); font: 11px Arial, Helvetica, sans-serif; }
.plot-label-strong { fill: var(--navy); font-weight: bold; }
.plot-axis-label { fill: var(--navy); font: bold 12px Arial, Helvetica, sans-serif; }
.plot-dot { fill: var(--navy); stroke: #fff; stroke-width: 2; }
.plot-dot-suggested { stroke: var(--gold); stroke-width: 4; }
.plot-dot-n { fill: #fff; font: bold 12px Arial, Helvetica, sans-serif; }
.plot-suggest { color: var(--navy); font-weight: bold; }
.plot-list { padding-left: 20px; font-size: 15px; }

/* The AI helper pages */
.ai-rule { padding: 12px 16px; border: 2px solid var(--coral); border-radius: 12px; color: var(--navy); font-weight: bold; }
.ai-box { margin: 20px 0; padding: 4px 18px 12px; border: 1px solid var(--line); border-radius: 14px; }
.ai-box h2 { margin-top: 0.6em; font-size: 21px; }
.house-rules dt { margin-top: 10px; color: var(--navy); font-weight: bold; }
.house-rules dd { margin: 0; }
.prompt { padding: 12px 14px; border-radius: 8px; background: #F4F6FB; color: #1F2937; white-space: pre-wrap; overflow-wrap: anywhere; }
.prompt-tools { margin: 8px 0; }
.card-where { margin: 12px 0 0; font-size: 15px; text-transform: uppercase; letter-spacing: 0.5px; }
.tip { font-style: italic; }
.ally-example { margin: 12px 0; padding: 4px 14px; border-radius: 12px; background: var(--cream); }
.ally-example > summary { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--navy); font-weight: bold; cursor: pointer; }
.ally-example .icon-lemon { width: 28px; height: 28px; padding: 5px; border-radius: 50%; background: var(--gold); color: var(--navy); }

/* Home: Check before the next class */
.class-check { margin: 16px 0 4px; padding: 4px 16px 8px; border-radius: 12px; background: #F4F6FB; }
.class-check .field { margin-top: 8px; }

.statement-preview { margin: 16px 0; padding: 12px 16px; border-left: 6px solid var(--gold); border-radius: 8px; background: var(--cream); color: var(--slate); font-size: 19px; }
.statement-preview .filled { color: var(--navy); font-weight: bold; }
.statement-preview .gap { color: var(--grey); letter-spacing: 1px; }
.kg-count { margin: 8px 0 20px; font-weight: bold; color: var(--navy); }


/* ---------------------------------------------------------------- tool pages */

.crumb { margin: 12px 0 0; font-size: 15px; }
.tool h1 { margin-top: 0.3em; }
.step-label { margin: 0; color: var(--navy); font-size: 15px; font-weight: bold; text-transform: uppercase; letter-spacing: 0.5px; }
.goal { font-size: 19px; color: var(--navy); }
.reminders { margin: 20px 0; padding: 4px 16px; border-left: 6px solid var(--navy); background: #F4F6FB; }
.ally { margin: 24px 0; padding: 8px 18px; border-radius: 14px; background: var(--cream); }
.ally > summary { display: flex; align-items: center; gap: 12px; min-height: 48px; color: var(--navy); font-weight: bold; cursor: pointer; }
.ally .icon-lemon { width: 34px; height: 34px; padding: 6px; border-radius: 50%; background: var(--gold); color: var(--navy); }
.ally-title { margin-top: 0.4em; font-size: 20px; }
.ally-rows dt { margin-top: 8px; color: var(--navy); font-weight: bold; }
.ally-rows dd { margin: 0; }
.safety { margin: 24px 0; padding: 4px 18px; border: 2px solid var(--coral); border-radius: 14px; }
.page-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 32px; padding-top: 12px; border-top: 1px solid var(--line); }
.page-nav a { display: inline-flex; align-items: center; min-height: 44px; }


/* ---------------------------------------------------------------- the map strip */

.map { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; padding: 0; list-style: none; }
@media (min-width: 560px) { .map { grid-template-columns: repeat(6, 1fr); } }
.map-box { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border: 2px solid var(--navy); border-radius: 12px; background: #fff; text-align: center; }
.map-abbr { color: var(--navy); font-size: 17px; font-weight: bold; }
.map-name { font-size: 13px; line-height: 1.2; }
.map-breath { margin-top: 4px; padding: 0 8px; border-radius: 999px; font-size: 13px; }
.breath-go-wide .map-breath { border: 2px solid var(--coral); color: var(--navy); }
.breath-narrow .map-breath { background: var(--navy); color: #fff; }
.breath-then .map-breath { background: var(--gold); color: var(--navy); }
.map-box.is-current { background: var(--gold); border-color: var(--navy); }
.map-box.is-current.breath-then .map-breath { background: #fff; }   /* a gold tag on a gold box would vanish */
.map-box.is-done { border-color: var(--green); }
.map-count { font-size: 13px; font-weight: bold; color: var(--navy); }


/* ---------------------------------------------------------------- Home */

.class-card { margin: 24px 0; padding: 4px 18px 12px; border: 1px solid var(--line); border-radius: 16px; }
.class-card h2 { margin-top: 0.7em; }
.class-n { display: block; font-size: 15px; text-transform: uppercase; letter-spacing: 0.5px; }
.class-sub { margin-top: 0; color: var(--navy); font-weight: bold; }
.map-note { font-size: 15px; }
.parts, .pages { margin: 0; padding: 0; list-style: none; }
.parts li { padding: 4px 0; }
.minutes { font-size: 15px; white-space: nowrap; }
.page-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-height: 48px; padding: 6px 0; border-top: 1px solid var(--line); }
.page-title { font-weight: bold; }
a.page-title { display: inline-flex; align-items: center; min-height: 44px; }
.page-meta { font-size: 15px; }
.status { margin-left: auto; padding: 2px 12px; border: 1px solid var(--edge); border-radius: 999px; color: var(--navy); font-size: 14px; white-space: nowrap; }
.status-started { border-color: var(--gold); background: var(--cream); }
.status-done { border-color: var(--green); }
.status-done .icon { margin-right: 4px; color: var(--navy); }
.status-coming { border-style: dashed; color: var(--slate); }
.fieldwork li { margin: 4px 0; }
.show-code { margin: 24px 0 8px; }
.show-code > summary { display: inline-flex; align-items: center; min-height: 44px; color: var(--navy); font-weight: bold; cursor: pointer; }
.print-links ul, .data-links ul { padding-left: 20px; }
.print-links li, .data-links li { margin: 6px 0; }

/* Bill's counts page */
.totals { padding-left: 20px; }
.counts-table { width: 100%; margin: 16px 0 24px; border-collapse: collapse; }
.counts-table caption { margin-bottom: 4px; color: var(--navy); font-size: 19px; font-weight: bold; text-align: left; }
.counts-table th, .counts-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.counts-table thead th { color: var(--navy); font-size: 15px; }
.counts-table tbody th { font-weight: normal; }
.counts-table td, .counts-table thead th + th { width: 5em; text-align: right; }


/* ---------------------------------------------------------------- the save code */

.save-code { margin: 8px 0; color: var(--navy); font: bold 30px/1.2 "Courier New", Courier, monospace; letter-spacing: 2px; word-break: break-all; }
.save-card { margin: 16px 0; padding: 16px; border: 2px dashed var(--navy); border-radius: 14px; text-align: center; }
.save-card p { margin: 4px 0; }
.save-card-series, .save-card-label { color: var(--navy); font-weight: bold; }
.save-card-where { font-size: 15px; }


/* ---------------------------------------------------------------- the print view on screen */

.print-tools { margin: 16px 0; padding: 4px 16px; border-radius: 12px; background: var(--cream); }
.print-page { margin: 28px 0; padding-top: 12px; border-top: 2px solid var(--navy); }
.plabel { margin-bottom: 2px; color: var(--navy); font-weight: bold; }
.panswer { margin-top: 2px; color: #1F2937; }
.pbox { min-height: 2.4em; margin: 4px 0 12px; border: 1px solid var(--edge); border-radius: 6px; }
.pbox-tall { min-height: 8em; }
.pblank { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 10px 0; }
.plabel-inline { color: var(--navy); font-weight: bold; }
.pline { flex: 1 1 10em; min-width: 8em; border-bottom: 1px solid var(--slate); }
.pmarks { white-space: nowrap; font-size: 15px; }
.pmark { display: inline-flex; align-items: center; justify-content: center; width: 1.1em; height: 1.1em; border: 1px solid var(--slate); vertical-align: -0.2em; }
.coming { font-style: italic; }
.poptions { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.ptable { width: 100%; border-collapse: collapse; margin: 6px 0 14px; }
.ptable th, .ptable td { height: 2.2em; padding: 4px 8px; border: 1px solid var(--edge); text-align: left; vertical-align: top; }
.ptable thead th { color: var(--navy); font-size: 15px; }
.pscale-ends { display: block; color: var(--slate); font-size: 12px; font-weight: normal; }   /* "1 Not so bad - 5 Idea is dead" */
.pscale { color: var(--slate); letter-spacing: 0.5em; white-space: nowrap; }                   /* 1 2 3 4 5, to circle */
.ptable tbody th { width: 2.5em; color: var(--navy); font-weight: normal; }
.pitem { margin: 10px 0 16px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 8px; break-inside: avoid; }
/* A list item on paper (an empathy map, an insight group): short answers three to a
   row, writing boxes two to a row (Says | Does, Thinks | Feels), the last one full
   width, so a whole map fits on one sheet. */
@media print, (min-width: 600px) {
  .pitem { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0 14px; align-items: end; }
  .pitem > * { grid-column: 1 / -1; }
  .pitem > .pfield { grid-column: span 2; }
  .pitem > .pfield-long { grid-column: span 3; }
  .pitem > .pfield-long:last-child { grid-column: 1 / -1; }
}
.pitem-label { margin: 6px 0; color: var(--navy); font-weight: bold; }
.pquestion { margin: 10px 0; }
.pif-no { font-style: italic; }


/* ---------------------------------------------------------------- paper */

@media print {
  .top, .bottom, .skip, .print-tools, .page-nav, .menu, .pill, .nojs-only, button, .ally-example { display: none !important; }
  .ai-box, .prompt { break-inside: avoid; }
  body { color: #000; font-size: 11.5pt; }
  main { max-width: none; padding: 0; }
  h1, h2, h3 { color: var(--navy); }
  a { color: inherit; text-decoration: none; }
  .print-page { margin: 0; padding: 0; border: 0; break-after: page; }
  .print-page:last-child { break-after: auto; }
  /* No heading or label stranded at the foot of a sheet, no box split in two */
  h2, h3, .plabel, .pitem-label, .widget-title { break-after: avoid; }
  .pcheck { break-after: avoid; }   /* "My sponsor OK'd this" stays with the initials and date after it */
  .pfield:not(.plist), .pblank, .pquestion, .ptable tr, .story, .money-math, .pulled, .doors, .tally, .safety, .print-check { break-inside: avoid; }
  .print-page:has(+ .print-check) { break-after: auto; }   /* the class check follows the last page, no new sheet */
  .ptable th, .ptable td { height: 1.9em; padding: 2px 6px; }
  .pbox, .pline, .pmark { border-color: #777; }
  .statement-preview { border-left-color: #bbb; background: none; }
  .ally { display: none; }
  /* Welcome: the Print button prints only the save card. */
  .welcome main > :not(.save-card) { display: none !important; }
  .welcome .save-card { margin-top: 0; }
}
