/*
 * Customer-facing pages: repair status, workshop page, "not found".
 * Same tag identity as the workshop screens, tuned for a phone held in one hand.
 */

@font-face {
    font-family: 'Archivo';
    font-style: normal;
    font-weight: 400 800;
    font-stretch: 62% 125%;
    font-display: swap;
    src: url('/fonts/archivo-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Archivo';
    font-style: normal;
    font-weight: 400 800;
    font-stretch: 62% 125%;
    font-display: swap;
    src: url('/fonts/archivo-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --ink: #1C2430;
    --paper: #E9EBE7;
    --card: #FFFFFF;
    --well: #F4F5F2;
    --steel: #5D6673;
    --line: #D6DAD3;
    --tag: #E8B820;
    --tag-soft: #FBF1CF;
    --ready: #1E7A4F;
    --ready-soft: #DDF0E5;
    --alarm: #B42F25;
    --wide: 118%;
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root {
        --ink: #E8EBE6;
        --paper: #13171C;
        --card: #1B2027;
        --well: #222831;
        --steel: #9BA3AD;
        --line: #2F3741;
        --tag-soft: #3A3218;
        --ready: #5CC48F;
        --ready-soft: #173426;
        --alarm: #F08377;
        color-scheme: dark;
    }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: 'Archivo', -apple-system, 'Segoe UI', system-ui, sans-serif;
    font-size: 17px;
    line-height: 1.5;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--tag); outline-offset: 2px; }

.st { max-width: 560px; margin: 0 auto; padding: 0 16px 48px; }

.st-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0 8px; }
.st-shop { font-weight: 650; font-size: 0.95rem; text-decoration: none; overflow-wrap: anywhere; }
.st-tag {
    position: relative;
    flex-shrink: 0;
    padding: 4px 10px 4px 24px;
    background: var(--tag);
    color: #1C2430;
    font-weight: 800;
    font-stretch: var(--wide);
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
    clip-path: polygon(11px 0, 100% 0, 100% 100%, 11px 100%, 0 50%);
}
.st-tag::before { content: ''; position: absolute; left: 9px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--paper); }

.st-hero { padding: 26px 0 8px; }
.st-item { color: var(--steel); font-size: 0.95rem; margin: 0 0 6px; overflow-wrap: anywhere; }
.st-ident { margin-left: 0.6em; padding: 1px 6px; border: 1px solid var(--line); border-radius: 4px; font-size: 0.85rem; color: var(--ink); white-space: nowrap; }
.st-status { font-size: 1.75rem; line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.st-next { font-size: 1.05rem; margin: 12px 0 0; max-width: 34ch; }
.st-eta { display: inline-block; margin-top: 14px; padding: 6px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 3px; font-weight: 650; font-size: 0.95rem; }

.st-rail { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 26px 0 6px; }
.st-rail i { display: block; height: 8px; background: var(--line); border-radius: 1px; }
.st-rail i.done { background: var(--ink); }
.st-rail i.now { background: var(--tag); }
.st-rail-labels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; font-size: 0.72rem; color: var(--steel); }
.st-rail-labels .now { color: var(--ink); font-weight: 700; }

.st-card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 18px; margin-top: 16px; }
.st-card--tag { background: var(--tag-soft); border-color: #E2C665; }
.st-card--ready { background: var(--ready-soft); border-color: #A9D8BC; }
.st-h { font-size: 1rem; font-weight: 650; margin: 0 0 10px; }
.st-amount { font-size: 2rem; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; margin: 4px 0 12px; }
.st-pre { white-space: pre-line; margin: 0; }
.st-muted { color: var(--steel); }
.st-small { font-size: 0.88rem; }

.st-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid #CDD2CC;
    border-radius: 6px;
    background: var(--card);
    color: var(--ink);
    font: inherit;
    font-weight: 650;
    font-size: 1.05rem;
    text-decoration: none;
    cursor: pointer;
}
.st-btn--ink { background: var(--ink); border-color: var(--ink); color: var(--card); }
.st-btn--quiet { border-color: transparent; background: transparent; color: var(--steel); min-height: 46px; font-weight: 600; }
.st-btn + .st-btn { margin-top: 8px; }
.st-actions { margin-top: 18px; }
.st-note { margin-top: 14px; }
.st-note summary { cursor: pointer; color: var(--steel); font-size: 0.92rem; }
.st-note textarea, .st-field input {
    width: 100%;
    margin-top: 8px;
    min-height: 50px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--well);
    color: var(--ink);
    font: inherit;
}
.st-note textarea { min-height: 80px; }
.st-done { margin-top: 16px; padding: 12px 14px; border-radius: 4px; background: var(--ready-soft); color: var(--ready); font-weight: 650; }

.st-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.st-facts dt { color: var(--steel); }
.st-facts dd { margin: 0; overflow-wrap: anywhere; }

.st-feed { list-style: none; margin: 0; padding: 0; }
.st-feed li { position: relative; padding: 0 0 16px 22px; border-left: 2px solid var(--line); margin-left: 5px; }
.st-feed li:last-child { border-left-color: transparent; padding-bottom: 0; }
.st-feed li::before { content: ''; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 2px solid var(--ink); }
.st-feed li:first-child::before { background: var(--tag); border-color: var(--tag); }
.st-feed-title { font-weight: 700; }
.st-feed-when { font-size: 0.82rem; color: var(--steel); }
.st-feed-note { margin-top: 4px; white-space: pre-line; }

.st-docs { list-style: none; margin: 0; padding: 0; }
.st-docs a { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 650; }
.st-docs li:last-child a { border-bottom: 0; }

.st-foot { margin-top: 28px; text-align: center; font-size: 0.82rem; color: var(--steel); }
.st-foot a { color: var(--steel); }

.st-field { margin-top: 12px; }
.st-field label { display: block; font-weight: 650; font-size: 0.95rem; }
.st-field .st-hint { display: block; color: var(--steel); font-size: 0.85rem; margin-top: 4px; }
.st-error { margin-top: 14px; padding: 12px 14px; border-radius: 4px; background: var(--tag-soft); font-weight: 600; }

@media (min-width: 600px) {
    .st-status { font-size: 2rem; }
}
/* Wider screens: the status and its next step on the left, reference on the right. */
@media (min-width: 900px) {
    .st { max-width: 1040px; padding: 0 32px 64px; }
    .st-hero { max-width: 640px; }
    .st-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: start; }
    .st-main > :first-child, .st-side > :first-child { margin-top: 0; }
    .st-grid { margin-top: 24px; }
}

/* Workshop identity: logo in the header, its photo, photos of the job. */
.st-shop { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.st-logo { height: 36px; width: auto; max-width: 120px; object-fit: contain; flex: none; }
.st-cover { display: block; width: 100%; aspect-ratio: 16 / 7; object-fit: cover; border-radius: 8px; margin-top: 8px; }
.st-card--shop { overflow: hidden; }
.st-shop-photo { display: block; width: calc(100% + 36px); margin: -18px -18px 14px; aspect-ratio: 16 / 9; object-fit: cover; }
.st-who { margin: 16px 0 0; font-size: 1rem; }
.st-photos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.st-photos li { display: grid; gap: 4px; font-size: 0.85rem; color: var(--steel); }
.st-photos img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: var(--well); }
@media (min-width: 900px) { .st-photos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
