/* Generated by scripts/css/build-moroc-tailwind.sh. */
/* Signup, Auth, the Stripe return and Onboarding share one entry canvas. */
.entry-canvas {
    font-family: var(--moroc-ui-font-family, var(--moroc-font-interface));
}

/*
 * Type-led entry look (Sign-in and Signup, data-entry-look="editorial"): one centred column on
 * a plain near-black canvas. The Moroc mark sits top-centre, then one large
 * statement, underline fields and the screen's actions; the ways out run centred along the bottom.
 * Validation, errors and controls are the shared ones; only the look is set here.
 */
.entry-canvas[data-entry-look="editorial"] {
    align-items: stretch;
    justify-content: flex-start;
    padding: clamp(1.25rem, 3vw, 2.5rem) clamp(1rem, 4vw, 3rem);
    background-color: var(--moroc-ui-canvas);
}

[data-entry-look="editorial"] [data-split-entry-task-region] {
    max-width: none;
    margin: 0;
    padding: 0;
    align-items: stretch;
}

/*
 * The column is one grid for every entry screen: the statement and the screen's body hold the
 * middle, the ways out sit on the bottom row. A stage's own wrapper (<section>) steps aside so
 * Sign-in and Signup share the same rows wherever each places its footer.
 */
[data-entry-look="editorial"] [data-split-entry-task-column] {
    /* One column width for every form; a heading is never wider than it. */
    --entry-column: 26rem;
    display: grid;
    max-width: none;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 1fr auto auto 1fr auto;
    justify-items: center;
    gap: 2.5rem 1.25rem;
}

[data-entry-look="editorial"] [data-split-entry-task-column] > section:not([hidden]) {
    display: contents;
}

[data-entry-look="editorial"] [data-split-entry-task-column] > :not(section),
[data-entry-look="editorial"] [data-split-entry-task-column] > section > :not([role="timer"]) {
    grid-column: 1 / -1;
    grid-row: 3;
    width: 100%;
    max-width: var(--entry-column);
}

[data-entry-look="editorial"] [data-split-entry-task-column] > section > [data-entry-header] {
    grid-row: 2;
}

/* A known person joins the Moroc mark: their lockup sits where the lone mark does, which then steps aside. */
[data-entry-look="editorial"] [data-split-entry-task-column] > section > [data-entry-lockup] {
    grid-row: 1;
    align-self: start;
}

.entry-canvas[data-entry-look="editorial"]:has(section:not([hidden]) > [data-entry-lockup]) > .entry-editorial-logo {
    display: none;
}

.entry-canvas[data-entry-look="editorial"]:has(section:not([hidden]) > [data-entry-lockup]) [data-split-entry-task-column] > [data-slot="alert"] {
    align-self: end;
}

[data-entry-look="editorial"] [data-split-entry-task-column] > [data-slot="alert"] {
    grid-row: 1;
    align-self: start;
}

/* The ways out run centred along the bottom edge. */
[data-entry-look="editorial"] [data-split-entry-task-column] > [data-entry-action-footer],
[data-entry-look="editorial"] [data-split-entry-task-column] > section > [data-entry-action-footer] {
    grid-row: 5;
    width: auto;
    max-width: none;
    align-items: center;
    text-align: center;
}

[data-entry-look="editorial"] [data-entry-action-footer]:not(:has([data-entry-context-actions])) [data-slot="separator"] { display: none; }

[data-entry-look="editorial"] [data-entry-navigation] {
    justify-content: center;
}

[data-entry-look="editorial"] :is([data-entry-header], [data-entry-heading]) {
    align-items: center;
    text-align: center;
}

/* The frame carries the Moroc mark top-centre; a header shows only a profile photo, above the heading. */
.entry-editorial-logo {
    position: absolute;
    z-index: 20;
    top: clamp(1.25rem, 3vw, 2.5rem);
    left: 50%;
    display: flex;
    width: 3.75rem;
    height: 1.375rem;
    transform: translateX(-50%);
}

[data-entry-look="editorial"] [data-entry-header] [data-entry-mark="logo"] {
    display: none;
}

/* Spacing rhythm: eyebrow (identity) 16px above the heading, heading 40px above the body (column gap). */
[data-entry-look="editorial"] [data-entry-heading] {
    gap: 1rem;
}

[data-entry-look="editorial"] [data-entry-header] h1 {
    font-size: var(--moroc-type-statement-size);
    line-height: var(--moroc-type-statement-line);
    font-weight: var(--moroc-type-statement-weight);
    letter-spacing: var(--moroc-type-statement-tracking);
    text-wrap: balance;
}

[data-entry-look="editorial"] [data-entry-heading] > p {
    font-size: 1.125rem;
}

/* The plan and price read as one quiet line under the statement, not a tag. */
[data-entry-look="editorial"] [data-signup-offer] {
    display: block;
    padding: 0;
    border-radius: 0;
    background: transparent;
    font-size: 1rem;
    text-align: center;
    text-wrap: pretty;
}

[data-entry-look="editorial"] [data-entry-hint] {
    justify-content: center;
    text-align: center;
}

/* Fields 28px apart; the actions sit 36px under the last field. A loading screen's form shape follows the same rhythm. */
[data-entry-look="editorial"] :is(form, [data-entry-loading-form]) {
    row-gap: 1.75rem;
}

[data-entry-look="editorial"] :is(form, [data-entry-loading-form]) > :is([data-entry-actions], button[type="submit"]) {
    margin-top: 0.5rem;
}

[data-entry-look="editorial"] :is([data-slot="field-label"], [data-slot="field-legend"]) {
    font-weight: 400;
    color: var(--moroc-ui-text-subtle);
}

[data-entry-look="editorial"] [data-slot="input"],
[data-entry-look="editorial"] [data-slot="autocomplete-input"],
[data-entry-look="editorial"] [data-slot="select-trigger"],
[data-entry-look="editorial"] [data-slot="input-group"] {
    height: 3.5rem;
    padding-inline: 0;
    border: 0;
    border-bottom: 1px solid var(--moroc-ui-border-strong);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transition: border-color 200ms ease;
}

[data-entry-look="editorial"] [data-slot="input-group"] {
    gap: 0.75rem;
}

[data-entry-look="editorial"] [data-slot="input-group"] [data-slot="input-group-control"] {
    padding-inline: 0;
}

/* Autocompletes keep the space their end controls reserve (Change, clear, suggestions). */
[data-entry-look="editorial"] [data-slot="autocomplete-input"] {
    padding-right: var(--autocomplete-end-space, 0px);
}

[data-entry-look="editorial"] [data-slot="input"],
[data-entry-look="editorial"] [data-slot="autocomplete-input"],
[data-entry-look="editorial"] [data-slot="select-trigger"],
[data-entry-look="editorial"] [data-slot="input-group-control"] {
    font-size: 1.375rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

/* A chosen value (an address picked from suggestions) is committed, not disabled: it reads like typed text. */
[data-entry-look="editorial"] [data-slot="autocomplete-input"][readonly]:not([aria-busy="true"]) {
    color: var(--moroc-ui-text-strong);
    cursor: default;
}

/* Its Change action is a quiet text link: no pencil, regular weight, muted until hovered. */
[data-entry-look="editorial"] [data-slot="autocomplete-end-action"] [data-slot="button"] {
    font-weight: 400;
    color: var(--moroc-ui-text-muted);
}

[data-entry-look="editorial"] [data-slot="autocomplete-end-action"] [data-slot="button"]:hover {
    background: transparent;
    color: var(--moroc-ui-text-strong);
}

[data-entry-look="editorial"] [data-slot="autocomplete-end-action"] [data-slot="button"] svg {
    display: none;
}

/* A choice spans the column like every field; a long choice truncates instead of widening the page. */
[data-entry-look="editorial"] [data-slot="select-trigger"] {
    width: 100%;
    min-width: 0;
}

/* A chosen option wraps onto a second line rather than cutting off what was chosen. */
[data-entry-look="editorial"] [data-slot="select-trigger"] {
    height: auto;
    min-height: 3.5rem;
    padding-block: 0.5rem;
    white-space: normal;
}

[data-entry-look="editorial"] [data-slot="select-value"] {
    overflow: visible;
    white-space: normal;
    text-overflow: clip;
    line-height: 1.25;
}

/* A topic chosen for the person (a Support preset) is committed, not disabled: it reads like typed text. */
[data-entry-look="editorial"] [data-slot="select-trigger"][data-entry-committed] {
    opacity: 1;
    color: var(--moroc-ui-text-strong);
    cursor: default;
}

[data-entry-look="editorial"] [data-slot="select-trigger"][data-entry-committed] svg {
    display: none;
}

/* A message grows with what is written; its line stays at the bottom. */
[data-entry-look="editorial"] [data-support-composer] {
    height: auto;
}

/* Labels already name every field, so entry fields show no placeholder: a clean line until you type — pickers (the
   office address) included. */
[data-entry-look="editorial"] [data-slot="input"]::placeholder,
[data-entry-look="editorial"] [data-slot="input-group-control"]::placeholder,
[data-entry-look="editorial"] [data-slot="autocomplete-input"]::placeholder {
    color: transparent;
}

/* Only a field with no visible label keeps its placeholder as the prompt, quietly: a search, a filter. */
[data-entry-look="editorial"] [data-slot="input-group-control"][inputmode="search"]::placeholder,
[data-entry-look="editorial"] [data-slot="field"]:has([data-field-label-group].sr-only) :is([data-slot="input"], [data-slot="input-group-control"], [data-slot="autocomplete-input"])::placeholder {
    font-weight: 400;
    color: var(--moroc-ui-text-subtle);
}

[data-entry-look="editorial"] [data-slot="input"]:focus-visible,
[data-entry-look="editorial"] [data-slot="autocomplete-input"]:focus-visible,
[data-entry-look="editorial"] [data-slot="select-trigger"]:focus-visible,
[data-entry-look="editorial"] [data-slot="input-group"]:has([data-slot="input-group-control"]:focus-visible) {
    border-bottom-color: var(--moroc-ui-text-strong);
    box-shadow: none;
}

[data-entry-look="editorial"] [data-slot="input"][aria-invalid="true"],
[data-entry-look="editorial"] [data-slot="autocomplete-input"][aria-invalid="true"],
[data-entry-look="editorial"] [data-slot="select-trigger"][aria-invalid="true"],
[data-entry-look="editorial"] [data-slot="input-group"]:has([aria-invalid="true"]) {
    border-bottom-color: var(--moroc-ui-danger);
    box-shadow: none;
}

/*
 * A profile told as a sentence (Page setup): the words are quiet and each answer sits on a soft marker, so what can be
 * changed reads at a glance without a second colour. Typed answers grow with their text; a picked answer (roles) wraps
 * like the words around it.
 */
[data-entry-look="editorial"] [data-entry-sentence] {
    margin: 0;
    color: var(--moroc-ui-text-subtle);
    font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem);
    font-weight: 500;
    line-height: 1.75;
    letter-spacing: -0.02em;
    text-align: center;
    text-wrap: pretty;
}

[data-entry-look="editorial"] [data-entry-sentence] strong {
    color: var(--moroc-ui-text-strong);
    font-weight: 600;
}

[data-entry-look="editorial"] [data-entry-blank] {
    display: inline-block;
    min-width: 2ch;
    max-width: 100%;
    margin: 0 0.05em;
    padding: 0 0.3em;
    border: 0;
    border-radius: 0.35em;
    background: color-mix(in oklab, var(--moroc-ui-text-strong) 11%, var(--moroc-ui-color-transparent));
    color: var(--moroc-ui-text-strong);
    font: inherit;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    vertical-align: baseline;
    field-sizing: content;
    outline: none;
    cursor: text;
    transition: background-color var(--moroc-ui-duration-150ms) ease-out, box-shadow var(--moroc-ui-duration-150ms) ease-out;
}

[data-entry-look="editorial"] [role="button"][data-entry-blank] {
    display: inline;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    line-height: inherit;
    cursor: pointer;
}

[data-entry-look="editorial"] [data-entry-blank]::placeholder {
    color: var(--moroc-ui-text-subtle);
    font-weight: 500;
}

[data-entry-look="editorial"] [data-entry-blank]:where(:hover, :focus-visible):not([aria-disabled="true"], :disabled) {
    background: color-mix(in oklab, var(--moroc-ui-text-strong) 18%, var(--moroc-ui-color-transparent));
}

[data-entry-look="editorial"] [data-entry-blank]:focus-visible {
    box-shadow: 0 0 0 2px var(--moroc-ui-focus-ring);
}

[data-entry-look="editorial"] [data-entry-blank]::selection {
    background: color-mix(in oklab, var(--moroc-ui-text-strong) 28%, var(--moroc-ui-color-transparent));
}

/* An answer still needed: the marker turns danger, as a field's line would, focused or not. */
[data-entry-look="editorial"] [data-entry-blank][aria-invalid="true"] {
    background: color-mix(in oklab, var(--moroc-ui-danger) 18%, var(--moroc-ui-color-transparent));
    box-shadow: inset 0 -1px 0 var(--moroc-ui-danger);
}

/* Browser autofill keeps the canvas instead of painting a light field. */
[data-entry-look="editorial"] input:-webkit-autofill {
    -webkit-text-fill-color: var(--moroc-ui-text-strong);
    transition: background-color 9999s ease-out;
}

/* Code slots are drawn like the fields: a large digit over one hairline. */
[data-entry-look="editorial"] [data-slot="input-otp-slot"] {
    height: 4rem;
    border: 0;
    border-bottom: 1px solid var(--moroc-ui-border-strong);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font-size: 1.375rem;
    font-weight: 500;
}

[data-entry-look="editorial"] [data-slot="input-otp-slot"][data-active="true"] {
    border-bottom-color: var(--moroc-ui-text-strong);
    box-shadow: none;
}

[data-entry-look="editorial"] [data-slot="input-otp-slot"][aria-invalid="true"] {
    border-bottom-color: var(--moroc-ui-danger);
    box-shadow: none;
}

/* Primary actions span the column; beside Back, Continue takes the rest of the row. */
[data-entry-look="editorial"] form > button[type="submit"],
[data-entry-look="editorial"] [data-entry-body] [data-slot="button"]:is([data-variant="default"], [data-variant="rea"]):not([data-entry-actions] > *, [data-signup-continue] > *) {
    width: 100%;
    height: 3.5rem;
    align-self: stretch;
    justify-self: stretch;
}

[data-entry-look="editorial"] [data-entry-actions] {
    gap: 0.75rem;
}

/* The main action may be a link (Open my REA profile); it is sized as the button it reads as. */
[data-entry-look="editorial"] [data-entry-actions] > :is(button, a) {
    height: 3.5rem;
}

/* The step's main action is always last: it takes the rest of the row, or all of it without Back. */
[data-entry-look="editorial"] [data-entry-actions] > :last-child {
    flex: 1;
}

/* Actions that belong to a step (Resend code) sit centred under it. */
[data-entry-look="editorial"] [data-entry-body] :is([data-entry-action-footer], [data-entry-context-actions]) {
    align-items: center;
    text-align: center;
}

/*
 * A screen that lists people (Signup's first step) is wider and fills exactly the screen: the list
 * takes what is left, runs to the bottom edge and streams off it; the ways out sit over the fade.
 */
.entry-canvas[data-entry-look="editorial"]:has([data-entry-fill]) {
    padding-bottom: 0;
}

[data-entry-look="editorial"] [data-split-entry-task-column]:has([data-entry-fill]) {
    height: calc(100svh - clamp(1.25rem, 3vw, 2.5rem));
    grid-template-rows: clamp(0rem, 4svh, 3rem) auto minmax(0, 1fr) 0 auto;
}

[data-entry-look="editorial"] [data-split-entry-task-column]:has([data-entry-fill]) > section > [data-entry-body] {
    grid-row: 3 / 6;
    /* A screen of people is wider than a form. */
    max-width: 46rem;
}

[data-entry-look="editorial"] [data-split-entry-task-column]:has([data-entry-fill]) > [data-entry-action-footer] {
    position: relative;
    z-index: 1;
    align-self: end;
    padding-bottom: clamp(1.25rem, 3vw, 2.5rem);
}

[data-entry-look="editorial"] [data-split-entry-task-column]:has([data-entry-fill]) > section > [data-entry-body],
[data-entry-look="editorial"] [data-entry-body]:has([data-entry-fill]) > :has([data-entry-fill]),
[data-entry-look="editorial"] [data-entry-fill] {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
}

[data-entry-look="editorial"] [data-entry-fill] {
    position: relative;
}

[data-entry-look="editorial"] [data-entry-fill] [data-entry-fill-scroll] {
    max-height: none;
    min-height: 0;
    flex: 1;
    /* The faces stream off the bottom of the screen. */
    mask-image: linear-gradient(to bottom, black calc(100% - 14rem), transparent 92%);
}

/* A list's scrollbar shows only while the list is in use. */
[data-entry-look="editorial"] [data-entry-fill-scroll]:not(:hover, :focus-within) {
    scrollbar-color: transparent transparent;
}

[data-entry-look="editorial"] [data-entry-fill-scroll]:not(:hover, :focus-within)::-webkit-scrollbar-thumb {
    background: transparent;
}

/* Filters above a list are quieter than a form's fields: smaller type, shorter line. */
[data-entry-look="editorial"] [data-entry-filters] :is([data-slot="input-group"], [data-slot="autocomplete-input"]) {
    height: 3rem;
}

[data-entry-look="editorial"] [data-entry-filters] :is([data-slot="input-group-control"], [data-slot="autocomplete-input"]) {
    font-size: 1.125rem;
}

/* Continue floats over the fading list, above the ways out. */
[data-entry-look="editorial"] [data-entry-fill] > [data-signup-continue] {
    position: absolute;
    z-index: 2;
    right: 0;
    bottom: clamp(4.5rem, 10svh, 6.5rem);
    left: 0;
}

@media (max-width: 40rem) {
    [data-entry-look="editorial"] [data-entry-fill] > [data-signup-continue] { bottom: 6.5rem; }
}

