@font-face {
    font-family: "Instrument Sans";
    src: url("fonts/instrument-sans.ttf") format("truetype");
    font-weight: 400 700;
    font-display: swap;
}

:root {
    color-scheme: light;
    --red: #d20a2e;
    --red-dark: #a80022;
    --coral: #ff5768;
    --red-soft: #ffe8ec;
    --paper: #f6f7fa;
    --ink: #17212e;
    --muted: #637184;
    --line: #e1e4ec;
    --white: #fff;
    --green: #16633c;
    --green-soft: #e3f6e9;
    --blue: #1754a3;
    --blue-soft: #e2efff;
    --violet: #56319f;
    --violet-soft: #eee6fc;
    --shadow: 0 4px 16px #2026400d, 0 1px 3px #20264009;
    --shadow-red: 0 4px 13px #a800222b;
    --button-gradient: linear-gradient(160deg, var(--red), var(--red-dark));
    --radius: 19px;
    --nav-height: calc(62px + env(safe-area-inset-bottom, 0px));
    --header-height: calc(75px + env(safe-area-inset-top, 0px));
    --page-padding: clamp(15px, 3vw, 34px);
    --body: -apple-system, BlinkMacSystemFont, "Instrument Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding: calc(var(--header-height) + 12px) 0 calc(var(--nav-height) + 80px); }
body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(ellipse 65% 340px at 50% 75px, #f8ecef, transparent 100%), var(--paper);
    color: var(--ink);
    font: 1rem/1.4 var(--body);
    -webkit-text-size-adjust: 100%;
}
h1, h2, p, ul, dl { margin: 0; }
h1, h2 { line-height: 1.13; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.62rem, 4.7vw, 2.35rem); font-weight: 760; letter-spacing: -.045em; }
h2 { font-size: clamp(1.14rem, 3.2vw, 1.46rem); font-weight: 720; letter-spacing: -.03em; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { color: inherit; font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--red-dark); outline-offset: 3px; }
.icon { width: 22px; height: 22px; flex: none; vertical-align: middle; }
.with-icon { display: inline-flex; align-items: center; gap: 8px; }
.with-icon > .icon, .section-icon { color: var(--red-dark); }
.muted { color: var(--muted); }
.mono, .code { font-variant-numeric: tabular-nums; }
.sr-only, .skip-link:not(:focus) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.skip-link:focus { position: fixed; z-index: 20; top: .5rem; left: .5rem; padding: .8rem; border-radius: 9px; background: var(--white); }
.eyebrow { color: var(--muted); font-size: .74rem; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; overflow-wrap: anywhere; }
.eyebrow + h1 { margin-top: 4px; }
.preserve-lines { white-space: pre-wrap; }

.top-bar {
    position: sticky;
    top: 0;
    z-index: 8;
    isolation: isolate;
    overflow: hidden;
    color: var(--white);
    background: radial-gradient(ellipse at 0 100%, #fa4156, transparent 62%),
        linear-gradient(114deg, var(--red) 10%, var(--red-dark) 100%);
    box-shadow: 0 3px 20px #a8002222;
}
.top-bar::before, .top-bar::after {
    content: "";
    position: absolute;
    z-index: -1;
    pointer-events: none;
}
.top-bar::before {
    inset: auto -12% -38px 37%;
    height: 60px;
    border-radius: 65% 52% 0 0;
    transform: rotate(-5deg);
    background: linear-gradient(90deg, #ff576800, #ff5768bc);
}
.top-bar::after {
    inset: auto -5% -47px -8%;
    height: 60px;
    border-radius: 50% 57% 0 0;
    transform: rotate(1.5deg);
    background: #ff9b9f3d;
}
.top-inner {
    min-height: var(--header-height);
    max-width: 1270px;
    margin-inline: auto;
    padding: env(safe-area-inset-top, 0px) max(var(--page-padding), env(safe-area-inset-right, 0px)) 3px max(var(--page-padding), env(safe-area-inset-left, 0px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.top-bar :focus-visible { outline-color: var(--white); }
.brand { display: inline-flex; align-items: center; gap: 9px; flex: none; min-height: 44px; }
.brand-mark .icon { width: 40px; height: 40px; stroke-width: 1.65; }
.brand-type { display: grid; gap: 3px; }
.brand-word { font-size: 1.58rem; font-weight: 780; line-height: .99; letter-spacing: -.042em; }
.brand-tagline { font-size: .62rem; line-height: 1; font-weight: 640; letter-spacing: .12em; text-transform: uppercase; }
.header-account { display: flex; align-items: center; justify-content: flex-end; gap: 9px; min-width: 0; }
.account-name { display: none; font-size: .86rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-button {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--white);
}
.icon-button.exit { border-color: #ffffff55; color: var(--white); background: #ffffff24; }
.icon-button:disabled { color: #95a0af; cursor: default; }
.app-layout { max-width: 1270px; margin-inline: auto; }
.navigation {
    position: fixed;
    inset: auto 0 0;
    z-index: 7;
    display: flex;
    justify-content: center;
    height: var(--nav-height);
    padding: 4px max(10px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(10px, env(safe-area-inset-left, 0px));
    border-top: 1px solid var(--line);
    background: #fffffff2;
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}
.navigation a {
    display: flex;
    flex: 1;
    max-width: 165px;
    min-height: 48px;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 3px;
    border-radius: 12px;
    color: #455469;
    font-size: .72rem;
    font-weight: 650;
}
.navigation a[aria-current] { color: var(--red-dark); background: var(--red-soft); }
.main-content {
    min-width: 0;
    max-width: 1020px;
    margin-inline: auto;
    padding: 21px max(var(--page-padding), env(safe-area-inset-right, 0px)) 30px max(var(--page-padding), env(safe-area-inset-left, 0px));
}
.signed-in .main-content { padding-bottom: calc(var(--nav-height) + 26px); }

.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin-bottom: 16px; }
.page-head > div { min-width: 0; }
.page-head > .button { flex-shrink: 0; }
.page-head .muted { margin-top: 4px; font-size: .93rem; }
.section-block { margin-top: 23px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; margin-bottom: 10px; }
.section-head h2 { min-width: 0; }
.section-head .text-action { flex: none; }
.panel {
    min-width: 0;
    padding: clamp(15px, 2.2vw, 23px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}
.panel h2 + .form-grid { margin-top: 16px; }
.compact-panel { max-width: 660px; margin-inline: auto; padding: clamp(20px, 4vw, 36px); display: grid; gap: 16px; justify-items: start; }
.back-link, .text-action { min-height: 44px; display: inline-flex; align-items: center; gap: 4px; color: var(--red-dark); font-size: .87rem; font-weight: 700; }
.back-link { margin: -9px 0 5px; }
.back-link .icon, .text-action .icon { width: 16px; height: 16px; }
.text-action { padding: 0; border: 0; background: transparent; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    min-width: 44px;
    border: 1px solid transparent;
    border-radius: 13px;
    padding: 9px 13px;
    font-size: .93rem;
    line-height: 1.22;
    font-weight: 700;
    text-align: center;
}
.button .icon { width: 19px; height: 19px; }
.primary { background: var(--button-gradient); color: var(--white); box-shadow: var(--shadow-red); }
.primary:focus-visible { outline-color: var(--ink); }
.secondary { background: var(--white); color: var(--ink); border-color: #d5dbe6; }
.tinted { background: var(--red-soft); color: var(--red-dark); border-color: #f2c4ce; }
.wide { width: 100%; }
.page-add { color: var(--red-dark); }
.button-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.action-dock {
    position: sticky;
    z-index: 6;
    bottom: var(--nav-height);
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
    padding: 9px 0 7px;
    background: linear-gradient(180deg, #f6f7fae8, var(--paper));
}
.action-dock > .button { width: 100%; min-height: 52px; }
.editor .action-dock { margin-top: 0; }
.keyboard-open .navigation { visibility: hidden; }
.keyboard-open .action-dock { position: static; }

.dashboard-head { margin-bottom: 12px; }
.identity-card { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.identity-card .row-main { gap: 2px; }
.identity-card .row-main strong { font-size: 1.08rem; }
.dashboard-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.action-card, .type-button {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 107px;
    padding: 10px 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(155deg, var(--white), #fafafd);
    box-shadow: var(--shadow);
    font-size: clamp(.96rem, 3.6vw, 1.12rem);
    font-weight: 740;
    line-height: 1.18;
    letter-spacing: -.021em;
    text-align: center;
}
.action-icon, .row-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: #edf0f6;
    color: #40506a;
}
.action-icon .icon { width: 25px; height: 25px; }
.row-icon .icon { width: 21px; height: 21px; }
.tone-blue { color: var(--blue); background: var(--blue-soft); }
.tone-green { color: var(--green); background: var(--green-soft); }
.tone-red { color: var(--red-dark); background: var(--red-soft); }
.tone-violet { color: var(--violet); background: var(--violet-soft); }

.record-list { list-style: none; padding: 0; }
.record-list:not(.separate-rows), .separate-rows > li {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}
.record-list:not(.separate-rows) > li + li { border-top: 1px solid var(--line); }
.separate-rows { display: grid; gap: 8px; }
.survey-row, .customer-link, .product-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 65px;
    padding: 10px 12px;
}
.separate-rows a, .separate-rows .customer-link { border-radius: calc(var(--radius) - 1px); }
.customer-link { width: 100%; border: 0; background: transparent; text-align: left; }
.customer-link > strong { flex: 1; overflow-wrap: anywhere; }
.customer-initials {
    border-radius: 50%;
    color: var(--blue);
    background: var(--blue-soft);
    font-size: .94rem;
    font-weight: 760;
    letter-spacing: -.03em;
}
.customer-row:nth-child(4n+2) .customer-initials { color: var(--violet); background: var(--violet-soft); }
.customer-row:nth-child(4n+3) .customer-initials { color: var(--green); background: var(--green-soft); }
.customer-row:nth-child(4n) .customer-initials { color: var(--red-dark); background: var(--red-soft); }
.row-main { display: grid; gap: 2px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.row-main strong { font-weight: 730; letter-spacing: -.019em; }
.row-meta { color: var(--muted); font-size: .82rem; }
.row-customer { color: #3e4e63; font-size: .89rem; }
.row-product-count { white-space: nowrap; }
.survey-row > .icon, .customer-link > .icon, .product-link > .icon { width: 16px; height: 16px; color: var(--muted); }
.survey-row.completed .row-icon { color: var(--green); background: var(--green-soft); }
.survey-row.draft .row-icon { color: var(--blue); background: var(--blue-soft); }
.draft-archive-row { position: relative; }
.draft-archive-row .survey-row { padding-inline-end: 54px; }
.draft-delete-action {
    position: absolute;
    inset-inline-end: 4px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--red-dark);
}
.draft-delete-action:hover { background: var(--red-soft); }
.draft-delete-action .icon { width: 19px; height: 19px; }
.draft-delete-action span { display: none; }
@media (pointer: coarse) {
    .draft-swipe-ready .draft-archive-row { overflow: hidden; --reveal-width: 90px; }
    .draft-swipe-ready .survey-row.draft {
        position: relative;
        z-index: 1;
        padding-inline-end: 12px;
        background: var(--white);
        touch-action: pan-y pinch-zoom;
    }
    .draft-swipe-ready .draft-delete-action {
        inset: 0 0 0 auto;
        width: var(--reveal-width);
        height: auto;
        transform: none;
        background: var(--red-dark);
        color: var(--white);
        font-size: .85rem;
        font-weight: 730;
        opacity: 0;
        pointer-events: none;
    }
    .draft-swipe-ready .draft-delete-action span { display: inline; }
    .draft-swipe-ready .draft-delete-action .icon { display: none; }
    .draft-swipe-ready .draft-archive-row:is([data-swipe-open], :has(.draft-delete-action:focus-visible)) .survey-row {
        transform: translateX(calc(-1 * var(--reveal-width)));
    }
    .draft-swipe-ready .draft-archive-row:is([data-swipe-open], :has(.draft-delete-action:focus-visible)) .draft-delete-action {
        opacity: 1;
        pointer-events: auto;
    }
    .draft-swipe-ready .draft-delete-action:focus-visible { outline-color: var(--white); outline-offset: -4px; }
}
@media (pointer: coarse) and (prefers-reduced-motion: no-preference) {
    .draft-swipe-ready .survey-row.draft { transition: transform .16s ease; }
}
.empty-state { padding: 20px 16px; color: var(--muted); }
.badge, .count-chip {
    display: inline-flex;
    flex: none;
    align-items: center;
    min-height: 25px;
    padding: 3px 9px;
    border-radius: 99px;
    background: #edf0f5;
    color: #465568;
    font-size: .72rem;
    font-weight: 750;
    line-height: 1.15;
    white-space: nowrap;
}
.badge.completed, .badge.active { background: var(--green-soft); color: var(--green); }
.badge.draft { background: var(--blue-soft); color: var(--blue); }
.badge.expired, .badge.suspended, .count-chip { background: var(--red-soft); color: var(--red-dark); }
.count-chip { min-width: 27px; justify-content: center; font-variant-numeric: tabular-nums; }

.editor { max-width: 820px; display: grid; gap: 12px; }
.form-stack { display: grid; gap: 13px; }
.form-grid, .fact-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px 16px; }
.fact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fact-grid dt { color: var(--muted); font-size: .81rem; font-weight: 650; margin-bottom: 3px; }
.fact-grid dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.full-width, .form-grid > .nonfield { grid-column: 1 / -1; }
.field { display: grid; align-content: start; gap: 5px; min-width: 0; }
.field label, .field legend { font-size: .87rem; font-weight: 670; }
.field input:not([type="radio"], [type="checkbox"]), .field select, .field textarea {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 47px;
    border: 1px solid #cfd6e2;
    border-radius: 12px;
    background: #fafbfe;
    padding: 9px 11px;
    font-size: 1rem;
}
.field input::placeholder { color: var(--muted); opacity: 1; }
.field input[type="file"] { padding: 6px; }
.field input[type="file"]::file-selector-button { padding: 8px; background: var(--white); border: 1px solid var(--line); border-radius: 7px; color: var(--ink); }
.field textarea { resize: vertical; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--red); }
.field-help { font-size: .81rem; color: var(--muted); }
.field-unit { position: relative; }
.field-unit > span { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: .76rem; color: var(--muted); pointer-events: none; }
.field-unit input[type="text"] { padding-right: 31px; font-variant-numeric: tabular-nums; }
.errorlist { color: var(--red-dark); font-size: .84rem; padding-left: 17px; }
.errorlist.nonfield, .notice { padding: 10px 13px; background: #edf1f8; color: var(--ink); border-radius: 13px; overflow-wrap: anywhere; }
.errorlist.nonfield { list-style: none; }
.notice.error, .errorlist.nonfield { background: var(--red-soft); color: var(--red-dark); }
.notice.success { background: var(--green-soft); color: var(--green); }
.notices { display: grid; gap: 7px; margin-bottom: 14px; }
.search-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.search-form .search-field { flex: 1 1 200px; }
.customer-search .search-field { flex-basis: 135px; }
.archive-search .field:not(.search-field) { flex: 1 1 135px; }
.search-form .button { min-height: 47px; }
.search-input { position: relative; }
.search-input > .icon { position: absolute; inset: 0 auto 0 10px; margin-block: auto; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search-input > input:not([type="radio"], [type="checkbox"]) { padding-left: 35px; background: var(--white); }
.search-reset { padding-inline: 5px; }
.customer-search .search-reset { flex-basis: 100%; }
.search-results { margin-top: 13px; }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 9px; margin-top: 16px; color: var(--muted); font-size: .87rem; }

.survey-heading { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; }
.section-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--red-soft); }
.section-icon .icon { width: 25px; height: 25px; }
.survey-heading-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.survey-timestamp, .survey-actor { color: var(--muted); font-size: .89rem; overflow-wrap: anywhere; }
.survey-timestamp { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.survey-timestamp .icon { width: 17px; height: 17px; }
.survey-actor { margin-top: 3px; }
.survey-customer { display: flex; align-items: flex-start; gap: 12px; }
.survey-customer .row-main { gap: 4px; }
.survey-customer h2 a { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 32px; }
.survey-customer h2 .icon, .customer-contact .icon { width: 16px; height: 16px; color: var(--red-dark); }
.customer-contacts { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; }
.customer-contact { display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: #455469; font-size: .89rem; }
a.customer-contact { min-height: 31px; }
.customer-contact span { overflow-wrap: anywhere; }
.survey-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.type-button { position: relative; min-height: 132px; }
.type-image { display: grid; place-items: center; width: 83px; height: 73px; border-radius: 15px; overflow: hidden; }
.type-image img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; }
.type-button > .icon { position: absolute; right: 9px; bottom: 10px; width: 15px; height: 15px; color: var(--muted); }
.product-row { min-width: 0; }
.product-link > img { flex: none; width: 65px; border-radius: 10px; background: var(--paper); }
.product-label { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; }
.code { display: inline-block; width: fit-content; border-radius: 7px; color: var(--red-dark); background: var(--red-soft); padding: 3px 7px; font-size: .79rem; font-weight: 750; line-height: 1.3; }
.row-actions { display: flex; flex-wrap: wrap; gap: 0 2px; margin-inline: 12px; }
.row-actions a { display: inline-flex; align-items: center; min-height: 44px; padding: 5px 9px; border-radius: 9px; font-size: .84rem; font-weight: 670; }
.row-actions .danger-text { color: var(--red-dark); }
.carousel-controls { display: flex; gap: 6px; }
.catalog-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: min(72vw, 285px);
    gap: 12px;
    padding: 7px 5px 17px;
    margin-inline: -5px;
    list-style: none;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-padding-inline: 5px;
    scroll-snap-type: x mandatory;
    scrollbar-color: #adb6c5 var(--paper);
}
.catalog-track > li { scroll-snap-align: start; min-width: 0; }
.catalog-card { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--white); box-shadow: var(--shadow); }
.catalog-card img { width: 100%; aspect-ratio: 540 / 399; object-fit: contain; background: #edf0f6; }
.catalog-card > span { display: flex; justify-content: space-between; align-items: center; gap: 4px; flex: 1; min-height: 55px; padding: 8px 12px; font-size: .95rem; font-weight: 710; }
.catalog-card .icon { width: 17px; height: 17px; color: var(--red-dark); }

.product-head { max-width: 820px; margin-bottom: 13px; }
.product-head .page-head { margin-bottom: 12px; }
.product-hero {
    position: relative;
    display: grid;
    justify-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(150deg, #f6f7fb, #e5e9f1);
    box-shadow: var(--shadow);
}
.product-hero > img {
    width: auto;
    height: clamp(156px, 47vw, 270px);
    object-fit: contain;
    mix-blend-mode: multiply;
    mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}
.photo-count { position: absolute; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 5px; min-height: 38px; padding-inline: 11px; border-radius: 30px; background: #17212edc; color: var(--white); font-size: .79rem; font-weight: 700; }
.photo-count .icon { width: 16px; height: 16px; }
.photo-count:focus-visible { outline-color: var(--white); outline-offset: -4px; }
.measure-sections, .product-detail { display: grid; gap: 9px; }
.measure-section { padding: 0; --measure-padding: clamp(12px, 2.1vw, 20px); }
.measure-section h2, .photo-section h2 { font-size: 1.13rem; }
.measure-section h2 { padding: 12px var(--measure-padding); border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; background: #fff1f3; }
.measure-section h2 + .form-grid { margin-top: 0; }
.measure-section .form-grid, .measure-section .fact-grid { padding: 13px var(--measure-padding) 15px; }
.measure-section .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.measure-section .choice-field { grid-column: 1 / -1; }
.measure-section summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    min-height: 49px;
    padding: 8px var(--measure-padding);
    border-radius: calc(var(--radius) - 1px);
    cursor: pointer;
    font-weight: 710;
    list-style: none;
}
.measure-section summary::-webkit-details-marker { display: none; }
.measure-section summary > .icon { width: 18px; height: 18px; color: var(--red-dark); }
.measure-section[open] summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; background: #fff1f3; }
.measure-section[open] summary > .icon { transform: rotate(90deg); }
.measure-section .with-icon > .icon { width: 20px; height: 20px; }
.choice-field { margin: 0; padding: 0; border: 0; }
.choice-field legend { padding: 0; margin-bottom: 5px; }
.choices { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 13px; background: #eef0f5; }
.choice {
    position: relative;
    display: grid;
    flex: 1;
    place-items: center;
    min-width: 44px;
    min-height: 44px;
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: #f9fafc;
    cursor: pointer;
    white-space: nowrap;
}
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choice > span { pointer-events: none; }
.choice:has(input:checked) { color: var(--white); background: var(--button-gradient); box-shadow: var(--shadow-red); }
.choice:has(input:focus-visible) { outline: 3px solid var(--red-dark); outline-offset: 2px; }
.prefill { display: flex; align-items: center; flex-wrap: wrap; gap: 0 12px; justify-content: space-between; padding-block: 4px; }
.prefill > span { font-size: .89rem; }
.photo-section h2 { margin-bottom: 7px; }
.photo-section .muted { font-size: .89rem; }
.photo-buttons { margin-top: 12px; }
.photo-buttons > .button { flex: 1 1 120px; }
.file-button { position: relative; cursor: pointer; }
.file-button input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.file-button:focus-within { outline: 3px solid var(--red-dark); outline-offset: 3px; }
.photo-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(112px, 100%), 1fr)); gap: 10px; margin-top: 12px; padding: 0; }
.photo-grid:empty { display: none; }
.photo-grid img, .preview-unavailable { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); }
.preview-unavailable { display: grid; place-items: center; padding: 9px; font-size: .77rem; color: var(--muted); text-align: center; }
.photo-tile { display: grid; gap: 4px; align-content: start; min-width: 0; }
.photo-tile > .button { padding-inline: 6px; font-size: .84rem; }
.remove-photo { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; font-size: .85rem; cursor: pointer; }
.remove-photo input { width: 18px; height: 18px; margin: 0; accent-color: var(--red-dark); }
.photo-tile-name { overflow-wrap: anywhere; color: var(--muted); font-size: .78rem; }

.completion-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 11px; margin-top: 16px; padding: 12px; border: 1px solid #cbe8d4; border-radius: var(--radius); background: linear-gradient(160deg, #f1fbf3, var(--green-soft)); color: var(--green); }
.completion-banner > div { flex: 1 1 155px; }
.completion-banner p { font-size: .88rem; }
.completion-banner .text-action { color: var(--green); }
.completion-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: #23824d; color: var(--white); }
.completed-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 16px; }
.completed-actions .button { min-height: 48px; }
.completed-email { grid-column: 1 / -1; }

.guest .main-content { width: 100%; max-width: 1020px; }
.login-layout { display: grid; gap: 16px; max-width: 520px; margin: 7px auto 0; }
.login-panel { padding: clamp(19px, 4vw, 34px); }
.login-panel .muted { margin-top: 8px; }
.login-panel .form-stack { margin-top: 18px; }
.login-switch { min-height: 44px; display: inline-flex; align-items: center; margin-top: 9px; color: var(--red-dark); font-size: .88rem; font-weight: 680; }
.login-visual { display: none; overflow: hidden; border: 1px solid #f3ced4; border-radius: var(--radius); background: linear-gradient(151deg, #fff5f6, #f4d8df); box-shadow: var(--shadow); }
.login-visual h2 { color: var(--red-dark); font-size: clamp(2.6rem, 5.2vw, 4.25rem); line-height: .95; letter-spacing: -.065em; }
.login-visual img { align-self: center; width: 100%; object-fit: contain; mix-blend-mode: multiply; }

@media (min-width: 385px) {
    .measure-section .form-grid:has(> .field:nth-child(3):last-child):not(:has(.choice-field)) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 390px) {
    .survey-row { gap: 7px; }
    .survey-row .row-icon { width: 34px; height: 34px; border-radius: 11px; }
    .survey-row > .icon { display: none; }
    .row-product-count { display: none; }
    .page-add { padding-inline: 10px; }
}
@media (min-width: 550px) {
    .account-name { display: inline; max-width: 44vw; }
    .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .action-dock > .button { width: auto; min-width: 220px; }
    .dashboard-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .action-card { min-height: 115px; }
    .type-button { min-height: 146px; }
    .type-image { width: 113px; height: 84px; }
    .completed-actions { grid-template-columns: 1.35fr 1fr 1fr; }
    .completed-email { grid-column: auto; }
    .photo-buttons > .button { flex: 0 1 auto; }
    .customer-search .search-reset { flex-basis: auto; }
}
@media (min-width: 820px) {
    :root { --nav-height: 0px; }
    .signed-in .app-layout { display: grid; grid-template-columns: 185px minmax(0, 1fr); }
    .signed-in .main-content { width: 100%; padding-top: 25px; padding-bottom: 37px; }
    .navigation {
        position: sticky;
        top: calc(var(--header-height) + 25px);
        align-self: start;
        display: grid;
        grid-auto-rows: 46px;
        align-content: start;
        justify-content: stretch;
        gap: 5px;
        height: auto;
        margin: 25px 0 0 var(--page-padding);
        padding: 7px;
        border: 1px solid var(--line);
        border-radius: 16px;
        background: var(--white);
        box-shadow: var(--shadow);
    }
    .navigation a { flex-direction: row; justify-content: flex-start; min-height: 44px; max-width: none; padding-inline: 9px; gap: 8px; font-size: .9rem; }
    .navigation a .icon { width: 19px; height: 19px; }
    .survey-row, .customer-link, .product-link { padding-inline: 15px; gap: 13px; }
    .dashboard-actions { gap: 13px; }
    .product-row { display: flex; align-items: center; justify-content: space-between; }
    .product-link { flex: 1; min-width: 0; }
    .row-actions { margin-inline: 0 10px; }
    .login-layout { grid-template-columns: .92fr 1fr; max-width: none; align-items: stretch; gap: 17px; margin-top: 20px; }
    .login-panel { display: flex; flex-direction: column; justify-content: center; }
    .login-visual { display: grid; grid-template-rows: auto 1fr; padding: 26px 24px 0; }
}
@media (hover: hover) {
    .primary:hover { background: var(--red-dark); }
    .secondary:hover, .icon-button:not(:disabled, .exit):hover, .survey-row:hover, .customer-link:hover,
    .product-link:hover, .row-actions a:hover, .navigation a:not([aria-current]):hover { background: #f1f4fa; }
    .tinted:hover { background: #ffdde4; }
    .exit:hover { background: #ffffff3b; }
    .action-card:hover, .type-button:hover, .catalog-card:hover { border-color: #d8a4ad; }
    .back-link:hover, .text-action:hover, .login-switch:hover, a.customer-contact:hover { text-decoration: underline; text-underline-offset: 3px; }
}
