/* ==========================================================================
   /study — New study space wizard (js/study/pages/create.js)

   The wizard is the one route with no sidebar content of its own: it draws its
   own top bar inside the main column, then centres a 720px card under the
   stepper. Tokens only — every colour comes from study.css.
   ========================================================================== */

/* The wizard fills the main column and its top bar spans it edge to edge, so
   nothing here is constrained by .st-page__inner. */
.st-create-page { align-items: stretch; }
.st-create-body { min-width: 0; }

/* --------------------------------------------------------------------------
   Top bar
   -------------------------------------------------------------------------- */
.st-create-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px var(--st-main-pad-x);
    background: var(--st-surface-2);
    border-bottom: var(--st-frame-border-w) solid var(--st-frame-border);
}

.st-create-top__title { font-size: 18px; }

.st-create-exit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: var(--st-tap);
    padding: 6px 2px;
    color: var(--st-ink-2);
    font-size: 14px;
    font-weight: 600;
}
.st-create-exit:hover { color: var(--st-ink); }
.st-create-exit--end { justify-content: flex-end; }

/* --------------------------------------------------------------------------
   Shell: stepper → card → footnote
   -------------------------------------------------------------------------- */
.st-create-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 0 var(--st-main-pad-x) 48px;
}

.st-create-stepper {
    padding: 32px 0 24px;
    flex-wrap: wrap;
    row-gap: 8px;
}

.st-create-card {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    max-width: 720px;
}

.st-create-step {
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.st-create-head {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.st-create-h1 {
    font-size: 26px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
/* The heading is focused on every step change; only show a ring when the user
   is actually driving from the keyboard. */
.st-create-h1:focus { outline: none; }
.st-create-h1:focus-visible { outline: 2px solid var(--st-focus); outline-offset: 4px; }

.st-create-sub {
    font-size: 14px;
    color: var(--st-ink-2);
}

/* Adopting a board you already write in is the common path; it sits with the
   heading rather than below the fold, without demoting the wizard itself. */
.st-create-alt {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
    font-size: 13px;
}
.st-create-alt__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid var(--st-border-strong);
    border-radius: 999px;
    background: var(--st-surface-2);
    color: var(--st-ink);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.st-create-alt__btn:hover { background: var(--st-fill); }
.st-create-alt__btn svg { color: var(--st-accent); }

/* Catalog escape hatch: text link, bottom-left of the card, above the foot
   divider — deliberately quieter than Continue and the existing-board pill. */
.st-create-browse-host:empty { display: none; }
.st-create-browse {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 13px;
}
.st-create-browse__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 0;
    border: 0;
    background: transparent;
    color: var(--st-accent);
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    line-height: 1.35;
}
.st-create-browse__link:hover { text-decoration: underline; }
.st-create-browse__link:focus-visible {
    outline: 2px solid var(--st-focus);
    outline-offset: 3px;
    border-radius: 4px;
}
.st-create-browse__link svg {
    flex: 0 0 auto;
    color: var(--st-accent);
}

.st-create-foot {
    padding-top: 8px;
    border-top: 1px solid var(--st-border-soft);
}
.st-create-foot__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.st-create-stepcount {
    font-size: 13px;
    color: var(--st-ink-4);
}

.st-create-note {
    margin-top: 20px;
    max-width: 520px;
    text-align: center;
    font-size: 12px;
    color: var(--st-ink-4);
}

/* Native date pickers size themselves; hold the shared input height. */
.st-create-date { min-height: var(--st-tap); }

.st-create-swatch { transition: transform 0.14s ease; }
.st-create-swatch:hover { transform: scale(1.06); }

/* --------------------------------------------------------------------------
   Step 2 — add methods, drop zone, pending list
   -------------------------------------------------------------------------- */
.st-create-methods {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.st-create-method {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    min-height: var(--st-tap);
    padding: 16px;
    text-align: left;
    color: var(--st-ink);
    background: var(--st-surface-2);
    border: var(--st-btn-border-w) solid var(--st-border-strong);
    border-radius: var(--st-radius-card-sm);
    transition: transform 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
}
.st-create-method:hover {
    background: var(--st-surface);
    transform: var(--st-lift);
    box-shadow: var(--st-shadow-soft);
}
.st-create-method__icon { color: var(--st-accent); }
.st-create-method__name { font-size: 14px; font-weight: 700; }
.st-create-method__hint { font-size: 12px; color: var(--st-ink-2); }

.st-create-drop,
.st-create-picker {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 32px 20px;
    text-align: center;
    transition: background-color 0.14s ease, border-color 0.14s ease;
}
.st-create-picker { gap: 12px; }
.st-create-drop__title { font-size: 14px; font-weight: 700; }
.st-create-drop__hint { font-size: 12px; }

.st-create-added { min-width: 0; }
.st-create-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.st-create-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--st-surface-2);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius-input);
}
.st-create-item__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13px;
}
.st-create-item__text strong { font-weight: 700; }
.st-create-item__text .st-muted { font-size: 12px; }
.st-create-item__remove { color: var(--st-ink-2); }

/* The named list inside a "can't be read yet" refusal. */
.st-create-skipped {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0 0 0 18px;
    font-size: 13px;
    color: var(--st-ink-2);
    line-height: 1.5;
}
.st-create-skipped li { list-style: disc; }

/* Triggered by its own button, so it never needs to be seen or tabbed to. */
.st-create-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
.st-create-note-text { min-height: 220px; }

/* --------------------------------------------------------------------------
   Step 3 — review
   -------------------------------------------------------------------------- */
.st-create-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--st-surface-2);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius-card-sm);
    flex-wrap: wrap;
}
.st-create-summary__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 200px;
    min-width: 0;
}
.st-create-summary__name { font-size: 18px; letter-spacing: -0.01em; }
.st-create-summary__meta { font-size: 13px; color: var(--st-ink-2); }

.st-create-outputs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.st-create-output {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--st-border-strong);
    background: var(--st-surface);
    font-size: 14px;
    /* Summary cards — checked look, not interactive checkboxes. */
    cursor: default;
    user-select: none;
}
.st-create-output__check {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--st-accent);
}
.st-create-output__label { min-width: 0; }
.st-create-generate__lead { max-width: 64ch; }

.st-create-privacy {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.st-create-share-summary {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-top: 10px;
}

/* Create: the error survives a failed attempt above the buttons, and the
   progress line counts the notes being saved beside them. */
.st-create-error {
    margin-bottom: 10px;
    line-height: 1.45;
}
.st-create-progress {
    font-size: 13px;
    font-weight: 700;
    color: var(--st-ink-2);
}

/* --------------------------------------------------------------------------
   Responsive — breakpoints match the shared sheet
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .st-create-methods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .st-create-outputs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .st-create-methods,
    .st-create-outputs { grid-template-columns: minmax(0, 1fr); }
    .st-create-inner { padding-bottom: 28px; }
    .st-create-stepper { padding: 22px 0 18px; }
    .st-create-card {
        max-width: none;
        padding: 20px;
        gap: 20px;
    }
    .st-create-h1 { font-size: 22px; }
    .st-create-top { padding: 8px var(--st-main-pad-x); }
    .st-create-top__title { font-size: 16px; }
    /* Keep the chevron; the link keeps its aria-label. */
    .st-create-exit > span { display: none; }
    .st-create-foot__row .st-btn { flex: 1 1 auto; }
    .st-create-drop { padding: 24px 16px; }
}

@media (max-width: 560px) {
    .st-create-alt { align-items: flex-start; flex-direction: column; gap: 4px; }
    .st-create-browse { max-width: 100%; }
    .st-create-browse__link { align-items: flex-start; }
}
