/* ============================================================================
 *  az-draft.css — the /draft screen, and nothing else.
 *
 *  HOW IT LOADS
 *  src/app/draft/page.tsx renders the <link> itself (React 19 hoists it into
 *  <head>); the root layout never does. Every navigation on this site is a full
 *  document load — the pages use plain <a>, not next/link — so the sheet cannot
 *  survive into another route. The five pages verified byte-identical against
 *  azeria.ai keep exactly the stylesheet set they had.
 *
 *  CONTRACT — the same three rules az-rooms.css follows
 *  1. Additive only. Every selector is a class introduced here (.az-draftroom*,
 *     .az-dmsg*, .az-dpanel*, .az-dfield*, .az-dcard*, .az-dcomposer*) or one of
 *     those qualifying an existing class. None of these names appears in
 *     site.dist.css or in any vendor sheet — .az-dcompare and .az-dept-* are the
 *     only existing .az-d* names, and neither is a prefix of anything here.
 *  2. No colour literals. Every colour is a var(--…) resolved from the
 *     [data-az-theme] token blocks in AzeriaAuthServer/wwwroot/css/site.scss, so
 *     the screen follows the site's light and dark themes with no second palette.
 *  3. House breakpoints only: 960px, where the room panel moves below the
 *     conversation, and 640px for the phone-width trims.
 *
 *  WHAT IT IS NOT
 *  Not the marketing chrome. This screen has no .az-navbar and no footer; it is
 *  a full-height application shell, which is why this sheet — alone among the
 *  page sheets here — sets a height on .az-draftroom.
 *
 *  CONTENTS
 *    1. Shell and header      .az-draftroom, __head, __brand, __chip, __save
 *    2. Two columns           .az-draftroom__body, __chat, __stream
 *    3. Messages              .az-dmsg (+ --me, __ava, __bub, __text, __link)
 *    4. Room panel            .az-dpanel, .az-dfield
 *    5. Room card             .az-dcard
 *    6. Composer              .az-dcomposer
 *    7. Sign-in wall          .az-dwall
 *    8. Narrow screens
 * ========================================================================== */


/* ---------------------------------------------------------------------------
 *  1. SHELL AND HEADER
 *  The shell owns the viewport height so the conversation scrolls inside it and
 *  the header, the composer and the panel stay put. 100dvh, not 100vh, so the
 *  composer is not left under a mobile browser's collapsing toolbar.
 * ------------------------------------------------------------------------ */
.az-draftroom {
    /* ONE gutter for the whole screen. The header, the conversation, the
       composer and the room panel are four separate boxes stacked down the
       page, so if each picks its own horizontal padding their edges step in and
       out as you scroll — which is exactly what they used to do (16 / 20 / 24px
       on a phone). They all read from this instead, so every vertical edge on
       the screen lines up at every width. */
    --az-gutter: 1.75rem;

    /* How far Azeria's replies are pushed in by the avatar column: its width
       plus .az-dmsg's gap. The room card uses it too, so the card lines up with
       the messages it is posted among instead of starting a new left edge. */
    --az-msg-indent: calc(26px + var(--s-xs));

    display: flex;
    flex-direction: column;
    height: 100dvh;
    background: var(--ground);
    color: var(--ink-secondary);
    font-family: var(--f-body);
}

body:has(.az-draftroom) {
    overflow: hidden;
}

.az-draftroom__head {
    display: flex;
    align-items: center;
    gap: var(--s-sm);
    flex-shrink: 0;
    padding: 0.9rem var(--az-gutter);
    background: var(--surface);
    border-bottom: 1px solid var(--hairline);
}

.az-draftroom__brand {
    display: inline-flex;
    align-items: center;
    gap: var(--s-xs);
    text-decoration: none;
}

/* .app-brand-logo is a vendor class whose size comes from whichever chrome
   renders it; there is no navbar here to set it, so it is sized locally. */
.az-draftroom__brand .app-brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    min-width: 26px;
    padding: 0;
    margin: 0;
}

.az-draftroom__brand .app-brand-logo svg {
    display: block;
    width: 26px;
    height: 26px;
}

.az-draftroom__brandtext {
    font-family: var(--f-display);
    font-weight: var(--weight-bold);
    font-size: var(--t-title-md);
    letter-spacing: -0.02em;
    color: var(--ink);
}

/* The three small pills on this screen — header, panel and card — share a
   recipe. They are status, not navigation, so they are quieter than .az-chip. */
.az-draftroom__chip,
.az-dpanel__chip,
.az-dcard__chip {
    display: inline-flex;
    align-items: center;
    font-family: var(--f-body);
    font-size: var(--t-caption-strong);
    line-height: 1;
    padding: var(--s-xs) var(--s-sm);
    border-radius: var(--pill);
    border: 1px solid var(--hairline);
    background: var(--rail);
    color: var(--ink-secondary);
    white-space: nowrap;
}

/* A <button>, because it opens the sign-in wall over this screen rather than
   navigating — so it carries UA chrome an <a> never had. Reset one property at
   a time: `font: inherit` is a shorthand and would take the size and weight set
   two lines below with it. */
.az-draftroom__save {
    margin-left: auto;
    appearance: none;
    -webkit-appearance: none;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    font-family: var(--f-body);
    font-size: var(--t-body-sm);
    font-weight: var(--weight-strong);
    line-height: 1.4;
    text-align: left;
    color: var(--ink);
    text-decoration: none;
    transition: color var(--d-fast) var(--ease);
}

.az-draftroom__save:hover,
.az-draftroom__save:focus-visible {
    color: var(--primary);
}

/* The qualifier reads as small print, so it takes the muted tone and normal
   weight while the link itself stays the emphasised half. */
.az-draftroom__savenote {
    font-weight: var(--weight-body);
    color: var(--ink-muted);
}


/* ---------------------------------------------------------------------------
 *  2. TWO COLUMNS
 *  Conversation left, room right. min-height: 0 on both the body and the chat
 *  column is what actually lets the stream scroll: without it a flex item's
 *  min-height is its content, and the whole shell would grow past the viewport
 *  instead of the stream scrolling inside it.
 * ------------------------------------------------------------------------ */
.az-draftroom__body {
    flex: 1;
    display: flex;
    min-height: 0;
}

.az-draftroom__chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background: var(--surface);
}

.az-draftroom__stream {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--s-base);
    padding: 1.75rem var(--az-gutter) 0.5rem;
}


/* ---------------------------------------------------------------------------
 *  3. MESSAGES
 * ------------------------------------------------------------------------ */
.az-dmsg {
    display: flex;
    align-items: flex-start;
    gap: var(--s-xs);
    max-width: 78%;
}

.az-dmsg--me {
    padding-left: var(--az-msg-indent);
}

/* Azeria's mark beside each of its replies. The width is load-bearing: it is
   half of --az-msg-indent, which is what lines the room card up with the
   messages, so changing it here means changing it there. */
.az-dmsg__ava {
    display: block;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    margin-top: var(--s-xxs);
}

.az-dmsg__ava img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    /* The asset carries its own pale ground, which reads as a bright disc on a
       dark page; the ring gives it an edge in both themes instead. */
    box-shadow: 0 0 0 1px var(--primary-border);
}

.az-dmsg__bub {
    min-width: 0;
    padding: var(--s-sm) var(--s-base);
    border-radius: var(--r-md);
    border: 1px solid var(--hairline);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

/* The bubble's corner points at its speaker. */
.az-dmsg__bub { border-top-left-radius: 4px; }
.az-dmsg--me .az-dmsg__bub {
    background: var(--primary-tint);
    border-color: var(--primary-border);
    box-shadow: none;
}

.az-dmsg__text {
    margin: 0;
    font-size: var(--t-body-sm);
    line-height: 1.55;
    color: var(--ink);
    /* Someone can paste an unbroken URL into the draft box. */
    overflow-wrap: anywhere;
}

.az-dmsg__link {
    display: inline-flex;
    align-items: center;
    gap: var(--s-xs);
    max-width: 100%;
    margin-top: var(--s-xs);
    padding: var(--s-xs) var(--s-sm);
    border-radius: var(--r-sm);
    border: 1px solid var(--hairline);
    background: var(--rail);
    color: var(--primary);
    font-family: var(--f-body);
    font-size: var(--t-caption);
    text-decoration: none;
}

.az-dmsg__link span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.az-dmsg__link:hover,
.az-dmsg__link:focus-visible {
    border-color: var(--primary-border);
}

.az-dstep {
    display: flex;
    align-items: center;
    gap: var(--s-xs);
    margin-left: var(--az-msg-indent);
    font-size: var(--t-caption);
    line-height: 1.5;
    color: var(--ink-muted);
}

.az-dstep__dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    animation: az-dstep-pulse 1.2s var(--ease) infinite;
}

@keyframes az-dstep-pulse {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .az-dstep__dot { animation: none; }
}

.az-dnotice {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-sm);
    max-width: 640px;
    margin-left: var(--az-msg-indent);
    padding: var(--s-sm) var(--s-base);
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    background: var(--rail);
}

.az-dnotice__text {
    flex: 1 1 200px;
    margin: 0;
    font-size: var(--t-body-sm);
    line-height: 1.5;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.az-dnotice__btn.az-btn {
    min-height: 44px;
    padding: var(--s-xs) var(--s-base);
    font-size: var(--t-body-sm);
}


/* ---------------------------------------------------------------------------
 *  4. ROOM PANEL
 *  A quieter ground than the conversation, so the two columns read as two
 *  different things rather than one wide page.
 * ------------------------------------------------------------------------ */
.az-dpanel {
    flex-shrink: 0;
    width: 370px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--s-xs);
    padding: 1.75rem var(--az-gutter);
    background: var(--rail);
    border-left: 1px solid var(--hairline);
}

.az-dpanel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--s-sm);
    margin-bottom: var(--s-xs);
}

.az-dpanel__title {
    margin: 0;
    font-family: var(--f-display);
    font-size: var(--t-title-md);
    font-weight: var(--weight-bold);
    letter-spacing: -0.01em;
    color: var(--ink);
}

.az-dpanel__sub {
    margin: var(--s-xxs) 0 0;
    font-size: var(--t-body-sm);
    color: var(--ink-muted);
}

/* One field. Keeps its box whether or not it has a value, so the panel does not
   jump as the room fills in. */
.az-dfield {
    padding: var(--s-sm) var(--s-base);
    border-radius: var(--r-sm);
    border: 1px solid var(--hairline);
    background: var(--surface);
}

.az-dfield__label {
    margin: 0 0 var(--s-xxs);
    font-family: var(--f-body);
    font-size: var(--t-caption-strong);
    font-weight: var(--weight-strong);
    letter-spacing: var(--ls-caption-strong);
    color: var(--ink-secondary);
}

.az-dfield__value {
    margin: 0;
    white-space: pre-wrap;
    font-size: var(--t-body-sm);
    line-height: 1.5;
    color: var(--ink);
    overflow-wrap: anywhere;
    /* The fields fill in as the conversation goes; fade rather than snap. */
    transition: color var(--d) var(--ease);
}

.az-dfield__value--empty {
    color: var(--ink-muted);
}

.az-dpanel__note {
    display: flex;
    align-items: flex-start;
    gap: var(--s-xs);
    margin: var(--s-xs) 0 0;
    font-size: var(--t-caption);
    line-height: 1.5;
    color: var(--ink-muted);
}

.az-dpanel__note .ti {
    flex-shrink: 0;
    margin-top: var(--s-xxs);
    font-size: var(--t-body-sm);
}

.az-dpanel__earlier {
    align-self: flex-start;
    appearance: none;
    -webkit-appearance: none;
    min-height: 44px;
    margin: var(--s-xs) 0 0;
    padding: var(--s-sm) 0;
    border: 0;
    background: none;
    text-align: left;
    font-family: var(--f-body);
    font-size: var(--t-body-sm);
    font-weight: var(--weight-strong);
    color: var(--primary);
    cursor: pointer;
}

.az-dpanel__earlier:hover,
.az-dpanel__earlier:focus-visible {
    text-decoration: underline;
}

.az-dpanel__earlier:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}


/* ---------------------------------------------------------------------------
 *  5. ROOM CARD — the room, posted into the conversation
 *  It is a message, so it sits in the stream's flow; the green border is what
 *  separates it from the bubbles around it.
 * ------------------------------------------------------------------------ */
.az-dcard {
    /* No `width: 100%` here. The stream is a column flex container, so the card
       already stretches to the line box — and it stretches to what is left after
       its margin, which `width: 100%` does not: that resolves against the full
       content width and pushes the card past the right edge by exactly the
       indent below. max-width still caps it on a wide screen. */
    max-width: 640px;
    /* Same indent as Azeria's replies, so the card sits in their column
       rather than opening a third left edge. */
    margin-left: var(--az-msg-indent);
    padding: var(--s-md) var(--s-md) var(--s-md);
    border-radius: var(--r-md);
    border: 1px solid var(--primary-border);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.az-dcard__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-sm);
    margin-bottom: var(--s-xs);
}

.az-dcard__eyebrow {
    margin: 0;
    /* At 320px it still needs two lines, and unbalanced it leaves "CREATED"
       alone on the second. */
    text-wrap: balance;
    font-family: var(--f-body);
    font-size: var(--t-caption-strong);
    font-weight: var(--weight-strong);
    letter-spacing: var(--ls-caption-strong);
    color: var(--primary);
}

.az-dcard__name {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--s-xs);
    margin: 0 0 var(--s-base);
    font-family: var(--f-display);
    font-size: var(--t-title-lg);
    font-weight: var(--weight-bold);
    line-height: 1.2;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.az-dcard__empty {
    color: var(--ink-muted);
}

.az-dcard__rows {
    margin: 0;
    padding: var(--s-base) 0;
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
    display: flex;
    flex-direction: column;
    gap: var(--s-xs);
}

/* Label column then value — a two-column <dl>, which is why each pair is
   wrapped in its own row element. */
.az-dcard__row {
    display: grid;
    grid-template-columns: 116px 1fr;
    gap: var(--s-sm);
    align-items: baseline;
}

.az-dcard__row dt {
    margin: 0;
    font-family: var(--f-body);
    font-size: var(--t-caption-strong);
    font-weight: var(--weight-strong);
    letter-spacing: var(--ls-caption-strong);
    color: var(--ink-secondary);
}

.az-dcard__row dd {
    min-width: 0;
    margin: 0;
    font-size: var(--t-body-sm);
    line-height: 1.5;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.az-dedit {
    display: flex;
    align-items: flex-start;
    gap: var(--s-xs);
    min-width: 0;
}

.az-dedit__value {
    flex: 1;
    min-width: 0;
    padding-block: var(--s-sm);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.az-dedit__value .az-dcard__name {
    margin: 0;
}

.az-dedit__pencil {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    background: transparent;
    color: var(--ink-secondary);
    cursor: pointer;
    font-size: var(--t-body);
}

.az-dedit__pencil:hover {
    background: var(--primary-tint);
    color: var(--primary);
}

.az-dedit__pencil:focus-visible,
.az-dedit__actions .az-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.az-dedit__form {
    flex: 1;
    min-width: 0;
    padding-block: var(--s-xs);
}

.az-dedit__input.form-control {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: var(--s-sm) var(--s-sm);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: var(--surface);
    color: var(--ink);
    font-family: var(--f-body);
    font-size: var(--t-body);
    line-height: 1.5;
    resize: vertical;
}

.az-dedit__input.form-control:focus {
    border-color: var(--primary);
    outline: 2px solid var(--primary-border);
    outline-offset: 1px;
    box-shadow: none;
}

.az-dedit__hint,
.az-dedit__error {
    margin: var(--s-xs) 0;
    font-size: var(--t-caption);
    line-height: 1.5;
    color: var(--ink-secondary);
}

.az-dedit__error {
    font-weight: var(--weight-strong);
    color: var(--ink);
}

.az-dedit__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-xs);
}

.az-dedit__actions .az-btn {
    min-width: 44px;
    min-height: 44px;
    padding: var(--s-xs) var(--s-base);
    font-size: var(--t-body-sm);
}

.az-dedit__pencil:disabled,
.az-dcard__actions .az-btn:disabled,
.az-draftroom__save:disabled,
.az-dcomposer__input:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

@media (hover: hover) and (pointer: fine) {
    .az-dedit__pencil {
        opacity: 0;
    }

    .az-dedit:hover .az-dedit__pencil:not(:disabled),
    .az-dcard__row:hover .az-dedit__pencil:not(:disabled),
    .az-dedit:focus-within .az-dedit__pencil {
        opacity: 1;
    }
}

.az-dcard__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-xs);
    margin-top: var(--s-base);
}

.az-dcard__actions .az-btn {
    /* .az-btn's own padding puts these at 39px tall, under the 44px a thumb
       needs. The padding stays as the card's tighter rhythm; the floor is what
       makes them tappable. */
    min-height: 44px;
    padding: var(--s-sm) var(--s-md);
    font-size: var(--t-body-sm);
}

.az-dcard__hint {
    margin: 0 0 0 auto;
    font-size: var(--t-caption);
    color: var(--ink-muted);
    /* On a phone this drops below the buttons and wraps; left alone it breaks
       after the last "·" and leaves "free" on a line of its own. */
    text-wrap: balance;
}


/* ---------------------------------------------------------------------------
 *  6. COMPOSER
 * ------------------------------------------------------------------------ */
.az-dcomposer {
    flex-shrink: 0;
    padding: 1rem var(--az-gutter) 1.25rem;
    background: var(--surface);
    border-top: 1px solid var(--hairline);
}

.az-dcomposer__row {
    display: flex;
    align-items: center;
    gap: var(--s-sm);
}

.az-dcomposer__send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    /* 44px is the smallest control a thumb reliably hits. Everything tappable
       on this screen meets it — tests-layout/mobile.spec.ts checks. */
    width: 44px;
    height: 44px;
    border-radius: 50%;
    /* <button> carries UA styling an <a> does not; appearance is all that needs
       resetting here, since every other property is set below. Do NOT reach for
       `font: inherit` — the shorthand also resets font-family and font-size. */
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    font-size: var(--t-body);
    transition: border-color var(--d-fast) var(--ease), opacity var(--d-fast) var(--ease);
}

.az-dcomposer__send {
    border: 1px solid transparent;
    background: var(--primary);
    color: var(--on-primary);
}

.az-dcomposer__send:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.az-dcomposer__input {
    flex: 1;
    min-width: 0;
    padding: var(--s-sm) var(--s-md);
    border-radius: var(--pill);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--ink);
    font-family: var(--f-body);
    font-size: var(--t-body-sm);
    transition: border-color var(--d-fast) var(--ease);
}

.az-dcomposer__input::placeholder {
    color: var(--ink-muted);
}

.az-dcomposer__input:focus {
    outline: none;
    border-color: var(--primary);
}

/* The nudge under the composer. It is an offer, so it takes the room's own
   accent rather than the muted tone the other small print uses. */
.az-dcomposer__hint {
    margin: var(--s-sm) 0 0;
    font-size: var(--t-caption);
    color: var(--primary);
}


/* ---------------------------------------------------------------------------
 *  7. SIGN-IN WALL — deck 5b
 *  A dialog over the screen, opened by the card's "Create this room now" and by
 *  the header's "Save and resume later". It dims the conversation rather than
 *  replacing it, because the visitor is meant to see the room they are about to
 *  make real sitting right behind the words.
 * ------------------------------------------------------------------------ */
.az-dwall {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--s-md);
    /* A scrim is the ink, thinned: there is one palette now, so --ink is the
       dark one and stays the dark one.
       Still no literal — mixing a token with transparent is how a scrim is
       expressed here. */
    background: color-mix(in srgb, var(--ink) 68%, transparent);
    animation: az-dwall-in var(--d-fast) var(--ease);
}

@keyframes az-dwall-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .az-dwall { animation: none; }
}

.az-dwall__dialog {
    position: relative;
    width: 100%;
    max-width: 470px;
    max-height: calc(100dvh - 2.5rem);
    overflow-y: auto;
    padding: var(--s-lg);
    border-radius: var(--r-lg);
    border: 1px solid var(--hairline);
    background: var(--surface);
    box-shadow: var(--shadow-float);
}

.az-dwall__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--hairline);
    background: var(--surface);
    color: var(--ink-secondary);
    cursor: pointer;
    font-size: var(--t-body-sm);
    transition: border-color var(--d-fast) var(--ease), color var(--d-fast) var(--ease);
}

.az-dwall__close:hover,
.az-dwall__close:focus-visible {
    border-color: var(--border);
    color: var(--ink);
}

.az-dwall__title {
    margin: 0 var(--s-xl) var(--s-xs) 0;
    font-family: var(--f-display);
    font-size: var(--t-title-lg);
    font-weight: var(--weight-bold);
    color: var(--ink);
}

.az-dwall__lead {
    margin: 0 0 var(--s-md);
    font-size: var(--t-body-sm);
    line-height: 1.55;
    color: var(--ink-secondary);
}

/* Continue with Google — a bordered row under the "or", not the green primary.
   The order and the mark come from the product's own Login/Register pages, not
   from the deck; the four-colour G is in the markup so this file stays free of
   colour literals. Bordered rather than filled because the email button above
   is the primary action and two filled buttons would compete. */
.az-dwall__google {
    appearance: none;
    -webkit-appearance: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-xs);
    width: 100%;
    min-height: 48px;
    cursor: pointer;
    padding: var(--s-sm) var(--s-md);
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--ink);
    font-family: var(--f-body);
    font-weight: var(--weight-strong);
    font-size: var(--t-body-sm);
    text-decoration: none;
    transition: border-color var(--d-fast) var(--ease);
}

.az-dwall__google:hover,
.az-dwall__google:focus-visible {
    border-color: var(--ink);
    color: var(--ink);
}

.az-dwall__google:disabled,
.az-dwall__submit:disabled,
.az-dwall__signin:disabled { opacity: .6; cursor: progress; }

.az-dwall__glogo {
    flex-shrink: 0;
}

/* The line-through-text look comes from the template's own .divider; this only
   sets the space around it. */
.az-dwall__or {
    margin: var(--s-md) 0;
}

.az-dwall__submit {
    width: 100%;
    min-height: 48px;
    margin-top: var(--s-xxs);
}

/* The account note: what signing in actually creates. */
.az-dwall__account {
    display: flex;
    align-items: flex-start;
    gap: var(--s-xs);
    margin: var(--s-md) 0 var(--s-base);
    font-size: var(--t-caption);
    line-height: 1.5;
    color: var(--ink-secondary);
}

.az-dwall__account .ti {
    flex-shrink: 0;
    margin-top: var(--s-xxs);
    color: var(--primary);
}

.az-dwall__account strong { color: var(--ink); }

.az-dwall__foot {
    margin: 0;
    font-size: var(--t-caption);
    line-height: 1.6;
    color: var(--ink-muted);
}

/* The two footer lines are separate paragraphs, so they need to sit close
   together rather than a paragraph apart. */
.az-dwall__foot + .az-dwall__foot { margin-top: var(--s-xxs); }

/* "Not now — keep shaping" is a button because it closes the wall; it is styled
   as the link it reads as. `font: inherit` is safe here — this element has no
   .az-btn recipe of its own to clobber. */
.az-dwall__signin,
.az-dwall__notnow {
    appearance: none;
    -webkit-appearance: none;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-weight: var(--weight-strong);
    color: var(--primary);
    cursor: pointer;
}

.az-dwall__signin:hover,
.az-dwall__signin:focus-visible,
.az-dwall__notnow:hover,
.az-dwall__notnow:focus-visible { text-decoration: underline; }


/* ---------------------------------------------------------------------------
 *  8. NARROW SCREENS
 *  Below 960px the room moves under the conversation. The shell stops owning
 *  the viewport height at that point and the page scrolls as one column —
 *  a pinned composer over a short stream is worse on a phone than a normal page.
 * ------------------------------------------------------------------------ */
@media (max-width: 960px) {
    body:has(.az-draftroom) {
        overflow: auto;
    }

    .az-draftroom {
        height: auto;
        min-height: 100dvh;
        /* One change moves all four boxes in together — header, stream,
           composer and panel. */
        --az-gutter: 1.25rem;
    }

    .az-draftroom__body {
        flex-direction: column;
    }

    .az-draftroom__stream {
        overflow-y: visible;
        padding-top: var(--s-md);
    }

    .az-dpanel {
        width: auto;
        overflow-y: visible;
        border-left: none;
        border-top: 1px solid var(--hairline);
    }

    .az-dmsg {
        max-width: 92%;
    }

    .az-dcard,
    .az-dnotice {
        max-width: none;
    }
}

@media (max-width: 640px) {
    .az-draftroom__head {
        flex-wrap: wrap;
        row-gap: var(--s-xs);
    }

    /* The header's three items do not fit one phone-width line; the link drops
       to its own row rather than shrinking the brand. */
    .az-draftroom__save {
        margin-left: 0;
        width: 100%;
    }


    .az-dcard {
        padding: var(--s-base);
    }

    /* The eyebrow and the chip do not share a phone-width line: side by side the
       chip takes ~170px and leaves the eyebrow ~100, which sets "YOUR ROOM ·
       READY TO BE CREATED" over three lines. The eyebrow takes the full width
       and the chip drops below it. */
    .az-dcard__top {
        flex-wrap: wrap;
        gap: var(--s-xs);
    }

    .az-dcard__eyebrow {
        flex: 1 1 100%;
        /* The full width is still ~8px short of the line at the desktop
           tracking. Tightening it is what fits "YOUR ROOM · READY TO BE
           CREATED" on one line instead of breaking it in two. */
        letter-spacing: var(--ls-caption-strong);
    }

    /* Stacked label over value: 116px of label plus a sentence does not fit. */
    .az-dcard__row {
        grid-template-columns: 1fr;
        gap: var(--s-xxs);
    }

    .az-dcard__hint {
        margin-left: 0;
    }

    .az-dwall {
        /* The dialog meets the bottom of a phone screen rather than floating in
           the middle of it, which is where a thumb is. */
        align-items: flex-end;
        padding: var(--s-sm);
    }

    .az-dwall__dialog {
        padding: var(--s-md) var(--s-md) var(--s-md);
    }

    .az-dwall__title {
        font-size: var(--t-title-lg);
    }
}
