:root {
    --ink: #123047;
    --ink-soft: #526372;
    --canvas: #edf4f1;
    --paper: #fbfcf9;
    --rule: #c9d8d1;
    --signal: #f2b84b;
    --signal-wash: #fff3d5;
    --ready: #2c775d;
    --display: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
    --body: "Aptos", "Segoe UI Variable", "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--canvas);
}

body {
    color: var(--ink);
    font-family: var(--body);
    margin: 0;
    min-width: 320px;
}

a {
    color: inherit;
}

.app-frame {
    min-height: 100vh;
}

.dashboard,
.simple-page {
    margin: 0 auto;
    max-width: 1120px;
    padding: 1.5rem clamp(1.25rem, 4vw, 4rem) 4rem;
}

.topbar {
    align-items: center;
    border-bottom: 1px solid var(--rule);
    display: flex;
    justify-content: space-between;
    padding-bottom: 1.25rem;
}

.brand {
    align-items: center;
    display: inline-flex;
    font-family: var(--display);
    font-size: 1.5rem;
    font-weight: 700;
    gap: 0.65rem;
    letter-spacing: -0.04em;
    text-decoration: none;
}

.brand-mark {
    align-items: center;
    background: var(--ink);
    border-radius: 50%;
    color: var(--paper);
    display: inline-flex;
    font-family: var(--body);
    font-size: 0.8rem;
    font-weight: 800;
    height: 1.75rem;
    justify-content: center;
    letter-spacing: 0;
    width: 1.75rem;
}

.pilot-badge,
.route-state,
.eyebrow {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.pilot-badge {
    border: 1px solid var(--ready);
    color: var(--ready);
    padding: 0.45rem 0.65rem;
}

.intro {
    max-width: 780px;
    padding: clamp(4rem, 12vw, 8rem) 0 clamp(3.5rem, 8vw, 5rem);
}

.eyebrow {
    color: var(--ready);
    margin: 0 0 0.85rem;
}

h1,
h2,
p {
    margin-top: 0;
}

h1,
h2 {
    font-family: var(--display);
    font-weight: 600;
    letter-spacing: -0.035em;
}

h1 {
    font-size: clamp(3rem, 7vw, 5.6rem);
    line-height: 0.95;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 1.55rem;
    line-height: 1.05;
    margin-bottom: 0.55rem;
}

.lede {
    color: var(--ink-soft);
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    line-height: 1.55;
    max-width: 620px;
}

.readiness-board {
    background: var(--paper);
    border: 1px solid var(--rule);
    box-shadow: 10px 10px 0 var(--signal);
    padding: clamp(1.5rem, 4vw, 3rem);
}

.route-header {
    align-items: start;
    display: flex;
    gap: 2rem;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.route-header p:last-child {
    color: var(--ink-soft);
    line-height: 1.45;
    margin: 0;
    max-width: 25rem;
}

.route {
    list-style: none;
    margin: 0;
    padding: 0;
}

.route-step {
    align-items: start;
    border-top: 1px solid var(--rule);
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 3rem minmax(0, 1fr) auto;
    padding: 1.4rem 0;
}

.route-step:last-child {
    border-bottom: 1px solid var(--rule);
}

.route-step h2 {
    margin: 0 0 0.4rem;
}

.route-step p {
    color: var(--ink-soft);
    line-height: 1.45;
    margin: 0;
}

.route-index {
    color: var(--ink-soft);
    font-family: var(--display);
    font-size: 1.2rem;
}

.route-state {
    color: var(--ink-soft);
    padding-top: 0.3rem;
}

.route-step--current .route-index,
.route-step--current .route-state {
    color: var(--ready);
}

.route-step--current {
    background: linear-gradient(90deg, var(--signal-wash), transparent 72%);
}

code {
    background: #e6eeea;
    color: var(--ink);
    font-family: "Cascadia Code", Consolas, monospace;
    font-size: 0.84em;
    padding: 0.15em 0.35em;
}

.principles {
    display: grid;
    gap: 1px;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 4rem;
}

.principles article {
    background: var(--paper);
    border: 1px solid var(--rule);
    min-height: 14rem;
    padding: 1.5rem;
}

.principles h2 {
    font-size: 1.45rem;
}

.principles p:last-child {
    color: var(--ink-soft);
    line-height: 1.45;
    margin-bottom: 0;
}

.principle-symbol {
    color: var(--ready);
    font-family: var(--display);
    font-size: 1.65rem;
    margin-bottom: 2rem;
}

.simple-page {
    padding-top: 12rem;
}

.simple-page h1 {
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    max-width: 44rem;
}

.text-link {
    color: var(--ready);
    font-weight: 700;
}

a:focus-visible {
    outline: 3px solid var(--signal);
    outline-offset: 4px;
}

@media (max-width: 720px) {
    .route-header,
    .route-step {
        display: block;
    }

    .route-index,
    .route-state {
        display: inline-block;
    }

    .route-index {
        margin-bottom: 0.65rem;
    }

    .route-state {
        margin-top: 0.8rem;
    }

    .principles {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
    }
}

/* Telas de gestão: entrar, salas e computadores. */

.sign-in {
    max-width: 22rem;
    margin: 4rem auto;
    display: grid;
    gap: 0.5rem;
}

.sign-in h1 {
    margin-bottom: 0;
}

.sign-in .subtitle {
    margin-top: 0;
    opacity: 0.7;
}

.sign-in label {
    font-weight: 600;
    margin-top: 0.75rem;
}

.sign-in input,
.panel input,
.panel textarea {
    width: 100%;
    padding: 0.5rem 0.6rem;
    border: 1px solid rgb(0 0 0 / 0.25);
    border-radius: 0.375rem;
    font: inherit;
}

/* Vertical apenas: a largura acompanha o painel, e um campo arrastado para fora dele empurraria o
   resto da tela. */
.panel textarea {
    resize: vertical;
}

/* Um computador que parou de falar. Discreto de propósito: é informação para quando o professor
   quiser, não um alarme — uma máquina desligada é o caso normal, não uma falha. */
.mudo {
    color: #8a6d1f;
    font-size: 0.85em;
}

/* Fora de .panel de propósito: é um controle de leitura da tabela, não um campo de formulário, e
   herdar a largura total faria a caixa atravessar a tela. */
.filter {
    display: block;
    margin: 1rem 0;
}

.filter input {
    margin-right: 0.4rem;
}

button {
    margin-top: 1rem;
    padding: 0.55rem 1rem;
    border: 0;
    border-radius: 0.375rem;
    background: #1f3a5f;
    color: #fff;
    font: inherit;
    cursor: pointer;
}

button:disabled {
    opacity: 0.55;
    cursor: progress;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgb(0 0 0 / 0.12);
}

.who {
    opacity: 0.75;
}

.panel {
    margin: 1.5rem 0;
    padding: 1rem;
    border: 1px solid rgb(0 0 0 / 0.12);
    border-radius: 0.5rem;
    max-width: 30rem;
}

.error {
    color: #8a1c1c;
    background: #fdeaea;
    padding: 0.6rem 0.8rem;
    border-radius: 0.375rem;
}

.empty,
.signed-out {
    opacity: 0.75;
}

.classrooms {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 0.5rem;
    max-width: 30rem;
}

.classrooms li a {
    display: block;
    padding: 0.75rem 1rem;
    border: 1px solid rgb(0 0 0 / 0.12);
    border-radius: 0.5rem;
    text-decoration: none;
}

.devices {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.devices caption {
    text-align: left;
    opacity: 0.7;
    padding-bottom: 0.5rem;
}

.devices th,
.devices td {
    text-align: left;
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid rgb(0 0 0 / 0.1);
}

.devices tr.revoked {
    opacity: 0.55;
}

.ticket {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #f4f7fb;
    border-radius: 0.375rem;
}

.ticket code {
    display: block;
    padding: 0.5rem;
    background: #fff;
    border-radius: 0.25rem;
    word-break: break-all;
    font-size: 1.05rem;
}

.ticket .hint {
    margin-bottom: 0;
    opacity: 0.7;
    font-size: 0.9rem;
}
