/*
 * criscros: the site's stylesheet.
 * Order: tokens, base, layout, components, then one block per page. Class names are BEM.
 * Breakpoints: phone under 640px, tablet 640 to 1023, laptop and desktop from 1024.
 */

/****************************************************/
/* Fonts                                            */
/****************************************************/

/* IBM Plex, Latin subset, served from this site (static/fonts/LICENSE.txt). Other characters fall back. */
@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/IBMPlexSans-Regular-Latin1.woff2') format('woff2');
}

@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/IBMPlexSans-Medium-Latin1.woff2') format('woff2');
}

@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/IBMPlexSans-SemiBold-Latin1.woff2') format('woff2');
}

@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/IBMPlexSans-Bold-Latin1.woff2') format('woff2');
}

@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/IBMPlexMono-Regular-Latin1.woff2') format('woff2');
}

@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/IBMPlexMono-Medium-Latin1.woff2') format('woff2');
}

/****************************************************/
/* Tokens                                           */
/****************************************************/

:root {
    color-scheme: dark;

    --ground: #14161a;
    --surface: #1c1f24;
    --raised: #23272e;
    --line: #30353d;
    --line-strong: #5a616b;
    --text: #edeef0;
    --text-soft: #c4c9d0;
    --muted: #a7adb6;
    --accent: #ffd400;
    --accent-hover: #ffe566;
    --accent-ink: #14161a;
    --selected: #2a2d22;
    /* for what deletes: 6:1 on the surface, and ink on it 6.4:1 */
    --danger: #f97066;
    --danger-ground: #2a1e1e;

    --radius: 4px;
    --radius-large: 8px;

    --font-sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', 'Helvetica Neue', sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

    --page: 1200px;
    --gutter: 24px;
}

@media (max-width: 639px) {
    :root {
        --gutter: 16px;
    }
}

/****************************************************/
/* Base                                             */
/****************************************************/

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--ground);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.5;
}

main {
    flex: 1 0 auto;
}

h1,
h2,
h3,
p,
figure,
dl,
dd {
    margin: 0;
}

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

a {
    color: var(--accent);
}

a:hover {
    color: var(--accent-hover);
}

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

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

/****************************************************/
/* Layout                                           */
/****************************************************/

.wrap {
    width: 100%;
    max-width: var(--page);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.wrap--full {
    max-width: none;
    padding-inline: 16px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 8px;
    z-index: 100;
    padding: 10px 14px;
    border-radius: var(--radius);
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 600;
}

.skip-link:focus {
    left: 8px;
}

/****************************************************/
/* Header and footer                                */
/****************************************************/

.site-header {
    border-bottom: 1px solid var(--line);
}

.site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px 32px;
    min-height: 64px;
    padding-block: 8px;
}

.site-header__logo {
    display: flex;
    align-items: center;
    min-height: 44px;
}

.site-header__logo img {
    height: 26px;
    width: auto;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 28px;
    font-size: 15px;
    font-weight: 500;
}

.site-nav__link {
    padding: 12px 0;
    color: var(--text);
    text-decoration: none;
}

.site-nav__link:hover {
    color: var(--accent);
}

.site-nav__link--current {
    box-shadow: inset 0 -2px 0 var(--accent);
}

@media (max-width: 639px) {
    .site-header__inner {
        gap: 4px 14px;
    }

    .site-header__logo img {
        height: 22px;
    }

    .site-nav {
        gap: 4px 14px;
    }

    .site-nav__link--wide {
        display: none;
    }

    .site-nav .button {
        padding: 0 12px;
        font-size: 15px;
    }
}

.site-footer {
    border-top: 1px solid var(--line);
    font-size: 14px;
    color: var(--muted);
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 32px;
    padding-block: 24px;
}

.site-footer__logo {
    height: 20px;
    width: auto;
}

.site-footer__copyright {
    font-family: var(--font-mono);
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0 24px;
}

.site-footer__links a {
    padding: 10px 0;
    color: var(--text-soft);
    text-decoration: none;
}

.site-footer__links a:hover {
    color: var(--text);
    text-decoration: underline;
}

/* The cookie notice: a bar along the foot of the window until the visitor answers it */
.consent {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 20;
    border-top: 1px solid var(--line-strong);
    background: var(--raised);
}

.consent[hidden] {
    display: none;
}

.consent__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 32px;
    padding-block: 18px;
}

.consent__text {
    flex: 1 1 480px;
    font-size: 15px;
}

.consent__actions {
    display: flex;
    gap: 12px;
}

/* the two answers are given the same weight */
.consent__actions .button {
    min-width: 120px;
}

/****************************************************/
/* Components                                       */
/****************************************************/

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: transparent;
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.button--primary {
    background: var(--accent);
    color: var(--accent-ink);
}

.button--primary:hover {
    background: var(--accent-hover);
    color: var(--accent-ink);
}

.button--outline {
    border-color: var(--line-strong);
}

.button--outline:hover {
    border-color: var(--text);
    color: var(--text);
}

.button--large {
    min-height: 50px;
    padding: 0 24px;
    font-size: 17px;
}

.button--block {
    width: 100%;
}

/* the buttons that delete for good */
.button--danger {
    border-color: var(--danger);
    background: var(--danger);
    color: var(--accent-ink);
}

.button--danger:hover {
    background: #fb8f88;
    color: var(--accent-ink);
}

.button--danger-outline {
    border-color: var(--danger);
    color: var(--danger);
}

.button--danger-outline:hover {
    background: var(--danger-ground);
    color: var(--danger);
}

/* A row of buttons of which one or more is pressed: the viewer's Colour and Symbols, the print page's choices */
.segmented {
    display: flex;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
}

.segmented__option {
    min-height: 42px;
    padding: 0 14px;
    border: 0;
    border-left: 1px solid var(--line-strong);
    background: transparent;
    color: var(--text-soft);
    font: inherit;
    cursor: pointer;
}

.segmented__option:first-child {
    border-left: 0;
}

.segmented__option[aria-pressed='true'] {
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 600;
}

.segmented__option:focus-visible {
    outline-offset: -3px;
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field__label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.field__input {
    width: 100%;
    min-height: 46px;
    padding: 0 12px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font: inherit;
}

.field__input:focus-visible {
    outline-offset: 0;
    border-color: var(--accent);
}

.field__hint {
    font-size: 13px;
    color: var(--muted);
}

.alert {
    display: flex;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    background: var(--selected);
}

.alert__icon {
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    color: var(--accent);
}

.alert--danger {
    border-color: var(--danger);
    background: var(--danger-ground);
}

.alert--danger .alert__icon {
    color: var(--danger);
}

/****************************************************/
/* Sign in, register, password reset                */
/****************************************************/

.auth {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    min-height: 100vh;
    min-height: 100dvh;
}

.auth__panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    padding: 40px clamp(24px, 6vw, 88px);
}

.auth__logo {
    display: flex;
    align-items: center;
    align-self: flex-start;
    min-height: 44px;
}

.auth__logo img {
    height: 28px;
    width: auto;
}

.auth__body {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
    max-width: 400px;
}

.auth__title {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.auth__text {
    color: var(--text-soft);
}

.auth__small {
    font-size: 14px;
    color: var(--muted);
}

.auth__form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0 20px;
}

.auth__links a {
    padding: 10px 0;
}

.auth__showcase {
    position: relative;
    overflow: hidden;
    border-left: 1px solid var(--line);
}

.auth__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: 35% 30%;
}

.auth__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 20px;
    padding: 14px 18px;
    background: rgba(20, 22, 26, 0.92);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-soft);
}

/* On a phone or an upright tablet the chart becomes a band above the form */
@media (max-width: 899px) {
    .auth {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: 150px auto;
        align-content: start;
    }

    .auth__showcase {
        grid-row: 1;
        border-left: 0;
        border-bottom: 1px solid var(--line);
    }

    .auth__caption {
        display: none;
    }

    .auth__panel {
        justify-content: flex-start;
        align-items: center;
        padding-block: 28px 40px;
    }

    .auth__logo {
        align-self: auto;
        width: 100%;
        max-width: 400px;
    }
}

/****************************************************/
/* Home                                             */
/****************************************************/

.hero {
    padding-block: 72px;
    text-align: center;
}

.hero__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
}

/* the wordmark is the page's title, and the sentence under it says what the site does */
.hero__logo {
    line-height: 0;
}

.hero__logo img {
    width: 400px;
    max-width: 80vw;
    height: auto;
}

.hero__tagline {
    max-width: 760px;
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 600;
    line-height: 1.2;
    text-wrap: balance;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.hero__note {
    font-size: 15px;
    color: var(--muted);
}

/* photo, pattern, chart */
.strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.7fr);
    gap: 20px;
    width: 100%;
    margin-top: 34px;
    text-align: left;
}

.strip__item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.strip__caption {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.strip__number {
    color: var(--accent);
}

.strip__image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.strip__image--pixels {
    image-rendering: pixelated;
}

.window {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-large);
    background: var(--surface);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.window__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px 16px;
    padding: 10px 14px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
}

.window__bar--top {
    border-bottom: 1px solid var(--line);
}

.window__bar--bottom {
    border-top: 1px solid var(--line);
}

.window__strong {
    color: var(--text);
}

.window__thread {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.window__swatch {
    width: 14px;
    height: 14px;
    border-radius: 2px;
    background: #d0883d;
}

.window__image {
    flex: 1 1 200px;
    width: 100%;
    height: 200px;
    min-height: 200px;
    max-width: none;
    object-fit: cover;
    object-position: 40% 30%;
}

@media (max-width: 899px) {
    .strip {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .strip__item--wide {
        grid-column: 1 / -1;
    }

    .window__image {
        height: 300px;
    }
}

@media (max-width: 639px) {
    .strip {
        gap: 20px 12px;
    }

    .strip__aside {
        display: none;
    }
}

@media (max-width: 479px) {
    .hero {
        padding-block: 48px;
    }

    .window__image {
        height: 240px;
    }
}

.section {
    padding-block: 72px;
    border-top: 1px solid var(--line);
}

.section--surface {
    background: var(--surface);
}

@media (max-width: 639px) {
    .section {
        padding-block: 48px;
    }
}

.section__head {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 32px;
}

.section__title {
    font-size: clamp(26px, 3.6vw, 34px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.section__lead {
    max-width: 640px;
    font-size: 17px;
    color: var(--text-soft);
}

.examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(480px, 100%), 1fr));
    gap: 24px;
}

.example {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.example__image {
    width: 100%;
    aspect-ratio: 2 / 1;
    object-fit: contain;
    border-radius: var(--radius);
    background: #ffffff;
}

.example__name {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.how {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-large);
    background: var(--line);
}

.how__step {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 26px;
    background: var(--ground);
}

.how__number {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--accent);
}

.how__title {
    font-size: 19px;
    font-weight: 600;
}

.how__text {
    font-size: 15px;
    color: var(--text-soft);
}

.how__more {
    margin-top: 28px;
    font-size: 15px;
    color: var(--text-soft);
}

.pricing {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 32px 64px;
}

.pricing__price {
    flex: 1 1 240px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pricing__amount {
    font-family: var(--font-mono);
    font-size: clamp(64px, 10vw, 96px);
    font-weight: 500;
    line-height: 1;
}

.pricing__unit {
    font-size: 20px;
    font-weight: 600;
}

.pricing__small {
    color: var(--muted);
}

.pricing__list {
    flex: 2 1 360px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 17px;
}

.pricing__item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.pricing__tick {
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: 3px;
    color: var(--accent);
}

.threads-note {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 48px;
}

.threads-note__title {
    flex: 1 1 220px;
    font-size: 22px;
    font-weight: 700;
}

.threads-note__text {
    flex: 3 1 420px;
    color: var(--text-soft);
}

/****************************************************/
/* More components                                  */
/****************************************************/

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

.button__icon {
    width: 18px;
    height: 18px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 6px;
    min-height: 44px;
    font-weight: 500;
    text-decoration: none;
}

.back-link svg {
    width: 18px;
    height: 18px;
}

.table-box {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-large);
}

.empty {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 32px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-large);
}

.empty__title {
    font-size: 22px;
    font-weight: 700;
}

.empty__text {
    max-width: 560px;
    color: var(--text-soft);
}

.dialog {
    width: min(440px, calc(100% - 32px));
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-large);
    background: var(--surface);
    color: var(--text);
}

.dialog::backdrop {
    background: rgba(8, 9, 11, 0.7);
}

.dialog__body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
}

.dialog__text {
    font-size: 18px;
    font-weight: 600;
}

.dialog__small {
    color: var(--text-soft);
}

.dialog__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}

/* A page that says one thing: payment received, pattern being made, something went wrong */
.notice {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    max-width: 720px;
    padding-block: 72px;
}

/* the waiting page holds two notices, one of them hidden */
.notice[hidden] {
    display: none;
}

.notice__icon--danger {
    color: var(--danger);
}

.notice__title {
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.notice__text {
    font-size: 17px;
    color: var(--text-soft);
}

.notice__time {
    font-family: var(--font-mono);
    color: var(--muted);
}

.notice__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.notice__spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--line);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: notice-spin 0.9s linear infinite;
}

@keyframes notice-spin {
    to {
        transform: rotate(360deg);
    }
}

/****************************************************/
/* Pages to read: guides, questions, privacy, terms */
/****************************************************/

.page {
    display: flex;
    flex-direction: column;
    gap: 28px;
    width: 100%;
    max-width: 760px;
    margin-inline: auto;
    padding: 64px var(--gutter) 80px;
}

.page__head {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.page__title {
    font-size: clamp(32px, 5vw, 46px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.page__lead {
    font-size: clamp(18px, 2.2vw, 20px);
    color: var(--text-soft);
    text-wrap: pretty;
}

.page__call {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 32px;
    margin-top: 12px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-large);
    background: var(--surface);
    color: var(--text-soft);
    font-size: 15px;
}

.page__call-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.page__call-title {
    font-size: 19px;
    font-weight: 600;
    color: var(--text);
}

/* Running text. Its headings, paragraphs and lists are plain elements, so they are styled from here. */
.prose {
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-size: 17px;
    color: var(--text-soft);
}

.prose h2 {
    margin-top: 20px;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--text);
}

.prose h3 {
    margin-top: 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.prose p,
.prose li {
    text-wrap: pretty;
}

.prose ul,
.prose ol {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding-left: 22px;
}

.prose strong {
    font-weight: 600;
    color: var(--text);
}

.prose__formula {
    padding: 18px 4px;
    border-block: 1px solid var(--line);
    font-family: var(--font-mono);
    color: var(--text);
}

/* A picture of the viewer with what it shows written beside it, or under it when the picture is wide */
.shot {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 16px 28px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-large);
    background: var(--surface);
}

.shot__image {
    flex: 0 1 auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.shot__text {
    flex: 1 1 240px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.shot__text h3 {
    margin-top: 0;
}

.sizes {
    width: 100%;
    min-width: 440px;
    border-collapse: collapse;
    font-size: 15px;
}

.sizes__caption {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    font-size: 14px;
    text-align: left;
    color: var(--text-soft);
}

.sizes th,
.sizes td {
    padding: 11px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.sizes tbody tr:last-child th,
.sizes tbody tr:last-child td {
    border-bottom: 0;
}

.sizes thead th {
    background: var(--surface);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.sizes tbody th {
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--text);
}

.sizes th.sizes__number,
.sizes td.sizes__number {
    font-family: var(--font-mono);
    text-align: right;
}

.sizes td.sizes__number {
    color: var(--text);
}

.sizes__name {
    margin-left: 6px;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 400;
    color: var(--muted);
}

@media (max-width: 639px) {
    .page {
        padding-block: 40px 56px;
    }
}

/****************************************************/
/* Photos (the gallery)                             */
/****************************************************/

.gallery {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

.gallery__photos {
    flex: 1 1 300px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-right: 1px solid var(--line);
    background: var(--surface);
}

.gallery__detail {
    flex: 999 1 560px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
    padding: 28px var(--gutter) 48px;
}

/* one for each photo, all but the chosen one hidden */
.gallery__panel {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

.gallery__panel[hidden] {
    display: none;
}

.gallery__heading {
    padding: 18px 16px 10px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.gallery__count {
    font-family: var(--font-mono);
}

.photo-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.photo-list__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-top: 1px solid #262a30;
    color: var(--text);
    text-decoration: none;
}

.photo-list__item:hover {
    background: var(--raised);
    color: var(--text);
}

.photo-list__item:focus-visible {
    outline-offset: -2px;
}

.photo-list__item--current,
.photo-list__item--current:hover {
    background: var(--selected);
    box-shadow: inset 3px 0 0 var(--accent);
}

.photo-list__thumb {
    flex: none;
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 3px;
}

.photo-list__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.photo-list__name {
    overflow: hidden;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.photo-list__meta {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-soft);
}

.gallery__credit {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border-top: 1px solid var(--line);
}

.gallery__credit-text {
    font-size: 14px;
    color: var(--text-soft);
}

.upload-tile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    color: var(--text);
    text-decoration: none;
}

.upload-tile:hover {
    border-color: var(--accent);
    color: var(--text);
}

.upload-tile__icon {
    flex: none;
    width: 22px;
    height: 22px;
    color: var(--accent);
}

.upload-tile__text {
    display: flex;
    flex-direction: column;
}

.upload-tile__title {
    font-weight: 600;
}

.upload-tile__meta {
    font-size: 13px;
    color: var(--text-soft);
}

.photo {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 20px 28px;
}

.photo__image {
    flex: none;
    width: 220px;
    height: 220px;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.photo__text {
    flex: 1 1 280px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.photo__name {
    overflow-wrap: anywhere;
    font-size: clamp(26px, 3.6vw, 32px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.photo__meta {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-soft);
}

.photo__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
}

.rename[open] {
    flex: 1 1 100%;
}

.rename > summary {
    display: inline-flex;
    list-style: none;
}

.rename > summary::-webkit-details-marker {
    display: none;
}

.rename__form {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 460px;
    margin-top: 12px;
}

.rename__row {
    display: flex;
    gap: 8px;
}

.patterns {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    font-family: var(--font-mono);
    font-size: 13px;
}

.patterns th {
    padding: 10px 14px;
    background: var(--surface);
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-align: left;
    text-transform: uppercase;
    color: var(--muted);
}

.patterns td {
    padding: 8px 14px;
    border-top: 1px solid var(--line);
}

.patterns .patterns__number {
    text-align: right;
    white-space: nowrap;
}

.patterns__none {
    color: var(--muted);
}

.patterns__date {
    white-space: nowrap;
}

.patterns__waiting {
    color: var(--accent);
}

.patterns__waiting--failed {
    color: var(--danger);
    white-space: nowrap;
}

.patterns__name {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}

.patterns__name:hover {
    color: var(--accent);
}

.patterns__thumb {
    flex: none;
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 2px;
    /* the chart's background, where squares are left out of the pattern */
    background-color: #0e1013;
    image-rendering: pixelated;
}

.patterns__thumb--waiting {
    background-color: var(--raised);
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 8px 8px;
}

/* a pattern that could not be made: a cross in the place of its picture */
.patterns__thumb--failed {
    display: grid;
    place-items: center;
    border: 1px solid var(--danger);
    background-color: var(--danger-ground);
    color: var(--danger);
}

.patterns td.patterns__actions {
    padding: 4px 8px;
    text-align: right;
    white-space: nowrap;
}

.patterns__open {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    vertical-align: middle;
}

.patterns__form {
    display: inline-block;
    vertical-align: middle;
}

.patterns__icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.patterns__icon-button:hover {
    background: var(--raised);
    color: var(--text);
}

.patterns__icon-button svg {
    width: 18px;
    height: 18px;
}

.gallery__note {
    max-width: 640px;
    font-size: 14px;
    color: var(--muted);
}

.photo-list__pin {
    flex: none;
    width: 18px;
    height: 18px;
    margin-left: auto;
    fill: var(--accent);
    stroke: var(--accent);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.photo-list__pin-stem {
    fill: none;
}

/* The patterns the user has pinned: one card each, above the table of the others */
.stitching {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stitching__heading {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.stitching__cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr));
    gap: 12px;
}

.stitching__card {
    display: flex;
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-large);
    background: var(--surface);
}

.stitching__thumb {
    flex: none;
    width: 104px;
    height: 104px;
    object-fit: cover;
    border-radius: 3px;
    /* the chart's background, where squares are left out of the pattern */
    background-color: #0e1013;
    image-rendering: pixelated;
}

.stitching__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.stitching__text {
    display: flex;
    flex-direction: column;
}

.stitching__name {
    font-size: 16px;
    font-weight: 600;
}

.stitching__meta,
.stitching__done {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-soft);
}

.stitching__done {
    font-size: 13px;
    color: var(--text);
}

.stitching__progress {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stitching__bar {
    display: block;
    width: 100%;
    height: 6px;
    border: 0;
    border-radius: 3px;
    background: var(--line);
    overflow: hidden;
    appearance: none;
}

.stitching__bar::-webkit-progress-bar {
    background: var(--line);
}

.stitching__bar::-webkit-progress-value {
    background: var(--accent);
}

.stitching__bar::-moz-progress-bar {
    background: var(--accent);
}

.stitching__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
}

/* On a phone each pattern in the table is a block: its name, then its size and threads, with its buttons beside */
@media (max-width: 639px) {
    .stitching__card {
        gap: 12px;
        padding: 12px;
    }

    .stitching__thumb {
        width: 72px;
        height: 72px;
    }

    .stitching__actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stitching__actions .button {
        width: 100%;
    }

    .patterns {
        min-width: 0;
    }

    .patterns thead {
        display: none;
    }

    .patterns,
    .patterns tbody {
        display: block;
    }

    .patterns tr {
        display: grid;
        /* the thumbnail's width, the size, the threads, the buttons */
        grid-template-columns: 56px auto minmax(0, 1fr) auto;
        align-items: center;
        padding: 8px 4px 8px 12px;
        border-top: 1px solid var(--line);
    }

    .patterns tr:first-child {
        border-top: 0;
    }

    .patterns td {
        padding: 0;
        border-top: 0;
    }

    .patterns .patterns__main {
        grid-column: 1 / 4;
        grid-row: 1;
        min-width: 0;
    }

    .patterns .patterns__size {
        grid-column: 2;
        grid-row: 2;
        font-size: 12px;
        text-align: left;
        color: var(--text-soft);
    }

    .patterns .patterns__threads {
        grid-column: 3;
        grid-row: 2;
        overflow: hidden;
        padding-left: 12px;
        font-size: 12px;
        text-overflow: ellipsis;
        text-align: left;
        color: var(--text-soft);
    }

    .patterns .patterns__threads::after {
        content: ' threads';
    }

    .patterns .patterns__waiting {
        grid-column: 3;
        grid-row: 2;
        padding-left: 12px;
        font-size: 12px;
    }

    .patterns .patterns__stitches,
    .patterns .patterns__date,
    .patterns .patterns__none {
        display: none;
    }

    .patterns td.patterns__actions {
        grid-column: 4;
        grid-row: 1 / 3;
        padding: 0 0 0 8px;
    }

    .patterns .patterns__open {
        display: none;
    }
}

@media (max-width: 899px) {
    .gallery__photos {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
}

@media (max-width: 479px) {
    .photo__image {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }
}

/****************************************************/
/* Upload                                           */
/****************************************************/

.upload {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 32px 40px;
    padding-block: 40px 56px;
}

.upload__drop {
    flex: 1 1 380px;
    position: relative;
    min-width: 0;
    min-height: 340px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-large);
    background: var(--surface);
}

.upload__drop:focus-within {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* the file input lies over the whole area, unseen, so that a click or a dropped file reaches it */
.upload__input {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload__zone {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 24px;
    text-align: center;
}

.upload__zone--over {
    background: var(--selected);
}

/* once a photo is chosen the words step aside for it */
.upload__zone--chosen {
    display: none;
}

.upload__icon {
    width: 34px;
    height: 34px;
    margin-bottom: 6px;
    color: var(--accent);
}

.upload__zone-title {
    font-size: 20px;
    font-weight: 600;
}

.upload__zone-text {
    font-size: 14px;
    color: var(--text-soft);
}

.upload__preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #0e1013;
}

.upload__preview[hidden] {
    display: none;
}

.upload__side {
    flex: 1 1 340px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
    max-width: 460px;
}

.upload__title {
    font-size: clamp(28px, 4vw, 34px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.upload__warning {
    font-size: 15px;
    color: var(--text-soft);
}

.alert[hidden] {
    display: none;
}

/****************************************************/
/* New pattern                                      */
/****************************************************/

.create {
    display: flex;
    flex-direction: column;
    gap: 28px;
    max-width: 1000px;
    padding-block: 28px 64px;
}

.create__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
}

.create__photo {
    flex: none;
    width: 112px;
    height: 112px;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.create__intro {
    flex: 1 1 320px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.create__title {
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.create__lead {
    max-width: 620px;
    color: var(--text-soft);
}

.create__mode {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.create__mode[hidden] {
    display: none;
}

.create__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.choice {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.choice__legend {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.choice__number {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 500;
    color: var(--accent);
}

.choice__options {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 12px;
}

.choice__option {
    flex: 1 1 260px;
    position: relative;
    display: flex;
    min-width: 0;
}

.choice__options--colours .choice__option {
    flex-basis: 170px;
}

/* the last thread limit is offered more quietly than the others */
.choice__options--colours .choice__option--small {
    flex: 0 1 150px;
}

/* the radio button itself is not drawn: its label is the thing to press */
.choice__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.size-card,
.colour-card {
    flex: 1 1 auto;
    display: flex;
    min-width: 0;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--surface);
    cursor: pointer;
}

.size-card:hover,
.colour-card:hover {
    border-color: var(--text);
}

.choice__input:checked + .size-card,
.choice__input:checked + .colour-card {
    border-color: var(--accent);
    background: var(--selected);
    box-shadow: inset 0 0 0 1px var(--accent);
}

.choice__input:focus-visible + .size-card,
.choice__input:focus-visible + .colour-card {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.size-card {
    align-items: center;
    gap: 14px;
    padding: 12px;
}

.size-card__preview {
    flex: none;
    width: 104px;
    height: 104px;
    object-fit: contain;
    border-radius: 2px;
    background: #0e1013;
    image-rendering: pixelated;
}

.size-card__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.size-card__name {
    font-size: 20px;
    font-weight: 700;
}

.size-card__stitches {
    font-family: var(--font-mono);
    font-size: 13px;
}

.size-card__inches {
    font-size: 13px;
    color: var(--text-soft);
}

.colour-card {
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-height: 68px;
    padding: 10px 16px;
}

.colour-card__name {
    font-size: 18px;
    font-weight: 700;
}

.colour-card__note {
    font-size: 13px;
    color: var(--text-soft);
}

.choice__option--small .colour-card {
    padding: 8px 14px;
    background: transparent;
}

.choice__option--small .colour-card__name {
    font-size: 15px;
    font-weight: 600;
}

.choice__option--small .colour-card__note {
    font-size: 12px;
}

.field__input--number {
    max-width: 150px;
    font-family: var(--font-mono);
}

.exact__fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.exact__row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
}

.exact__times {
    padding-bottom: 12px;
    font-family: var(--font-mono);
    color: var(--muted);
}

.exact__summary {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-soft);
}

.reduce {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 760px;
}

.reduce__option {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    padding: 12px 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--surface);
}

.reduce__option:has(.reduce__radio:checked) {
    border-color: var(--accent);
}

.reduce__radio {
    flex: none;
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--accent);
}

.reduce__label {
    flex: 1 1 260px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    cursor: pointer;
}

.reduce__name {
    font-weight: 600;
}

.reduce__note {
    font-size: 14px;
    color: var(--text-soft);
}

.field__input:disabled {
    opacity: 0.45;
}

.choice__optional {
    font-size: 17px;
    font-weight: 400;
    color: var(--muted);
}

/* The advanced options' step 1: the size fields, the one picture and the erase tools side by side; on a tablet the
   picture beside the two, and on a phone one under another (static/js/erase.js) */
.workbench {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr) minmax(0, 0.9fr);
    align-items: start;
    gap: 24px 32px;
}

.workbench__size,
.workbench__picture {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.workbench__heading {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.workbench__optional {
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
}

/* on a computer the two size fields are stacked in so narrow a column */
@media (min-width: 1024px) {
    .workbench .exact__times {
        display: none;
    }
}

@media (max-width: 1023px) {
    .workbench {
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
        grid-template-areas:
            'picture size'
            'picture erase';
    }

    .workbench__size {
        grid-area: size;
    }

    .workbench__picture {
        grid-area: picture;
    }

    .workbench__erase {
        grid-area: erase;
    }
}

@media (max-width: 639px) {
    .workbench {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            'size'
            'picture'
            'erase';
    }
}

.erase__canvas {
    display: block;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #0e1013;
    cursor: crosshair;
    touch-action: manipulation;
}

.erase__canvas--brush {
    touch-action: none;
}

/* the quick drawing, until the site's copy arrives: nothing can be erased on it yet */
.erase--busy .erase__canvas {
    opacity: 0.75;
    cursor: progress;
}

.erase__controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.erase__controls[hidden] {
    display: none;
}

/* Tap, one tall button, on the left; the two brushes, Erase above Replace, on the right: one or the other */
.erase__tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
}

.erase__tap {
    display: flex;
}

.erase__brushes {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
}

.erase__tool {
    flex: 1 1 auto;
    min-height: 48px;
    padding: 0 14px;
    border: 0;
    background: transparent;
    color: var(--text-soft);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
}

.erase__tool[aria-pressed='true'] {
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 600;
}

.erase__tool:focus-visible {
    outline-offset: -3px;
}

.erase__tap .erase__tool {
    min-height: 98px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    font-size: 18px;
}

.erase__brushes .erase__tool + .erase__tool {
    border-top: 1px solid var(--line-strong);
}

.erase__label {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* A ? whose words show in a card above it, on hover, focus or a press (static/js/erase.js) */
.tip-wrap {
    position: relative;
    display: inline-flex;
}

.tip {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: transparent;
    color: var(--text-soft);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: help;
}

.tip:hover,
.tip[aria-expanded='true'] {
    border-color: var(--accent);
    color: var(--accent);
}

.tip__text {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    z-index: 5;
    width: 240px;
    max-width: calc(100vw - 16px);
    padding: 10px 12px;
    transform: translateX(-50%);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 6px 20px rgb(0 0 0 / 50%);
    font-size: 14px;
    line-height: 1.45;
    pointer-events: none;
    /* not shown, so a card near the right edge cannot widen the page */
    display: none;
}

.tip-wrap:hover .tip__text,
.tip:focus-visible + .tip__text,
.tip[aria-expanded='true'] + .tip__text {
    display: block;
}

.create__warning {
    margin: 12px 0 0;
    padding: 10px 12px;
    border: 1px solid var(--danger);
    border-radius: var(--radius);
    background: var(--danger-ground);
    color: var(--danger);
    font-weight: 600;
}

.create__warning[hidden] {
    display: none;
}

.erase__setting[hidden] {
    display: none;
}

.erase__setting {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.erase__slider {
    width: 100%;
    margin: 0;
    accent-color: var(--accent);
}

.erase__ends {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    color: var(--muted);
}

.erase__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.erase__actions .button:disabled {
    opacity: 0.45;
    cursor: default;
}

.erase__count {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-soft);
}

/****************************************************/
/* Account, and deleting a photo or the account     */
/****************************************************/

.account__rows {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: var(--radius-large);
    background: var(--surface);
}

.account__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    padding: 18px 20px;
}

.account__row + .account__row {
    border-top: 1px solid var(--line);
}

.account__label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.account__name {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.account__value {
    font-size: 17px;
    font-weight: 500;
    overflow-wrap: anywhere;
}

.account__danger {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    padding: 20px;
    border: 1px solid var(--danger);
    border-radius: var(--radius-large);
}

.account__danger-title {
    margin-bottom: 4px;
    font-size: 19px;
    font-weight: 600;
}

.account__danger p {
    color: var(--text-soft);
}

.confirm {
    display: flex;
    flex-direction: column;
    gap: 22px;
    width: 100%;
    max-width: 640px;
    margin-inline: auto;
    padding: 48px var(--gutter) 56px;
}

.confirm__step {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.confirm__title {
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
}

.confirm__what {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-large);
    background: var(--surface);
}

.confirm__thumb {
    flex: none;
    width: 72px;
    height: 72px;
    border-radius: var(--radius);
    object-fit: cover;
}

.confirm__what-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.confirm__what-name {
    font-size: 19px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.confirm__what-meta {
    font-size: 15px;
    color: var(--muted);
}

.confirm__group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.confirm__list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-left: 22px;
    color: var(--text-soft);
}

.confirm__p {
    color: var(--text-soft);
    overflow-wrap: anywhere;
}

.confirm__p strong {
    color: var(--text);
}

.confirm__loss {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    border: 1px solid var(--danger);
    border-radius: var(--radius);
    background: var(--danger-ground);
}

.confirm__loss-title {
    font-weight: 600;
    color: var(--danger);
}

.confirm__loss p {
    color: var(--text-soft);
}

.confirm__form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.confirm__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
