/* Steinerskolen i Tromsø house style (from the HMS prototype). Same tokens as
   sit-dash/dash/public/style.css. Never colour alone; big targets; light only. */
:root{
--md-primary:#254c70;--md-on-primary:#fff;--md-primary-container:#3f6489;--md-secondary-container:#d6e4f7;--md-error:#ba1a1a;--md-surface-container:#eeedf1;--md-surface-container-lowest:#fff;--md-on-surface:#1a1c1e;--md-on-surface-variant:#42474e;--md-outline-variant:#c2c7cf;
--md-shape-xs:4px;--md-shape-sm:8px;--md-shape-md:12px;--md-shape-lg:16px;--md-shape-full:999px;
--md-headline-m:1.6rem;--md-title-l:1.2rem;--md-hover:8%;
--blue:var(--md-primary-container);--blue-hover:color-mix(in srgb,var(--md-primary-container),#fff var(--md-hover));--bg:var(--md-surface-container);--card:var(--md-surface-container-lowest);--ink:var(--md-on-surface);--muted:var(--md-on-surface-variant);--line:var(--md-outline-variant);--soft:var(--md-secondary-container);--red:var(--md-error);--ok:#2e7d32;--warn:#c4521a}

*{box-sizing:border-box}
html{font-size:20px}
body{margin:0;font-family:"Segoe UI",system-ui,sans-serif;background:var(--bg);color:var(--ink);line-height:1.45}
/* Header: logo left, page title centred (bump ?v= in the HTML when this file changes:
   the website lets browsers cache CSS for a week). */
header.site{background:var(--blue);color:#fff;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:1rem;padding:.7rem 1.2rem}
.apptitle{font-size:var(--md-title-l);font-weight:700;letter-spacing:.02em;text-align:center}
header.site a.brand{color:#fff;text-decoration:none;font-weight:700;font-size:1.3rem;display:flex;align-items:center;gap:.6rem}
.logo{height:2.3rem;width:auto;filter:brightness(0) invert(1)}
/* Inside the website's own page the site header is already there. */
.framed header.site{display:none}
.framed body,body.framed{background:transparent}
main{max-width:46rem;margin:0 auto;padding:1.2rem 1rem 3rem}
h1{font-size:var(--md-headline-m);margin:.2rem 0 .8rem;line-height:1.2}
a{color:var(--blue)}
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--md-shape-md);padding:1.2rem;margin-bottom:1rem}
.meta{color:var(--muted);font-size:.85rem}

label.f,legend.f{display:block;font-weight:600;margin:1.2rem 0 .4rem;font-size:1.1rem;padding:0}
.hint{color:var(--muted);font-size:.85rem;margin:-.2rem 0 .5rem}
h1+.hint{margin-top:0}
/* The step heading takes focus for screen readers; no box around it. */
h1[tabindex]:focus{outline:none}
input,textarea,select{font:inherit;width:100%;padding:.7rem .8rem;border:2px solid var(--line);border-radius:var(--md-shape-md);background:#fff;color:inherit}
input:focus,textarea:focus,select:focus{border-color:var(--blue);outline:none;box-shadow:0 0 0 4px var(--soft)}
select{appearance:none;padding-right:2.8rem;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6876' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right .9rem center/1.1rem}
textarea{min-height:7rem;resize:vertical}
input[type=file]{padding:.6rem;background:var(--bg)}
fieldset{border:0;margin:0;padding:0;min-width:0}
.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(13rem,1fr));gap:0 1rem}
.form-grid.zip{grid-template-columns:minmax(7rem,1fr) 3fr}

/* Choice buttons (radio inputs styled as big buttons). The chosen one is filled
   AND gets a check mark, so the choice reads without colour. */
.choices{display:flex;flex-wrap:wrap;gap:.6rem;margin-bottom:.4rem}
.choices.stack{flex-direction:column}
.choices label{position:relative;cursor:pointer}
.choices input{position:absolute;opacity:0;width:1px;height:1px}
.choices span{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;font-weight:600;min-width:3.2rem;min-height:3.2rem;padding:.6rem 1.1rem;border:2px solid var(--line);border-radius:var(--md-shape-md);background:#fff}
.choices.stack span{justify-content:flex-start;width:100%}
.choices label:hover span{border-color:var(--blue)}
.choices input:focus-visible+span{outline:3px solid var(--blue);outline-offset:2px}
.choices input:checked+span{border-color:var(--blue);background:var(--blue);color:#fff}
.choices input:checked+span::before{content:'✓';font-weight:800}

.steps{display:flex;gap:.4rem;margin-bottom:.3rem}
.steps span{flex:1;height:.5rem;border-radius:var(--md-shape-xs);background:var(--line)}
.steps span.on{background:var(--blue)}
.stepcount{margin:.2rem 0 .8rem}

.btn{font:inherit;font-weight:600;border-radius:var(--md-shape-md);border:2px solid var(--blue);background:#fff;color:var(--blue);padding:.7rem 1.3rem;min-height:3.2rem;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;gap:.4rem}
.btn.primary{background:var(--blue);color:#fff}
.btn.primary:hover{background:var(--blue-hover)}
.btn:focus-visible{outline:3px solid var(--blue);outline-offset:2px}
.btn.link{border:0;padding:.2rem .4rem;min-height:0;text-decoration:underline}
.row{display:flex;gap:.8rem;flex-wrap:wrap;align-items:center}
.spread{justify-content:space-between}

.note{border-left:4px solid var(--warn);padding:.4rem .8rem;margin:.6rem 0;background:#fff7f0;font-size:.9rem}
.msg{min-height:1.4em;font-weight:600;margin:.4rem 0}
.msg.bad{color:var(--red)}
.msg.bad::before{content:'⚠ '}
/* Problem fields: thicker red frame plus the message text, not colour alone. */
.invalid{border-color:var(--red)!important;border-width:3px!important}
.fielderr{color:var(--red);font-weight:600;font-size:.85rem;margin:.3rem 0 0}
.fielderr::before{content:'⚠ '}
.trap{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}

dl.review{display:grid;grid-template-columns:minmax(8rem,14rem) 1fr;gap:.4rem 1rem;margin:0 0 .6rem}
dl.review dt{color:var(--muted)}
dl.review dd{margin:0;overflow-wrap:anywhere}
.revblock{border-top:1px solid var(--line);padding-top:.6rem;margin-top:.6rem}
.revblock h2{font-size:var(--md-title-l);margin:0 0 .4rem;display:flex;justify-content:space-between;align-items:center;gap:1rem}
details.privacy{margin-top:1rem;border:1px solid var(--line);border-radius:var(--md-shape-md);padding:.6rem 1rem}
details.privacy summary{cursor:pointer;font-weight:600}

/* Wizard mode (set by script.js): one step at a time. */
.wizard .step{display:none}
.wizard .step.current{display:block}
.wizard .p2{display:none}
.wizard .p2.open{display:block}
#next,#prev{display:none}
.wizard #next,.wizard #prev{display:inline-flex}
.wizard #send{display:none}
.wizard.last #send{display:inline-flex}
.wizard.last #next{display:none}
.wizard.first #prev{visibility:hidden}
.steps:empty,.stepcount:empty{display:none}

/* Thank-you page (takk-for-soknad) */
.done h1{display:flex;gap:.6rem;align-items:center}
.done .copy{font-size:.85rem;overflow:auto}
.done .copy table{width:100%;border-collapse:collapse}
.done .copy td{padding:.35rem .5rem;border-bottom:1px solid var(--line);vertical-align:top}

@media (max-width:640px){html{font-size:18px}.logo{height:1.7rem}header.site{grid-template-columns:auto 1fr}header.site>div:last-child{display:none}.apptitle{text-align:right;font-size:1rem}dl.review{grid-template-columns:1fr}dl.review dt{margin-top:.4rem}}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
@media print{.no-print,header.site,.nav,.steps,.stepcount{display:none!important}body{background:#fff}.card{border:0}}
