/**
 * Postroute - the shells and the page geometry.
 *
 * Three shells: .page is the centred card the sign-in family uses, .shell is
 * the application someone works in, .site is the public front. What follows
 * is layout - where things sit - and reads every value from theme.css. The
 * objects themselves (button, card, field, table...) are in components.css
 * and are not restyled here.
 *
 * Loaded last, after theme.css and components.css.
 */

/* --- the sign-in card ---------------------------------------------------- */

.page {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-6);
    padding: var(--space-8) var(--space-4);
    background: var(--ground);
    color: var(--ink);
    font: var(--text-md)/var(--leading-base) var(--font-sans);
}

.foot {
    color: var(--ink-soft);
    font-size: var(--text-sm);
    text-align: center;
}

.foot p {
    margin: 0;
}

/* --- the application shell ------------------------------------------------
   Signing in leads to a real page, not the sign-in card grown a little. The
   centred card is right for a single decision and wrong for a panel someone
   works in. */

.shell {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--ground);
    color: var(--ink);
    font: var(--text-md)/var(--leading-base) var(--font-sans);
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-2) var(--space-6);
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}

.topbar__brand {
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-tight);
    color: var(--ink);
    text-decoration: none;
}

.topbar__right {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.topbar__who {
    font-size: var(--text-base);
    color: var(--ink-soft);
}

.shell__body {
    flex: 1;
    display: grid;
    grid-template-columns: var(--width-nav) 1fr;
    align-items: start;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    padding: var(--space-5) var(--space-3);
    border-right: 1px solid var(--line);
    min-height: 100%;
}

.nav__link {
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    color: var(--ink-soft);
    text-decoration: none;
}

.nav__link:hover {
    background: var(--paper);
    color: var(--ink);
}

.nav__link--on {
    background: var(--paper);
    color: var(--ink);
    font-weight: var(--weight-semibold);
}

/* The top padding matches the nav's, so the first thing on the page starts on
   the same line as the first thing in the sidebar. They are read as one row and
   were a third of an inch apart. */
.content {
    padding: var(--space-5) var(--space-8) var(--space-12);
    max-width: var(--width-content);
}

.content__head {
    margin-bottom: var(--space-6);
}

.content__title {
    margin: 0;
    font-size: var(--text-2xl);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-tight);
}

/* Panels sit side by side where there is room and stack where there is not,
   without a breakpoint deciding it for them. */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
    gap: var(--space-5);
    align-items: start;
}

.shell .list {
    margin-bottom: var(--space-4);
}

/* A list first, actions second: the domain page is opened ten times to look
   at what exists for every once something changes. */
.bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.bar__count {
    margin: 0;
    font-size: var(--text-base);
}

.bar__actions {
    display: flex;
    gap: var(--space-2);
}

/* --- the public front ------------------------------------------------------
   Full width, in sections: what this is, what it does, the server, who runs
   it. The same tokens as the application, so the two read as one product. */

.site {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--ground);
    color: var(--ink);
    font: var(--text-md)/var(--leading-base) var(--font-sans);
}

.site__header {
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}

/* The three stripes from the logo, as a rule along the top. */
.site__stripe {
    height: 3px;
    background: linear-gradient(
        90deg,
        var(--brand-blue) 0 33.4%,
        var(--brand-yellow) 33.4% 66.7%,
        var(--brand-red) 66.7%
    );
}

.site__inner {
    width: 100%;
    max-width: var(--width-site);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.site__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    min-height: 4.25rem;
}

.site__brand {
    display: block;
    line-height: 0;
}

.site__logo {
    display: block;
    height: 2.25rem;
    width: auto;
}

.site__main {
    flex: 1;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: var(--height-hero);     /* never shorter than the artwork */
    padding: var(--space-12) 0 var(--space-16);
}

/* The title sits high; the button hangs well below it, where it stood before
   the lede moved to the corner. */
.hero .actions {
    margin-top: var(--space-20);
}

/* The artwork behind the hero: Vlad's blue lines (public/img/hero-lines.png,
   rotated from the file he supplied), as wide as the CONTENT COLUMN (68rem,
   like every section), centred, and as tall as the whole hero including its
   padding - a box only as tall as the text cropped the strokes top and bottom. */
.hero::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    z-index: 0;
    width: 100%;
    max-width: var(--width-site);
    transform: translateX(-50%);
    background: url("../img/hero-lines.png") no-repeat center / 100% auto;
    opacity: var(--opacity-artwork);
    pointer-events: none;
}

.hero > .site__inner {
    position: relative;
    z-index: 1;
}

.hero__title {
    margin: 0 0 var(--space-5);
    font-size: var(--text-5xl);
    font-weight: var(--weight-bold);
    letter-spacing: var(--tracking-tighter);
    line-height: var(--leading-tight);
}

/* The two-line lede sits in the hero's bottom-right corner, on the column's
   right edge - not on the button's row. The right offset is the column's own
   padding edge: half of what the viewport has beyond 68rem, plus the padding. */
.hero__lede {
    position: absolute;
    right: max(var(--space-6), calc((100% - var(--width-site)) / 2 + var(--space-6)));
    bottom: var(--space-8);
    z-index: 1;
    margin: 0;
    text-align: right;
    font-size: var(--text-xl);
    line-height: var(--leading-snug);
    color: var(--ink-soft);
}

.section {
    padding: var(--space-12) 0;
    border-top: 1px solid var(--line);
}

.section__title {
    margin: 0 0 var(--space-6);
    font-size: var(--text-2xl);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-tight);
}

.section__lede {
    margin: 0 0 var(--space-6);
    max-width: var(--width-prose);
    color: var(--ink-soft);
}

.site__footer {
    padding: var(--space-12) 0 var(--space-10);
    border-top: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: var(--text-sm);
}

/* Brand and tagline on the left, link columns on the right, a hairline, then
   the identity and the addresses on one bottom row. */
.site__footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) repeat(2, minmax(10rem, 1fr));
    gap: var(--space-8);
    padding-bottom: var(--space-10);
    border-bottom: 1px solid var(--line);
}

/* The brand block is as wide as its longest line; the envelope sits behind
   it as a faint watermark, the text written over it. */
.site__brandblock {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    justify-content: flex-start;    /* the text lines up with the column titles */
    gap: var(--space-2);
    min-height: 11rem;              /* room for the envelope behind */
    padding-bottom: var(--space-4);
}

.site__brandblock > p {
    position: relative;
    z-index: 1;
}

.site__mark {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    opacity: var(--opacity-watermark);
    pointer-events: none;
}

.site__wordmark {
    margin: 0;
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-tight);
    color: var(--ink);
}

.site__tagline {
    margin: 0;
    max-width: var(--width-prose);
}

.site__col {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.site__col-title {
    margin: 0 0 var(--space-1);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
}

.site__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--space-2) var(--space-6);
    padding-top: var(--space-6);
}

.site__bottom .identity {
    margin: 0;
}

.site__addresses {
    margin: 0;
}

/* --- one breakpoint: a phone ---------------------------------------------- */

@media (max-width: 46rem) {
    /* the sidebar becomes a row above the content */
    .shell__body {
        grid-template-columns: 1fr;
    }

    .nav {
        flex-direction: row;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding: var(--space-2) var(--space-3);
        min-height: 0;
    }

    .content {
        padding: var(--space-5) var(--space-4) var(--space-10);
    }

    .site__inner {
        padding: 0 var(--space-4);
    }

    .hero {
        padding: var(--space-12) 0 var(--space-10);
    }

    .hero__title {
        font-size: var(--text-4xl);
    }

    /* on a phone the lede falls back into the flow, under the button */
    .hero__lede {
        position: static;
        margin: var(--space-6) var(--space-4) 0;
        font-size: var(--text-lg);
        text-align: left;
    }

    .section {
        padding: var(--space-8) 0;
    }

    .site__footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
}

/* --- the new-mailbox page --------------------------------------------------- */

/* The form, and beside it the person as their colleagues will see them, kept
   in view while the form scrolls; one column on a phone, the card first. */
.newbox {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--width-preview);
    gap: var(--space-8);
    align-items: start;
}

.newbox__main {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    min-width: 0;
}

.newbox__section {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.newbox__pair {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: var(--space-4);
}

.newbox__preview {
    position: sticky;
    top: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.newbox__caption {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--ink-soft);
}

.newbox__comes {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.newbox__gets {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    margin: 0;
    padding: 0 0 0 var(--space-5);
    font-size: var(--text-sm);
    color: var(--ink);
}

.newbox__submit {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    padding-top: var(--space-4);
    border-top: 1px solid var(--line);
}

@media (max-width: 52rem) {
    .newbox {
        grid-template-columns: minmax(0, 1fr);
    }

    .newbox__preview {
        position: static;
        order: -1;
    }

    /* On a phone the card alone stays above the form; the list is the form's own boxes. */
    .newbox__comes {
        display: none;
    }
}

/* --- Asistență: the page in the mail program's tab ----------------------------
   resources/views/client/support.blade.php, drawn by js/client-support.js
   (docs/support.md). The rest is the portal's own components: tiles, list,
   tag, field, button. */
.support-page {
    width: 100%;
    max-width: var(--width-site);
    box-sizing: border-box;
    margin: 0 auto;
    padding: var(--space-12) var(--space-6);
}

.support-page h1 {
    margin: 0 0 var(--space-6);
    font-size: var(--text-2xl);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-tight);
}

.support-page h2 {
    margin: var(--space-8) 0 var(--space-2);
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
}

.support-tile {
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.support-tile__icon {
    width: 1.75rem;
    height: 1.75rem;
}

/* The request for a new mailbox: what is typed on the left, how its signature
   and business card will look on the right (Vlad, 05.11.2026). */
.support-ask {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-8);
    align-items: start;
}

.support-preview {
    position: sticky;
    top: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.support-preview__frame {
    display: block;
    width: 100%;
    background: transparent;
    border: 0;
}

/* Română | English, at the top right of the previews. */
.support-switch {
    display: inline-flex;
    align-self: flex-end;
    padding: var(--space-1);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

.support-switch__option {
    position: relative;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
    color: var(--ink-soft);
    font-size: var(--text-sm);
    cursor: pointer;
}

.support-switch__box {
    position: absolute;
    opacity: 0;
}

.support-switch__option:has(:checked) {
    background: var(--accent);
    color: var(--accent-ink);
}

.support-switch__option:has(:focus-visible) {
    outline: var(--focus-ring);
}

/* The signature as the foot of a mail: a sheet of paper, as tall as it is. */
.support-mail {
    padding: var(--space-5) var(--space-6);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--elevation-2);
}

.support-card-preview__hint {
    margin: var(--space-1) 0 0;
    color: var(--ink-soft);
    font-size: var(--text-xs);
    text-align: center;
}

@media (max-width: 52rem) {
    .support-ask {
        grid-template-columns: minmax(0, 1fr);
    }

    .support-preview {
        position: static;
    }
}

/* A mailbox chosen from the customer's own: the page's list under the box, in
   the box's letters (the browser's own list could not be made to match). */
.support-combo {
    position: relative;
}

.support-combo .field__input {
    box-sizing: border-box;
    width: 100%;
}

.support-combo__list {
    position: absolute;
    top: calc(100% + var(--space-1));
    right: 0;
    left: 0;
    z-index: 20;
    max-height: var(--height-picklist);
    margin: 0;
    padding: var(--space-1) 0;
    overflow-y: auto;
    list-style: none;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--control-radius);
    box-shadow: var(--elevation-2);
}

.support-combo__option {
    display: flex;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-2) var(--space-4);
    cursor: pointer;
}

.support-combo__option:hover,
.support-combo__option--active {
    background: var(--ground);
}

.support-combo__address {
    color: var(--ink-soft);
    overflow-wrap: anywhere;
    text-align: right;
}

.support-combo__none {
    padding: var(--space-2) var(--space-4);
    color: var(--ink-soft);
}

/* The phone of a new mailbox: +40 fixed in front, the rest typed. */
.support-phone {
    display: flex;
    align-items: stretch;
}

.support-phone__prefix {
    display: flex;
    align-items: center;
    padding: 0 var(--space-3);
    background: var(--ground);
    border: 1px solid var(--line);
    border-right: 0;
    border-radius: var(--control-radius) 0 0 var(--control-radius);
    color: var(--ink-soft);
}

.support-phone .field__input {
    flex: 1;
    min-width: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* The signature's own page in that frame. */
.signature-preview {
    margin: 0;
    padding: 0;
    background: var(--paper);
    font-family: Calibri, Arial, sans-serif;
}

.signature-preview__empty {
    opacity: 0.35;
}

.signature-preview__hello {
    margin: 0 0 var(--space-3);
    color: var(--ink-soft);
}

/* The mail's text, drawn as faded lines. */
.signature-preview__line {
    display: block;
    width: 92%;
    height: 0.6em;
    margin: 0 0 var(--space-2);
    background: var(--line);
    border-radius: var(--radius-sm);
}

.signature-preview__line--short {
    width: 58%;
    margin-bottom: var(--space-4);
}

/* A manual drawn on the Asistență page: the page already has its own top space. */
.support-page .manual {
    padding-top: 0;
    padding-bottom: var(--space-6);
}

/* A manual's picture opened large over the Asistență page; a click closes it. */
.support-shot {
    max-width: var(--width-site);
    cursor: zoom-out;
}

.support-shot img {
    display: block;
    max-width: 100%;
    height: auto;
}

.support-request {
    flex-direction: column;
    align-items: stretch;
}

.support-request__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--space-2);
}

.support-request__when {
    color: var(--ink-soft);
    font-size: var(--text-sm);
}

.support-request__problem {
    margin: var(--space-1) 0 0;
    color: var(--ink);
}

.support-older {
    margin-top: var(--space-4);
}

.support-older summary {
    color: var(--ink-soft);
    cursor: pointer;
}

.support-details {
    margin: var(--space-1) 0 0;
    padding: 0;
    list-style: none;
    font-size: var(--text-sm);
    color: var(--ink-soft);
}

.support-steps {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin: var(--space-2) 0 0;
    padding: 0;
    list-style: none;
    font-size: var(--text-sm);
    color: var(--ink-soft);
}

.support-steps__done {
    color: var(--ok);
    font-weight: var(--weight-semibold);
}

.support-steps span {
    margin-left: var(--space-1);
    font-weight: var(--weight-normal);
    color: var(--ink-soft);
}

/* The person's first page: each card in the colour of how grave it is (the
   --grave-* tokens), its icon drawn in that colour so it holds in the dark theme. */
.support-need {
    --grave: var(--grave-none);
    --grave-ground: var(--grave-none-ground);
    background: var(--grave-ground);
}

.support-need[data-grave="now"] { --grave: var(--grave-now); --grave-ground: var(--grave-now-ground); }
.support-need[data-grave="soon"] { --grave: var(--grave-soon); --grave-ground: var(--grave-soon-ground); }
.support-need[data-grave="planned"] { --grave: var(--grave-planned); --grave-ground: var(--grave-planned-ground); }
.support-need[data-grave="info"] { --grave: var(--grave-info); --grave-ground: var(--grave-info-ground); }

.support-need,
.tile.support-need:hover,
.tile.support-need:focus-visible {
    border-top: var(--space-1) solid var(--grave);
}

.support-need__mark {
    width: 1.75rem;
    height: 1.75rem;
    background: var(--grave);
    mask: center / contain no-repeat;
}

.support-need[data-icon="support"] .support-need__mark { mask-image: url("../img/support/support.svg"); }
.support-need[data-icon="space"] .support-need__mark { mask-image: url("../img/support/kind-space.svg"); }
.support-need[data-icon="leaving"] .support-need__mark { mask-image: url("../img/support/kind-leaving.svg"); }
.support-need[data-icon="mailbox"] .support-need__mark { mask-image: url("../img/support/kind-mailbox.svg"); }
.support-need[data-icon="access"] .support-need__mark { mask-image: url("../img/support/kind-access.svg"); }
.support-need[data-icon="other"] .support-need__mark { mask-image: url("../img/support/kind-other.svg"); }
.support-need[data-icon="help"] .support-need__mark { mask-image: url("../img/support/kind-help.svg"); }

/* What the card's form will ask, under what it is for. */
.support-need__asks {
    margin-top: var(--space-1);
    font-size: var(--text-sm);
    color: var(--ink);
}

.support-rating {
    display: flex;
    gap: var(--space-1);
}

.support-star {
    padding: 0;
    border: 0;
    background: none;
    font-size: var(--text-xl);
    color: var(--warn);
    cursor: pointer;
}

.tag--up {
    color: var(--warn);
    border-color: var(--warn);
}

.tag--done {
    color: var(--ok);
    border-color: var(--ok);
}

.tag--bad {
    color: var(--bad);
    border-color: var(--bad);
}

/* A detection's file or command line: long, no spaces to break at */
.devices__where {
    max-width: 40rem;
    overflow-wrap: anywhere;
    font-size: var(--text-xs);
}

/* A helper's requests as cards, each in the colour of what was asked for
   (Vlad, 04.11.2026: "carduri care sa fie colorate dupa ce vrea lumea"). */
.support-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
    gap: var(--space-4);
    align-items: start;
}

.support-card {
    --card-kind: var(--kind-other);
    --card-kind-ground: var(--kind-other-ground);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding: var(--space-4);
    background: var(--paper);
    border: 1px solid var(--line);
    border-top: var(--space-1) solid var(--card-kind);
    border-radius: var(--radius-lg);
    box-shadow: var(--elevation-1);
}

.support-card[data-kind="help"] {
    --card-kind: var(--kind-help);
    --card-kind-ground: var(--kind-help-ground);
}

.support-card[data-kind="new_mailbox"] {
    --card-kind: var(--kind-mailbox);
    --card-kind-ground: var(--kind-mailbox-ground);
}

.support-card[data-kind="shared_access"] {
    --card-kind: var(--kind-access);
    --card-kind-ground: var(--kind-access-ground);
}

.support-card[data-kind="leaving"] {
    --card-kind: var(--kind-leaving);
    --card-kind-ground: var(--kind-leaving-ground);
}

.support-card[data-kind="space"] {
    --card-kind: var(--kind-space);
    --card-kind-ground: var(--kind-space-ground);
}

.support-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
}

.support-card__kind {
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    background: var(--card-kind-ground);
    color: var(--card-kind);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
}

.support-card__who {
    margin: 0;
    font-size: var(--text-md);
    font-weight: var(--weight-semibold);
}

.support-card__when {
    font-size: var(--text-sm);
    color: var(--ink-soft);
}

.support-card p {
    margin: 0;
}

.support-card .actions {
    margin-top: var(--space-2);
}

/* A new mailbox's address, chosen among the ones its name makes. */
.support-addresses {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.support-addresses .field__hint {
    margin-left: var(--space-2);
}

/* A helper's portal (js/client-support.js, drawHub): a card for each page, in
   the colour of what is most pressing there - Cereri the colour of its most
   pressing kind of request, Calculatoare that of its worst computer. A card
   with something waiting is tinted all over; a calm one is white, green on top. */
.hub {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
    gap: var(--space-4);
}

.hub-card {
    --hub: var(--ok);
    --hub-ground: var(--paper);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
    min-block-size: 9rem;
    padding: var(--space-5) var(--space-6);
    font: inherit;
    text-align: start;
    color: var(--ink);
    background: var(--hub-ground);
    border: 1px solid var(--line);
    border-top: 6px solid var(--hub);
    border-radius: var(--radius-lg);
    box-shadow: var(--elevation-1);
    cursor: pointer;
}

.hub-card:hover {
    box-shadow: var(--elevation-2);
}

.hub-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.hub-card__name {
    font-size: var(--text-2xl);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-tight);
}

.hub-card__line {
    color: var(--ink-soft);
    font-size: var(--text-sm);
}

.hub-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
    margin-top: auto;
}

.hub-chip {
    padding: 2px var(--space-2);
    border-radius: var(--radius-sm);
    background: var(--paper);
    color: var(--hub);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
}

:is(.hub-card, .hub-chip)[data-state="help"] { --hub: var(--kind-help); }
:is(.hub-card, .hub-chip)[data-state="leaving"] { --hub: var(--kind-leaving); }
:is(.hub-card, .hub-chip)[data-state="shared_access"] { --hub: var(--kind-access); }
:is(.hub-card, .hub-chip)[data-state="new_mailbox"] { --hub: var(--kind-mailbox); }
:is(.hub-card, .hub-chip)[data-state="space"] { --hub: var(--kind-space); }
:is(.hub-card, .hub-chip)[data-state="other"] { --hub: var(--kind-other); }
:is(.hub-card, .hub-chip)[data-state="bad"] { --hub: var(--bad); }
:is(.hub-card, .hub-chip)[data-state="warn"] { --hub: var(--warn); }
:is(.hub-card, .hub-chip)[data-state="off"] { --hub: var(--ink-soft); }

.hub-card[data-state="help"] { --hub-ground: var(--kind-help-ground); }
.hub-card[data-state="leaving"] { --hub-ground: var(--kind-leaving-ground); }
.hub-card[data-state="shared_access"] { --hub-ground: var(--kind-access-ground); }
.hub-card[data-state="new_mailbox"] { --hub-ground: var(--kind-mailbox-ground); }
.hub-card[data-state="space"] { --hub-ground: var(--kind-space-ground); }
.hub-card[data-state="other"] { --hub-ground: var(--kind-other-ground); }
.hub-card[data-state="bad"] { --hub-ground: var(--bad-ground); }
.hub-card[data-state="warn"] { --hub-ground: var(--warn-ground); }

.hub-card:not([data-state="calm"], [data-state="ok"], [data-state="off"]) {
    border-color: var(--hub);
}

.hub-back {
    margin-bottom: var(--space-2);
}

/* What is no longer open: the same colours, stepped back. */
.support-card--done {
    background: var(--ground);
    box-shadow: none;
}

/* WhatsApp (docs/whatsapp.md): a conversation, its bubbles and their ticks. */
.wa-thread {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    max-height: 60vh;
    overflow-y: auto;
    margin-bottom: var(--space-5);
    padding: var(--space-4);
    background: var(--ground);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

.wa-msg {
    max-width: var(--width-prose);
    padding: var(--space-2) var(--space-3);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    align-self: flex-start;
}

.wa-msg--out,
.wa-msg--echo {
    align-self: flex-end;
    background: var(--ok-ground);
}

.wa-msg__body,
.wa-template-body {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.wa-msg__body {
    margin: 0;
}

.wa-msg__meta {
    margin: var(--space-1) 0 0;
    font-size: var(--text-xs);
    color: var(--ink-soft);
}

.wa-msg__error {
    margin: var(--space-1) 0 0;
    font-size: var(--text-sm);
    color: var(--bad);
}

.wa-preview {
    overflow-wrap: anywhere;
}
