@font-face {
    font-family: 'Golos Text';
    src: url('fonts/GolosText.ttf') format('truetype');
    font-weight: 100 900;
    font-display: swap;
}

:root {
    --paper: #f1f3e9;
    --ink: #29382f;
    --muted: #59675e;
    --line: #c9d1c3;
    --blue: #235bd4;
    --wash: #e3ebfc;
    --quiet: #e5eadd;
    --danger: #a3362b;
    color-scheme: light;
    font-family: 'Golos Text', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    background: var(--paper);
    color: var(--ink);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
}

a {
    color: var(--blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    text-underline-offset: 5px;
}

button, input, textarea, select {
    font: inherit;
    color: inherit;
    border-radius: 4px;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: wait;
    opacity: .5;
}

button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}

h1, h2, h3, p {
    margin: 0;
    font-weight: 400;
}

h1 {
    font-size: 30px;
    line-height: 1.25;
    letter-spacing: -1px;
}

h2 {
    font-size: 23px;
    line-height: 1.35;
    letter-spacing: -.6px;
}

small {
    font-size: 14px;
}

strong {
    font-weight: 500;
}

input, textarea, select {
    min-width: 0;
    max-width: 100%;
    background: transparent;
    border: 1px solid var(--line);
    padding: 11px 12px;
    min-height: 48px;
}

select {
    background: var(--paper);
}

textarea {
    resize: vertical;
}

input[type='checkbox'] {
    width: 18px;
    height: 18px;
    min-height: 18px;
    accent-color: var(--blue);
}

input[type='color'] {
    width: 100%;
    padding: 4px;
}

.site-shell {
    max-width: 1440px;
    min-height: 100vh;
    margin: 0 auto;
    border-inline: 1px solid var(--line);
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    min-width: 0;
}

.chrome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 76px;
    padding: 0 27px;
    border-block: 1px solid var(--ink);
}

.brand {
    font-family: 'Golos Text', sans-serif;
    font-size: 24px;
    letter-spacing: -.5px;
    color: var(--ink);
    white-space: nowrap;
}

.brand span {
    font-size: 14px;
    letter-spacing: 0;
    color: var(--muted);
    margin-left: 14px;
}

.chrome nav {
    display: flex;
    align-items: center;
    gap: 23px;
    font-size: 14px;
}

.chrome nav a {
    color: var(--ink);
}

.chrome nav button {
    border: 0;
    background: transparent;
    padding: 12px 0;
    font-size: 14px;
}

.site-footer {
    padding: 23px 27px;
    min-height: 73px;
    border-top: 1px solid var(--ink);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    color: var(--muted);
    font-size: 14px;
}

.site-footer div {
    display: flex;
    gap: 24px;
}

.skip-link {
    position: absolute;
    top: -100px;
    padding: 12px;
    background: var(--paper);
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

.overline {
    color: var(--muted);
    font-size: 14px;
    text-transform: none;
    letter-spacing: 0;
}

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

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

.body-copy {
    font-family: 'Golos Text', sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: var(--muted);
}

.home-grid {
    display: grid;
    grid-template-columns: .93fr 1.07fr;
    min-height: 542px;
}

.home-copy {
    padding: 31px 27px 27px;
    border-right: 1px solid var(--line);
}

.hero-title {
    font-size: clamp(32px, 3vw, 40px);
    line-height: 1.16;
    letter-spacing: -1.4px;
    white-space: pre-line;
    margin-top: 15px;
    max-width: 590px;
}

.home-copy .body-copy {
    margin-top: 21px;
    max-width: 490px;
}

.home-plan {
    padding: 48px 27px 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 13px;
    margin-block: 22px 17px;
    font-size: 14px;
}

.button {
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 48px;
    padding: 11px 15px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    font-size: 14px;
    text-align: left;
}

.button:hover {
    border-color: var(--blue);
    text-decoration: none;
}

.button.primary {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

.text-link {
    border: 0;
    background: transparent;
    color: var(--blue);
    padding: 11px 0;
    text-align: left;
    min-height: 48px;
}

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

.spec-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    border-bottom: 1px solid var(--line);
    padding: 14px 0;
    font-size: 14px;
}

.spec-line small {
    color: var(--muted);
}

.spec-line span {
    text-align: right;
    overflow-wrap: anywhere;
}

.spec-line.long {
    display: block;
}

.spec-line.long small {
    display: block;
    margin-bottom: 10px;
}

.spec-line.long span {
    display: block;
    text-align: left;
    white-space: pre-wrap;
    font-family: 'Golos Text', sans-serif;
}

.band {
    padding: 22px 27px;
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid var(--line);
    font-size: 14px;
}

.drawing {
    width: 100%;
}

.drawing-head, .drawing-foot {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: var(--muted);
    font-size: 14px;
}

.dimension {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 15px;
    font-size: 14px;
    color: var(--muted);
}

.dimension::before, .dimension::after {
    content: '';
    flex: 1;
    height: 8px;
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.dimension::after {
    border-left: 0;
    border-right: 1px solid var(--line);
}

.kitchen {
    position: relative;
    aspect-ratio: 1.8;
    width: 100%;
    border-bottom: 1px solid var(--ink);
    margin-bottom: 12px;
}

.cab {
    position: absolute;
    background: var(--quiet);
    color: var(--ink);
    border: 1px solid currentColor;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 30px;
}

.cab span {
    font-size: 14px;
    border: 1px solid var(--line);
    background: var(--paper);
    padding: 2px 5px;
    z-index: 1;
}

.cab.selected {
    color: var(--blue);
    background: var(--wash);
}

.cab.selected span {
    border-color: var(--blue);
}

.cab:hover {
    background: var(--wash);
    color: var(--blue);
}

.tall {
    left: 0;
    top: 0;
    width: 16.667%;
    bottom: 4.5%;
}

.tall::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    border-top: 1px solid currentColor;
    opacity: .6;
}

.upper {
    top: 0;
    height: 32.8%;
    width: 27.777%;
}

.upper::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    border-left: 1px solid currentColor;
    opacity: .6;
}

.u1 {
    left: 16.667%;
}

.u2 {
    left: 44.444%;
}

.u3 {
    left: 72.221%;
}

.lower {
    bottom: 4.5%;
    height: 36.8%;
}

.l1 {
    left: 16.667%;
    width: 16.666%;
}

.l2 {
    left: 33.333%;
    width: 16.666%;
}

.l3 {
    left: 50%;
    width: 25%;
}

.l4 {
    left: 75%;
    width: 25%;
}

.worktop {
    position: absolute;
    left: 16.1%;
    width: 83.9%;
    bottom: 41.3%;
    height: 1.2%;
    min-height: 3px;
    background: var(--muted);
    border: 1px solid var(--ink);
    pointer-events: none;
    z-index: 2;
}

.plinth {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4.5%;
    background: var(--quiet);
    border-inline: 1px solid var(--line);
}

.record-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 17px 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    width: 100%;
    text-align: left;
    color: var(--ink);
    font-size: 14px;
}

.record-link small {
    display: block;
    color: var(--muted);
    font-family: 'Golos Text', sans-serif;
    margin-top: 6px;
}

.record-link > span:last-child {
    color: var(--blue);
}

.section-head {
    padding: 22px 27px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    border-bottom: 1px solid var(--line);
}

.section-head h1, .section-head h2 {
    margin-top: 6px;
    font-size: 25px;
}

.section-head > p {
    max-width: 280px;
    font: 16px/1.6 'Golos Text', sans-serif;
    color: var(--muted);
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    min-height: 450px;
}

.main-panel {
    padding: 25px 27px;
    min-width: 0;
}

.two-column > .main-panel {
    border-right: 1px solid var(--line);
}

.rail {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.rail h2 {
    margin-top: 0;
}

.rail .spec-line {
    display: block;
    padding-block: 11px;
}

.rail .spec-line span {
    display: block;
    text-align: left;
    margin-top: 5px;
}

.rail > a:not(.button) {
    font-size: 14px;
    padding-top: 8px;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.tabs > * {
    border: 0;
    background: transparent;
    padding: 12px 0;
    font-size: 14px;
}

.tabs button[aria-selected='true'] {
    color: var(--blue);
    border-bottom: 2px solid var(--blue);
}

.wardrobe {
    height: 310px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid var(--blue);
    background: var(--wash);
    margin-block: 25px;
}

.wardrobe > div {
    border-right: 1px solid var(--blue);
    display: grid;
    place-items: center;
    color: var(--blue);
    position: relative;
}

.wardrobe > div::before {
    content: '';
    position: absolute;
    top: 30%;
    border-bottom: 1px solid var(--blue);
    width: 100%;
}

.material-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--line);
}

.material-gallery article {
    padding: 27px;
    border-right: 1px solid var(--line);
}

.material-gallery h2 {
    font-size: 21px;
    margin-block: 12px;
}

.material-gallery small {
    color: var(--muted);
}

.swatch {
    width: 100%;
    height: 130px;
    border: 1px solid var(--line);
    margin-bottom: 15px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 22px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 18px;
}

.form-grid .field {
    margin-bottom: 0;
}

.field input, .field textarea, .field select {
    width: 100%;
    font-size: 16px;
    color: var(--ink);
}

.field input[type='checkbox'] {
    width: 20px;
}

.span-two {
    grid-column: 1 / -1;
}

.check {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 20px 0;
}

.auth-sheet {
    max-width: 460px;
    margin: 0 auto;
    padding: 62px 25px 80px;
    min-height: 630px;
}

.auth-sheet.wide {
    max-width: 610px;
}

.auth-sheet h1 {
    margin-block: 16px 22px;
    font-size: 34px;
}

.auth-sheet .body-copy {
    margin-block: 18px 28px;
}

.full-width {
    width: 100%;
}

.setup-link {
    display: block;
    border-top: 1px solid var(--line);
    padding-top: 16px;
    font-size: 14px;
}

.notice {
    margin: 18px 27px;
    border: 1px solid var(--line);
    display: flex;
    gap: 15px;
    align-items: center;
    padding: 14px 18px;
    background: var(--quiet);
    font-family: 'Golos Text', sans-serif;
}

.notice.error {
    color: var(--danger);
    border-color: var(--danger);
    background: transparent;
}

.notice.success {
    color: var(--blue);
    background: var(--wash);
    border-color: var(--blue);
}

.notice p {
    flex: 1;
}

.auth-sheet .notice, .modal .notice {
    margin-inline: 0;
}

.loading-line {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--blue), transparent);
    background-size: 50% 100%;
    animation: loading 1.4s linear infinite;
}

@keyframes loading {
    to {
        background-position: 200% 0;
    }
}

.empty-state {
    padding: 55px 27px;
    text-align: center;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    align-items: center;
    justify-content: center;
}

.empty-state p {
    max-width: 520px;
}

.empty-cross {
    font-size: 48px;
    line-height: 1;
    color: var(--line);
}

.all-sheets {
    padding: 26px 27px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    border-bottom: 1px solid var(--ink);
    background: var(--quiet);
}

.all-sheets h2 {
    font-size: 14px;
    color: var(--muted);
    text-transform: none;
    margin-bottom: 14px;
}

.all-sheets section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
}

.all-sheets section .muted {
    font-size: 14px;
}

.admin-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
}

.admin-sidebar {
    border-right: 1px solid var(--line);
    padding: 25px 22px;
}

.admin-sidebar h2 {
    font-size: 14px;
    text-transform: none;
    color: var(--muted);
    margin: 24px 0 8px;
}

.admin-sidebar a {
    display: block;
    padding: 7px 0;
    font-size: 16px;
    color: var(--ink);
}

.admin-sidebar a.active {
    color: var(--blue);
}

.admin-main {
    min-width: 0;
}

.toolbar {
    padding: 25px 27px;
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 25px;
    font-size: 14px;
    color: var(--muted);
}

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

.search-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 320px;
    width: 100%;
    font-size: 14px;
    color: var(--muted);
}

.search-field input {
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--ink);
    padding-inline: 0;
    font-size: 16px;
}

.table-scroll {
    overflow-x: auto;
    width: 100%;
}

.records-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.records-table th {
    text-align: left;
    font-size: 14px;
    font-weight: 400;
    text-transform: none;
    color: var(--muted);
    background: var(--quiet);
}

.records-table th, .records-table td {
    padding: 17px 20px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.records-table td {
    overflow-wrap: anywhere;
}

.records-table td small {
    display: block;
    max-width: 300px;
    color: var(--muted);
    margin-top: 7px;
}

.status-dot {
    width: 5px;
    height: 5px;
    display: inline-block;
    background: var(--blue);
    margin-right: 8px;
}

.status {
    font-size: 14px;
    color: var(--blue);
    border: 1px solid var(--line);
    padding: 6px 10px;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: #19252a66;
    z-index: 50;
    padding: 30px 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal {
    background: var(--paper);
    width: min(540px, 100%);
    max-height: 90dvh;
    overflow-y: auto;
    padding: 27px;
    border: 1px solid var(--ink);
}

.editor-modal {
    width: min(780px, 100%);
}

.modal h2 {
    margin-bottom: 22px;
}

.modal-head {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    align-items: start;
}

.modal-head h2 {
    margin-top: 8px;
}

.icon-button {
    border: 0;
    background: transparent;
    font-size: 28px;
    min-width: 44px;
    min-height: 48px;
}

.modal .notice {
    flex-wrap: wrap;
}

.upload {
    display: flex;
    flex-direction: column;
    gap: 15px;
    border: 1px dashed var(--line);
    padding: 20px;
    margin-top: 20px;
    font-size: 14px;
}

.upload input {
    border: 0;
    padding: 0;
    font-size: 14px;
}

.attachments {
    margin-top: 36px;
}

.attachments h2 {
    font-size: 20px;
    margin-bottom: 15px;
}

.document-page {
    padding: 40px 27px 70px;
    max-width: 950px;
    margin: auto;
}

.document-page h1, .document-page h2 {
    margin-block: 15px 28px;
}

.document-body {
    white-space: pre-wrap;
    font: 15px/1.9 'Golos Text', sans-serif;
    overflow-wrap: anywhere;
}

.registry {
    padding: 28px 27px 40px;
    min-height: 560px;
}

.registry-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 35px;
    margin-bottom: 35px;
}

.registry h1 {
    margin-top: 12px;
    font-size: 34px;
}

.register-rule {
    border-bottom: 1px solid var(--ink);
    display: flex;
    justify-content: space-between;
    padding-bottom: 12px;
    font-size: 14px;
    color: var(--muted);
}

.order-record {
    padding: 30px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 28px;
    border-bottom: 1px solid var(--ink);
    align-items: center;
}

.record-number {
    font-size: 24px;
    overflow-wrap: anywhere;
}

.order-record h2 {
    font-size: 23px;
    margin-bottom: 10px;
}

.inline-links {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
    border-top: 1px solid var(--line);
    margin-top: 18px;
    padding-top: 14px;
    font-size: 14px;
}

.record-money {
    text-align: right;
}

.record-money small {
    display: block;
    color: var(--muted);
    margin-block: 6px 15px;
}

.order-identity {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 25px;
    padding: 22px 27px;
}

.order-identity h1 {
    font-size: 30px;
    letter-spacing: -.7px;
    margin-top: 8px;
}

.client-identity {
    text-align: right;
    font-size: 14px;
}

.client-identity small {
    display: block;
    margin-top: 7px;
    color: var(--muted);
}

.order-context {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    border-block: 1px solid var(--line);
}

.order-context > div {
    padding: 12px 27px;
    border-right: 1px solid var(--line);
    font-size: 14px;
}

.order-context small {
    color: var(--muted);
    display: block;
    margin-bottom: 7px;
}

.order-context span {
    font-size: 14px;
    color: var(--muted);
}

.sheet-nav {
    display: flex;
    flex-wrap: wrap;
    padding: 0 27px;
    gap: 27px;
    border-bottom: 1px solid var(--ink);
}

.sheet-nav a {
    padding: 13px 0;
    color: var(--ink);
    font-size: 14px;
}

.sheet-nav a.active {
    color: var(--blue);
    border-bottom: 2px solid var(--blue);
}

.sheet-nav small {
    font-size: 14px;
    margin-right: 6px;
}

.sheet-selector {
    padding: 12px 27px;
    border-bottom: 1px solid var(--line);
}

.sheet-selector label {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    color: var(--muted);
}

.sheet-selector select {
    border: 0;
    color: var(--blue);
    font-size: 16px;
    min-height: 32px;
    padding: 5px;
}

.drawing-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
}

.drawing-panel {
    padding: 23px 27px;
    border-right: 1px solid var(--line);
}

.drawing-panel .tabs {
    margin-top: 20px;
    margin-bottom: 0;
    border-top: 1px solid var(--line);
    border-bottom: 0;
    font-size: 14px;
}

.related-sheets {
    flex-wrap: wrap;
    justify-content: start;
    gap: 20px 30px;
}

.payment-layout {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
}

.money-column {
    border-right: 1px solid var(--line);
    padding: 25px 27px;
}

.money-value {
    font-size: 34px;
    line-height: 1.3;
    letter-spacing: -1px;
    margin-block: 12px 23px;
}

.due {
    color: var(--blue);
    margin-top: 38px;
}

.cost-row {
    padding: 17px 0;
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 15px;
    color: var(--ink);
}

.cost-row small {
    display: block;
    color: var(--muted);
    margin-top: 7px;
}

.cost-row > span {
    color: var(--muted);
    font-size: 14px;
}

.total-line {
    border-top: 1px solid var(--ink);
    margin-block: 12px 22px;
    padding-top: 18px;
    display: flex;
    justify-content: space-between;
    font-size: 17px;
}

.batch-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 25px;
    border-bottom: 1px solid var(--line);
    padding: 27px 0;
}

.batch-row small {
    display: block;
    color: var(--muted);
    font-size: 14px;
    margin-top: 7px;
}

.route-steps {
    display: flex;
    gap: 6px;
    align-items: start;
    flex-wrap: wrap;
}

.route-steps a {
    flex: 1;
    min-width: 90px;
    color: var(--muted);
    border-top: 2px solid var(--line);
    padding-top: 12px;
    font-size: 14px;
}

.route-steps a.done {
    border-color: var(--blue);
    color: var(--blue);
}

.room-plan {
    height: 340px;
    border: 2px solid var(--ink);
    position: relative;
    margin: 20px 15px 35px;
    display: grid;
    place-items: center;
}

.room-plan span {
    text-align: center;
}

.room-plan small {
    display: block;
    color: var(--muted);
    margin-top: 7px;
}

.room-kitchen {
    position: absolute;
    top: 0;
    left: 0;
    right: 15%;
    height: 65px;
    border: 1px solid var(--blue);
    background: repeating-linear-gradient(90deg, var(--wash) 0, var(--wash) 16%, var(--blue) 16.1%, var(--wash) 16.4%);
}

.room-door {
    position: absolute;
    bottom: -2px;
    left: 30px;
    height: 65px;
    width: 65px;
    border: 1px dashed var(--muted);
    border-bottom-color: var(--paper);
    border-radius: 100% 0 0;
}

.conversation {
    padding: 27px;
    max-width: 920px;
    margin: auto;
}

.message {
    border-left: 2px solid var(--line);
    padding: 13px 18px;
    margin-bottom: 20px;
    max-width: 85%;
}

.message.own {
    border-color: var(--blue);
    margin-left: auto;
    background: var(--wash);
}

.message small {
    color: var(--muted);
}

.message p {
    white-space: pre-wrap;
    font: 16px/1.7 'Golos Text', sans-serif;
    margin-top: 8px;
}

.conversation form {
    border-top: 1px solid var(--line);
    padding-top: 25px;
    margin-top: 35px;
}

.spaced {
    margin-block: 40px 20px;
}

.validation-errors, .validation-message {
    color: var(--danger);
    font-size: 14px;
    margin-bottom: 20px;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--paper);
    border-top: 1px solid var(--danger);
    z-index: 100;
    padding: 15px 25px;
}

#blazor-error-ui .dismiss {
    float: right;
    cursor: pointer;
}

/* Обзор показывает состояние и действие до схемы мебели на любом экране. */
h1, h2, h3 {
    font-weight: 500;
}

.home-copy .spec-line {
    font-size: 16px;
}

.order-overview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    border-bottom: 1px solid var(--line);
}

.overview-status {
    padding: 28px 27px;
    min-width: 0;
}

.overview-status h2 {
    margin: 12px 0;
    font-size: 27px;
}

.overview-status .body-copy {
    max-width: 630px;
}

.overview-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 28px;
}

.overview-step {
    border-top: 2px solid var(--line);
    padding-top: 12px;
    color: var(--muted);
    font-size: 15px;
}

.overview-step.complete, .overview-step.current {
    border-color: var(--blue);
    color: var(--blue);
}

.overview-step small {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    color: var(--muted);
}

.next-action {
    padding: 25px;
    background: var(--wash);
    border-left: 1px solid var(--line);
}

.next-action h2 {
    font-size: 22px;
    margin: 10px 0;
}

.next-action .body-copy, .payment-note {
    font-size: 14px;
    line-height: 1.6;
}

.next-action .money-value {
    margin: 12px 0;
}

.payment-note {
    margin-top: 12px;
    color: var(--muted);
}

.next-action .button {
    width: 100%;
    margin: 18px 0 12px;
}

.next-action > a:last-child {
    font-size: 14px;
}

.order-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 25px;
    padding: 16px 27px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    color: var(--muted);
}

.order-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-block: 1px solid var(--line);
}

.order-links a {
    padding: 22px 27px;
    border-right: 1px solid var(--line);
}

.order-links a:last-child {
    border-right: 0;
}

.order-links small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    line-height: 1.5;
}

.technical-details {
    border-top: 1px solid var(--line);
    margin-top: 20px;
    font-size: 13px;
    color: var(--muted);
}

summary {
    cursor: pointer;
    color: var(--blue);
    padding: 12px 0;
    min-height: 48px;
    font-size: 14px;
}

summary:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}

.module-key {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
    margin-top: 15px;
}

.extra-sections {
    padding: 8px 27px;
}

.related-sheets {
    display: flex;
    padding: 8px 0 18px;
    font-size: 14px;
}

.technical-cost {
    grid-template-columns: 80px minmax(0, 1fr) auto;
}

.drawing-head, .drawing-foot, .dimension {
    font-size: 13px;
}

.cab {
    border-radius: 0;
}

.cab span {
    font-size: 13px;
}

.work-guidance {
    padding: 18px 27px;
    background: var(--wash);
    border-bottom: 1px solid var(--line);
}

.work-guidance p {
    margin-top: 6px;
    font-size: 14px;
    color: var(--muted);
}

@media (min-width: 1200px) {
    .home-grid {
        min-height: 630px;
    }
    .home-copy {
        padding: 50px 40px;
    }
    .home-plan {
        padding: 55px 40px;
    }
}

@media (max-width: 760px) {
    .order-overview {
        grid-template-columns: 1fr;
    }
    .overview-status {
        padding: 24px 17px;
    }
    .overview-status h2 {
        font-size: 25px;
    }
    .overview-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
    .next-action {
        padding: 22px 17px;
        border-left: 0;
        border-top: 1px solid var(--line);
    }
    .order-links {
        grid-template-columns: 1fr;
    }
    .order-links a {
        padding: 18px 17px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
    .order-links a:last-child {
        border-bottom: 0;
    }
    .extra-sections, .order-breadcrumb, .work-guidance {
        padding-inline: 17px;
    }
    .order-identity {
        flex-wrap: wrap;
        gap: 10px;
    }
    .client-identity {
        text-align: left;
        max-width: none !important;
    }
    .sheet-nav a {
        min-height: 48px;
        padding-inline: 2px;
    }
    .technical-cost {
        grid-template-columns: 50px minmax(0, 1fr) auto !important;
    }
    .admin-main .records-table {
        min-width: 0;
    }
    .admin-main .records-table thead {
        display: none;
    }
    .admin-main .records-table tr {
        display: block;
        padding: 15px 17px;
        border-bottom: 1px solid var(--line);
    }
    .admin-main .records-table td {
        display: block;
        padding: 6px 0;
        border: 0;
    }
    .admin-main .records-table td[data-label]::before {
        content: attr(data-label);
        display: block;
        color: var(--muted);
        font-size: 13px;
    }
    .chrome {
        padding: 0 17px;
        gap: 12px;
        min-height: 66px;
    }
    .brand {
        font-size: 23px;
        letter-spacing: -.5px;
    }
    .brand span, .desktop-link {
        display: none;
    }
    .chrome nav {
        gap: 16px;
    }
    .site-shell {
        border: 0;
    }
    .home-grid {
        display: block;
    }
    .home-copy {
        border-right: 0;
        padding: 27px 17px;
    }
    .hero-title {
        font-size: 35px;
        max-width: 440px;
        line-height: 1.17;
    }
    .home-copy .body-copy {
        font-size: 16px;
    }
    .home-plan {
        padding: 27px 17px;
        border-top: 1px solid var(--line);
    }
    .band, .site-footer {
        padding: 20px 17px;
        flex-wrap: wrap;
    }
    .section-head {
        padding: 20px 17px;
        align-items: start;
        flex-wrap: wrap;
        gap: 15px;
    }
    .section-head h1, .section-head h2 {
        font-size: 23px;
    }
    .section-head > p {
        max-width: none;
    }
    .two-column, .drawing-layout, .payment-layout {
        display: block;
    }
    .main-panel, .drawing-panel, .money-column {
        padding: 22px 17px;
        border-right: 0 !important;
    }
    .rail {
        border-top: 1px solid var(--line);
        padding: 25px 17px;
    }
    .rail .button {
        width: 100%;
    }
    .material-gallery {
        grid-template-columns: 1fr;
    }
    .material-gallery article {
        border-bottom: 1px solid var(--line);
        padding: 22px 17px;
    }
    .material-gallery .swatch {
        height: 100px;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .span-two {
        grid-column: auto;
    }
    .field input, .field textarea, .field select {
        font-size: 16px;
    }
    .admin-layout {
        display: block;
    }
    .admin-sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--line);
        display: flex;
        overflow-x: auto;
        gap: 22px;
        padding: 12px 17px;
    }
    .admin-sidebar h2, .admin-sidebar .overline {
        display: none;
    }
    .admin-sidebar a {
        flex-shrink: 0;
    }
    .toolbar {
        padding: 20px 17px;
    }
    .records-table {
        min-width: 600px;
    }
    .records-table th, .records-table td {
        padding: 15px;
    }
    .all-sheets {
        padding: 25px 17px;
        grid-template-columns: 1fr 1fr;
        gap: 25px 15px;
    }
    .notice {
        margin: 15px 17px;
        font-size: 16px;
    }
    .modal-backdrop {
        padding: 12px;
    }
    .modal {
        padding: 20px;
        max-height: 94dvh;
    }
    .registry {
        padding: 24px 17px 35px;
    }
    .registry-head {
        display: block;
    }
    .registry h1 {
        font-size: 30px;
        margin-bottom: 25px;
    }
    .order-record {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 25px 0;
    }
    .record-money {
        display: flex;
        flex-wrap: wrap;
        gap: 10px 20px;
        align-items: center;
        text-align: left;
    }
    .record-money small {
        margin: 0;
    }
    .order-identity {
        padding: 20px 17px;
    }
    .order-identity h1 {
        font-size: 27px;
        letter-spacing: -.6px;
        overflow-wrap: anywhere;
    }
    .client-identity {
        font-size: 14px;
        max-width: 45%;
    }
    .order-context {
        grid-template-columns: 1fr 1fr;
    }
    .order-context > div {
        padding: 11px 17px;
        font-size: 14px;
    }
    .order-context > div:first-child {
        grid-column: 1 / -1;
        border-bottom: 1px solid var(--line);
    }
    .order-context small {
        font-size: 14px;
    }
    .sheet-nav {
        display: flex;
        padding: 0 17px;
        gap: 0;
        justify-content: space-between;
    }
    .sheet-selector {
        padding: 6px 17px;
        border-bottom: 1px solid var(--ink);
    }
    .sheet-selector select {
        font-size: 16px;
        min-height: 48px;
    }
    .drawing-head {
        font-size: 14px;
    }
    .drawing-head span:last-child {
        text-align: right;
        max-width: 120px;
    }
    .cab span {
        font-size: 14px;
        padding: 1px 3px;
    }
    .drawing-foot {
        font-size: 14px;
    }
    .batch-row {
        grid-template-columns: 70px 1fr;
        gap: 12px;
    }
    .route-steps {
        gap: 15px 6px;
    }
    .cost-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
        font-size: 14px;
    }
    .related-sheets {
        gap: 15px 25px;
    }
    .conversation {
        padding: 22px 17px;
    }
    .message {
        max-width: 95%;
    }
    .auth-sheet {
        padding: 40px 22px 65px;
        min-height: 580px;
    }
    .auth-sheet h1 {
        font-size: 30px;
    }
    .spec-line {
        gap: 18px;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --paper: #19252a;
        --ink: #e4ede4;
        --muted: #b3c1b7;
        --line: #455b50;
        --blue: #a0bdff;
        --wash: #293f58;
        --quiet: #25392e;
        --danger: #ffa99d;
        color-scheme: dark;
    }
    .button.primary {
        color: #19252a;
    }
}

@media (prefers-reduced-motion: reduce) {
    .loading-line {
        animation: none;
        background: var(--blue);
    }
}

/* Заголовок получает программный фокус при навигации;
рамки нужны элементам управления. */
h1[tabindex="-1"]:focus {
    outline: none;
}
