/* ==========================================================================
   MethodikoMoria PWA — styles.css
   Reproduces the Android (Jetpack Compose) app look, feel and animations.
   ========================================================================== */

:root {
    --deep-red: #9E1B32;
    --deep-red-dark: #851528;

    --green-bg: #D4EDDA;
    --green-bg-sel: #A9DBB6;
    --green-fg: #1E7E34;
    --yellow-bg: #FFF3CD;
    --yellow-bg-sel: #FFE38A;
    --yellow-fg: #856404;
    --red-bg: #F8D7DA;
    --red-bg-sel: #EFA9B1;
    --red-fg: #9E1B32;

    --teal: #157A8B;
    --light-gray: #C7C7C7;
    --card-radius: 12px;

    --shadow-1: 0 1px 3px rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .10);
    --shadow-nav: 0 2px 4px rgba(0, 0, 0, .14);
    --shadow-bottom: 0 -2px 8px rgba(0, 0, 0, .12);

    --font: "Segoe UI", Roboto, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: var(--font);
    color: #1a1a1a;
    background: #ECEFF3;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior: none;
}

/* ----- Header (deep-red top bar with white logo) ----- */
.app-header {
    flex: none;
    background: var(--deep-red);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 12px;
    padding-top: calc(6px + env(safe-area-inset-top));
    z-index: 20;
    box-shadow: var(--shadow-nav);
}

.app-header__logo {
    height: 24px;
    width: auto;
    display: block;
}

.app-header__title {
    font-size: 16px;
    font-weight: 700;
}

/* ----- Main viewport: holds the absolutely-positioned animated screens ----- */
.app-main {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.screen-root {
    position: absolute;
    inset: 0;
}

.boot-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ECEFF3;
    z-index: 5;
}

.spinner {
    width: 44px;
    height: 44px;
    border: 4px solid rgba(158, 27, 50, .25);
    border-top-color: var(--deep-red);
    border-radius: 50%;
    animation: spin .9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Screens + page-swap animation (mirrors Compose AnimatedContent slide+fade)
   ========================================================================== */
.screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: #ECEFF3;
    will-change: transform, opacity;
}

.screen.is-animating {
    transition: transform .3s ease, opacity .3s ease;
}

.screen.enter-from-right { transform: translateX(100%); opacity: 0; }
.screen.enter-from-left  { transform: translateX(-100%); opacity: 0; }
.screen.exit-to-left     { transform: translateX(-100%); opacity: 0; }
.screen.exit-to-right    { transform: translateX(100%); opacity: 0; }

.screen__scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
}

.screen__scroll--flush { padding: 8px 12px 12px; }

/* Pinned sub-navigation bar (white surface with shadow) below the header */
.screen__nav {
    flex: none;
    background: #fff;
    box-shadow: var(--shadow-nav);
    padding: 12px;
    z-index: 10;
}

.screen__bottom {
    flex: none;
    background: #fff;
    box-shadow: var(--shadow-bottom);
    padding: 12px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 10;
}

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
    background: #fff;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-1);
    padding: 12px;
}

.card + .card,
.stack > * + * { margin-top: 12px; }

.card__title { font-weight: 700; }
.card__title--red { color: var(--deep-red); }

.muted { color: #5a5a5a; }
.small { font-size: 12px; }
.text-13 { font-size: 13px; }

.info-card { font-size: 14px; }

.section-desc {
    font-size: 12px;
    color: #444;
    margin-top: 4px;
    line-height: 1.4;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: var(--deep-red);
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1.2;
    transition: filter .12s ease, transform .08s ease;
    user-select: none;
}

.btn:active { filter: brightness(.90); }
.btn:disabled {
    background: var(--light-gray);
    color: #fff;
    cursor: default;
    filter: none;
}

.btn--block { display: flex; width: 100%; }
.btn--green { background: var(--green-fg); }
.btn--teal { background: var(--teal); }
.btn--sm { font-size: 14px; padding: 10px 10px; }

/* Screen 1 orientation buttons: full width, left-aligned text, tighter radius */
.btn--orientation {
    justify-content: flex-start;
    text-align: left;
    border-radius: 4px;
    margin-top: 8px;
}

.btn .icon { width: 18px; height: 18px; flex: none; }
.btn--green .icon, .btn--teal .icon { width: 20px; height: 20px; }

.nav-row {
    display: flex;
    gap: 8px;
}
.nav-row .btn { flex: 1; font-size: 14px; padding: 10px 8px; }

/* ==========================================================================
   Floating-label outlined inputs (Material OutlinedTextField look)
   ========================================================================== */
.field {
    position: relative;
    margin: 10px 0;
}

.field input {
    width: 100%;
    font-family: inherit;
    font-size: 16px;
    padding: 15px 12px;
    border: 1px solid #b4b4b4;
    border-radius: 6px;
    background: #fff;
    outline: none;
    transition: border-color .12s ease;
}

.field input:focus {
    border-color: var(--deep-red);
    box-shadow: inset 0 0 0 1px var(--deep-red);
}

.field label {
    position: absolute;
    left: 9px;
    top: 15px;
    color: #6a6a6a;
    pointer-events: none;
    background: #fff;
    padding: 0 4px;
    font-size: 16px;
    transition: top .12s ease, font-size .12s ease, color .12s ease;
    max-width: calc(100% - 18px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.field input:focus + label,
.field input:not(:placeholder-shown) + label {
    top: -8px;
    font-size: 12px;
    color: var(--deep-red);
}

/* ==========================================================================
   Grades summary + key/value rows
   ========================================================================== */
.kv {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    padding: 1px 0;
}
.kv .v { font-weight: 700; text-align: right; }

/* ==========================================================================
   Filter card: dropdowns, colour bars with circular checkpoints
   ========================================================================== */
.select-wrap { margin: 6px 0; }

.select {
    width: 100%;
    font-family: inherit;
    font-size: 16px;
    padding: 14px 12px;
    border: 1px solid #b4b4b4;
    border-radius: 6px;
    background: #fff;
    color: #1a1a1a;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #777 50%),
        linear-gradient(135deg, #777 50%, transparent 50%);
    background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}
.select:focus { border-color: var(--deep-red); box-shadow: inset 0 0 0 1px var(--deep-red); }

/* Multi-select filter dropdown (Πανεπιστήμιο / Πόλη) — mouse & touch friendly */
.ms { position: relative; margin: 6px 0; }

.ms__trigger {
    display: flex;
    align-items: center;
    text-align: left;
    padding-right: 34px;            /* room for the .select dropdown arrow */
    cursor: pointer;
}
.ms__summary {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ms--active .ms__trigger { border-color: var(--deep-red); font-weight: 600; }

.ms__panel {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 45;
    flex-direction: column;
    max-height: 320px;
    padding: 8px;
    background: #fff;
    border: 1px solid #b4b4b4;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}
.ms--open .ms__panel { display: flex; }

.ms__search {
    width: 100%;
    font-family: inherit;
    font-size: 15px;
    padding: 10px 12px;
    margin-bottom: 6px;
    border: 1px solid #cfcfcf;
    border-radius: 6px;
    outline: none;
}
.ms__search:focus { border-color: var(--deep-red); box-shadow: inset 0 0 0 1px var(--deep-red); }

.ms__list { overflow-y: auto; -webkit-overflow-scrolling: touch; }

.ms__option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}
.ms__option:hover { background: #f2f2f2; }
.ms__option.is-checked { background: rgba(158, 27, 50, .08); }
.ms__cb {
    width: 20px;
    height: 20px;
    flex: none;
    margin: 0;
    accent-color: var(--deep-red);
}
.ms__option-label { flex: 1; min-width: 0; }

.filter-bars { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }

.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    background: var(--light-gray);
    transition: background .15s ease;
    user-select: none;
}

.filter-bar .label { flex: 1; }
.filter-bar--green.is-on { background: var(--green-fg); }
.filter-bar--yellow.is-on { background: var(--yellow-fg); }
.filter-bar--red.is-on { background: var(--red-fg); }

.filter-bar__check {
    flex: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fff;
    border: 1.5px solid #9e9e9e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    line-height: 1;
    font-weight: 700;
}
.filter-bar.is-on .filter-bar__check { border-color: #fff; }
.filter-bar__check .tick { display: none; }
.filter-bar.is-on .filter-bar__check .tick { display: block; }
.filter-bar--green.is-on .filter-bar__check .tick { color: var(--green-fg); }
.filter-bar--yellow.is-on .filter-bar__check .tick { color: var(--yellow-fg); }
.filter-bar--red.is-on .filter-bar__check .tick { color: var(--red-fg); }

.clear-btn { margin-top: 8px; }

/* ==========================================================================
   Result cards (Screen 4)
   ========================================================================== */
.result-card {
    position: relative;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-1);
    padding: 10px 36px 10px 10px;
    margin: 8px 0;
    cursor: pointer;
    transition: background-color .25s ease;
}
.result-card--green { background: var(--green-bg); }
.result-card--yellow { background: var(--yellow-bg); }
.result-card--red { background: var(--red-bg); }
.result-card--green.selected { background: var(--green-bg-sel); }
.result-card--yellow.selected { background: var(--yellow-bg-sel); }
.result-card--red.selected { background: var(--red-bg-sel); }

.result-card__name { font-weight: 700; }
.result-card--green .result-card__name,
.result-card--green .result-card__morio { color: var(--green-fg); }
.result-card--yellow .result-card__name,
.result-card--yellow .result-card__morio { color: var(--yellow-fg); }
.result-card--red .result-card__name,
.result-card--red .result-card__morio { color: var(--red-fg); }

/* Clickable department title links — keep the card's colour, underline on hover only. */
.dept-link { color: inherit; text-decoration: none; cursor: pointer; }
.dept-link:visited { color: inherit; }
.dept-link:hover { text-decoration: underline; text-underline-offset: 2px; }

/* Status mark (✓ / ? / ✖) at the start of a σχολή row — small buffer before the title. */
.dept-mark { margin-right: 7px; }

.result-card__sub { font-size: 13px; color: #444; margin: 1px 0; }
.result-card__special { font-size: 12px; color: #444; margin-top: 2px; }

.select-check {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 1.5px solid #9e9e9e;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.result-card.selected .select-check {
    background: var(--deep-red);
    border-color: var(--deep-red);
    color: #fff;
}

.no-results { color: #777; padding: 8px; font-size: 14px; }

/* ==========================================================================
   Selection cards (Screen 5) + controls
   ========================================================================== */
.selection-item { overflow: hidden; }

.selection-card {
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-1);
    padding: 5px 8px;
    margin: 5px 0;
}
.selection-card--green { background: var(--green-bg); }
.selection-card--yellow { background: var(--yellow-bg); }
.selection-card--red { background: var(--red-bg); }

.selection-card__body { flex: 1; min-width: 0; }
.selection-card__name { font-weight: 700; font-size: 14px; line-height: 1.2; }
.selection-card--green .selection-card__name,
.selection-card--green .selection-card__morio { color: var(--green-fg); }
.selection-card--yellow .selection-card__name,
.selection-card--yellow .selection-card__morio { color: var(--yellow-fg); }
.selection-card--red .selection-card__name,
.selection-card--red .selection-card__morio { color: var(--red-fg); }
.selection-card__sub { font-size: 12px; color: #444; line-height: 1.2; }
.selection-card__morio { font-size: 12px; font-weight: 700; line-height: 1.2; }

.selection-card__diff {
    flex: none;
    align-self: center;
    min-width: 44px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.selection-card__diff--pos {
    background: var(--green-bg);
    color: var(--green-fg);
    border-color: var(--green-fg);
}
.selection-card__diff--neg {
    background: var(--red-bg);
    color: var(--red-fg);
    border-color: var(--red-fg);
}

.selection-card__controls {
    flex: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2px;
}
.ctrl-stack { display: flex; flex-direction: column; }

.ctrl-btn {
    width: 34px;
    height: 28px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--deep-red);
}
.ctrl-btn:disabled { color: #cfcfcf; cursor: default; }
.ctrl-btn--del { color: var(--deep-red); }
.ctrl-btn .icon { width: 22px; height: 22px; transition: transform .12s ease; }
.ctrl-btn:not(:disabled):active .icon { transform: scale(.78); }

/* Drag-and-drop reordering (Screen 5) */
.selection-card { transition: box-shadow .15s ease, transform .15s ease; }

.drag-handle {
    flex: none;
    align-self: stretch;
    width: 26px;
    margin-left: -2px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9aa0a6;
    cursor: grab;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.drag-handle:active,
.selection-item.dragging .drag-handle { cursor: grabbing; }
.drag-handle .icon { width: 20px; height: 20px; }

.dnd-active { -webkit-user-select: none; user-select: none; }
.dnd-active .selection-item { transition: transform .18s ease; }
.dnd-active .selection-item.dragging { transition: none; }

.selection-item.dragging {
    position: relative;
    z-index: 20;
    overflow: visible;
}
.selection-item.dragging .selection-card {
    box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
    transform: scale(1.015);
}

/* delete: fade + shrink (mirrors Compose fadeOut + shrinkVertically) */
.selection-item.removing {
    animation: fadeShrink .24s ease forwards;
}
@keyframes fadeShrink {
    to { opacity: 0; max-height: 0; margin: 0; padding: 0; transform: translateX(8px); }
}
.selection-item { max-height: 400px; }

/* New item entering the list */
.selection-item.entering { animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ==========================================================================
   Install button area (always offered, regardless of installation state)
   ========================================================================== */
.install-card { display: block; background: #e9ecf2; margin-top: 16px; }

/* ==========================================================================
   Misc / responsive
   ========================================================================== */
.spacer-8 { height: 8px; }
.spacer-12 { height: 12px; }

@media (min-width: 720px) {
    .screen__scroll, .screen__nav, .screen__bottom {
        max-width: 760px;
        margin-left: auto;
        margin-right: auto;
        width: 100%;
    }
}

/* --------------------------------------------------------------------------
   Adaptive results: stacked cards (narrow) → aligned table (wide ≥ 1080px),
   mirroring the responsive results table on methodiko-frontistirio.gr/moria.
   -------------------------------------------------------------------------- */
.rc-row, .result-thead { display: none; }

@media (min-width: 1080px) {
    /* Widen ONLY the results screen (the σχολές list) so all table columns fit;
       the initial steps keep their narrow 760px width. */
    .screen--wide .screen__scroll, .screen--wide .screen__nav { max-width: 1180px; }

    .result-table {
        background: #fff;
        border-radius: var(--card-radius);
        box-shadow: var(--shadow-1);
        overflow: hidden;
        margin: 8px 0;
    }

    .result-thead {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 112px 104px 58px 70px 62px 74px 80px 66px;
        column-gap: 8px;
        align-items: end;
        padding: 8px 54px 8px 12px;
        font-size: 12px;
        font-weight: 700;
        color: #333;
        background: #f3f4f7;
        border-bottom: 2px solid #cfcfcf;
    }

    /* Each colourful clickable card collapses into a single table row */
    .result-table .result-card {
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
        border-top: 1px solid rgba(0, 0, 0, .08);
    }
    .result-table .result-card:first-of-type { border-top: none; }

    .rc-card { display: none; }

    .rc-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 112px 104px 58px 70px 62px 74px 80px 66px;
        column-gap: 8px;
        align-items: center;
        padding: 9px 54px 9px 12px;
    }

    .rc-cell {
        font-size: 13px;
        line-height: 1.3;
        min-width: 0;
        overflow-wrap: anywhere;
    }
    .rc-cell--name { font-weight: 700; }
    .rc-cell--c { text-align: center; color: #333; }
    .rc-cell--n { text-align: right; font-variant-numeric: tabular-nums; }
    .rc-strong { font-weight: 700; }

    .result-card--green .rc-cell--name,
    .result-card--green .rc-cell--morio { color: var(--green-fg); }
    .result-card--yellow .rc-cell--name,
    .result-card--yellow .rc-cell--morio { color: var(--yellow-fg); }
    .result-card--red .rc-cell--name,
    .result-card--red .rc-cell--morio { color: var(--red-fg); }

    .rc-special-row {
        grid-column: 1 / -1;
        text-align: right;
        font-size: 12px;
        color: #444;
        padding-top: 2px;
    }

    /* Centre the selection checkpoint vertically within the row */
    .result-table .result-card .select-check { top: 50%; transform: translateY(-50%); }
}

/* Toast for share fallback / messages */
.toast {
    position: fixed;
    left: 50%;
    bottom: calc(24px + env(safe-area-inset-bottom));
    transform: translateX(-50%) translateY(20px);
    background: #323232;
    color: #fff;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .3);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    z-index: 100;
    max-width: 90vw;
    text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ==========================================================================
   Print — floating button (desktop only) + black-and-white A4 layout
   ========================================================================== */

/* Floating "Εκτύπωση" button, lower-right. Hidden by default; only revealed on
   large (desktop) screens while viewing the σχολές list (4) or My Choices (5). */
.print-fab {
    display: none;
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 60;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: var(--deep-red);
    border: none;
    border-radius: 26px;
    padding: 13px 20px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .28);
    transition: filter .12s ease, transform .08s ease;
}
.print-fab:hover { filter: brightness(1.06); }
.print-fab:active { filter: brightness(.9); transform: translateY(1px); }
.print-fab .icon { width: 20px; height: 20px; flex: none; }

@media (min-width: 1080px) {
    body[data-screen="4"] .print-fab,
    body[data-screen="5"] .print-fab { display: inline-flex; }
}

/* Floating "Καθαρισμός" (full reset) button, lower-left — mirrors .print-fab.
   Desktop-only; revealed on the results screens (4 & 5). Neutral grey so it is
   visually distinct from the red print button. */
.clear-fab {
    display: none;
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 60;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: #555;
    border: none;
    border-radius: 26px;
    padding: 13px 20px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .28);
    transition: filter .12s ease, transform .08s ease;
}
.clear-fab:hover { filter: brightness(1.1); }
.clear-fab:active { filter: brightness(.9); transform: translateY(1px); }
.clear-fab .icon { width: 20px; height: 20px; flex: none; }

@media (min-width: 1080px) {
    body[data-screen="4"] .clear-fab,
    body[data-screen="5"] .clear-fab { display: inline-flex; }
}

/* The print document lives off-screen until the browser switches to print media. */
#print-root { display: none; }

@page {
    size: A4;
    margin: 12mm 10mm;
}

@media print {
    html, body {
        height: auto;
        overflow: visible;
        background: #fff;
    }
    body { display: block; }

    /* Hide the whole interactive app; show only the print document. */
    .app-header,
    .app-main,
    .print-fab,
    .clear-fab,
    .toast,
    .boot-loader { display: none !important; }
    #print-root { display: block !important; }

    .print-doc {
        color: #000;
        font-size: 9pt;
        line-height: 1.25;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .print-head {
        border-bottom: 2px solid #000;
        padding-bottom: 6px;
        margin-bottom: 8px;
    }
    .print-brand { font-size: 8.5pt; letter-spacing: .3px; color: #333; }
    .print-title { font-size: 15pt; font-weight: 700; margin: 2px 0 4px; }
    .print-meta { font-size: 8.5pt; color: #222; }
    .print-meta span + span { margin-left: 16px; }
    .print-grades { font-size: 8.5pt; color: #222; margin-top: 4px; }

    .print-legend {
        font-size: 8pt;
        color: #222;
        margin: 6px 0 8px;
    }

    .print-section-title {
        font-size: 10.5pt;
        font-weight: 700;
        margin: 10px 0 3px;
        page-break-after: avoid;
        break-after: avoid;
    }

    .print-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 8.6pt;
        margin-bottom: 6px;
    }
    .print-table--choices { font-size: 9.2pt; }

    /* Repeat the header row on every printed page. */
    .print-table thead { display: table-header-group; }

    .print-table th,
    .print-table td {
        border: 1px solid #8a8a8a;
        padding: 2px 4px;
        vertical-align: top;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
    .print-table th {
        background: #e6e6e6;
        text-align: left;
        white-space: pre-line;
        vertical-align: bottom;
        font-size: 8pt;
    }

    .print-table tbody tr { page-break-inside: avoid; break-inside: avoid; }

    .print-table .c-name { font-weight: 700; }
    .print-table .c-strong { font-weight: 700; }
    .print-table .c-diff { text-align: right; font-weight: 700; }
    .print-table .c-diff--pos { background: var(--green-bg); }
    .print-table .c-diff--neg { background: var(--red-bg); }
    .print-table .c-num {
        text-align: right;
        font-variant-numeric: tabular-nums;
    }
    .print-table .c-code { text-align: center; }
    .print-table .c-mark { text-align: center; font-weight: 700; width: 14px; }
    .print-table td.c-num,
    .print-table td.c-code,
    .print-table td.c-mark { white-space: nowrap; }

    .print-special-row td {
        font-size: 7.5pt;
        color: #333;
        text-align: right;
    }

    .print-empty { font-size: 10pt; padding: 8px 0; }

    .print-foot {
        margin-top: 10px;
        padding-top: 4px;
        border-top: 1px solid #8a8a8a;
        font-size: 8pt;
        color: #444;
        text-align: right;
    }
}
