/* Nunito is served from this site, so no visitor data goes to a font provider. */
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/nunito-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/nunito-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 900; font-display: swap; src: url('../fonts/nunito-latin-900-normal.woff2') format('woff2'); }

:root {
    --ink: #1F2A44;
    --ink-soft: #3B4659;
    --ink-muted: #5A6578;
    --paper: #FFFDF7;
    --white: #FFFFFF;
    --yellow: #F2B33D;
    --yellow-dark: #E3A12A;
    --blue: #2F6FEB;
    --red: #B42318;
    --tint: #FCEFD0;
    --shadow: 6px 6px 0 var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: 'Nunito', system-ui, sans-serif;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.55;
}

[hidden] { display: none !important; }

a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--blue); }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible, pre:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 3px;
}

h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

h1 { font-size: clamp(34px, 6vw, 52px); font-weight: 900; line-height: 1.08; letter-spacing: -1px; }
h2 { font-size: 24px; font-weight: 900; line-height: 1.2; }

.visually-hidden {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
}

.skip-link { position: absolute; left: -999px; top: 8px; padding: 8px 14px; background: var(--yellow); border: 2px solid var(--ink); border-radius: 10px; font-weight: 900; z-index: 10; }
.skip-link:focus { left: 8px; }

.wrap { min-height: 100vh; display: flex; flex-direction: column; }

/* Header */
.site-header {
    width: 100%; max-width: 1120px; margin: 0 auto; padding: 20px 24px;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px;
}
.site-logo { display: inline-block; margin-left: -8px; }
.site-logo svg { display: block; height: 56px; width: auto; max-width: 100%; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.site-nav a {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
    border-radius: 10px; font-weight: 700; text-decoration: none;
}
.site-nav a:hover { background: var(--tint); color: var(--ink); }
.site-nav a[aria-current] { background: var(--ink); color: var(--white); }

/* Page */
.page {
    flex: 1; width: 100%; max-width: 920px; margin: 0 auto; padding: 24px 24px 96px;
    display: flex; flex-direction: column; gap: 24px;
}
.intro { font-size: 20px; line-height: 1.6; color: var(--ink-soft); max-width: 680px; }
.h1-sub { display: block; font-size: 0.5em; font-weight: 700; letter-spacing: 0; color: var(--ink-muted); margin-top: 6px; }

.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: 15px; color: var(--ink-muted); }
.breadcrumb a { color: var(--ink-muted); }
.breadcrumb [aria-current] { color: var(--ink); font-weight: 700; }

.section { display: flex; flex-direction: column; gap: 16px; }
.section-link { font-size: 16px; }

/* Home */
.page-home { max-width: 1120px; gap: 56px; }
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px; padding-top: 16px; }
.hero-logo svg { display: block; width: 120px; height: 120px; }
.hero .intro { max-width: 640px; }
.page-home .section > h2 { font-size: 30px; }

/* Cards and tiles */
.card {
    padding: 28px; background: var(--white);
    border: 3px solid var(--ink); border-radius: 20px; box-shadow: var(--shadow);
}
.card h2 { margin-bottom: 6px; }
.card p { color: var(--ink-soft); }

.tile-grid { display: grid; gap: 20px; }
.tile-grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.tile-grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.tile-grid > li { display: flex; }

.tile {
    flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 24px;
    background: var(--white); color: var(--ink); text-decoration: none;
    border: 3px solid var(--ink); border-radius: 20px; box-shadow: var(--shadow);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
a.tile:hover { color: var(--ink); transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
a.tile:active { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--ink); }
.tile-title { font-size: 26px; font-weight: 900; line-height: 1.15; }
.tile-text { color: var(--ink-soft); font-size: 16px; flex: 1; }
.tile-meta {
    align-self: flex-start; margin-top: 8px; padding: 4px 12px;
    background: var(--subject-tint, var(--tint)); border: 2px solid var(--ink); border-radius: 999px;
    font-size: 14px; font-weight: 900;
}
.tile-icon {
    display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin-bottom: 4px;
    background: var(--subject-tint, var(--tint)); border: 2px solid var(--ink); border-radius: 14px;
}
.tile-soon { box-shadow: none; border-style: dashed; background: transparent; }
.tile-soon .tile-meta { background: transparent; border-style: dashed; }

@media (prefers-reduced-motion: reduce) { .tile { transition: none; } }

/* Subject colours: tints behind dark text, so they never carry meaning alone */
.subject-taal { --subject-tint: #FBD9D2; }
.subject-rekenen { --subject-tint: #D6E4FD; }
.subject-topografie { --subject-tint: #CFEBDD; }

/* Buttons and inputs */
.button {
    min-height: 48px; padding: 0 20px; font: inherit; font-weight: 900; color: var(--ink);
    background: var(--yellow); border: 2px solid var(--ink); border-radius: 12px; cursor: pointer;
}
.button:hover { background: var(--yellow-dark); }

label, legend { font-size: 15px; font-weight: 700; }
input[type="text"], input[type="email"], textarea {
    width: 100%; min-height: 48px; padding: 0 14px; font: inherit; color: var(--ink);
    background: var(--paper); border: 2px solid var(--ink); border-radius: 12px;
}
textarea { padding: 10px 14px; line-height: 1.5; resize: vertical; }
input::placeholder, textarea::placeholder { color: #6B7588; opacity: 1; }

/* Signup */
.signup { width: 100%; max-width: 560px; margin: 0 auto; }
.signup-form { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.signup-form label { width: 100%; }
.signup-form input { flex: 1 1 240px; min-width: 0; width: auto; }
.error { color: var(--red) !important; font-weight: 700; font-size: 15px; margin-bottom: 12px; }
.small { font-size: 14px; color: var(--ink-muted) !important; }

/* Sign-up dialog shown before the first copy */
.signup-dialog {
    width: min(480px, calc(100vw - 32px)); padding: 28px; color: var(--ink);
    background: var(--white); border: 3px solid var(--ink); border-radius: 20px; box-shadow: var(--shadow);
}
.signup-dialog::backdrop { background: rgba(31, 42, 68, 0.6); }
.signup-dialog form { display: flex; flex-direction: column; gap: 14px; }
.signup-dialog p { color: var(--ink-soft); font-size: 16px; }
.signup-dialog .error { margin: 0; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.button-plain { background: var(--white); }
.button-plain:hover { background: var(--tint); }

/* Subject tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
    background: var(--white); border: 2px solid var(--ink); border-radius: 999px;
    font-weight: 900; text-decoration: none;
}
.tab:hover { background: var(--subject-tint); color: var(--ink); }
.tab[aria-current] { background: var(--ink); color: var(--white); }

/* Prompt cards */
.prompt-list { display: flex; flex-direction: column; gap: 16px; }
.prompt-card { background: var(--white); border: 3px solid var(--ink); border-radius: 20px; }
.prompt-card[open] { box-shadow: var(--shadow); }
.prompt-card summary {
    position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
    padding: 20px 60px 20px 24px; cursor: pointer; list-style: none; border-radius: 17px;
}
.prompt-card summary::-webkit-details-marker { display: none; }
.prompt-card summary::after {
    content: ''; position: absolute; right: 26px; top: 28px; width: 12px; height: 12px;
    border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: rotate(45deg);
}
.prompt-card[open] summary::after { transform: rotate(-135deg); top: 34px; }
.prompt-card summary:hover .prompt-title { text-decoration: underline; text-underline-offset: 4px; }
.prompt-kind {
    padding: 2px 10px; background: var(--subject-tint, var(--tint)); border: 2px solid var(--ink); border-radius: 999px;
    font-size: 13px; font-weight: 900;
}
.prompt-title { font-size: 22px; font-weight: 900; line-height: 1.2; }
.prompt-summary { color: var(--ink-soft); font-size: 16px; }

.prompt-body { display: flex; flex-direction: column; gap: 20px; padding: 4px 24px 24px; }
.prompt-fields {
    margin: 0; padding: 16px; border: 2px dashed var(--ink); border-radius: 14px;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 16px;
}
.prompt-fields legend { padding: 0 8px; font-weight: 900; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field-wide { grid-column: 1 / -1; }

.prompt-output { display: flex; flex-direction: column; gap: 12px; }
.prompt-text {
    margin: 0; padding: 18px; max-height: 420px; overflow: auto;
    background: var(--paper); border: 2px solid var(--ink); border-radius: 14px;
    font-family: inherit; font-size: 16px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere;
}
.prompt-text .filled { background: var(--subject-tint, var(--tint)); border-radius: 4px; padding: 0 3px; font-weight: 700; }
.prompt-text .todo { background: #FFFFFF; color: #8A1C12; border-radius: 4px; padding: 0 3px; font-weight: 900; outline: 2px dashed #8A1C12; outline-offset: -1px; }
.prompt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.copy-status { font-size: 15px; font-weight: 700; color: var(--ink-soft); }
.prompt-tip { padding: 12px 16px; background: var(--tint); border-radius: 12px; font-size: 16px; color: var(--ink-soft); }
.prompt-tip strong { color: var(--ink); font-weight: 900; }

.empty { box-shadow: none; border-style: dashed; }

/* Guide */
.steps { counter-reset: step; display: flex; flex-direction: column; gap: 20px; }
.steps li { counter-increment: step; position: relative; padding-left: 64px; min-height: 48px; }
.steps li::before {
    content: counter(step); position: absolute; left: 0; top: 0; width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: var(--yellow); border: 3px solid var(--ink); border-radius: 12px; font-size: 20px; font-weight: 900;
}
.steps h2 { font-size: 22px; margin-bottom: 4px; }
.steps p { color: var(--ink-soft); max-width: 640px; }
.rules ul { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.rules li { padding-left: 22px; position: relative; color: var(--ink-soft); }
.rules li::before { content: ''; position: absolute; left: 0; top: 0.55em; width: 10px; height: 10px; background: var(--yellow); border: 2px solid var(--ink); border-radius: 3px; }
.rules strong { color: var(--ink); font-weight: 900; }
.pill-list { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
    display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px;
    background: var(--yellow); border: 2px solid var(--ink); border-radius: 12px; font-weight: 900; text-decoration: none;
}
.pill:hover { background: var(--yellow-dark); color: var(--ink); }

.site-footer { padding: 24px; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; font-size: 14px; color: var(--ink-muted); }
.site-footer a { color: var(--ink-muted); }
.site-footer a:hover, .site-footer a[aria-current] { color: var(--ink); }

/* Long-form text */
.prose { display: flex; flex-direction: column; gap: 14px; max-width: 720px; color: var(--ink-soft); }
.prose h2 { margin-top: 18px; color: var(--ink); font-size: 22px; scroll-margin-top: 16px; }
.prose strong { color: var(--ink); font-weight: 900; }
.prose ul { display: flex; flex-direction: column; gap: 8px; padding-left: 22px; list-style: disc; }
.prose-meta { font-size: 15px; color: var(--ink-muted); }
.table-scroll { overflow-x: auto; border: 2px solid var(--ink); border-radius: 14px; background: var(--white); }
.prose table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid #D5D9E0; }
.prose th { color: var(--ink); font-weight: 900; background: var(--tint); border-bottom: 2px solid var(--ink); }
.prose tr:last-child td { border-bottom: 0; }

/* Cookie notice */
.cookie-notice {
    position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 20; max-width: 640px; margin: 0 auto; padding: 16px 20px;
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
    background: var(--white); border: 3px solid var(--ink); border-radius: 16px; box-shadow: var(--shadow);
}
.cookie-notice p { flex: 1 1 280px; font-size: 15px; color: var(--ink-soft); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 560px) {
    .site-header { padding: 16px; }
    .site-logo svg { height: 46px; }
    .page { padding: 16px 16px 72px; }
    .card { padding: 22px; }
    .signup-form .button { width: 100%; }
    .prompt-card summary { padding: 18px 52px 18px 18px; }
    .prompt-card summary::after { right: 20px; }
    .prompt-body { padding: 4px 18px 20px; }
    .prompt-actions .button { width: 100%; }
    .signup-dialog { padding: 22px; }
    .dialog-actions .button { width: 100%; }
    .cookie-actions { width: 100%; }
    .cookie-notice .button { flex: 1 1 130px; }
}
