/*
  hortusify.online · accesso. The same departure-board language as TeacherAI: platform white by day, the night
  board in the evening (chosen by the operating system), ink, steel and rules; signal yellow only for what changed
  or is happening now, red only for what failed. No script on these pages: everything here is plain CSS.
  Fonts ship from this server (OFL, licences beside them in fonts/).
*/

@import url(fonts/fonts.css);


:root {
    color-scheme: light;
    --ground: #f4f4f2;
    --panel: #ffffff;
    --inset: #edeeeb;
    --rule: #dedfdc;
    --frame: #c0c3bf;
    --ink: #0d0f12;
    --ink-2: #373c42;
    --steel: #626870;
    --signal: #f2c200;
    --on-signal: #0d0f12;
    --hold: #fff1b8;
    --fail: #c02626;
    --fail-soft: #fcebe9;
    --shade: rgb(13 15 18 / 45%);
    --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
    --font-text: Barlow, system-ui, sans-serif;
    --font-mono: "Martian Mono", ui-monospace, monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --ground: #0e1013;
        --panel: #15181c;
        --inset: #1d2126;
        --rule: #262b31;
        --frame: #3d434b;
        --ink: #eceef0;
        --ink-2: #bec3c9;
        --steel: #9299a1;
        --hold: #3d3308;
        --fail: #ff8074;
        --fail-soft: #3a1816;
        --shade: rgb(0 0 0 / 60%);
    }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--ground);
    color: var(--ink);
    font: 400 15px/1.5 var(--font-text);
    -webkit-font-smoothing: antialiased;
    caret-color: var(--ink);
}
::selection { background: rgb(242 194 0 / 55%); color: var(--on-signal); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
a { color: inherit; text-underline-offset: 3px; }
input[type="checkbox"] { accent-color: var(--ink); }
::placeholder { color: var(--steel); opacity: 1; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 1ms !important; } }

/* ---------- Frame of every page ---------- */

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 60px;
    padding: 0 20px;
    background: var(--panel);
    border-bottom: 1px solid var(--rule);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; border-radius: 6px; }
.brand svg { display: block; }
.brand-word { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: 0.01em; line-height: 1; }
.brand .tile { fill: var(--ink); }
.brand .glyph { fill: var(--panel); }

.shell {
    flex: 1;
    display: grid;
    place-items: center;
    padding: 32px 16px 40px;
}
.foot { padding: 0 20px 20px; text-align: center; }
.foot-text { text-transform: none; letter-spacing: 0.02em; }

/* ---------- Type ---------- */

.label {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    font-stretch: 87.5%;
    line-height: 1.3;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--steel);
}
h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.005em;
}
h2 {
    margin: 0 0 6px;
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 600;
    line-height: 1.1;
}
h3 { margin: 0 0 8px; font-size: 1rem; font-weight: 600; }
.lead { margin: 8px 0 0; color: var(--ink-2); }
.lead strong { color: var(--ink); font-weight: 600; }
.hint { margin: 6px 0 0; font-size: 13.5px; color: var(--steel); }
.code-mark {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 0.9;
    font-variant-numeric: tabular-nums;
}
code {
    font-family: var(--font-mono);
    font-size: 0.86em;
    font-stretch: 87.5%;
}

/* ---------- The pass ---------- */

.pass {
    width: 100%;
    max-width: 480px;
    background: var(--panel);
    border: 1px solid var(--frame);
    border-radius: 6px;
    overflow: hidden;
}
.pass-wide { max-width: 680px; }
.pass-main { padding: 26px 24px 24px; }
.pass-section { padding: 22px 24px; border-top: 1px dashed var(--frame); }
.pass-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border-top: 1px dashed var(--frame);
    background: var(--inset);
}
.pass-foot form { margin: 0; }
.pass-foot .spacer { flex: 1; }

/* ---------- Forms ---------- */

.form { display: grid; gap: 16px; margin: 22px 0 0; }
.field { display: grid; gap: 6px; }
.field label {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    font-stretch: 87.5%;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--steel);
}
input:not([type="checkbox"]):not([type="hidden"]) {
    width: 100%;
    min-height: 44px;
    padding: 9px 12px;
    background: var(--panel);
    border: 1px solid var(--frame);
    border-radius: 6px;
    color: var(--ink);
    font: 400 16px/1.4 var(--font-text);
    transition: border-color 140ms;
}
input:not([type="checkbox"]):hover { border-color: var(--steel); }
input:not([type="checkbox"]):focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
input[inputmode="numeric"] { font-family: var(--font-mono); font-stretch: 87.5%; letter-spacing: 0.18em; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--ink-2); cursor: pointer; }
.check input { width: 17px; height: 17px; margin: 0; }

button, .btn {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    border: 1px solid var(--ink);
    border-radius: 6px;
    background: var(--ink);
    color: var(--panel);
    font: 600 14.5px/1 var(--font-text);
    letter-spacing: 0.01em;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 140ms, border-color 140ms, color 140ms;
}
button:hover, .btn:hover { background: var(--ink-2); border-color: var(--ink-2); }
.form > button[type="submit"] { min-height: 46px; font-size: 15.5px; }
button.secondary, .btn.secondary { background: var(--panel); border-color: var(--frame); color: var(--ink); }
button.secondary:hover, .btn.secondary:hover { background: var(--inset); border-color: var(--steel); }
button.ghost, .btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
button.ghost:hover, .btn.ghost:hover { background: var(--panel); color: var(--ink); }
.btn svg, button svg { flex-shrink: 0; }

/* ---------- Messages ---------- */

.notice, .alert { margin: 16px 0 0; padding: 11px 14px; border-radius: 6px; font-size: 14.5px; }
.notice { background: var(--hold); border: 1px solid var(--signal); color: var(--ink); }
.alert { background: var(--fail-soft); border: 1px solid color-mix(in srgb, var(--fail) 45%, transparent); color: var(--ink); }

/* ---------- Portal board ---------- */

.board { margin: 20px 0 0; padding: 0; list-style: none; border: 1px solid var(--frame); border-radius: 6px; overflow: hidden; }
.board-head, .board a {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 0 16px;
}
.board-head { min-height: 34px; background: var(--inset); border-bottom: 1px solid var(--rule); }
.board li + li { border-top: 1px solid var(--rule); }
.board a { min-height: 64px; padding-top: 10px; padding-bottom: 10px; text-decoration: none; transition: background-color 140ms; }
.board a:hover { background: var(--inset); }
.board a:focus-visible { outline-offset: -2px; }
.board .code-mark { font-size: 26px; }
.board-name { display: block; font-weight: 600; font-size: 16px; }
.board-path { display: block; font-family: var(--font-mono); font-size: 11px; font-stretch: 87.5%; color: var(--steel); }
.board-go { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; }
.empty { margin: 20px 0 0; padding: 28px 20px; border: 1px dashed var(--frame); border-radius: 6px; text-align: center; color: var(--ink-2); }

/* ---------- Security ---------- */

.state { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 7px; border-radius: 3px; border: 1px solid var(--frame); font-family: var(--font-mono); font-size: 10px; font-weight: 600; font-stretch: 87.5%; letter-spacing: 0.05em; text-transform: uppercase; }
.state-on { border-color: var(--ink); }
.state-off { border-style: dashed; color: var(--steel); }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.steps { margin: 18px 0 0; padding: 0; list-style: none; counter-reset: stop; display: grid; gap: 14px; }
.steps > li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; counter-increment: stop; }
.steps > li::before {
    content: counter(stop);
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid var(--ink);
    border-radius: 6px;
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 700;
}
.steps > li > :first-child { margin-top: 7px; }
.qr { display: inline-block; margin: 12px 0 8px; padding: 12px; background: #ffffff; border: 1px solid var(--frame); border-radius: 6px; line-height: 0; }
.qr svg { width: 184px; height: 184px; }
.secret { display: inline-block; margin-top: 4px; padding: 4px 8px; border-radius: 4px; background: var(--inset); color: var(--ink); word-break: break-all; letter-spacing: 0.08em; }
.codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.codes li { padding: 8px 10px; border: 1px dashed var(--frame); border-radius: 4px; text-align: center; background: var(--panel); }
.codes code { font-size: 14px; letter-spacing: 0.06em; }
.subform { margin: 20px 0 0; padding: 18px 0 0; border-top: 1px solid var(--rule); }
.subform .form { margin-top: 10px; }
.form > form { margin: 0; }
.form > form > button { width: 100%; }
.form > .btn { min-height: 46px; }
.pass-foot > .btn.ghost:first-child { margin-left: -16px; }
@media (max-width: 719px) { .shell { place-items: start center; padding-top: 20px; } }
