/* =========================================================================
   Biloou — dashboard & auth
   Same neo-brutalist system as the marketing site, tuned for long forms:
   calmer background, tighter rhythm, borders that still hit hard.
   ========================================================================= */

:root {
    --ink:     #141210;
    --paper:   #FFF8EC;
    --paper-2: #FFEFD6;
    --shade:   #F3EADA;
    --yellow:  #FFE04B;
    --cyan:    #6BE5E0;
    --pink:    #FF6FB5;
    --lime:    #C6FF5C;
    --orange:  #FF8A3D;
    --purple:  #B39BFF;
    --danger:  #D8362A;
    --ok:      #167A4B;

    --border: 3px solid var(--ink);
    --sh-sm: 3px 3px 0 var(--ink);
    --sh:    6px 6px 0 var(--ink);

    --font-display: "Arial Black", "Archivo Black", "Helvetica Neue", Impact, system-ui, sans-serif;
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "JetBrains Mono", "Cascadia Mono", Consolas, "Courier New", monospace;

    --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html { overflow-x: clip; }
@supports not (overflow: clip) { html { overflow-x: hidden; } }

body {
    background: var(--shade);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
ul, ol { list-style: none; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }

/* The `hidden` attribute must win over any `display` a component sets, or
   things like the password meter stay on screen when they should not. */
[hidden] { display: none !important; }

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: -0.015em;
    text-transform: uppercase;
}

:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

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

.skip-link {
    position: absolute;
    top: -100px; left: 1rem;
    z-index: 999;
    padding: 0.7rem 1.15rem;
    background: var(--yellow);
    border: var(--border);
    box-shadow: var(--sh);
    font-weight: 800;
    text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* -------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------- */
.btn-brut {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.7rem 1.1rem;
    background: var(--paper);
    border: var(--border);
    box-shadow: var(--sh-sm);
    font-family: var(--font-display);
    font-size: 0.78rem;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.13s var(--ease-pop), box-shadow 0.13s var(--ease-pop),
                background-color 0.13s ease;
}
.btn-brut:hover:not(:disabled) { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.btn-brut:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: none; }
.btn-brut:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-brut--primary { background: var(--yellow); }
.btn-brut--dark { background: var(--ink); color: var(--paper); }
.btn-brut--sm { padding: 0.45rem 0.7rem; font-size: 0.68rem; }
.btn-brut--lg { padding: 0.95rem 1.3rem; font-size: 0.9rem; box-shadow: var(--sh); }
.btn-brut--block { width: 100%; }

.icon-btn {
    display: grid;
    place-items: center;
    width: 2rem; height: 2rem;
    background: var(--paper);
    border: 2px solid var(--ink);
    cursor: pointer;
    line-height: 1;
    transition: background-color 0.12s ease, transform 0.12s var(--ease-pop);
}
.icon-btn:hover { background: var(--yellow); transform: translateY(-2px); }
.icon-btn--danger:hover { background: var(--danger); color: var(--paper); }

/* -------------------------------------------------------------------------
   Flash messages
   ------------------------------------------------------------------------- */
.flash {
    padding: 0.8rem 1rem;
    margin-bottom: 1.25rem;
    background: var(--lime);
    border: var(--border);
    border-left-width: 10px;
    box-shadow: var(--sh-sm);
    font-weight: 700;
    font-size: 0.9375rem;
}
.flash--warn  { background: var(--yellow); }
.flash--error { background: var(--pink); }

/* -------------------------------------------------------------------------
   Auth screens
   Split layout: brand panel on the left, form on the right. On narrow screens
   the panel becomes a slim strip so the form is what you land on.
   ------------------------------------------------------------------------- */
.auth-body { background: var(--paper); }

.auth-split {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    min-height: 100vh;
}

/* Brand panel ------------------------------------------------------------ */
.auth-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: clamp(1.75rem, 4vw, 3rem);
    background-color: var(--yellow);
    background-image:
        linear-gradient(rgba(20, 18, 16, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(20, 18, 16, 0.07) 1px, transparent 1px);
    background-size: 26px 26px;
    border-right: var(--border);
    overflow: hidden;
}

.auth-panel__deco { position: absolute; inset: 0; pointer-events: none; }
.auth-panel__shape { position: absolute; border: var(--border); }
.auth-panel__shape--1 {
    top: 12%; right: -3rem;
    width: 11rem; height: 11rem;
    background: var(--cyan);
    border-radius: 50%;
}
.auth-panel__shape--2 {
    bottom: 16%; left: -2.5rem;
    width: 8rem; height: 8rem;
    background: var(--pink);
    transform: rotate(18deg);
}
.auth-panel__shape--3 {
    bottom: 40%; right: 18%;
    width: 3.5rem; height: 3.5rem;
    background: var(--lime);
    transform: rotate(-12deg);
}

.auth-panel__brand,
.auth-panel__title,
.auth-panel__points,
.auth-panel__foot { position: relative; z-index: 1; }

.auth-panel__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    align-self: flex-start;
    font-family: var(--font-display);
    font-size: 1.1rem;
    text-decoration: none;
    text-transform: uppercase;
}
.auth-panel__mark {
    display: grid;
    place-items: center;
    width: 2.1rem; height: 2.1rem;
    background: var(--paper);
    border: var(--border);
    box-shadow: var(--sh-sm);
}
.auth-panel__brand:hover .auth-panel__mark { background: var(--pink); }

.auth-panel__title {
    margin-top: auto;
    padding-top: 2.5rem;
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3.2vw, 2.8rem);
    line-height: 1;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.auth-panel__points {
    display: grid;
    gap: 0.6rem;
    margin-top: 1.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
}
.auth-panel__points li { display: flex; align-items: flex-start; gap: 0.6rem; }
.auth-panel__points li::before {
    content: "";
    flex: 0 0 auto;
    width: 12px; height: 12px;
    margin-top: 0.45rem;
    background: var(--paper);
    border: 2px solid var(--ink);
}

.auth-panel__foot { margin-top: auto; padding-top: 2.5rem; font-size: 0.875rem; font-weight: 700; }
.auth-panel__foot a { text-decoration: none; border-bottom: 3px solid var(--ink); }
.auth-panel__foot a:hover { background: var(--paper); }

/* Form side -------------------------------------------------------------- */
.auth-main {
    display: grid;
    place-items: center;
    padding: clamp(1.75rem, 4vw, 3rem) clamp(1.25rem, 4vw, 3rem);
}

.auth-card { width: min(100%, 27rem); }

/* The card brand only shows when the panel is out of view. */
.auth-card__brand {
    display: none;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-display);
    text-decoration: none;
    text-transform: uppercase;
}
.auth-card__mark {
    display: grid;
    place-items: center;
    width: 2rem; height: 2rem;
    background: var(--yellow);
    border: var(--border);
}

.auth-card__title { font-size: clamp(1.7rem, 5vw, 2.4rem); }
.auth-card__sub { margin-top: 0.5rem; font-size: 0.9375rem; }

.auth-form { margin-top: 1.75rem; display: grid; gap: 1.15rem; }

.auth-card__note {
    margin-top: 1.25rem;
    font-size: 0.8125rem;
    opacity: 0.75;
}

.auth-card__alt {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 2px dashed var(--ink);
    font-size: 0.9rem;
}
.auth-card__alt a { font-weight: 800; border-bottom: 3px solid var(--pink); text-decoration: none; }
.auth-card__alt a:hover { background: var(--pink); }

/* Password field --------------------------------------------------------- */
.pw { display: flex; align-items: stretch; }
.pw input { flex: 1 1 auto; min-width: 0; }

.pw__toggle {
    flex: 0 0 auto;
    padding-inline: 0.85rem;
    background: var(--paper-2);
    border: var(--border);
    border-left: none;
    font-family: var(--font-display);
    font-size: 0.7rem;
    text-transform: uppercase;
    cursor: pointer;
}
.pw__toggle:hover { background: var(--yellow); }

.pw-strength { display: flex; align-items: center; gap: 0.6rem; }
.pw-strength__bar {
    flex: 1 1 auto;
    height: 0.65rem;
    background: var(--paper-2);
    border: 2px solid var(--ink);
    overflow: hidden;
}
.pw-strength__bar > span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--ink);
    transition: width 0.18s ease;
}
.pw-strength__label {
    flex: 0 0 auto;
    min-width: 4.5rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.pw-strength.is-weak   .pw-strength__bar > span { background: var(--danger); }
.pw-strength.is-fair   .pw-strength__bar > span { background: var(--orange); }
.pw-strength.is-good   .pw-strength__bar > span { background: var(--yellow); }
.pw-strength.is-strong .pw-strength__bar > span { background: var(--lime); }

/* A lone card with no brand panel beside it — the 404 page. */
.auth-standalone {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 2rem 1.25rem;
    background-color: var(--yellow);
    background-image:
        linear-gradient(rgba(20, 18, 16, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(20, 18, 16, 0.07) 1px, transparent 1px);
    background-size: 26px 26px;
}
.auth-standalone .auth-card {
    padding: clamp(1.5rem, 5vw, 2.25rem);
    background: var(--paper);
    border: var(--border);
    box-shadow: 10px 10px 0 var(--ink);
}
.auth-standalone .auth-card__brand { display: inline-flex; }

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

/* -------------------------------------------------------------------------
   Fields
   ------------------------------------------------------------------------- */
.field { display: grid; gap: 0.35rem; min-width: 0; }

.field > label,
.field label {
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="url"],
.field input[type="password"],
.field textarea,
.field select {
    width: 100%;
    padding: 0.65rem 0.75rem;
    background: var(--paper);
    border: var(--border);
    font-size: 0.9375rem;
}
.field label input,
.field label textarea,
.field label select { margin-top: 0.35rem; }

.field textarea { resize: vertical; min-height: 4.5rem; font-family: inherit; }
.field select { appearance: none; background-image: none; cursor: pointer; }

.field input:focus, .field textarea:focus, .field select:focus {
    outline: none;
    background: var(--yellow);
    box-shadow: var(--sh-sm);
}
.field [aria-invalid="true"] { background: var(--pink); }

.field__hint { font-size: 0.78rem; opacity: 0.75; }
.field__error { font-size: 0.8rem; font-weight: 800; color: var(--danger); }

.field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: 1rem 1.15rem;
    align-items: start;
}
.field--full { grid-column: 1 / -1; }
.field--narrow { max-width: 12rem; }
.field--grow { grid-column: span 2; }
.field--action { align-self: end; padding-bottom: 0.15rem; }

.switch { display: inline-flex; align-items: center; gap: 0.6rem; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__box {
    display: grid;
    place-items: center;
    width: 1.6rem; height: 1.6rem;
    background: var(--paper);
    border: var(--border);
    flex: 0 0 auto;
}
.switch input:checked + .switch__box { background: var(--lime); }
.switch input:checked + .switch__box::after { content: "\2713"; font-weight: 900; }
.switch input:focus-visible + .switch__box { outline: 3px solid var(--ink); outline-offset: 2px; }
.switch span:last-child { font-family: var(--font-body); font-size: 0.9375rem; text-transform: none; letter-spacing: 0; }

/* -------------------------------------------------------------------------
   Dashboard chrome
   ------------------------------------------------------------------------- */
.dash-top {
    position: sticky;
    top: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.7rem clamp(1rem, 3vw, 1.75rem);
    background: var(--paper);
    border-bottom: var(--border);
}

.dash-top__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--font-display);
    text-decoration: none;
    text-transform: uppercase;
}
.dash-top__mark {
    display: grid;
    place-items: center;
    width: 1.9rem; height: 1.9rem;
    background: var(--yellow);
    border: var(--border);
}

.dash-top__toggle {
    display: none;
    padding: 0.4rem 0.6rem;
    background: var(--yellow);
    border: var(--border);
    cursor: pointer;
}

.dash-top__right { display: flex; align-items: center; gap: 0.7rem; margin-left: auto; }
.dash-top__user {
    font-size: 0.8125rem;
    font-weight: 700;
    max-width: 12rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dash-top__out { display: inline; }

.dash-shell {
    display: grid;
    grid-template-columns: 15rem minmax(0, 1fr);
    align-items: start;
    gap: clamp(1.25rem, 3vw, 2.25rem);
    padding: clamp(1.25rem, 3vw, 2.25rem);
    max-width: 1400px;
    margin-inline: auto;
}

.dash-nav {
    position: sticky;
    top: 5.5rem;
    padding: 0.9rem;
    background: var(--paper);
    border: var(--border);
    box-shadow: var(--sh-sm);
}
.dash-nav ul { display: grid; gap: 0.25rem; }

.dash-nav__link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.7rem;
    border: 2px solid transparent;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
}
.dash-nav__link:hover { background: var(--paper-2); border-color: var(--ink); }
.dash-nav__link.is-current { background: var(--yellow); border-color: var(--ink); box-shadow: var(--sh-sm); }
.dash-nav__icon { font-size: 0.85rem; }

.dash-nav__state {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 2px dashed var(--ink);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.dot { width: 10px; height: 10px; border: 2px solid var(--ink); border-radius: 50%; }
.dot--live { background: var(--lime); }
.dot--draft { background: var(--paper-2); }

.dash-main { min-width: 0; }

.dash-head { margin-bottom: 1.5rem; }
.dash-head__title { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.dash-head__lede { margin-top: 0.4rem; font-size: 0.95rem; }

/* -------------------------------------------------------------------------
   Panels
   ------------------------------------------------------------------------- */
.panel {
    padding: clamp(1.1rem, 2.5vw, 1.6rem);
    margin-bottom: 1.5rem;
    background: var(--paper);
    border: var(--border);
    box-shadow: var(--sh);
}
.panel--yellow { background: var(--yellow); }
.panel--lime { background: var(--lime); }

.panel__title { font-size: 1.15rem; }
.panel__lede { margin-top: 0.4rem; margin-bottom: 1rem; font-size: 0.9rem; }
.panel__title + .field-grid,
.panel__title + .repeat { margin-top: 1.1rem; }

.panel__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; }

.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 1.5rem;
    align-items: start;
}
.dash-grid .panel { margin-bottom: 0; }
.panel--wide { grid-column: 1 / -1; }

/* Key/value list --------------------------------------------------------- */
.kv { display: grid; gap: 0; margin-top: 1rem; border-top: 2px solid var(--ink); }
.kv > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 0.55rem;
    border-bottom: 2px solid var(--ink);
}
.kv dt {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.kv dd { font-weight: 700; font-size: 0.9rem; text-align: right; word-break: break-word; }
.kv__mono { font-family: var(--font-mono); font-weight: 400 !important; }

/* Progress --------------------------------------------------------------- */
.meter {
    height: 1.1rem;
    margin-block: 0.9rem 1.1rem;
    background: var(--paper-2);
    border: var(--border);
    overflow: hidden;
}
.meter__fill { display: block; height: 100%; width: var(--pct, 0%); background: var(--lime); }

.checklist { display: grid; gap: 0.5rem; }
.checklist__item { display: flex; align-items: center; gap: 0.6rem; font-size: 0.9rem; }
.checklist__box {
    display: grid;
    place-items: center;
    width: 1.4rem; height: 1.4rem;
    flex: 0 0 auto;
    background: var(--paper);
    border: 2px solid var(--ink);
    font-weight: 900;
}
.checklist__item.is-done .checklist__box { background: var(--lime); }
.checklist__item.is-done a { text-decoration: line-through; opacity: 0.65; }
.checklist a { text-decoration: none; border-bottom: 2px solid var(--ink); }
.checklist a:hover { background: var(--yellow); }

/* Quick links ------------------------------------------------------------ */
.quick {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    gap: 0.9rem;
    margin-top: 1rem;
}
.quick__card {
    display: grid;
    gap: 0.2rem;
    padding: 1rem;
    background: var(--paper-2);
    border: var(--border);
    text-decoration: none;
    transition: transform 0.14s var(--ease-pop), box-shadow 0.14s var(--ease-pop);
}
.quick__card:hover { transform: translate(-3px, -3px); box-shadow: var(--sh); background: var(--cyan); }
.quick__icon { font-size: 1.2rem; }
.quick__card strong { font-family: var(--font-display); font-size: 0.9rem; text-transform: uppercase; }
.quick__card span:last-child { font-size: 0.8rem; }

/* -------------------------------------------------------------------------
   Repeatable rows
   ------------------------------------------------------------------------- */
.repeat { display: grid; gap: 1rem; }

.repeat__row {
    padding: 0.9rem 1rem 1.1rem;
    background: var(--paper-2);
    border: var(--border);
    min-width: 0;
}
.repeat__row--tight { padding-block: 0.75rem; }

.repeat__bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.7rem;
    margin-bottom: 0.9rem;
    border-bottom: 2px solid var(--ink);
}
.repeat__no {
    padding: 0.1rem 0.45rem;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
}
.repeat__handle {
    font-family: var(--font-display);
    font-size: 0.85rem;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.repeat__tools { display: flex; gap: 0.35rem; margin-left: auto; }

.repeat__empty {
    padding: 1.25rem;
    background: var(--paper-2);
    border: 2px dashed var(--ink);
    font-size: 0.9rem;
    text-align: center;
}

.form-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; }
.form-actions--sticky {
    position: sticky;
    bottom: 0;
    z-index: 20;
    padding: 0.85rem;
    margin-top: 1.5rem;
    background: var(--paper);
    border: var(--border);
    box-shadow: var(--sh);
}
.form-note { margin-top: 0.85rem; font-size: 0.8rem; opacity: 0.75; }

/* -------------------------------------------------------------------------
   Template picker
   ------------------------------------------------------------------------- */
.picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 1.25rem;
}

.picker__card {
    display: flex;
    flex-direction: column;
    padding: 0.9rem;
    background: var(--paper);
    border: var(--border);
    box-shadow: var(--sh-sm);
    cursor: pointer;
    transition: transform 0.14s var(--ease-pop), box-shadow 0.14s var(--ease-pop);
}
.picker__card:hover { transform: translate(-3px, -3px); box-shadow: var(--sh); }
.picker__card.is-current { background: var(--yellow); }
.picker__card:focus-within { outline: 3px solid var(--ink); outline-offset: 3px; }

.picker__radio { position: absolute; opacity: 0; width: 0; height: 0; }

.picker__frame { display: block; border: 2px solid var(--ink); }
.picker__frame .tpl-preview { height: 170px; border: none; }

.picker__body { display: block; padding: 0.9rem 0.2rem 0.8rem; }
.picker__name { display: block; font-family: var(--font-display); font-size: 1.05rem; text-transform: uppercase; }
.picker__kind {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.picker__blurb { display: block; margin-top: 0.6rem; font-size: 0.875rem; }

.picker__traits { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.75rem; }
.picker__traits span {
    padding: 0.15rem 0.45rem;
    background: var(--paper);
    border: 2px solid var(--ink);
    font-size: 0.68rem;
    font-weight: 700;
}

.picker__state {
    margin-top: auto;
    padding: 0.55rem;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-display);
    font-size: 0.72rem;
    text-align: center;
    text-transform: uppercase;
}
.picker__card.is-current .picker__state { background: var(--lime); color: var(--ink); }
.picker__radio:checked ~ .picker__state { background: var(--lime); color: var(--ink); }

/* -------------------------------------------------------------------------
   Publish
   ------------------------------------------------------------------------- */
.url-box {
    padding: 0.8rem 1rem;
    background: var(--paper);
    border: var(--border);
    box-shadow: var(--sh-sm);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    word-break: break-all;
}
.url-box a { font-weight: 700; }

.slug-input { display: flex; align-items: stretch; min-width: 0; }
.slug-input input { min-width: 0; }

.slug-input__prefix,
.slug-input__suffix {
    display: grid;
    place-items: center;
    padding-inline: 0.75rem;
    background: var(--ink);
    color: var(--paper);
    border: var(--border);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    white-space: nowrap;
}
.slug-input__prefix { border-right: none; }
.slug-input__suffix { border-left: none; }
.slug-input__prefix + input { border-left: none !important; }
.slug-input input:has(+ .slug-input__suffix) { border-right: none; }

@media (max-width: 520px) {
    .slug-input { flex-wrap: wrap; }
    .slug-input__prefix, .slug-input__suffix { width: 100%; padding-block: 0.35rem; }
}

.notice {
    margin-top: 1.25rem;
    padding: 0.9rem 1rem;
    background: var(--paper);
    border: 2px dashed var(--ink);
    font-size: 0.875rem;
}
.notice ul { margin-top: 0.5rem; display: grid; gap: 0.3rem; }
.notice li::before { content: "— "; }
.notice a { font-weight: 700; }

.share { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* -------------------------------------------------------------------------
   Photo
   ------------------------------------------------------------------------- */
.photo-current {
    display: grid;
    grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
    margin-top: 1rem;
}

.photo-current__img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center 30%;
    border: var(--border);
    box-shadow: var(--sh);
}

.photo-current__empty {
    display: grid;
    place-items: center;
    gap: 0.35rem;
    width: 100%;
    aspect-ratio: 4 / 5;
    background: var(--paper-2);
    border: 3px dashed var(--ink);
}
.photo-current__empty span {
    font-family: var(--font-display);
    font-size: 2.5rem;
    line-height: 1;
    opacity: 0.4;
}
.photo-current__empty p { font-size: 0.8rem; font-weight: 700; opacity: 0.7; }

.photo-current__side { display: grid; gap: 1rem; align-content: start; }
.photo-note { font-size: 0.875rem; }

.field input[type="file"] {
    width: 100%;
    padding: 0.6rem;
    background: var(--paper);
    border: 3px dashed var(--ink);
    font-size: 0.875rem;
    cursor: pointer;
}
.field input[type="file"]:focus { outline: none; background: var(--yellow); }
.field input[type="file"]:disabled { opacity: 0.5; cursor: not-allowed; }

.photo-themes { display: grid; gap: 0.6rem; margin-top: 0.5rem; }
.photo-themes li {
    padding: 0.7rem 0.9rem;
    background: var(--paper);
    border: 2px solid var(--ink);
    font-size: 0.875rem;
}
.photo-themes strong {
    display: block;
    font-family: var(--font-display);
    font-size: 0.85rem;
    text-transform: uppercase;
}

@media (max-width: 520px) {
    .photo-current { grid-template-columns: 1fr; }
    .photo-current__img, .photo-current__empty { max-width: 12rem; }
}

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .dash-shell { grid-template-columns: 1fr; padding-top: 1rem; }
    .dash-top__toggle { display: block; order: -1; }

    .dash-nav {
        position: static;
        display: none;
    }
    .dash-nav.is-open { display: block; }

    .field--grow { grid-column: auto; }
}

/* Below this the brand panel becomes a strip across the top. */
@media (max-width: 880px) {
    .auth-split { grid-template-columns: 1fr; min-height: 0; }

    .auth-panel { display: none; }
    .auth-card__brand { display: inline-flex; }

    .auth-main {
        min-height: 100vh;
        padding-block: clamp(2rem, 8vw, 4rem);
        background-color: var(--yellow);
        background-image:
            linear-gradient(rgba(20, 18, 16, 0.07) 1px, transparent 1px),
            linear-gradient(90deg, rgba(20, 18, 16, 0.07) 1px, transparent 1px);
        background-size: 26px 26px;
        align-content: center;
    }

    /* On the tinted background the form needs its own card. */
    .auth-card {
        padding: clamp(1.5rem, 5vw, 2.25rem);
        background: var(--paper);
        border: var(--border);
        box-shadow: 10px 10px 0 var(--ink);
    }
}

@media (max-width: 620px) {
    .dash-top { flex-wrap: wrap; }
    .dash-top__right { width: 100%; margin-left: 0; }
    .dash-top__user { margin-right: auto; }
    .field--narrow { max-width: none; }
    .form-actions--sticky { position: static; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}
