/* Visual style matched to physa.nl (Studio Physa):
   sage green header, warm cream background, terracotta pill buttons,
   Libre Baskerville headings and Almarai body text. */

:root {
    --physa-ink: #303636;
    --physa-ink-soft: #5b6363;
    --physa-sage: #495a58;
    --physa-sage-dark: #3b4947;
    --physa-sage-tint: #dfe4e2;
    --physa-terracotta: #d4967d;
    --physa-terracotta-dark: #c07e64;
    --physa-terracotta-tint: rgba(212, 150, 125, 0.25);
    --physa-cream: #e5e3dc;
    --physa-cream-light: #f2f0ea;
    --physa-white: #ffffff;
    --physa-line: #d3cfc4;
    --physa-success: #3f6b4f;
    --physa-success-tint: #e2ece4;
    --physa-warning: #8a5a2b;
    --physa-warning-tint: #f4e6d6;
    --physa-error: #a3402c;

    --font-heading: "Libre Baskerville", Georgia, "Times New Roman", serif;
    --font-body: "Almarai", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    --radius-card: 24px;
    --radius-input: 12px;
    --radius-pill: 300px;
}

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

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--physa-ink);
    background: var(--physa-cream);
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 400;
    color: var(--physa-ink);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h1 { font-size: 38px; margin: 8px 0 24px; }

/* FocusOnNavigate moves focus to the h1 for screen readers; that focus
   shouldn't draw an outline. */
h1:focus { outline: none; }
h2 { font-size: 26px; margin: 36px 0 16px; }
h3 { font-size: 20px; margin: 0 0 12px; }

a {
    color: var(--physa-sage);
    text-underline-offset: 3px;
}

a:hover {
    color: var(--physa-terracotta-dark);
}

/* ---- Buttons & form controls ---- */
button {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1;
    padding: 12px 24px;
    margin: 2px 4px 2px 0;
    border: 1.5px solid var(--physa-terracotta);
    border-radius: var(--radius-pill);
    background: var(--physa-terracotta);
    color: var(--physa-white);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

button:hover:not(:disabled) {
    background: var(--physa-terracotta-dark);
    border-color: var(--physa-terracotta-dark);
}

button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--physa-sage);
    outline-offset: 2px;
}

/* Smaller, outlined buttons for row-level actions */
.admin-table button,
.lesson-row button,
.module-card > button,
.block-card > button,
.video-block-editor button,
.delete-confirm button {
    padding: 8px 16px;
    font-size: 14px;
    background: transparent;
    color: var(--physa-sage);
    border-color: var(--physa-sage);
}

.admin-table button:hover:not(:disabled),
.lesson-row button:hover:not(:disabled),
.module-card > button:hover:not(:disabled),
.block-card > button:hover:not(:disabled),
.video-block-editor button:hover:not(:disabled),
.delete-confirm button:hover:not(:disabled) {
    background: var(--physa-sage);
    border-color: var(--physa-sage);
    color: var(--physa-white);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
textarea {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--physa-ink);
    padding: 10px 14px;
    border: 1px solid var(--physa-line);
    border-radius: var(--radius-input);
    background: var(--physa-white);
    transition: border-color 0.15s ease;
}

input:focus, textarea:focus {
    border-color: var(--physa-sage);
    outline: none;
}

input[type="checkbox"] {
    accent-color: var(--physa-sage);
}

input[type="file"] {
    font-family: var(--font-body);
    font-size: 14px;
}

input[type="file"]::file-selector-button {
    font-family: var(--font-body);
    padding: 8px 16px;
    margin-right: 12px;
    border: 1.5px solid var(--physa-sage);
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--physa-sage);
    cursor: pointer;
}

textarea {
    width: 100%;
    min-height: 96px;
    resize: vertical;
}

/* ---- Header ---- */
.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 24px;
    padding: 20px 32px;
    background: var(--physa-sage);
    color: var(--physa-white);
}

.top-nav .brand {
    font-family: var(--font-heading);
    font-size: 22px;
    color: var(--physa-white);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.top-nav .brand-sub {
    font-family: var(--font-body);
    font-size: 13px;
    margin-left: 10px;
    padding-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: 3px;
}

.top-nav nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 22px;
}

.top-nav nav a {
    color: var(--physa-white);
    text-decoration: none;
    font-size: 15px;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
}

.top-nav nav a:hover,
.top-nav nav a.active {
    color: var(--physa-white);
    border-bottom-color: var(--physa-white);
}

/* The primary call to action in the header, like "Boek je kennismaking" on physa.nl */
.top-nav nav a.nav-cta {
    background: var(--physa-terracotta);
    border: none;
    border-radius: var(--radius-pill);
    padding: 12px 24px;
}

.top-nav nav a.nav-cta:hover {
    background: var(--physa-terracotta-dark);
}

.logout-form {
    display: inline;
    margin: 0;
}

.logout-button {
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    color: var(--physa-white);
    font-size: 14px;
    padding: 9px 20px;
    margin: 0;
}

.logout-button:hover:not(:disabled) {
    background: var(--physa-white);
    border-color: var(--physa-white);
    color: var(--physa-sage);
}

/* ---- Footer ---- */
.site-footer {
    margin-top: auto;
    padding: 32px;
    background: var(--physa-white);
    color: var(--physa-ink-soft);
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 24px;
}

.site-footer .footer-brand {
    font-family: var(--font-heading);
    color: var(--physa-ink);
    font-size: 17px;
}

.site-footer a {
    color: var(--physa-ink-soft);
}

/* ---- Home / landing page ---- */
.home-hero {
    max-width: 680px;
    margin: 72px auto;
    text-align: center;
    padding: 0 20px;
}

.home-hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.home-hero p {
    color: var(--physa-ink-soft);
    font-size: 18px;
    line-height: 1.7;
}

.home-hero .hero-cta {
    display: inline-block;
    margin: 16px 0 8px;
    padding: 18px 34px;
    border-radius: var(--radius-pill);
    background: var(--physa-terracotta);
    color: var(--physa-white);
    text-decoration: none;
    font-size: 16px;
}

.home-hero .hero-cta:hover {
    background: var(--physa-terracotta-dark);
    color: var(--physa-white);
}

.home-hero .hero-note {
    font-size: 15px;
}

/* ---- Main content ---- */
.content {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 24px 64px;
}

.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--physa-white);
    border-radius: var(--radius-card);
    overflow: hidden;
    margin-top: 20px;
}

.admin-table th, .admin-table td {
    text-align: left;
    padding: 14px 18px;
    border-bottom: 1px solid var(--physa-cream);
    vertical-align: middle;
}

.admin-table th {
    background: var(--physa-sage);
    color: var(--physa-white);
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 0.03em;
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-table tbody tr:hover td {
    background: var(--physa-cream-light);
}

/* ---- Course builder ---- */
.course-status-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 20px;
    margin-bottom: 24px;
    background: var(--physa-white);
    border-radius: var(--radius-card);
}

/* Unpublish follows Republish; keep it secondary */
.course-status-bar button + button {
    background: transparent;
    color: var(--physa-sage);
    border-color: var(--physa-sage);
}

.course-status-bar button + button:hover:not(:disabled) {
    background: var(--physa-sage);
    border-color: var(--physa-sage);
    color: var(--physa-white);
}

.course-editor > h3 {
    margin-top: 32px;
}

.course-status-bar .publish-error {
    flex-basis: 100%;
    margin: 0;
}

.course-title-input {
    display: block;
    width: 100%;
    font-family: var(--font-heading) !important;
    font-size: 30px !important;
    padding: 12px 18px !important;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.module-card, .block-card {
    background: var(--physa-white);
    border-radius: var(--radius-card);
    padding: 20px 24px;
    margin-bottom: 16px;
}

.module-card > input {
    font-family: var(--font-heading) !important;
    font-size: 18px !important;
    min-width: 280px;
    margin-right: 8px;
}

.lessons-in-module {
    margin-top: 16px;
    padding: 16px;
    background: var(--physa-cream-light);
    border-radius: 16px;
}

.lesson-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--physa-white);
    border-radius: 12px;
    padding: 10px 16px;
    margin-bottom: 8px;
}

.lesson-row a {
    text-decoration: none;
    color: var(--physa-ink);
}

.lesson-row a:hover {
    color: var(--physa-terracotta-dark);
}

.drag-handle {
    cursor: grab;
    margin-right: 10px;
    color: var(--physa-terracotta);
    font-weight: 700;
    letter-spacing: 1px;
    user-select: none;
}

.add-block-toolbar {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.video-block-editor {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin: 12px 0;
}

.video-block-editor video {
    border-radius: 16px;
    background: var(--physa-ink);
}

.video-block-editor > input {
    width: 100%;
    max-width: 480px;
}

.text-block-editor {
    margin: 12px 0;
}

.upload-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    max-width: 480px;
}

.upload-progress .progress-bar {
    flex-grow: 1;
}

/* EasyMDE editor, softened to fit the palette */
.EasyMDEContainer .editor-toolbar {
    border-color: var(--physa-line);
    border-radius: var(--radius-input) var(--radius-input) 0 0;
    background: var(--physa-cream-light);
}

.EasyMDEContainer .editor-toolbar button {
    background: transparent;
    border-color: transparent;
    color: var(--physa-ink);
    padding: 0;
    margin: 0;
    border-radius: 6px;
}

.EasyMDEContainer .editor-toolbar button:hover:not(:disabled),
.EasyMDEContainer .editor-toolbar button.active {
    background: var(--physa-white);
    border-color: var(--physa-line);
    color: var(--physa-ink);
}

.EasyMDEContainer .CodeMirror {
    border-color: var(--physa-line);
    border-radius: 0 0 var(--radius-input) var(--radius-input);
    font-family: var(--font-body);
}

/* ---- Progress ---- */
.progress-bar {
    background: var(--physa-sage-tint);
    border-radius: var(--radius-pill);
    height: 8px;
    overflow: hidden;
}

.progress-fill {
    background: var(--physa-terracotta);
    height: 100%;
    border-radius: var(--radius-pill);
    transition: width 0.3s ease;
}

/* ---- Mijn account: course cards ---- */
.course-card {
    background: var(--physa-terracotta-tint);
    border-radius: var(--radius-card);
    padding: 24px 28px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.course-card h3 {
    font-size: 22px;
    margin: 0;
}

.course-card p {
    margin: 0;
    color: var(--physa-ink-soft);
}

.course-card .progress-bar {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.7);
}

.course-card > span {
    font-size: 14px;
    color: var(--physa-ink-soft);
}

.course-card > a {
    display: inline-block;
    margin-top: 4px;
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    background: var(--physa-terracotta);
    color: var(--physa-white);
    text-decoration: none;
    font-size: 15px;
}

.course-card > a:hover {
    background: var(--physa-terracotta-dark);
    color: var(--physa-white);
}

/* ---- Status badges & messages ---- */
.status-badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    line-height: 1.3;
}

.status-draft { background: var(--physa-cream); color: var(--physa-ink-soft); }
.status-published { background: var(--physa-success-tint); color: var(--physa-success); }

.unpublished-changes-warning {
    color: var(--physa-warning);
    font-size: 14px;
    margin-right: auto;
}

.publish-error, .upload-error {
    color: var(--physa-error);
    font-size: 14px;
}

.replace-video-note,
.deactivated-notice {
    background: var(--physa-warning-tint);
    color: var(--physa-warning);
    border-radius: 16px;
    padding: 12px 18px;
    font-size: 14px;
    margin: 0 0 8px;
}

.deactivated-notice {
    font-size: 15px;
    margin-bottom: 24px;
}

.delete-confirm {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 14px;
    color: var(--physa-error);
    margin-left: 4px;
}

.create-user-form {
    background: var(--physa-white);
    border-radius: var(--radius-card);
    padding: 24px 28px;
    margin-bottom: 20px;
}

.editor-save {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin: 8px 0 32px;
}

.create-user-form h2 {
    margin-top: 0;
    font-size: 22px;
}

.create-user-form summary {
    cursor: pointer;
    color: var(--physa-sage);
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* Direct children only: an input inside a label in a row must not get a
   flex-basis, since the label stacks vertically and it'd become a height. */
.form-row > input {
    flex: 1 1 220px;
}

/* "Are you sure?" before a role change, 2FA reset or deletion. */
.confirm-box {
    background: var(--physa-warning-tint);
    color: var(--physa-ink);
    border-radius: 16px;
    padding: 16px 20px;
    margin: 16px 0;
    max-width: 640px;
}

.confirm-box p {
    margin: 0 0 12px;
}

.temp-password-display {
    background: var(--physa-success-tint);
    color: var(--physa-success);
    border-radius: 16px;
    padding: 14px 18px;
    margin: 16px 0 0;
    font-size: 14px;
    word-break: break-all;
}

.temp-password-display code {
    background: var(--physa-white);
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 700;
}

.user-action-success {
    color: var(--physa-success);
    font-size: 14px;
}

.enrolled-badge, .completed-badge {
    color: var(--physa-success);
    font-size: 14px;
}

.not-enrolled-badge {
    color: var(--physa-ink-soft);
    font-size: 14px;
}

.invite-help-text {
    color: var(--physa-ink-soft);
    font-size: 14px;
    margin-top: -4px;
    margin-bottom: 16px;
}

/* ---- Course player ---- */
.course-unavailable {
    text-align: center;
    padding: 72px 20px;
}

.player-layout {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.lesson-nav {
    width: 280px;
    flex-shrink: 0;
    background: var(--physa-white);
    border-radius: var(--radius-card);
    padding: 24px;
    position: sticky;
    top: 24px;
}

.lesson-nav h3 {
    font-size: 20px;
    margin-bottom: 20px;
}

.module-group + .module-group {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--physa-cream);
}

.module-group strong {
    display: block;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--physa-sage);
}

.lesson-nav ul {
    list-style: none;
    padding-left: 0;
    margin: 8px 0 0;
}

.lesson-nav li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    margin: 0 -12px;
    border-radius: 12px;
    color: var(--physa-ink);
    text-decoration: none;
    font-size: 15px;
}

.lesson-nav li a:hover {
    background: var(--physa-cream-light);
}

.lesson-nav li.active a {
    background: var(--physa-terracotta-tint);
}

.lesson-check {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid var(--physa-line);
    position: relative;
}

.lesson-check.done {
    background: var(--physa-sage);
    border-color: var(--physa-sage);
}

.lesson-check.done::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid var(--physa-white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.lesson-content {
    flex-grow: 1;
    min-width: 0;
}

.lesson-content > h2 {
    font-size: 32px;
    margin-top: 0;
}

.content-block {
    background: var(--physa-white);
    border-radius: var(--radius-card);
    padding: 24px;
    margin-bottom: 20px;
}

.content-block video {
    border-radius: 16px;
    background: var(--physa-ink);
    display: block;
}

.content-block .caption {
    color: var(--physa-ink-soft);
    font-size: 14px;
    margin: 12px 0 0;
}

.text-content-block {
    font-size: 17px;
    line-height: 1.75;
}

.text-content-block > :first-child {
    margin-top: 0;
}

.mark-read-btn {
    margin-top: 12px;
    background: transparent;
    color: var(--physa-sage);
    border-color: var(--physa-sage);
}

.mark-read-btn:hover:not(:disabled) {
    background: var(--physa-sage);
    border-color: var(--physa-sage);
    color: var(--physa-white);
}

.lesson-nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 28px;
}

@media (max-width: 800px) {
    .top-nav { padding: 16px 20px; }
    .content { padding: 28px 16px 48px; }
    h1 { font-size: 30px; }
    .home-hero h1 { font-size: 36px; }
    .player-layout { flex-direction: column; }
    .lesson-nav { width: 100%; position: static; }
    .admin-table { display: block; overflow-x: auto; }
    .module-card > input { min-width: 0; width: 100%; margin-bottom: 8px; }
}

/* ---- Identity / auth pages ---- */
.auth-page-wrapper {
    max-width: 460px;
    margin: 0 auto;
    padding: 56px 20px;
}

.auth-header {
    background: var(--physa-sage);
    padding: 20px 32px;
}

.auth-header .brand {
    font-family: var(--font-heading);
    font-size: 22px;
    color: var(--physa-white);
    text-decoration: none;
}

.auth-back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--physa-ink-soft);
    text-decoration: none;
    font-size: 14px;
}

.auth-page-content {
    background: var(--physa-white);
    border-radius: var(--radius-card);
    padding: 40px;
}

.auth-page-content h1 {
    font-size: 30px;
    margin-top: 0;
}

.auth-form .form-group {
    margin-bottom: 18px;
}

.auth-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--physa-ink);
}

.auth-form input:not([type="checkbox"]),
.auth-form textarea {
    width: 100%;
}

.auth-form button[type="submit"] {
    width: 100%;
    padding: 16px;
    margin: 8px 0 0;
    font-size: 16px;
}

/* Two-factor setup */
.two-factor-steps li {
    margin-bottom: 12px;
}

.two-factor-qr svg {
    display: block;
    width: 200px;
    height: 200px;
    margin: 12px 0;
    background: var(--physa-white);
}

.two-factor-key {
    word-spacing: 0.3em;
}

.recovery-codes {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    gap: 6px 24px;
    padding-left: 18px;
    font-size: 16px;
}

/* Passkeys */
.passkey-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.passkey-list li {
    border-top: 1px solid var(--physa-line);
    padding: 14px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
}

.passkey-rename {
    display: flex;
    gap: 8px;
    flex: 1 1 100%;
}

.passkey-rename input {
    flex: 1;
    min-width: 0;
}

.passkey-meta {
    font-size: 14px;
    color: var(--physa-ink-soft);
}

.passkey-login {
    margin-top: 12px;
}

.passkey-login button[type="button"] {
    width: 100%;
    padding: 16px;
    font-size: 16px;
}

.link-button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: var(--physa-error);
    font-size: 14px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.link-button:hover:not(:disabled) {
    background: none;
    color: var(--physa-error);
}

.button-danger,
.auth-form button.button-danger {
    background: var(--physa-error);
    border-color: var(--physa-error);
}

.button-danger:hover:not(:disabled) {
    background: #86321f;
    border-color: #86321f;
}

.auth-success {
    background: var(--physa-success-tint);
    color: var(--physa-success);
    border-radius: 12px;
    padding: 12px 16px;
}

.auth-validation-error {
    color: var(--physa-error);
    font-size: 14px;
    margin-top: 4px;
}

.auth-validation-error ul {
    margin: 0 0 12px;
    padding-left: 18px;
}

.auth-page-footer {
    margin-top: 20px;
    font-size: 14px;
    color: var(--physa-ink-soft);
}

.lesson-title-input {
    width: 100%;
    max-width: 480px;
    margin-bottom: 20px;
}

/* ---- Embedded in an iframe on physa.nl (?embed=1) ---- */
.page.embedded {
    min-height: 0;
}

.page.embedded .content {
    padding: 0 16px 24px;
}

/* ---- Check je energielek ---- */
.ec-page {
    max-width: 760px;
    margin: 0 auto;
}

.ec-intro,
.ec-section {
    background: var(--physa-white);
    border-radius: var(--radius-card);
    padding: 32px;
    margin-bottom: 20px;
}

.ec-intro {
    background: var(--physa-terracotta-tint);
}

.ec-intro h1 {
    font-size: 40px;
    margin: 0 0 16px;
}

.ec-intro p {
    font-size: 17px;
    margin: 0 0 12px;
}

.ec-center {
    text-align: center;
    padding: 56px 32px;
}

.ec-muted {
    color: var(--physa-ink-soft);
    font-size: 15px !important;
}

.ec-section h2 {
    font-size: 26px;
    margin: 0 0 8px;
}

.ec-question {
    padding: 18px 0;
    border-top: 1px solid var(--physa-cream);
    scroll-margin-top: 24px;
}

.ec-section h2 + .ec-question,
.ec-section h2 + .ec-hint + .ec-question {
    border-top: none;
}

.ec-question fieldset {
    border: none;
    margin: 0;
    padding: 0;
    min-width: 0;
}

.ec-question-text {
    display: block;
    font-size: 16px;
    margin-bottom: 10px;
    padding: 0;
}

.ec-question.ec-missing {
    margin: 0 -16px;
    padding: 18px 16px;
    border-radius: 16px;
    background: var(--physa-warning-tint);
}

.ec-question.ec-missing .ec-question-text::after,
.ec-question.ec-missing .ec-consent span::after {
    content: " — vul dit nog in";
    color: var(--physa-error);
    font-size: 14px;
}

.ec-hint {
    color: var(--physa-ink-soft);
    font-size: 14px;
    margin: 8px 0 0;
}

.ec-input {
    width: 100%;
}

select.ec-input {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--physa-ink);
    padding: 10px 14px;
    border: 1px solid var(--physa-line);
    border-radius: var(--radius-input);
    background: var(--physa-white);
}

/* Answer choices as pills, like the buttons on physa.nl */
.ec-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ec-options-stacked {
    flex-direction: column;
    align-items: flex-start;
}

.ec-option {
    position: relative;
    cursor: pointer;
}

.ec-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ec-option span {
    display: inline-block;
    padding: 9px 18px;
    border: 1.5px solid var(--physa-line);
    border-radius: var(--radius-pill);
    font-size: 15px;
    background: var(--physa-white);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ec-option:hover span {
    border-color: var(--physa-terracotta);
}

.ec-option.selected span {
    background: var(--physa-terracotta);
    border-color: var(--physa-terracotta);
    color: var(--physa-white);
}

.ec-option input:focus-visible + span {
    outline: 2px solid var(--physa-sage);
    outline-offset: 2px;
}

.ec-scale .ec-option span {
    min-width: 44px;
    text-align: center;
    padding: 9px 0;
}

.ec-consent {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    cursor: pointer;
}

.ec-consent input {
    margin-top: 5px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.ec-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.ec-error {
    background: var(--physa-warning-tint);
    color: var(--physa-error);
    border-radius: 16px;
    padding: 14px 18px;
}

.ec-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.ec-actions button[type="submit"] {
    padding: 18px 32px;
    font-size: 16px;
}

.ec-secondary {
    background: transparent;
    color: var(--physa-sage);
    border-color: var(--physa-sage);
}

.ec-secondary:hover:not(:disabled) {
    background: var(--physa-sage);
    border-color: var(--physa-sage);
    color: var(--physa-white);
}

.ec-button {
    display: inline-block;
    margin-top: 12px;
    padding: 16px 30px;
    border-radius: var(--radius-pill);
    background: var(--physa-terracotta);
    color: var(--physa-white);
    text-decoration: none;
}

.ec-button:hover {
    background: var(--physa-terracotta-dark);
    color: var(--physa-white);
}

.ec-actions .ec-button {
    margin-top: 0;
}

/* Results */
.ec-summary {
    background: var(--physa-sage);
    color: var(--physa-white);
    border-radius: 20px;
    padding: 22px 24px;
    margin-bottom: 28px;
}

.ec-summary strong {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 22px;
}

.ec-summary p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 15px;
}

.ec-bar-row + .ec-bar-row {
    margin-top: 22px;
}

.ec-bar-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
    font-size: 17px;
}

.ec-bar-value {
    font-family: var(--font-heading);
    font-size: 20px;
}

.ec-bar {
    height: 14px;
    border-radius: var(--radius-pill);
    background: var(--physa-cream);
    overflow: hidden;
}

.ec-bar-fill {
    height: 100%;
    border-radius: var(--radius-pill);
    min-width: 6px;
}

.ec-bar-fill.level-low { background: #9fb3a8; }
.ec-bar-fill.level-some { background: #c9b28f; }
.ec-bar-fill.level-more { background: var(--physa-terracotta); }
.ec-bar-fill.level-high { background: var(--physa-terracotta-dark); }

.ec-bar-label {
    margin: 6px 0 0;
    color: var(--physa-ink-soft);
    font-size: 14px;
}

.ec-vitality {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 28px;
    padding: 18px 24px;
    border-radius: 20px;
    background: var(--physa-cream-light);
}

.ec-vitality strong {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 30px;
}

.ec-vitality small {
    font-size: 16px;
    color: var(--physa-ink-soft);
}

.ec-reflections {
    margin-top: 28px;
}

.ec-reflections h3,
.ec-answers h3 {
    font-size: 19px;
    margin: 0 0 12px;
}

.ec-reflections dl,
.ec-answers dl {
    margin: 0;
}

.ec-reflections dt,
.ec-answers dt {
    font-weight: 700;
    font-size: 14px;
    margin-top: 12px;
}

.ec-reflections dd,
.ec-answers dd {
    margin: 2px 0 0;
    white-space: pre-line;
}

.ec-cta h2 {
    font-size: 24px;
}

.ec-admin-submission h2 {
    font-size: 20px;
}

.ec-admin-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 4px 0 20px;
}

.ec-admin-actions button {
    padding: 8px 16px;
    font-size: 14px;
    margin: 0;
    background: transparent;
    color: var(--physa-sage);
    border-color: var(--physa-sage);
}

.ec-admin-actions button:hover:not(:disabled) {
    background: var(--physa-sage);
    border-color: var(--physa-sage);
    color: var(--physa-white);
}

.ec-admin-link {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: var(--radius-pill);
    background: var(--physa-terracotta);
    color: var(--physa-white);
    text-decoration: none;
}

.ec-admin-link:hover {
    background: var(--physa-terracotta-dark);
    color: var(--physa-white);
}

.ec-admin-note {
    background: var(--physa-sage-tint);
    border-radius: 16px;
    padding: 12px 18px;
    font-size: 14px;
}

.ec-answers {
    margin-top: 24px;
}

.ec-answers summary {
    cursor: pointer;
    color: var(--physa-sage);
    margin-bottom: 8px;
}

.ec-answers h3 {
    margin-top: 20px;
}

@media (max-width: 800px) {
    .ec-intro, .ec-section { padding: 24px 20px; }
    .ec-intro h1 { font-size: 30px; }
    .ec-scale .ec-option span { min-width: 38px; }
}

@media print {
    .top-nav, .site-footer, .ec-cta, .ec-admin-note { display: none; }
    body { background: #fff; }
    .ec-intro, .ec-section { border: 1px solid var(--physa-line); break-inside: avoid; }
}

/* ---- Admin area: side menu ---- */
.admin-shell {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.admin-sidenav {
    width: 220px;
    flex-shrink: 0;
    background: var(--physa-white);
    border-radius: var(--radius-card);
    padding: 20px 16px;
    position: sticky;
    top: 24px;
}

.admin-sidenav-title {
    margin: 0 0 10px 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--physa-sage);
}

.admin-sidenav nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-sidenav nav + nav {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--physa-line);
}

.admin-sidenav a {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--physa-ink);
    text-decoration: none;
}

.admin-sidenav a:hover {
    background: var(--physa-cream-light);
}

.admin-sidenav a.active {
    background: var(--physa-terracotta-tint);
}

.admin-main {
    flex-grow: 1;
    min-width: 0;
}

.admin-main > h1:first-child,
.admin-main > a:first-child + h1 {
    margin-top: 0;
}

/* ---- Students ---- */
.status-pending { background: var(--physa-warning-tint); color: var(--physa-warning); }
.status-missing { background: #f6e1db; color: var(--physa-error); }

.student-email {
    color: var(--physa-ink-soft);
    font-size: 14px;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 0;
}

.filter-chips .filter-chip {
    padding: 8px 18px;
    font-size: 14px;
    margin: 0;
    background: var(--physa-white);
    color: var(--physa-ink);
    border-color: var(--physa-line);
}

.filter-chips .filter-chip:hover:not(:disabled) {
    background: var(--physa-white);
    border-color: var(--physa-terracotta);
}

.filter-chips .filter-chip.active,
.filter-chips .filter-chip.active:hover:not(:disabled) {
    background: var(--physa-terracotta);
    border-color: var(--physa-terracotta);
    color: var(--physa-white);
}

.order-search {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin: 16px 0 12px;
}

.order-search input[type="search"] {
    flex: 1 1 280px;
}

.order-search label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-list-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    margin: 16px 0 8px;
    color: var(--physa-ink-soft);
}

.order-list-summary p {
    margin: 0;
}

.order-list-summary label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-list-summary select {
    width: auto;
}

/* Column headers that sort: plain header text, underlined on hover.
   .admin-table in front to win over the row-button rule. */
.admin-table .sort-button,
.admin-table .sort-button:hover:not(:disabled) {
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    line-height: inherit;
}

.admin-table .sort-button:hover:not(:disabled) {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* A link that opens a row, shaped like the row buttons. */
.admin-table a.button-secondary {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    line-height: 1;
    border: 1.5px solid var(--physa-sage);
    border-radius: var(--radius-pill);
    text-decoration: none;
    white-space: nowrap;
}

.order-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 20px 0;
}

.students-add-second {
    margin-top: 24px;
}

.create-user-form h2 + .invite-help-text {
    margin-top: 0;
}

.create-user-form summary + h2 {
    margin-top: 16px;
}

.student-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.student-header h1 {
    margin-bottom: 4px;
}

.button-secondary {
    background: transparent;
    color: var(--physa-sage);
    border-color: var(--physa-sage);
}

.button-secondary:hover:not(:disabled) {
    background: var(--physa-sage);
    border-color: var(--physa-sage);
    color: var(--physa-white);
}

/* Page editor: "Features" blocks (blog posts, contact form) */
.button-feature {
    background: var(--physa-sage);
    border-color: var(--physa-sage);
    color: var(--physa-white);
}

.button-feature:hover:not(:disabled) {
    background: var(--physa-sage-dark);
    border-color: var(--physa-sage-dark);
    color: var(--physa-white);
}

.register-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.register-options .create-user-form {
    margin-bottom: 0;
}

.register-options h3 {
    margin-top: 0;
}

@media (max-width: 800px) {
    .admin-shell { flex-direction: column; gap: 16px; }
    .admin-sidenav { width: 100%; position: static; padding: 12px; }
    .admin-sidenav nav { flex-direction: row; flex-wrap: wrap; align-items: center; }
    .admin-sidenav-title { width: 100%; margin: 0 0 4px 12px; font-size: 11px; }
    .admin-sidenav nav + nav { margin-top: 10px; padding-top: 10px; }
}

.admin-table .status-badge {
    white-space: nowrap;
}

/* The admin column is narrower than the full page, so tables are a bit
   denser there, and long email addresses may wrap. */
.admin-main .admin-table th,
.admin-main .admin-table td {
    padding: 12px 12px;
}

.admin-main .admin-table td:first-child {
    overflow-wrap: anywhere;
}

/* The page title wraps between words, not per letter, now the type column
   competes for the room. */
.admin-main .page-table td:first-child {
    min-width: 12em;
}

/* ---- Website pages (CMS blocks) ---- */
.site-page {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.site-hero {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    min-height: 420px;
    display: flex;
    align-items: flex-end;
    background-color: var(--physa-sage);
    background-size: cover;
    background-position: center;
    color: var(--physa-white);
}

/* Sage veil over the photo so white text stays readable, like physa.nl */
.site-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(73, 90, 88, 0.15) 0%, rgba(73, 90, 88, 0.75) 100%);
}

.site-hero.no-image {
    min-height: 0;
}

.site-hero.no-image::before {
    display: none;
}

/* Three equal columns: the title spans them, the text takes one
   (text-left / text-center / text-right). */
.site-hero-inner {
    position: relative;
    width: 100%;
    padding: 56px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 48px;
    row-gap: 16px;
}

.site-hero h1 {
    grid-column: 1 / -1;
    color: var(--physa-white);
    font-size: 56px;
    margin: 0;
}

.site-hero-body { grid-column: 1; }
.site-hero.text-center .site-hero-body { grid-column: 2; }
.site-hero.text-right .site-hero-body { grid-column: 3; }

/* Without a photo there's nothing to keep clear of: text at reading width. */
.site-hero.no-image .site-hero-body {
    grid-column: 1 / -1;
    max-width: 760px;
}

.site-hero .site-prose {
    color: rgba(255, 255, 255, 0.92);
    font-size: 19px;
}

.site-hero-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

/* Light: a light photo as it is, dark text, title at the top. */
.site-hero.tone-light {
    min-height: 560px;
    align-items: flex-start;
    background-color: var(--physa-cream-light);
    color: var(--physa-ink);
}

.site-hero.tone-light::before {
    display: none;
}

.site-hero-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.site-hero.tone-light h1 {
    color: var(--physa-sage);
}

.site-hero.tone-light .site-prose {
    color: var(--physa-ink);
}

/* Light style: the title's and text's colour from the palette, to suit the
   photo. White and cream get a soft shadow so they stay readable over
   leaves and branches. */
.site-hero.title-sage h1 { color: var(--physa-sage); }
.site-hero.title-ink h1 { color: var(--physa-ink); }
.site-hero.title-terracotta h1 { color: var(--physa-terracotta); }
.site-hero.title-cream h1 { color: var(--physa-cream-light); }
.site-hero.title-white h1 { color: var(--physa-white); }
.site-hero.copy-sage .site-prose, .site-hero.copy-sage .site-prose a { color: var(--physa-sage); }
.site-hero.copy-ink .site-prose, .site-hero.copy-ink .site-prose a { color: var(--physa-ink); }
.site-hero.copy-terracotta .site-prose, .site-hero.copy-terracotta .site-prose a { color: var(--physa-terracotta); }
.site-hero.copy-cream .site-prose, .site-hero.copy-cream .site-prose a { color: var(--physa-cream-light); }
.site-hero.copy-white .site-prose, .site-hero.copy-white .site-prose a { color: var(--physa-white); }
.site-hero:is(.title-white, .title-cream) h1,
.site-hero:is(.copy-white, .copy-cream) .site-prose {
    text-shadow: 0 1px 3px rgba(0, 0, 0, .55), 0 0 24px rgba(0, 0, 0, .45);
}

/* Photo panel: the photo fills two thirds on one side, the text the other. */
.site-hero-panel {
    grid-row: 2;
    width: 100%;
    height: 100%;
    min-height: 420px;
    object-fit: cover;
    border-radius: 22px;
}

.site-hero.photo-left .site-hero-panel { grid-column: 1 / span 2; }
.site-hero.photo-right .site-hero-panel { grid-column: 2 / span 2; }

.site-hero[class*="photo-"] .site-hero-body {
    grid-row: 2;
    align-self: center;
}

.site-section {
    margin: 0;
}

.site-prose {
    font-size: 17px;
    line-height: 1.75;
    max-width: 760px;
}

.site-prose > :first-child { margin-top: 0; }
.site-prose > :last-child { margin-bottom: 0; }

.site-prose h2 { font-size: 34px; }
.site-prose h3 { font-size: 24px; }

.site-text-image {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.site-text-image.image-left img {
    order: -1;
}

.site-text-image img,
.site-image img {
    width: 100%;
    border-radius: 30px;
    display: block;
    object-fit: cover;
}

/* Columns side by side; widths come from the block (grid-template-columns). */
.site-columns {
    display: grid;
    gap: 48px;
    align-items: start;
}

.site-columns.align-center {
    align-items: center;
}

.site-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

.site-column .site-image {
    margin: 0;
}

.site-column p:has(> .site-button) {
    margin: 0;
}

.site-image figcaption {
    margin-top: 10px;
    color: var(--physa-ink-soft);
    font-size: 14px;
    text-align: center;
}

.site-cards-heading {
    text-align: center;
    margin: 0 0 24px;
}

.site-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.site-card {
    background: var(--physa-terracotta-tint);
    border-radius: 30px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.site-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

.site-card-body {
    padding: 24px 28px 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
}

.site-card-body h3 {
    margin: 0;
    font-size: 24px;
}

.site-card-body .site-button {
    align-self: flex-start;
    margin-top: auto;
}

.site-button-row {
    text-align: center;
}

.site-button {
    display: inline-block;
    padding: 18px 32px;
    border-radius: var(--radius-pill);
    background: var(--physa-terracotta);
    color: var(--physa-white);
    text-decoration: none;
}

.site-button:hover {
    background: var(--physa-terracotta-dark);
    color: var(--physa-white);
}

/* A second action next to the main one (e.g. the invoice PDF beside
   paying): outlined, so it doesn't compete. Same size as .site-button. */
.site-button.site-button-outline {
    padding: 16px 30px;
    background: transparent;
    border: 2px solid var(--physa-terracotta-dark);
    color: var(--physa-ink);
}

.site-button.site-button-outline:hover {
    background: var(--physa-terracotta-tint);
    color: var(--physa-ink);
}

/* ---- Blog ---- */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.blog-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 32px;
}

.blog-card {
    display: flex;
    flex-direction: column;
}

.blog-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 30px;
    display: block;
}

.blog-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 18px;
    flex-grow: 1;
}

.blog-card time,
.blog-post-meta {
    color: var(--physa-ink-soft);
    font-size: 15px;
}

.blog-card h3 {
    margin: 0;
    font-size: 24px;
}

.blog-card h3 a {
    color: inherit;
    text-decoration: none;
}

.blog-card h3 a:hover {
    text-decoration: underline;
}

.blog-card p {
    margin: 0;
}

.blog-card-more {
    margin-top: auto;
    align-self: flex-start;
    padding: 12px 26px;
}

/* Products stand apart from blog cards: a panel with a real button. */
.product-card {
    background: var(--physa-white);
    border-radius: var(--radius-card);
    padding: 16px 16px 24px;
}

.product-card img {
    border-radius: 16px;
}

.product-card .blog-card-body {
    padding: 18px 12px 0;
}

.product-card-button {
    margin-top: auto;
    align-self: flex-start;
    padding: 12px 26px;
}

.blog-list-empty {
    text-align: center;
    color: var(--physa-ink-soft);
}

.blog-post {
    max-width: 760px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.blog-post-header h1 {
    font-size: 48px;
    margin: 0 0 12px;
}

.blog-post-meta {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
}

.blog-post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    border-top: 1px solid var(--physa-line);
    padding-top: 24px;
}

.blog-post-nav a {
    color: var(--physa-ink);
    text-decoration: none;
}

.blog-post-nav a span {
    display: block;
    font-size: 14px;
    color: var(--physa-ink-soft);
}

.blog-post-nav-older {
    grid-column: 2;
    text-align: right;
}

.blog-post-nav .blog-post-nav-all {
    grid-column: 1 / -1;
    justify-self: center;
    color: var(--physa-white);
}

/* ---- Store: product cards and the product page ---- */
.product-back {
    border-top: 1px solid var(--physa-line);
    padding-top: 24px;
    text-align: center;
}

.product-price {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
    font-size: 18px;
}

.product-price del {
    color: var(--physa-ink-soft);
}

.product-sale {
    font-size: 13px;
    padding: 2px 10px;
    border-radius: var(--radius-pill);
    background: var(--physa-terracotta-tint);
    color: var(--physa-terracotta-dark);
}

.product-page {
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
/* Products stand apart from blog cards: a panel with a real button. */
.product-card {
    background: var(--physa-white);
    border-radius: var(--radius-card);
    padding: 16px 16px 24px;
}

.product-card img {
    border-radius: 16px;
}

.product-card .blog-card-body {
    padding: 18px 12px 0;
}

.product-card-button {
    margin-top: auto;
    align-self: flex-start;
    padding: 12px 26px;
}

    display: flex;
    flex-direction: column;
    gap: 40px;
}

.product-page-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}

.product-page-top.no-image {
    grid-template-columns: minmax(0, 640px);
}

.product-page-image {
    width: 100%;
    border-radius: 30px;
    display: block;
}

.product-page-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.product-page-info h1 {
    font-size: 44px;
    margin: 0;
}

.product-page-info .product-price {
    font-size: 24px;
}

.product-vat {
    margin: 0;
    font-size: 14px;
    color: var(--physa-ink-soft);
}

.product-kind {
    color: var(--physa-ink-soft);
    font-size: 14px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.product-outline {
    max-width: 720px;
}

.product-outline h3 {
    margin: 24px 0 4px;
    font-size: 20px;
}

.product-outline ol {
    margin: 0;
    padding-left: 22px;
}

.product-includes ul {
    margin: 6px 0 0;
    padding-left: 20px;
}

.product-summary {
    margin: 0;
    font-size: 18px;
}

.checkout {
    max-width: 640px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.checkout h1 {
    font-size: 40px;
    margin: 0;
}

.checkout-summary {
    background: var(--physa-white);
    border-radius: var(--radius-card);
    padding: 20px 28px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 16px;
    align-items: baseline;
}

.checkout-summary .product-vat {
    grid-column: 1 / -1;
}

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.checkout-form .contact-form-field input {
    width: 100%;
}

.checkout-consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    line-height: 1.5;
}

.checkout-consent input {
    margin-top: 5px;
    flex: none;
}

.checkout-form .site-button {
    align-self: flex-start;
}

.order-status {
    margin: 0;
    font-size: 18px;
}

.order-status-paid {
    color: var(--physa-success);
}

.order-status-failed,
.order-status-cancelled,
.order-status-expired {
    color: var(--physa-error);
}

.admin-table td.nowrap {
    white-space: nowrap;
}

.order-downloads {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.test-payment-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.price-input {
    max-width: 140px;
}

@media (max-width: 800px) {
    .product-page-top {
        grid-template-columns: 1fr;
    }

    .product-page-info h1 {
        font-size: 34px;
    }
}

/* ---- Block styles (a block's background and width) ---- */
.block-style {
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.block-style[class*="block-bg-"] {
    border-radius: 30px;
    padding: 56px 64px;
}

.block-bg-white { background: var(--physa-white); }
.block-bg-light { background: var(--physa-cream-light); }
.block-bg-terracotta { background: var(--physa-terracotta-tint); }

.block-bg-sage {
    background: var(--physa-sage);
    color: var(--physa-white);
}

.block-bg-sage :is(h1, h2, h3, h4, p, li, figcaption, time, label, .contact-form-privacy),
.block-bg-sage .site-prose a:not(.site-button) {
    color: var(--physa-white);
}

.block-bg-sage .contact-form-optional { color: rgba(255, 255, 255, 0.75); }
.block-bg-sage .contact-form .validation-message { color: #ffd3c4; }

/* Cards get a solid surface on a coloured band (their own tint would turn
   muddy on sage and vanish on terracotta). */
.block-bg-sage .site-card { background: var(--physa-cream-light); }
.block-bg-terracotta .site-card { background: var(--physa-white); }

/* Surfaces with their own light background keep dark text on a dark band. */
.block-bg-sage :is(.site-card, .embed-consent),
.block-bg-sage :is(.site-card, .embed-consent) :is(h3, p, a:not(.site-button)) {
    color: var(--physa-ink);
}

.block-width-narrow {
    max-width: 760px;
}

@media (max-width: 800px) {
    .block-style[class*="block-bg-"] { padding: 32px 22px; border-radius: 22px; }
}

/* ---- Embed ---- */
.site-embed {
    margin: 0;
    max-width: 960px;
    width: 100%;
    align-self: center;
}

.site-embed iframe,
.site-embed .embed-consent {
    width: 100%;
    height: var(--embed-height, 600px);
    border: 0;
    border-radius: 30px;
}

.site-embed iframe {
    display: block;
}

.site-embed.is-video iframe,
.site-embed.is-video .embed-consent {
    height: auto;
    aspect-ratio: 16 / 9;
}

.embed-consent {
    background: var(--physa-sage-tint);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    text-align: center;
    box-sizing: border-box;
}

.embed-consent p {
    margin: 0;
    max-width: 520px;
    color: var(--physa-ink-soft);
}

.embed-consent .embed-consent-title {
    font-family: var(--font-heading);
    font-size: 22px;
    color: var(--physa-ink);
}

.embed-consent .site-button {
    border: none;
    font: inherit;
    cursor: pointer;
}

/* ---- Contact form ---- */
.contact-form {
    max-width: 760px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-form h2 {
    margin: 0;
}

.contact-form-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

/* With a photo: the heading, intro and fields in one column, the photo
   filling the other (on a phone, a band above them). */
.contact-form.with-image {
    max-width: 1100px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: stretch;
}

.contact-form.with-image .contact-form-image {
    order: 2;
    min-height: 420px;
}

.contact-form.with-image.image-left .contact-form-image {
    order: 0;
}

.contact-form-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
    display: block;
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
}

.contact-form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 15px;
}

/* Fields side by side line up at the bottom: a label that wraps onto two
   lines pushes its own field down, not out of line with its neighbour. */
.contact-form-field > label {
    margin-top: auto;
}

.contact-form-fields input,
.contact-form-fields textarea {
    width: 100%;
    font-size: 16px;
}

.contact-form-message {
    grid-column: 1 / -1;
}

.contact-form-optional {
    color: var(--physa-ink-soft);
}

.contact-form .validation-message,
.checkout-form .validation-message {
    color: var(--physa-error);
    font-size: 14px;
}

/* An outline rather than the border: the site-wide input style sets that. */
.contact-form .invalid {
    box-shadow: 0 0 0 1px var(--physa-error);
}

.contact-form .site-button {
    align-self: flex-start;
    border: none;
    font: inherit;
    cursor: pointer;
}

.contact-form .site-button:disabled {
    opacity: 0.6;
    cursor: default;
}

.contact-form-privacy {
    font-size: 14px;
    color: var(--physa-ink-soft);
}

.contact-form-sent {
    background: var(--physa-success-tint);
    color: var(--physa-success);
    border-radius: 16px;
    padding: 18px 22px;
    margin: 0;
}

/* Off-screen rather than display:none, which some bots skip. */
.contact-form-hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@media (max-width: 800px) {
    .site-page { gap: 28px; }
    .contact-form-fields { grid-template-columns: 1fr; }
    .contact-form.with-image { grid-template-columns: 1fr; gap: 24px; }
    .contact-form.with-image .contact-form-image { order: 0; min-height: 0; height: 260px; }
    .blog-post-header h1 { font-size: 34px; }
    .blog-post-nav { grid-template-columns: 1fr; }
    .blog-post-nav-older { grid-column: 1; text-align: left; }
    .site-hero { min-height: 320px; }
    .site-hero-inner { padding: 32px 24px; }
    .site-hero-inner { display: block; }
    .site-hero h1 { margin-bottom: 16px; }
    .site-hero-panel { height: 72vw; max-height: 460px; min-height: 0; margin-bottom: 20px; }
    /* Light on a phone: no room beside the person, so a photo band above the text. */
    .site-hero.tone-light { display: block; min-height: 0; }
    .site-hero.tone-light .site-hero-photo { position: static; height: 72vw; max-height: 460px; }
    /* The text is under the photo band there, on the light background. */
    .site-hero.tone-light[class*="title-"] h1 { color: var(--physa-sage); text-shadow: none; }
    .site-hero.tone-light[class*="copy-"] .site-prose,
    .site-hero.tone-light[class*="copy-"] .site-prose a { color: var(--physa-ink); text-shadow: none; }
    .site-hero h1 { font-size: 36px; }
    .site-text-image { grid-template-columns: 1fr; gap: 24px; }
    .site-columns { grid-template-columns: 1fr !important; gap: 32px; }
    .site-text-image.image-left img { order: 0; }
}

/* ---- Admin page editor ---- */
/* Admin > Messages */
.message-head {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.message-head strong {
    flex-grow: 0;
    white-space: nowrap;
}

.message-head .block-summary {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-date {
    color: var(--physa-ink-soft);
    font-size: 14px;
    white-space: nowrap;
}

.message-card.handled {
    opacity: 0.75;
}

.message-body {
    padding: 4px 0 8px 28px;
}

.message-body dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 4px 16px;
    margin: 0 0 12px;
}

.message-body dt {
    color: var(--physa-ink-soft);
}

.message-body dd {
    margin: 0;
}

.message-text {
    white-space: pre-wrap;
    background: var(--physa-cream-light);
    border-radius: 12px;
    padding: 14px 18px;
}

.message-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

/* Page editor: a block's Style row */
.block-style-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px 32px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--physa-line);
    font-size: 14px;
}

.block-style-row > .toolbar-label { flex-basis: 100%; }

.block-style-row label {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Admin > Redirects */
.redirect-add-row {
    align-items: flex-end;
    flex-wrap: wrap;
}

.redirect-import {
    width: 100%;
    font-family: ui-monospace, Menlo, monospace;
    font-size: 14px;
    margin-bottom: 10px;
}

.blog-page-notice {
    background: var(--physa-warning-tint);
    color: var(--physa-warning);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
}

.blog-page-notice > div {
    flex: 1 1 300px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.blog-page-notice > div p {
    flex: none;
}

.blog-page-notice p {
    margin: 0;
    flex: 1 1 320px;
}

.post-date-input {
    max-width: 200px;
}

.page-block-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.page-block-head strong {
    flex-grow: 1;
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 18px;
}

.page-block-fields,
.page-settings {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.page-settings {
    margin: 16px 0;
}

.page-block-fields label,
.page-settings label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
    color: var(--physa-ink-soft);
}

/* Fields side by side share the row; in the vertical stack a flex-basis
   would turn into a height, so it's only set inside a row. */
.page-block-fields .form-row,
.page-settings .form-row {
    align-items: flex-end;
}

.page-block-fields .form-row > label,
.page-settings .form-row > label {
    flex: 1 1 220px;
}

.page-block-fields label.checkbox-label,
.page-settings label.checkbox-label {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    color: var(--physa-ink);
}

.page-card-editor {
    border: 1px solid var(--physa-cream);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.page-card-editor-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Columns block: one panel per column, side by side where they fit. */
.columns-editor {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.column-editor {
    border: 1px solid var(--physa-cream);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.column-item-editor {
    background: var(--physa-cream-light);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.column-item-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--physa-ink-soft);
}

.column-item-tools {
    display: flex;
    gap: 4px;
}

.page-block-fields .column-item-tools button {
    padding: 4px 9px;
    min-width: 30px;
}

.column-add {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.page-block-fields button,
.page-block-head button,
.page-card-editor button,
.image-field button {
    padding: 8px 16px;
    font-size: 14px;
    background: transparent;
    color: var(--physa-sage);
    border-color: var(--physa-sage);
    align-self: flex-start;
}

.page-block-fields button:hover:not(:disabled),
.page-block-head button:hover:not(:disabled),
.page-card-editor button:hover:not(:disabled),
.image-field button:hover:not(:disabled) {
    background: var(--physa-sage);
    color: var(--physa-white);
}

.image-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.image-field-preview {
    max-width: 280px;
    max-height: 180px;
    border-radius: 16px;
    object-fit: cover;
}

.image-field-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.image-field-upload,
.page-block-fields label.image-field-upload,
.page-settings label.image-field-upload {
    position: relative;
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    border: 1.5px solid var(--physa-terracotta);
    border-radius: var(--radius-pill);
    background: var(--physa-terracotta);
    color: var(--physa-white);
    cursor: pointer;
    overflow: hidden;
    flex-direction: row;
}

.image-field-upload input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.slug-input {
    display: flex;
    align-items: center;
    gap: 4px;
}

.slug-input input {
    flex-grow: 1;
}

.menu-order-input {
    max-width: 120px;
}

.new-page-row {
    margin-bottom: 8px;
}

.add-block-toolbar {
    flex-wrap: wrap;
}

/* ---- Questionnaire pages ---- */
.site-page.questionnaire {
    gap: 20px;
}

/* The form's cards are narrower than the page, like the original check. */
.site-page.questionnaire > .ec-section,
.site-page.questionnaire > .ec-submit {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
}

.ec-section > .ec-hint:first-of-type {
    margin-top: 0;
}

.ec-submit .ec-error {
    margin-top: 0;
}

/* ---- Page editor: collapsible blocks, questionnaire fields ---- */
.block-card.collapsed {
    padding: 6px 12px 6px 16px;
    margin-bottom: 6px;
    border-radius: 14px;
}

/* Questions sit indented under their section. */
.block-card.is-question {
    margin-left: 28px;
}

.block-card.collapsed .block-toggle strong {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 14px;
}

.block-card.collapsed .page-block-head button:not(.block-toggle) {
    padding: 5px 12px;
    font-size: 13px;
}

.page-block-head button:not(.block-toggle) {
    white-space: nowrap;
    flex-shrink: 0;
}

.block-card.collapsed .page-block-head {
    margin-bottom: 0;
}

.block-card.questionnaire-block {
    border-left: 4px solid var(--physa-sage-tint);
}

.block-card.feature-block {
    border-left: 4px solid var(--physa-sage);
}

.page-block-head .block-toggle {
    flex-grow: 1;
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
    padding: 4px 0;
    margin: 0;
    background: none;
    border: none;
    color: var(--physa-ink);
    text-align: left;
    font-size: 15px;
    line-height: 1.3;
    overflow: hidden;
}

.page-block-head .block-toggle:hover:not(:disabled) {
    background: none;
    color: var(--physa-terracotta-dark);
}

.block-toggle-icon {
    color: var(--physa-sage);
    width: 12px;
    flex-shrink: 0;
}

.page-block-head .block-toggle strong {
    flex-grow: 0;
    flex-shrink: 0;
}

.block-summary {
    color: var(--physa-ink-soft);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.field-hint {
    font-size: 13px;
    color: var(--physa-ink-soft);
}

.page-block-fields textarea {
    min-height: 0;
}

.page-block-fields select,
.form-row select,
.page-settings select,
.manual-paid select {
    font-family: var(--font-body);
    font-size: 15px;
    padding: 10px 14px;
    border: 1px solid var(--physa-line);
    border-radius: var(--radius-input);
    background: var(--physa-white);
    color: var(--physa-ink);
}

.checkbox-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}

.choice-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 16px;
    background: var(--physa-cream-light);
}

.choice-option-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.choice-option-row input {
    flex-grow: 1;
}

.choice-option-row select {
    width: 72px;
}

.band-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 12px;
    align-items: center;
    font-size: 14px;
    color: var(--physa-ink-soft);
}

.band-grid input[type="number"] {
    width: 72px;
    margin: 0 4px;
}

.add-block-toolbar {
    align-items: center;
}

.toolbar-label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--physa-sage);
    width: 120px;
}

.course-status-bar .publish-error {
    flex-basis: 100%;
}

/* ---- Site footer (overrides the simple footer above) ---- */
.site-footer {
    display: block;
    margin-top: auto;
    padding: 56px 32px 24px;
    background: var(--physa-sage);
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
}

.site-footer a {
    color: var(--physa-white);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
    color: var(--physa-white);
}

.site-footer-columns {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
}

.site-footer .footer-brand {
    font-family: var(--font-heading);
    font-size: 26px;
    color: var(--physa-white);
}

.site-footer-brand p {
    margin: 10px 0 0;
    max-width: 320px;
}

.site-footer-column h2 {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
    margin: 0 0 12px;
}

.site-footer-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.site-footer-address {
    white-space: pre-line;
}

.site-footer-bottom {
    max-width: 1100px;
    margin: 40px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.site-footer-bottom a {
    color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 800px) {
    .site-footer { padding: 40px 20px 20px; }
    .site-footer-columns { grid-template-columns: 1fr; gap: 24px; }
}

/* ---- Staging banner ---- */
.staging-banner {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 6px 16px;
    background: repeating-linear-gradient(-45deg, #a3402c, #a3402c 12px, #b8513b 12px, #b8513b 24px);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.02em;
}

/* ---- Mijn account ---- */
.account-page {
    max-width: 760px;
}

.account-section {
    margin-bottom: 40px;
}

.account-settings {
    background: var(--physa-white);
    border-radius: var(--radius-card);
    padding: 8px 28px;
    margin: 0;
}

/* The credit note form opens right under the order's card. */
.account-settings + .credit-form {
    margin-top: 20px;
}

.account-settings > div {
    display: grid;
    /* The middle column never narrower than a short word: words may break
       anywhere, so without it a tight row squeezes it to one letter. */
    grid-template-columns: 13em minmax(7em, 1fr) auto;
    gap: 4px 16px;
    align-items: baseline;
    padding: 14px 0;
    border-top: 1px solid var(--physa-line);
}

.account-settings > div:first-child {
    border-top: none;
}

.account-settings dt {
    font-weight: 700;
}

.account-settings dd {
    margin: 0;
    overflow-wrap: anywhere;
}

/* Button labels wrap between words, never inside one. */
.account-settings dd button,
.account-settings dd a.link-button-pill {
    overflow-wrap: normal;
}

/* Mijn account: one row per order (number, products, date, amount,
   status, Bekijken), wrapping on a phone. */
.account-orders {
    list-style: none;
    margin: 0;
    padding: 8px 28px;
    background: var(--physa-white);
    border-radius: var(--radius-card);
}

.account-orders li {
    display: grid;
    grid-template-columns: 9em minmax(6em, 1fr) auto auto auto auto;
    gap: 6px 16px;
    align-items: center;
    padding: 14px 0;
    border-top: 1px solid var(--physa-line);
}

.account-orders li:first-child {
    border-top: none;
}

.account-order-number {
    font-weight: 700;
}

.account-order-products,
.account-order-date {
    color: var(--physa-ink-soft);
    font-size: 14px;
}

.account-order-products {
    overflow-wrap: anywhere;
}

.account-order-amount,
.account-order-date,
.account-orders .status-badge {
    white-space: nowrap;
}

/* The order page: status and date under the heading, a pay box for an
   open invoice, the facts, the documents as buttons. */
.account-order-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    align-items: center;
    margin: -8px 0 24px;
    color: var(--physa-ink-soft);
}

/* The grey badge (credited, cancelled) is the page's own colour here, so it
   gets an outline to stay visible. */
.account-order-meta .status-draft {
    border: 1px solid var(--physa-line);
    background: var(--physa-white);
}

.account-order-pay {
    background: var(--physa-white);
    border-radius: var(--radius-card);
    border-left: 4px solid var(--physa-terracotta);
    padding: 16px 28px;
    margin-bottom: 20px;
}

.account-order-pay p:last-child {
    margin-bottom: 0;
}

.account-order-facts > div {
    grid-template-columns: 13em minmax(7em, 1fr);
}

.account-order-lines,
.account-order-instalments {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.account-order-lines li {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    align-items: center;
}

.account-order-line-title {
    flex: 1 1 12em;
}

.account-order-line-price {
    white-space: nowrap;
}

.account-order-line-note {
    flex-basis: 100%;
}

.account-order-instalments li {
    display: grid;
    grid-template-columns: 1.5em 6em auto 1fr;
    gap: 4px 16px;
    align-items: baseline;
}

.account-order-instalments li > * {
    white-space: nowrap;
}

.account-order-documents {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.account-order-question {
    margin-top: 20px;
}

.account-list {
    margin: 0;
}

.account-order .account-list a {
    margin-left: 10px;
}

.account-list {
    padding-left: 18px;
}

.account-list span {
    color: var(--physa-ink-soft);
    font-size: 14px;
}

@media (max-width: 600px) {
    .account-settings {
        padding: 4px 20px;
    }

    .account-settings > div {
        grid-template-columns: 1fr auto;
    }

    .account-settings dt {
        grid-column: 1 / -1;
    }

    .account-orders {
        padding: 4px 20px;
    }

    /* Number and amount on top, then what it was, then date, status and
       the button. */
    .account-orders li {
        display: flex;
        flex-wrap: wrap;
        gap: 6px 12px;
    }

    .account-order-number { order: 1; flex: 1 1 auto; }
    .account-order-amount { order: 2; }
    .account-order-products { order: 3; flex-basis: 100%; }
    .account-order-date { order: 4; }
    .account-orders .status-badge { order: 5; }
    .account-orders .site-button { order: 6; margin-left: auto; }

    .account-order-pay {
        padding: 14px 20px;
    }

    .account-order-facts > div {
        grid-template-columns: 1fr;
    }

    /* The number, then amount, due date and status under each other. */
    .account-order-instalments li {
        grid-template-columns: 1.5em minmax(0, 1fr);
        gap: 2px 12px;
    }

    .account-order-instalments li > * {
        grid-column: 2;
        white-space: normal;
    }

    .account-order-instalments li > :first-child {
        grid-column: 1;
        grid-row: 1;
    }
}

/* Focal point picker (hero editor): the photo to click on, beside how it's cropped. */
.focal-field {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;
}

.focal-field-pick {
    position: relative;
    cursor: crosshair;
    line-height: 0;
    border-radius: 12px;
    overflow: hidden;
}

.focal-field-pick img {
    display: block;
    max-width: 320px;
    max-height: 240px;
    user-select: none;
}

.focal-field-marker {
    position: absolute;
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .4);
    pointer-events: none;
}

.focal-field-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.focal-field-previews {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.focal-field-previews figure { margin: 0; }
.focal-field-previews figcaption { font-size: 12px; color: var(--muted, #666); margin-top: 4px; }

.focal-field-crop {
    width: 220px;
    overflow: hidden;
    border-radius: 8px;
    background: #eee;
}

.focal-field-phone .focal-field-crop { width: 110px; }

.focal-field-crop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.focal-field-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.focal-field-presets button {
    padding: 4px 12px;
    font-size: 13px;
    background: transparent;
    color: var(--physa-sage);
    border-color: var(--physa-sage);
}

.focal-field-presets button.is-active {
    background: var(--physa-sage);
    color: #fff;
}

/* SwatchField: a choice as small pictures (hero colours, text position). */
.hero-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 32px;
}

.swatch-field-label {
    display: block;
    font-size: 14px;
    margin-bottom: 6px;
}

.swatch-field-options {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.swatch-field .swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px;
    min-width: 64px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--physa-ink);
    font-size: 12px;
}

.swatch-field .swatch:hover:not(:disabled) {
    background: var(--physa-cream);
    color: var(--physa-ink);
}

.swatch-field .swatch.is-active {
    border-color: var(--physa-sage);
    background: var(--physa-sage-tint);
}

.swatch-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--physa-line);
}

/* A hero in miniature: the title bar on top, three columns, one with the text. */
.swatch-thirds {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 5px 1fr;
    gap: 3px;
    width: 42px;
    height: 28px;
    padding: 3px;
    border: 1px solid var(--physa-line);
    border-radius: 5px;
    background: var(--physa-white);
}

.swatch-thirds > span {
    border-radius: 2px;
    background: var(--physa-cream);
}

.swatch-thirds > .swatch-thirds-title {
    grid-column: 1 / -1;
    background: var(--physa-ink-soft);
}

/* The Kolommen choices: columns side by side, top or centred. */
.swatch-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    width: 42px;
    height: 28px;
    padding: 3px;
    border: 1px solid var(--physa-line);
    border-radius: 5px;
    background: var(--physa-white);
}

.swatch-columns > .is-text {
    border-radius: 2px;
    background: repeating-linear-gradient(180deg, var(--physa-sage) 0 2px, transparent 2px 4px);
}

.swatch-columns > .swatch-short { height: 9px; }
.swatch-align-top > .swatch-short { align-self: start; }
.swatch-align-center > .swatch-short { align-self: center; }

/* Hero style: a veil with white text, or the bare photo with dark text. */
.swatch-thirds:is(.swatch-tone-dark, .swatch-tone-light) > .is-text { grid-column: 1 / span 2; }
.swatch-tone-dark { background: linear-gradient(rgba(73, 90, 88, .7), rgba(73, 90, 88, .7)), linear-gradient(160deg, #8fa39b, #4f6158); }
.swatch-tone-dark > .swatch-thirds-title { background: var(--physa-white); }
.swatch-tone-dark > .is-text { background: repeating-linear-gradient(180deg, var(--physa-white) 0 2px, transparent 2px 4px); }
.swatch-tone-light { background: linear-gradient(160deg, #f4f1ea, #cfd6cf); }
.swatch-tone-light > .swatch-thirds-title { background: var(--physa-sage); }
.swatch-tone-light > .is-text { background: repeating-linear-gradient(180deg, var(--physa-ink) 0 2px, transparent 2px 4px); }

/* Block width: text across the block, or a narrow centred column. */
.swatch-columns:is(.swatch-width-normal, .swatch-width-narrow) { grid-template-columns: 1fr; }
.swatch-width-narrow > .is-text { justify-self: center; width: 50%; }

/* Tekst met afbeelding: the image beside the text. */
.swatch-columns > .swatch-thirds-photo {
    border-radius: 2px;
    background: linear-gradient(160deg, #8fa39b, #4f6158);
}

/* The photo choices: the photo across the whole hero, or two thirds. */
.swatch-thirds > .swatch-thirds-photo {
    background: linear-gradient(160deg, #8fa39b, #4f6158);
}

.swatch-photo-full { position: relative; }
.swatch-photo-full > .swatch-thirds-photo {
    position: absolute;
    inset: 0;
    border-radius: 4px;
}
.swatch-photo-full > .swatch-thirds-title { position: relative; z-index: 1; }

.swatch-photo-left > .swatch-thirds-photo { grid-column: 1 / span 2; }
.swatch-photo-right > .swatch-thirds-photo { grid-column: 2 / span 2; grid-row: 2; }
.swatch-photo-right > .is-text { grid-column: 1; grid-row: 2; }

.swatch-thirds > .is-text {
    background: repeating-linear-gradient(180deg, var(--physa-sage) 0 2px, transparent 2px 4px);
}

/* The order form (Eqology): the contact form's fields, in groups. */
.order-form-group {
    border: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-form-group legend {
    font-weight: 600;
    padding: 0;
    margin-bottom: 12px;
}

.order-form-products {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 20px;
}

.order-form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 15px;
    cursor: pointer;
}

.order-form-check input {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    flex-shrink: 0;
    accent-color: var(--physa-sage);
}

.order-form-iban {
    font-size: 15px;
    letter-spacing: 0.04em;
    margin-right: 8px;
}

.order-form-products-list {
    margin: 0;
    padding-left: 18px;
}

@media (max-width: 800px) {
    .order-form-products { grid-template-columns: 1fr; }
}

/* "2 nieuw" on a filter chip (Bestellingen > Eqology). */
.filter-chip-count {
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: 300px;
    background: var(--physa-terracotta);
    color: #fff;
    font-size: 12px;
}

/* Admin > Bestellingen > Nieuwe bestelling: a block per line, its fields
   wrapping on a narrow screen. */
.manual-lines {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
}

.manual-line {
    width: 100%;
    margin: 0;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--physa-line);
}

.manual-line .form-row {
    flex-wrap: wrap;
}

.page-settings .form-row > label.manual-line-title { flex: 2 1 160px; }
.page-settings .form-row > label.manual-line-narrow { flex: 1 1 95px; }
.page-settings .form-row > label.manual-line-qty { flex: 0 1 70px; }

.manual-line input { width: 100%; }

.manual-line .link-button {
    margin-bottom: 10px;
}

.manual-total {
    align-self: flex-end;
    margin: 4px 0 0;
    font-size: 16px;
}

/* "Betaald?" and an instalment's row: date, how, and the button on one
   line, all the same height. */
.manual-paid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
}

.manual-paid label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.manual-paid button {
    margin: 0;
}

/* Actions side by side in the order details (Downloaden, Factuur mailen). */
.button-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.button-row button {
    margin: 0;
}

/* A smaller outlined button for an action inside a row (Terugzetten,
   a credit note's Downloaden and Mailen). */
button.button-compact,
a.link-button-pill.button-compact {
    padding: 7px 14px;
    font-size: 13px;
    margin: 0;
}

.order-address {
    white-space: pre-line;
}

/* Admin > Bestellingen > Exporteren: one row per export. */
.order-export {
    margin: 16px 0 20px;
    padding: 14px 20px;
    border-radius: 16px;
    background: var(--physa-white);
}

/* Exporteren and Nieuwe bestelling beside the Bestellingen title. */
.order-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: 12px;
}

/* A link that does what a button does (Nieuwe bestelling, Downloaden),
   looking like the site's buttons; with button-secondary, outlined. */
a.link-button-pill {
    display: inline-block;
    font-size: 15px;
    line-height: 1;
    padding: 12px 24px;
    border: 1.5px solid var(--physa-terracotta);
    border-radius: var(--radius-pill);
    background: var(--physa-terracotta);
    color: var(--physa-white);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

a.link-button-pill:hover {
    background: var(--physa-terracotta-dark);
    border-color: var(--physa-terracotta-dark);
}

a.link-button-pill.button-secondary {
    background: transparent;
    color: var(--physa-sage);
    border-color: var(--physa-sage);
}

a.link-button-pill.button-secondary:hover {
    background: var(--physa-sage);
    color: var(--physa-white);
}

.order-export-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px 16px;
    padding: 12px 0;
    border-top: 1px solid var(--physa-line);
}

.order-export-row > strong {
    flex: 0 0 130px;
    align-self: center;
}

.order-export-row > .field-hint {
    flex: 1 1 100%;
    order: 1;
    margin-top: -4px;
}

.order-export-row label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
}

.order-export-row select {
    padding: 8px 12px;
    border: 1px solid var(--physa-line);
    border-radius: var(--radius-input);
    background: var(--physa-white);
    font: inherit;
}

/* An order's credit notes, and the form to make one. */
.credit-note-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
}

.credit-line {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--physa-line);
}

.credit-line label,
.credit-reason {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
}

.credit-reason {
    margin: 12px 0;
}

.credit-effects {
    margin: 4px 0 16px;
    padding-left: 18px;
    color: var(--physa-ink-soft);
    font-size: 14px;
}

/* Two badges in one cell (Gepubliceerd + Niet gepubliceerde wijzigingen):
   a little room between them, beside each other or stacked. */
td.status-badges .status-badge {
    display: inline-block;
    margin: 2px 4px 2px 0;
}

/* ---- Text size and alignment (a block's style row; the hero's own) ---- */

.text-size-small .site-prose { font-size: 15px; line-height: 1.7; }
.text-size-large .site-prose { font-size: 20px; }
.site-hero.text-size-small .site-prose { font-size: 16px; }
.site-hero.text-size-large .site-prose { font-size: 22px; }

/* The text and what's in it (buttons, captions); a narrower prose column
   moves with it. */
.text-align-center :is(.site-prose, .site-column, .site-cards, .blog-card-body, .site-image figcaption) { text-align: center; }
.text-align-right :is(.site-prose, .site-column, .site-cards, .blog-card-body, .site-image figcaption) { text-align: right; }
.text-align-justify .site-prose { text-align: justify; hyphens: auto; }
.text-align-center > .site-section.site-prose { margin-inline: auto; }
.text-align-right > .site-section.site-prose { margin-left: auto; }

.site-hero.text-align-center .site-hero-body { align-items: center; text-align: center; }
.site-hero.text-align-right .site-hero-body { align-items: flex-end; text-align: right; }
.site-hero.text-align-justify .site-prose { text-align: justify; hyphens: auto; }

/* Hero, "Midden": title and text in the middle of the photo's height,
   the title beside the text's third (like physa.nl's "Wie ben ik?"). */
.site-hero.v-center,
.site-hero.tone-light.v-center { align-items: center; }
.site-hero.v-center:not([class*="photo-"]).text-right h1 { grid-column: 1 / span 2; grid-row: 1; align-self: center; }
.site-hero.v-center:not([class*="photo-"]).text-right .site-hero-body { grid-column: 3; grid-row: 1; }
.site-hero.v-center:not([class*="photo-"]).text-left h1 { grid-column: 2 / span 2; grid-row: 1; align-self: center; }
.site-hero.v-center:not([class*="photo-"]).text-left .site-hero-body { grid-column: 1; grid-row: 1; }

/* ---- Kolommen: photos cropped to one shape, so what's under them lines up ---- */

.site-columns.shape-square .site-image img { aspect-ratio: 1 / 1; }
.site-columns.shape-portrait .site-image img { aspect-ratio: 4 / 5; }
.site-columns.shape-landscape .site-image img { aspect-ratio: 3 / 2; }

/* ---- Headings that are links (blog teasers): terracotta and a bit larger,
   like physa.nl ---- */

.site-prose :is(h2, h3, h4) a { color: var(--physa-terracotta); }
.site-prose h4:has(> a) { font-size: 24px; }

/* ---- Picture buttons for text size, alignment, hero placement, photo shape ---- */

.swatch-box {
    display: grid;
    width: 42px;
    height: 28px;
    padding: 4px;
    border: 1px solid var(--physa-line);
    border-radius: 5px;
    background: var(--physa-white);
}

.swatch-textsize {
    place-items: center;
    font-family: var(--font-heading);
    color: var(--physa-ink);
    line-height: 1;
}
.swatch-textsize-small { font-size: 11px; }
.swatch-textsize-normal { font-size: 15px; }
.swatch-textsize-large { font-size: 20px; }

.swatch-lines { align-content: center; gap: 3px; }
.swatch-lines > span { height: 2px; border-radius: 1px; background: var(--physa-sage); }
.swatch-lines > span:nth-child(2) { width: 70%; }
.swatch-lines > span:nth-child(3) { width: 85%; }
.swatch-lines > span:nth-child(4) { width: 55%; }
.swatch-lines-center > span { justify-self: center; }
.swatch-lines-right > span { justify-self: end; }
.swatch-lines-justify > span:nth-child(-n+3) { width: 100%; }

.swatch-vertical { grid-template-columns: 2fr 1fr; gap: 3px; background: linear-gradient(160deg, #8fa39b, #4f6158); }
.swatch-vertical-title { height: 5px; border-radius: 2px; background: var(--physa-white); }
.swatch-vertical-text { border-radius: 2px; background: repeating-linear-gradient(180deg, var(--physa-white) 0 2px, transparent 2px 4px); }
.swatch-vertical-top { grid-template-rows: 5px 9px; align-content: start; }
.swatch-vertical-top .swatch-vertical-title { grid-column: 1 / -1; }
.swatch-vertical-top .swatch-vertical-text { grid-column: 2; }
.swatch-vertical-center { align-items: center; }
.swatch-vertical-center .swatch-vertical-text { height: 11px; }

.swatch-shape { grid-template-columns: 1fr 1fr; gap: 4px; align-items: start; }
.swatch-shape > span { border-radius: 2px; background: linear-gradient(160deg, #8fa39b, #4f6158); }
.swatch-shape-original > span:first-child { height: 18px; }
.swatch-shape-original > span:last-child { height: 12px; }
.swatch-shape-square > span { height: 14px; }
.swatch-shape-portrait > span { height: 19px; }
.swatch-shape-landscape > span { height: 10px; }

/* Kolommen, "Per regel": each column's items share the block's rows, so the
   photos, titles and texts line up across the columns (CSS subgrid). On a
   phone the columns stack as usual. */
.site-columns.align-rows {
    grid-template-rows: repeat(var(--rows), auto);
    row-gap: 24px;
}

.site-columns.align-rows > .site-column {
    display: grid;
    grid-row: 1 / span var(--rows);
    grid-template-rows: subgrid;
    align-content: start;
}

@media (max-width: 800px) {
    .site-columns.align-rows { grid-template-rows: none; }
    .site-columns.align-rows > .site-column { display: flex; grid-row: auto; }
}

.swatch-rows { grid-template-columns: 1fr 1fr; grid-template-rows: 8px 3px 6px; gap: 2px 4px; align-content: start; }
.swatch-rows-photo { border-radius: 2px; background: linear-gradient(160deg, #8fa39b, #4f6158); }
.swatch-rows-title { border-radius: 1px; background: var(--physa-terracotta); }
.swatch-rows-title:nth-child(3) { width: 80%; }
.swatch-rows-title:nth-child(4) { width: 45%; }
.swatch-rows-text { background: repeating-linear-gradient(180deg, var(--physa-sage) 0 1px, transparent 1px 3px); }

/* Admin > Pagina's > Exporteren and Importeren (PageExport, PageImport). */
.page-transfer {
    margin: 16px 0 20px;
    padding: 14px 20px;
    border-radius: 16px;
    background: var(--physa-white);
}

.page-transfer-group {
    border: 0;
    margin: 12px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.page-transfer-group legend {
    font-weight: 600;
    margin-bottom: 6px;
}

.page-transfer label,
.page-transfer-publish {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.page-transfer-group code {
    margin-left: 6px;
    color: var(--physa-ink-soft);
    overflow-wrap: anywhere;
}

.page-transfer-actions {
    margin-top: 16px;
}

.page-transfer-publish {
    margin-top: 16px;
}

.page-transfer-table td:first-child,
.page-transfer-table th:first-child {
    width: 32px;
}

.page-transfer-result {
    margin: 16px 0;
    padding: 14px 20px;
    border-radius: 16px;
    background: var(--physa-white);
}

.page-transfer-table code {
    overflow-wrap: anywhere;
}

.page-transfer-group .status-badge {
    margin-left: 6px;
}

/* Instalments: the preview in Nieuwe bestelling and the list on an order. */
.instalment-preview {
    margin: 4px 0 0;
    padding-left: 22px;
}

.instalment-table {
    border-collapse: collapse;
    /* Inside the order details, where words may break anywhere: that would
       squeeze the cells to one letter wide. */
    overflow-wrap: normal;
}

.instalment-table td:nth-child(-n+3) {
    white-space: nowrap;
}

/* Mijn account: an address keeps its lines. */
.account-address {
    white-space: pre-line;
}

/* A section heading with its action beside it (a user's Bestellingen). */
.section-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
}

/* "Alles betaald" under the instalments. */
.instalments-all {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--physa-line);
}

/* On the order page the list takes the rest of the row, and the "Betaald"
   controls wrap below each other when there's no room. */
.account-settings > .instalments-row {
    grid-template-columns: 1fr;
}

.account-settings > .instalments-row > dd {
    grid-column: 1 / -1;
}

.instalment-table {
    width: 100%;
}

.instalment-table td:last-child {
    width: 100%;
}

.instalment-table td {
    padding: 4px 12px 4px 0;
    vertical-align: middle;
}

.instalment-table .manual-paid {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
}

/* The invoice's pay page (/factuur/...): a row per instalment (number,
   amount, due date, status, its pay button), paid ones muted. On a phone
   the status and button move to a second line. */
.invoice-pay-instalments {
    margin: 0 0 24px;
    padding: 8px 28px;
    list-style: none;
    background: var(--physa-white);
    border-radius: var(--radius-card);
}

.invoice-pay-instalments li {
    display: grid;
    grid-template-columns: 1.5em 6.5em max-content 1fr 6.5em;
    align-items: center;
    gap: 8px 16px;
    min-height: 44px;
    padding: 10px 0;
    border-bottom: 1px solid var(--physa-line);
}

.invoice-pay-instalments li:last-child {
    border-bottom: 0;
}

.invoice-pay-instalments .is-paid .instalment-amount,
.invoice-pay-instalments .is-paid .instalment-due,
.invoice-pay-instalments .is-paid .instalment-position {
    color: var(--physa-ink-soft);
}

.invoice-pay-instalments .instalment-position {
    color: var(--physa-ink-soft);
}

.invoice-pay-instalments .instalment-due {
    white-space: nowrap;
}

.invoice-pay-instalments .instalment-status {
    justify-self: end;
    text-align: right;
}

/* A paid row has no button: its status takes that room too. */
.invoice-pay-instalments .is-paid .instalment-status {
    grid-column: 4 / 6;
}

.invoice-pay-instalments .instalment-pay {
    text-align: right;
}

.site-button.site-button-small {
    padding: 10px 20px;
}

@media (max-width: 640px) {
    .invoice-pay-instalments {
        padding: 4px 16px;
    }

    .invoice-pay-instalments li {
        grid-template-columns: 1.5em 1fr auto;
    }

    .invoice-pay-instalments .instalment-due {
        grid-column: 2 / 4;
        grid-row: 2;
    }

    .invoice-pay-instalments .instalment-status,
    .invoice-pay-instalments .is-paid .instalment-status {
        grid-column: 2;
        grid-row: 3;
        justify-self: start;
        text-align: left;
    }

    .invoice-pay-instalments .instalment-pay {
        grid-column: 3;
        grid-row: 3;
    }
}
