:root {
    --bg: #f6f3ed;
    --panel: #ffffff;
    --ink: #252322;
    --muted: #70675f;
    --line: #ded8cf;
    --primary: #9b5d38;
    --primary-dark: #6f3f25;
    --success: #087f5b;
    --warning: #9a5b00;
    --danger: #b42318;
    --sage: #416b5a;
    --signal: #2f5d8c;
    --paper: #f4f1eb;
    --panel-warm: #fffdf9;
    --surface: #ebe4da;
    --shadow: 0 16px 40px rgba(37, 35, 34, 0.09);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

a {
    color: inherit;
}

.app-body {
    background: var(--paper);
}

.topbar {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 14px max(28px, calc((100vw - 1180px) / 2));
    background: rgba(255, 253, 249, 0.96);
    border-bottom: 1px solid rgba(112, 103, 95, 0.2);
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    display: inline-flex;
    align-items: center;
    min-width: 154px;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: 0;
}

.brand img {
    width: 154px;
    height: auto;
    display: block;
}

.nav {
    display: flex;
    gap: 4px;
}

.nav a {
    color: var(--muted);
    text-decoration: none;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 800;
}

.nav a.active,
.nav a:hover {
    color: var(--ink);
    background: var(--surface);
}

.logout-form {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.page {
    width: min(1180px, calc(100% - 32px));
    margin: 38px auto 70px;
}

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

.section-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    min-width: min(100%, 560px);
}

.dashboard-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 360px;
    justify-content: flex-end;
}

.dashboard-search input[type="search"] {
    width: min(100%, 360px);
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 12px;
    font: inherit;
    color: var(--ink);
    background: #fffdf9;
}

.dashboard-search input[type="search"]:focus {
    outline: 3px solid #ead8ca;
    border-color: var(--primary);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.section-intro {
    max-width: 650px;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 16px;
}

.app-section-head {
    padding-bottom: 8px;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0;
    letter-spacing: 0;
}

h1 {
    font-size: 34px;
    line-height: 1.12;
}

h2 {
    font-size: 20px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    color: var(--ink);
    text-decoration: none;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    font-size: 14px;
}

.button:hover {
    border-color: #c8b6a7;
    background: #fffaf4;
}

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

.button.primary:hover {
    border-color: var(--primary-dark);
    background: var(--primary-dark);
}

.button.ghost {
    background: transparent;
}

.button.ghost:hover {
    background: #f7eee7;
}

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

.button.small {
    min-height: 34px;
    padding-inline: 10px;
    font-size: 13px;
}

.button.full {
    width: 100%;
}

.flash {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 18px;
    border: 1px solid var(--line);
    background: var(--panel-warm);
    font-weight: 700;
}

.flash.success {
    color: var(--success);
    border-color: #a7f3d0;
    background: #ecfdf5;
}

.flash.error {
    color: var(--danger);
    border-color: #fecaca;
    background: #fff1f2;
}

.login-panel {
    min-height: calc(100vh - 170px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    align-items: center;
    gap: 42px;
}

.login-copy {
    display: grid;
    gap: 12px;
}

.login-copy h1 {
    max-width: 690px;
    font-size: 54px;
}

.login-copy p:not(.eyebrow) {
    max-width: 560px;
    color: var(--muted);
    font-size: 18px;
}

.form-panel,
.side-panel,
.empty-state,
.table-wrap {
    background: var(--panel-warm);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(37, 35, 34, 0.07);
}

.form-panel,
.side-panel,
.empty-state {
    padding: 24px;
}

.form-panel {
    display: grid;
    gap: 16px;
}

.form-section {
    display: grid;
    gap: 14px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.form-section:last-of-type {
    border-bottom: 0;
    padding-bottom: 0;
}

.form-section h2 {
    margin-bottom: 0;
}

.form-grid {
    display: grid;
    gap: 12px;
}

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

label {
    display: grid;
    gap: 7px;
    color: var(--ink);
    font-weight: 800;
}

.field-group {
    display: grid;
    gap: 8px;
}

.field-label {
    color: var(--ink);
    font-weight: 800;
}

.ean-list {
    display: grid;
    gap: 8px;
}

.field-help {
    margin: -2px 0 0;
    color: var(--muted);
    font-size: 13px;
}

input[type="text"],
input[type="url"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
    color: var(--ink);
    background: #fffdf9;
}

input[type="text"],
input[type="url"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
select {
    min-height: 44px;
    padding: 0 12px;
}

textarea {
    min-height: 150px;
    padding: 12px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: 3px solid #ead8ca;
    border-color: var(--primary);
}

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.check-row input {
    width: 18px;
    height: 18px;
}

.choice-panel {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 16px;
    border: 1px solid #d8cabc;
    border-radius: 8px;
    background: #fbf7f1;
}

.choice-panel legend {
    padding: 0 6px;
    font-weight: 900;
}

.source-field {
    padding-left: 28px;
}

.source-field[hidden] {
    display: none;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    background: #f8f5ef;
    font-size: 12px;
    text-transform: uppercase;
}

tbody tr:hover td {
    background: #fffaf4;
}

td small,
.muted {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.muted-link {
    display: block;
    max-width: 560px;
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-col {
    width: 48%;
}

.product-summary {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-width: 360px;
}

.product-thumb {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8f5ef;
    color: inherit;
    text-decoration: none;
}

.product-thumb:hover {
    border-color: var(--primary);
}

.product-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.product-thumb.is-empty {
    padding: 8px;
    color: var(--muted);
    background: #ebe4da;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
}

.product-copy {
    min-width: 0;
}

.product-copy strong {
    display: block;
    margin-bottom: 3px;
    overflow-wrap: anywhere;
}

.product-title-link {
    color: var(--ink);
    text-decoration: none;
}

.product-title-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

code {
    display: inline-block;
    max-width: 260px;
    overflow-wrap: anywhere;
    padding: 3px 6px;
    border-radius: 6px;
    background: #ebe4da;
    color: var(--ink);
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    color: var(--muted);
    background: #ebe4da;
}

.badge.ok,
.badge.initial,
.badge.unchanged {
    color: var(--success);
    background: #e3f3ec;
}

.badge.changed {
    color: var(--warning);
    background: #f8ead8;
}

.badge.danger,
.badge.error {
    color: var(--danger);
    background: #fee2e2;
}

.actions-col {
    width: 58px;
}

.action-buttons,
.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.actions-cell {
    text-align: right;
}

.action-buttons {
    align-items: center;
    justify-content: flex-end;
}

.action-buttons form {
    margin: 0;
}

.icon-button {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fffdf9;
    color: var(--ink);
    cursor: pointer;
    text-decoration: none;
}

.icon-button:hover {
    border-color: #c8b6a7;
    background: #fffaf4;
}

.icon-button.ghost {
    background: transparent;
}

.icon-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
    gap: 20px;
    align-items: start;
}

.installer-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
    gap: 20px;
    align-items: start;
}

.installer-form {
    gap: 22px;
}

.installer-help ul {
    margin: 0;
    padding-left: 20px;
    color: var(--muted);
}

.installer-help li + li {
    margin-top: 7px;
}

.side-panel {
    display: grid;
    gap: 18px;
}

.meta-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.meta-list div {
    display: grid;
    gap: 2px;
}

.meta-list dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.meta-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.history {
    margin-top: 28px;
}

.history h2 {
    margin-bottom: 14px;
}

.compact-head {
    margin-bottom: 14px;
}

.compact-head h2 {
    margin-bottom: 0;
}

.log-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    gap: 20px;
    align-items: start;
    margin-bottom: 18px;
}

.filter-panel {
    align-content: start;
}

.period-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.period-link {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
}

.period-link.active,
.period-link:hover {
    color: var(--primary);
    border-color: #dfc3ad;
    background: #f7eee7;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
    gap: 12px;
    align-items: end;
}

.manual-log-panel h2 {
    margin-bottom: 0;
}

.log-table table {
    min-width: 720px;
}

.empty-state {
    display: grid;
    gap: 12px;
    justify-items: start;
}

.system-panel {
    display: grid;
    gap: 12px;
    margin-bottom: 22px;
    padding: 18px;
    border: 1px solid #3a3531;
    border-radius: 8px;
    background: #252322;
    color: #fffdf9;
    box-shadow: 0 18px 46px rgba(37, 35, 34, 0.14);
}

.system-panel .eyebrow {
    color: #d9a77f;
}

.system-panel code {
    background: rgba(255, 255, 255, 0.08);
    color: #fffdf9;
}

.cron-url {
    max-width: 100%;
    overflow-wrap: anywhere;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
}

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

pre {
    width: 100%;
    overflow: auto;
    padding: 14px;
    border-radius: 8px;
    background: #111827;
    color: #f9fafb;
}

@media (max-width: 860px) {
    .topbar {
        position: static;
        flex-wrap: wrap;
        padding: 16px;
    }

    .nav {
        order: 3;
        width: 100%;
    }

    .logout-form {
        margin-left: 0;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .section-head,
    .login-panel,
    .split-layout,
    .installer-layout,
    .form-grid.two,
    .log-layout,
    .filter-grid {
        grid-template-columns: 1fr;
    }

    .section-head {
        align-items: start;
    }

    .section-actions,
    .dashboard-search {
        width: 100%;
        justify-content: flex-start;
    }

    .login-copy h1 {
        font-size: 38px;
    }

    h1 {
        font-size: 30px;
    }
}

@media (max-width: 560px) {
    .page {
        width: min(100% - 20px, 1180px);
        margin-top: 22px;
    }

    .topbar {
        gap: 12px;
    }

    .button {
        width: 100%;
    }

    .dashboard-search {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-search input[type="search"] {
        width: 100%;
    }

    .action-buttons .button,
    .action-buttons form,
    .button-row .button,
    .button-row form {
        width: 100%;
    }
}

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

.preview-result {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbf7f1;
    font-size: 14px;
    line-height: 1.5;
}

.preview-result.ok {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.preview-result.error {
    border-color: #fecaca;
    background: #fef2f2;
    color: var(--danger);
}

.preview-result.error .preview-guidance {
    color: var(--ink);
}

.preview-result div + div {
    margin-top: 4px;
}

.preview-image {
    width: 96px;
    height: 96px;
    display: block;
    margin-bottom: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    object-fit: cover;
    background: #f8f5ef;
}

.price-chart {
    width: 100%;
    height: auto;
    margin-bottom: 8px;
}

.price-chart .chart-line {
    fill: none;
    stroke: var(--primary);
    stroke-width: 2;
}

.price-chart .chart-area {
    fill: rgba(155, 93, 56, 0.11);
    stroke: none;
}

.price-chart .chart-dot {
    fill: var(--primary);
}

.chart-meta {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 14px;
}

.chart-panel {
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-warm);
    box-shadow: 0 12px 32px rgba(37, 35, 34, 0.07);
}

.chart-meta strong {
    color: var(--ink);
}

.form-footnote {
    margin: 14px 0 0;
    font-size: 14px;
    color: var(--muted);
    text-align: center;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 26px;
}

.plan-card {
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.plan-card-highlight {
    border-color: var(--primary);
}

.plan-card h3 {
    margin: 0 0 12px;
    font-size: 18px;
}

.plan-card ul {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.plan-card strong {
    color: var(--ink);
}

.plan-usage {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fffdf9;
    color: var(--muted);
    font-size: 14px;
}

.app-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.app-metrics article {
    min-height: 122px;
    display: grid;
    align-content: center;
    gap: 4px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-warm);
    box-shadow: 0 12px 32px rgba(37, 35, 34, 0.07);
}

.app-metrics article:nth-child(2) {
    border-color: rgba(65, 107, 90, 0.32);
}

.app-metrics article:nth-child(3) {
    border-color: rgba(47, 93, 140, 0.28);
}

.app-metrics article.has-warning {
    border-color: rgba(180, 35, 24, 0.34);
}

.app-metrics span,
.app-metrics small {
    color: var(--muted);
    font-size: 13px;
}

.app-metrics span {
    font-weight: 900;
    text-transform: uppercase;
}

.app-metrics strong {
    color: var(--ink);
    font-size: 34px;
    line-height: 1;
}

.plan-usage .badge {
    background: #f1e7de;
    color: var(--primary-dark);
}

.inline-form {
    margin: 0;
}

.inline-form select {
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    font: inherit;
}

.dashboard-filters {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fffdf9;
    box-shadow: 0 12px 32px rgba(37, 35, 34, 0.05);
}

.filter-group {
    display: grid;
    gap: 8px;
}

.filter-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.filter-chips,
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel-warm);
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.chip:hover {
    border-color: var(--primary);
    background: #fffaf4;
}

.chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.chip-count {
    min-width: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(23, 32, 51, 0.08);
    font-size: 12px;
    text-align: center;
}

.chip.active .chip-count {
    background: rgba(255, 255, 255, 0.25);
}

.badge.category-badge {
    background: #f1e7de;
    color: var(--primary-dark);
}

.compact-table table {
    min-width: 900px;
}

.history {
    padding-top: 10px;
}

.login-panel .form-panel {
    border-color: #d4cabd;
}

.public-body {
    background: var(--paper);
}

.public-header {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 14px max(28px, calc((100vw - 1180px) / 2));
    border-bottom: 1px solid rgba(112, 103, 95, 0.2);
    background: rgba(244, 241, 235, 0.96);
    position: sticky;
    top: 0;
    z-index: 20;
}

.public-brand {
    display: inline-flex;
    align-items: center;
    min-width: 170px;
}

.public-brand img {
    width: 168px;
    height: auto;
    display: block;
}

.public-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.public-nav a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
}

.public-nav a:hover,
.public-nav a.active {
    color: var(--ink);
    background: #ebe4da;
}

.public-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.public-main {
    overflow: hidden;
}

.public-main > .flash {
    width: min(1120px, calc(100% - 32px));
    margin: 20px auto 0;
}

.public-hero,
.subpage-hero,
.public-section,
.public-band,
.public-cta,
.faq-section,
.contact-layout,
.checkout-page {
    width: min(1180px, calc(100% - 32px));
    margin-inline: auto;
}

.public-hero {
    min-height: calc(88vh - 76px);
    display: grid;
    align-content: center;
    gap: 24px;
    padding: 70px 0 42px;
}

.hero-kicker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-kicker span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fffaf4;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.public-hero h1 {
    max-width: 760px;
    font-size: 82px;
    line-height: 0.98;
}

.hero-lead {
    max-width: 760px;
    margin: 0;
    color: #514a44;
    font-size: 21px;
    line-height: 1.55;
}

.hero-actions,
.checkout-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-preview {
    display: grid;
    gap: 18px;
    margin-top: 28px;
    padding: 18px;
    border: 1px solid #d6cec3;
    border-radius: 8px;
    background: #fffdf9;
    box-shadow: 0 22px 70px rgba(37, 35, 34, 0.13);
}

.preview-toolbar,
.preview-table > div,
.preview-grid {
    display: grid;
    gap: 12px;
}

.preview-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.preview-toolbar span,
.preview-stat span,
.preview-stat small {
    color: var(--muted);
    font-size: 13px;
}

.preview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.preview-stat {
    min-height: 118px;
    display: grid;
    align-content: center;
    gap: 4px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8f5ef;
}

.preview-stat strong {
    font-size: 34px;
}

.preview-table {
    display: grid;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.preview-table > div {
    grid-template-columns: 1.4fr 1fr 0.8fr 0.8fr;
    align-items: center;
    min-height: 48px;
    padding: 0 14px;
    border-bottom: 1px solid var(--line);
    background: #fff;
    font-size: 14px;
}

.preview-table > div:first-child {
    min-height: 38px;
    color: var(--muted);
    background: #f8f5ef;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.preview-table > div:last-child {
    border-bottom: 0;
}

.preview-table .down {
    color: var(--success);
    font-weight: 900;
}

.preview-table .up {
    color: var(--signal);
    font-weight: 900;
}

.preview-table i {
    width: 7px;
    height: 7px;
    display: inline-block;
    margin-right: 7px;
    border-radius: 999px;
    background: var(--primary);
}

.subpage-hero {
    display: grid;
    gap: 14px;
    padding: 76px 0 44px;
}

.subpage-hero h1 {
    max-width: 850px;
    font-size: 52px;
    line-height: 1.06;
}

.subpage-hero p:not(.eyebrow) {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-size: 19px;
}

.public-section,
.faq-section {
    padding: 54px 0;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.22fr);
    gap: 56px;
    align-items: start;
}

.public-section h2,
.public-band h2,
.public-cta h2,
.faq-section h2,
.checkout-page h1 {
    font-size: 32px;
    line-height: 1.16;
}

.section-copy {
    display: grid;
    gap: 14px;
    color: var(--muted);
    font-size: 17px;
}

.section-copy p {
    margin: 0;
}

.answer-section {
    padding-top: 28px;
}

.answer-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
    gap: 24px;
    align-items: start;
}

.answer-copy {
    display: grid;
    gap: 14px;
    color: var(--muted);
    font-size: 17px;
}

.answer-copy p {
    margin: 0;
}

.fact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.fact-grid div,
.use-case-grid article {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fffdf9;
    box-shadow: 0 12px 32px rgba(37, 35, 34, 0.07);
}

.fact-grid div {
    min-height: 126px;
    padding: 16px;
}

.fact-grid dt {
    margin-bottom: 7px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.fact-grid dd {
    margin: 0;
    color: #514a44;
    font-size: 15px;
    line-height: 1.45;
}

.section-headline {
    display: grid;
    gap: 8px;
    max-width: 760px;
    margin-bottom: 26px;
}

.process-grid,
.feature-grid,
.strategy-grid,
.use-case-grid,
.faq-grid,
.pricing-grid {
    display: grid;
    gap: 16px;
}

.process-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.use-case-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.process-grid article,
.feature-card,
.strategy-grid article,
.use-case-grid article,
.faq-grid article,
.pricing-card,
.contact-form,
.contact-aside,
.checkout-panel,
.checkout-note {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fffdf9;
    box-shadow: 0 12px 32px rgba(37, 35, 34, 0.07);
}

.process-grid article,
.strategy-grid article,
.use-case-grid article,
.faq-grid article {
    padding: 20px;
}

.process-grid span {
    color: var(--primary);
    font-size: 13px;
    font-weight: 900;
}

.process-grid h3,
.feature-card h2,
.strategy-grid h3,
.use-case-grid h3,
.faq-grid h3,
.pricing-card h2,
.pricing-card h3,
.contact-aside h2,
.checkout-note h2 {
    margin: 8px 0 8px;
    font-size: 18px;
}

.process-grid p,
.feature-card li,
.strategy-grid p,
.use-case-grid p,
.faq-grid p,
.pricing-card p,
.contact-aside p,
.contact-points dd,
.checkout-panel p,
.checkout-note li {
    color: var(--muted);
}

.process-grid p,
.strategy-grid p,
.use-case-grid p,
.faq-grid p,
.pricing-card p,
.contact-aside p,
.checkout-panel p {
    margin: 0;
}

.answer-faq .faq-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.public-band,
.public-cta {
    display: grid;
    gap: 22px;
    padding: 34px;
    border: 1px solid #d4cabd;
    border-radius: 8px;
    background: #252322;
    color: #fffdf9;
}

.public-band .eyebrow,
.public-cta .eyebrow {
    color: #d9a77f;
}

.public-band h2,
.public-cta h2 {
    max-width: 620px;
}

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

.band-list span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #f4f1eb;
    font-size: 14px;
    font-weight: 800;
}

.public-band .button,
.public-cta .button {
    width: max-content;
    border-color: #d9a77f;
    background: #d9a77f;
    color: #252322;
}

.feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card {
    padding: 22px;
}

.feature-card ul,
.pricing-card ul,
.checkout-note ul {
    margin: 12px 0 0;
    padding-left: 20px;
    line-height: 1.7;
}

.scenario-list {
    display: grid;
    gap: 14px;
}

.scenario-list article {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.scenario-list article:last-child {
    border-bottom: 0;
}

.scenario-list h3 {
    margin: 0 0 4px;
}

.scenario-list p {
    margin: 0;
    color: var(--muted);
}

.pricing-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
}

.compact-pricing {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pricing-card {
    display: grid;
    gap: 18px;
    align-content: start;
    padding: 22px;
    position: relative;
}

.pricing-card.is-highlighted {
    border-color: var(--primary);
    box-shadow: 0 18px 46px rgba(155, 93, 56, 0.16);
}

.pricing-label {
    width: max-content;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 0 9px;
    border-radius: 999px;
    background: #f1e7de;
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 900;
}

.price-line {
    display: grid;
    gap: 2px;
}

.price-line strong {
    font-size: 32px;
    line-height: 1;
}

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

.price-line .price-secondary {
    font-size: 13px;
    opacity: 0.85;
}

.pricing-summary {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.comparison-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fffdf9;
}

.comparison-table {
    min-width: 820px;
    background: transparent;
}

.comparison-table th {
    color: var(--muted);
}

.comparison-table tbody th {
    color: var(--ink);
    font-size: 14px;
    text-transform: none;
}

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

.identity-panel {
    display: grid;
    gap: 18px;
}

.logo-spec {
    display: grid;
    place-items: center start;
    min-height: 130px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fffdf9;
}

.logo-spec img {
    width: min(340px, 100%);
    height: auto;
}

.swatches {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.swatches span {
    min-height: 92px;
    display: flex;
    align-items: end;
    padding: 10px;
    border-radius: 8px;
    background: var(--swatch);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.swatches span:nth-child(3) {
    color: var(--ink);
}

.identity-panel p {
    margin: 0;
    color: var(--muted);
}

.strategy-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.message-table {
    display: grid;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #fffdf9;
}

.message-table div {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 18px;
    padding: 18px;
    border-bottom: 1px solid var(--line);
}

.message-table div:last-child {
    border-bottom: 0;
}

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

.legal-hero h1 {
    max-width: 920px;
}

.legal-layout {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.legal-summary,
.legal-content {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-warm);
    box-shadow: 0 12px 32px rgba(37, 35, 34, 0.07);
}

.legal-summary {
    position: sticky;
    top: 100px;
    display: grid;
    gap: 18px;
    padding: 22px;
}

.legal-summary h2,
.legal-content h2 {
    font-size: 20px;
    line-height: 1.25;
}

.legal-summary dl {
    display: grid;
    gap: 14px;
    margin: 0;
}

.legal-summary div {
    display: grid;
    gap: 3px;
}

.legal-summary dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.legal-summary dd,
.legal-summary p {
    margin: 0;
    overflow-wrap: anywhere;
}

.legal-summary a,
.legal-content a {
    color: var(--primary);
    font-weight: 800;
}

.legal-content {
    padding: 28px;
}

.legal-content section {
    padding-bottom: 28px;
    border-bottom: 1px solid var(--line);
}

.legal-content section + section {
    padding-top: 28px;
}

.legal-content section:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.legal-content p,
.legal-content li {
    color: var(--muted);
    font-size: 16px;
    line-height: 1.7;
}

.legal-content p {
    margin: 12px 0 0;
}

.legal-content ul {
    display: grid;
    gap: 8px;
    margin: 14px 0 0;
    padding-left: 20px;
}

.legal-content strong {
    color: var(--ink);
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 22px;
    padding-bottom: 70px;
}

.contact-form,
.contact-aside,
.checkout-panel,
.checkout-note {
    padding: 24px;
}

.contact-form {
    display: grid;
    gap: 16px;
}

.contact-aside {
    display: grid;
    gap: 22px;
    align-content: start;
}

.contact-points {
    display: grid;
    gap: 14px;
    margin: 0;
}

.contact-points div {
    display: grid;
    gap: 3px;
}

.contact-points dt {
    font-weight: 900;
}

.contact-points dd {
    margin: 0;
}

.checkout-page {
    min-height: calc(100vh - 200px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 22px;
    align-items: start;
    padding: 72px 0;
}

.checkout-panel {
    display: grid;
    gap: 18px;
}

.checkout-summary {
    display: grid;
    gap: 4px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8f5ef;
}

.checkout-summary strong {
    font-size: 34px;
}

.checkout-summary span,
.checkout-summary p {
    color: var(--muted);
}

.public-footer {
    width: min(1180px, calc(100% - 32px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 40px auto 0;
    padding: 28px 0 42px;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.public-footer img {
    width: 140px;
    height: auto;
    display: block;
    margin-bottom: 10px;
}

.public-footer p {
    margin: 0;
}

.public-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: flex-end;
}

.public-footer a {
    color: var(--muted);
    font-weight: 800;
    text-decoration: none;
}

.public-footer a:hover {
    color: var(--primary);
}

@media (max-width: 1040px) {
    .process-grid,
    .feature-grid,
    .strategy-grid,
    .use-case-grid,
    .answer-faq .faq-grid,
    .pricing-grid,
    .compact-pricing {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .answer-layout {
        grid-template-columns: 1fr;
    }

    .contact-layout,
    .checkout-page,
    .legal-layout {
        grid-template-columns: 1fr;
    }

    .legal-summary {
        position: static;
    }
}

@media (max-width: 760px) {
    .public-header {
        position: static;
        flex-wrap: wrap;
        gap: 12px;
        padding: 14px 16px;
    }

    .public-brand {
        min-width: 148px;
    }

    .public-brand img {
        width: 148px;
    }

    .public-nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
        margin-left: 0;
        padding-bottom: 2px;
    }

    .public-header-actions {
        margin-left: auto;
    }

    .public-header .button {
        width: auto;
    }

    .public-hero {
        min-height: 0;
        padding: 46px 0 34px;
    }

    .public-hero h1 {
        font-size: 54px;
    }

    .hero-lead {
        font-size: 18px;
    }

    .preview-grid,
    .two-column,
    .faq-grid,
    .process-grid,
    .feature-grid,
    .strategy-grid,
    .use-case-grid,
    .fact-grid,
    .answer-faq .faq-grid,
    .pricing-grid,
    .compact-pricing,
    .swatches {
        grid-template-columns: 1fr;
    }

    .hero-preview {
        overflow-x: auto;
    }

    .preview-table {
        min-width: 620px;
    }

    .preview-toolbar {
        grid-template-columns: 1fr;
    }

    .subpage-hero {
        padding: 44px 0 24px;
    }

    .subpage-hero h1 {
        font-size: 38px;
    }

    .public-section,
    .faq-section {
        padding: 34px 0;
    }

    .public-section h2,
    .public-band h2,
    .public-cta h2,
    .faq-section h2,
    .checkout-page h1 {
        font-size: 26px;
    }

    .legal-content {
        padding: 22px;
    }

    .public-band,
    .public-cta {
        padding: 24px;
    }

    .message-table div {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .public-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .public-footer nav {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .public-hero,
    .subpage-hero,
    .public-section,
    .public-band,
    .public-cta,
    .faq-section,
    .contact-layout,
    .checkout-page,
    .public-footer,
    .public-main > .flash {
        width: min(100% - 20px, 1180px);
    }

    .public-hero h1 {
        font-size: 44px;
    }

    .hero-actions .button,
    .checkout-actions .button,
    .public-band .button,
    .public-cta .button,
    .contact-form .button {
        width: 100%;
    }

    .public-header-actions {
        width: 100%;
    }

    .public-header-actions .button {
        flex: 1 1 0;
        width: auto;
    }

    .pricing-card,
    .feature-card,
    .contact-form,
    .contact-aside,
    .checkout-panel,
    .checkout-note,
    .legal-summary,
    .legal-content {
        padding: 18px;
    }
}

@media (max-width: 1040px) {
    .app-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .topbar {
        position: static;
        flex-wrap: wrap;
        gap: 12px;
        padding: 14px 16px;
    }

    .brand {
        min-width: 148px;
    }

    .brand img {
        width: 148px;
    }

    .nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .logout-form {
        margin-left: auto;
    }
}

@media (max-width: 560px) {
    .app-metrics {
        grid-template-columns: 1fr;
    }

    .section-head {
        display: grid;
    }

    .plan-usage,
    .dashboard-filters {
        padding: 12px;
    }
}

/* Viacero zdrojov (stránok) pod produktom */
.source-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 8px;
    align-items: start;
    margin-bottom: 10px;
}

.source-row .preview-result {
    grid-column: 1 / -1;
}

.source-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin: 14px 0 22px;
}

.source-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
}

.source-card form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
}

.source-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.meta-list.compact div {
    padding: 4px 0;
}

.meta-list.compact dt {
    font-size: 12px;
}

@media (max-width: 640px) {
    .source-row {
        grid-template-columns: 1fr;
    }
}

/* Predplatné / billing */
.plan-prices {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.plan-prices form {
    margin: 0;
    display: grid;
    gap: 4px;
}

.plan-prices .field-help {
    text-align: center;
}

/* Cookie consent (Google Ads / Consent Mode) */
.consent-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px 24px;
    flex-wrap: wrap;
    padding: 16px max(20px, calc((100vw - 1180px) / 2));
    border-top: 1px solid var(--line);
    background: var(--panel-warm, #fff);
    box-shadow: 0 -10px 30px rgba(37, 35, 34, 0.12);
}

.consent-banner p {
    margin: 0;
    flex: 1 1 340px;
    text-align: left;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.consent-banner a {
    color: var(--primary);
    font-weight: 700;
}

.consent-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

@media (max-width: 720px) {
    .consent-banner {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px 16px;
    }

    .consent-banner p {
        flex: none;
    }

    .consent-actions {
        flex-wrap: wrap;
    }

    .consent-actions .button {
        flex: 1 1 auto;
    }
}

/* Product editor */
.product-form-page {
    padding: 30px;
    border: 1px solid #d8c7b4;
    border-radius: 8px;
    background: #f7f1e7;
}

.product-editor-head {
    align-items: start;
    margin-bottom: 28px;
}

.product-editor-head .section-intro {
    max-width: 720px;
}

.editor-back-button {
    gap: 7px;
    background: #fffdf9;
}

.editor-back-button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.editor-context-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
    padding: 14px 16px;
    border: 1px solid #decebd;
    border-radius: 8px;
    background: rgba(255, 253, 249, 0.78);
}

.editor-product-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.editor-product-summary img,
.editor-product-placeholder {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: block;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #eee5d9;
    object-fit: cover;
}

.editor-product-placeholder::before {
    content: "";
    display: block;
    width: 16px;
    height: 16px;
    margin: 15px;
    border: 2px solid #b7a99b;
    border-radius: 50%;
}

.editor-product-summary div {
    display: grid;
    min-width: 0;
}

.editor-product-summary strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.editor-product-summary span {
    color: var(--muted);
    font-size: 13px;
}

.editor-utility-actions {
    justify-content: flex-end;
}

.editor-utility-actions form {
    margin: 0;
}

.product-editor-form {
    margin: 0;
}

.product-form-page input[type="text"],
.product-form-page input[type="url"],
.product-form-page input[type="number"],
.product-form-page select {
    font-weight: 500;
}

.product-form-page .field-help {
    font-weight: 500;
    line-height: 1.45;
}

.product-editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
    gap: 22px 28px;
    align-items: start;
}

.product-editor-main {
    display: grid;
    gap: 20px;
}

.editor-card,
.editor-settings-card {
    border: 1px solid #d8c7b4;
    border-radius: 8px;
    background: #fffdf9;
}

.editor-card {
    display: grid;
    gap: 18px;
    padding: 26px;
}

.editor-section-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.editor-section-head > div {
    min-width: 0;
}

.editor-section-head h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 30px;
    font-size: 20px;
}

.editor-section-head p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.editor-step {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #ad6a40;
    color: #fff;
    font-size: 14px;
    font-weight: 900;
}

.required-label {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    background: #f0ded0;
    color: var(--primary-dark);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.editor-source-list {
    display: grid;
    gap: 18px;
}

.editor-source-row {
    display: grid;
    gap: 14px;
}

.editor-source-row + .editor-source-row {
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.source-row-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.source-row-heading[hidden],
.conditional-field[hidden] {
    display: none;
}

.selector-test-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.selector-test-row .button {
    min-width: 112px;
}

.add-source-button {
    width: 100%;
    min-height: 48px;
    border: 1px dashed #b99373;
    border-radius: 8px;
    background: transparent;
    color: var(--primary-dark);
    font: inherit;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}

.add-source-button:hover {
    border-style: solid;
    background: #fbf3eb;
}

.source-list-help {
    margin-top: -6px;
}

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

.editor-product-grid .conditional-field {
    grid-column: 1 / -1;
}

.new-category-control {
    color: var(--primary-dark);
    font-size: 13px;
}

.new-category-control summary {
    width: fit-content;
    cursor: pointer;
    font-weight: 900;
}

.new-category-control[open] summary {
    margin-bottom: 10px;
}

.new-category-control label {
    color: var(--ink);
}

.new-category-control .field-help {
    display: block;
    margin-top: 6px;
}

.current-value-note {
    margin: -4px 0 0 42px;
    color: var(--muted);
    font-size: 13px;
}

.editor-source-overview-list {
    display: grid;
    border-top: 1px solid var(--line);
}

.editor-source-overview-list > div {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.editor-source-overview-list > div > span:first-child {
    min-width: 0;
    display: grid;
}

.editor-source-overview-list strong,
.editor-source-overview-list small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.editor-source-overview-list small {
    color: var(--muted);
    font-size: 12px;
}

.editor-source-overview > .button {
    width: fit-content;
}

.editor-settings-column {
    display: grid;
    gap: 8px;
}

.editor-aside-label {
    display: flex;
    align-items: baseline;
    gap: 9px;
    min-height: 22px;
    padding-inline: 4px;
    color: #9a8a79;
    font-size: 12px;
}

.editor-aside-label strong,
.settings-subhead {
    color: #897663;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.editor-settings-card {
    display: grid;
    gap: 18px;
    padding: 22px;
    background: #fbf6ec;
}

.settings-divider {
    height: 1px;
    background: #dfd1c0;
}

.settings-subhead {
    margin: 0;
}

.switch-control {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
}

.switch-control input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.switch-ui {
    width: 42px;
    height: 24px;
    flex: 0 0 42px;
    padding: 3px;
    border-radius: 999px;
    background: #b9aea2;
    transition: background 160ms ease;
}

.switch-ui::after {
    content: "";
    width: 18px;
    height: 18px;
    display: block;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(37, 35, 34, 0.28);
    transition: transform 160ms ease;
}

.switch-control input:checked + .switch-ui {
    background: #ad6a40;
}

.switch-control input:checked + .switch-ui::after {
    transform: translateX(18px);
}

.switch-control input:focus-visible + .switch-ui {
    outline: 3px solid #ead8ca;
    outline-offset: 2px;
}

.input-with-unit {
    display: grid;
    grid-template-columns: minmax(0, 118px) auto;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.input-with-unit input {
    min-width: 0;
}

.editor-form-actions {
    grid-column: 1;
    display: flex;
    align-items: center;
    gap: 18px;
}

.editor-form-actions .button {
    min-width: 190px;
    min-height: 48px;
}

.text-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

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

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

.source-management {
    scroll-margin-top: 100px;
}

.source-management .source-card {
    border-radius: 8px;
    background: #fffdf9;
}

@media (max-width: 900px) {
    .product-editor-grid {
        grid-template-columns: 1fr;
    }

    .editor-settings-column,
    .editor-form-actions {
        grid-column: 1;
    }

    .editor-context-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .editor-utility-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .product-form-page {
        margin-inline: -10px;
        padding: 18px 14px 14px;
    }

    .product-editor-head {
        display: flex;
        flex-direction: column-reverse;
        gap: 14px;
        margin-bottom: 20px;
    }

    .product-editor-head h1 {
        font-size: 28px;
    }

    .product-editor-head .section-intro {
        font-size: 14px;
    }

    .editor-back-button {
        width: auto;
        min-height: 34px;
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--primary-dark);
    }

    .editor-context-bar {
        padding: 12px;
    }

    .editor-utility-actions,
    .editor-utility-actions form,
    .editor-utility-actions .button {
        width: 100%;
    }

    .product-editor-grid {
        gap: 16px;
    }

    .product-editor-main {
        gap: 14px;
    }

    .editor-card,
    .editor-settings-card {
        padding: 16px;
    }

    .editor-section-head {
        gap: 10px;
    }

    .editor-section-head h2 {
        min-height: 28px;
        font-size: 17px;
    }

    .editor-section-head p {
        display: none;
    }

    .editor-step {
        width: 28px;
        height: 28px;
        flex-basis: 28px;
        font-size: 13px;
    }

    .editor-product-grid {
        grid-template-columns: 1fr;
    }

    .selector-test-row {
        grid-template-columns: minmax(0, 1fr) 92px;
    }

    .selector-test-row .button {
        width: 100%;
        min-width: 0;
        padding-inline: 8px;
    }

    .editor-product-grid .conditional-field {
        grid-column: 1;
    }

    .current-value-note {
        margin-left: 38px;
    }

    .editor-source-overview > .button {
        width: 100%;
    }

    .editor-aside-label {
        flex-wrap: wrap;
    }

    .input-with-unit {
        grid-template-columns: minmax(0, 112px) auto;
    }

    .editor-form-actions {
        display: grid;
        gap: 8px;
        padding-top: 2px;
    }

    .editor-form-actions .button,
    .editor-form-actions .text-button {
        width: 100%;
    }

    .editor-form-actions .button {
        min-height: 48px;
    }

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

    .editor-utility-actions > .button.primary,
    .editor-utility-actions > form:last-child {
        grid-column: 1 / -1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .switch-ui,
    .switch-ui::after {
        transition: none;
    }
}
