* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    color: var(--ink-900);
    background: var(--gradient-page);
}

img {
    max-width: 100%;
}

button,
input,
select {
    font: inherit;
}

.ds-page {
    position: relative;
}

.ds-shell {
    width: min(1480px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 40px;
}

.ds-hero,
.ds-panel {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    background: var(--surface-glass);
    box-shadow: var(--shadow-soft);
}

.ds-hero {
    position: relative;
    overflow: hidden;
    padding: 36px 40px;
    background: var(--gradient-hero);
}

.ds-hero::after {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 6px;
    background: linear-gradient(90deg, var(--brand-500) 0%, #ff7d9f 100%);
}

.ds-panel {
    margin-top: 24px;
    padding: 30px;
}

.ds-two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.ds-hero-bar,
.ds-chip-row,
.ds-button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.ds-hero-bar {
    margin-bottom: 18px;
}

.ds-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 28px;
    align-items: start;
}

.ds-hero-copy,
.ds-section-head,
.ds-stack-sm,
.ds-stack-md {
    display: grid;
}

.ds-hero-copy {
    gap: 20px;
}

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

.ds-stack-sm {
    gap: 12px;
}

.ds-stack-md {
    gap: 16px;
}

.ds-brand-logo {
    width: clamp(220px, 30vw, 420px);
    max-height: 132px;
    object-fit: contain;
    object-position: left center;
}

.ds-eyebrow,
.ds-kicker,
.ds-label,
.ds-table th {
    font-family: var(--font-label);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.ds-eyebrow,
.ds-kicker {
    margin: 0;
    font-size: 0.78rem;
}

.ds-eyebrow,
.ds-kicker,
.ds-label {
    color: var(--brand-700);
}

.ds-lead,
.ds-copy,
.ds-metric-card p,
.ds-type-card p {
    margin: 0;
    line-height: 1.7;
    color: var(--ink-600);
}

h1,
h2,
h3 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-900);
}

h1 {
    font-size: clamp(2.2rem, 5vw, 4.2rem);
    line-height: 1.02;
    max-width: 12ch;
}

h2 {
    font-size: clamp(1.5rem, 2.6vw, 2rem);
}

h3 {
    font-size: 1.2rem;
}

.ds-badge,
.ds-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
}

.ds-badge {
    color: var(--brand-700);
    background: var(--brand-soft);
    border: 1px solid rgba(210, 0, 53, 0.16);
    font-family: var(--font-label);
    font-size: 0.78rem;
    font-weight: 700;
}

.ds-badge-muted,
.ds-chip {
    color: var(--ink-600);
    background: var(--surface-100);
    border: 1px solid var(--border-subtle);
}

.ds-metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.ds-metric-card,
.ds-swatch,
.ds-type-card,
.ds-asset-card {
    border-radius: var(--radius-lg);
}

.ds-metric-card {
    min-height: 132px;
    padding: 18px 20px;
    border: 1px solid var(--border-subtle);
    background: var(--surface-0);
}

.ds-metric-card-wide {
    grid-column: span 2;
}

.ds-metric-value {
    display: block;
    margin-top: 10px;
    font-family: var(--font-mono);
    font-size: clamp(1.2rem, 2.6vw, 1.9rem);
    line-height: 1.15;
}

.ds-swatch-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.ds-swatch {
    display: grid;
    gap: 10px;
    padding: 18px;
    border: 1px solid var(--border-subtle);
    background: linear-gradient(180deg, #ffffff 0%, var(--surface-50) 100%);
}

.ds-swatch strong,
.ds-type-card strong {
    font-weight: 700;
}

.ds-swatch span {
    color: var(--ink-600);
    font-family: var(--font-mono);
    font-size: 0.88rem;
}

.ds-swatch-color {
    width: 100%;
    height: 84px;
    border-radius: 18px;
}

.ds-swatch-border {
    border: 1px solid var(--border-subtle);
}

.ds-type-card,
.ds-asset-card {
    padding: 20px;
    border: 1px solid var(--border-subtle);
    background: linear-gradient(180deg, #ffffff 0%, #fff9fb 100%);
}

.ds-sample-display {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.ds-sample-body {
    font-size: 1rem;
}

.ds-sample-mono {
    font-family: var(--font-mono);
    font-size: 1rem;
}

.ds-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 13px 18px;
    border: 0;
    border-radius: 14px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.ds-button-primary,
.ds-button-secondary {
    color: var(--surface-0);
    background: var(--brand-500);
    box-shadow: var(--shadow-medium);
}

.ds-button-secondary {
    background: var(--brand-700);
}

.ds-button-ghost {
    color: var(--brand-700);
    background: var(--surface-100);
    border: 1px solid rgba(210, 0, 53, 0.16);
}

.ds-button-danger {
    color: var(--surface-0);
    background: var(--danger-500);
}

.ds-button:hover {
    transform: translateY(-1px);
}

.ds-button-primary:hover,
.ds-button-secondary:hover,
.ds-button-danger:hover {
    box-shadow: var(--shadow-strong);
}

.ds-alert {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid transparent;
    font-size: 0.92rem;
    line-height: 1.5;
}

.ds-alert-success {
    color: var(--success-500);
    background: var(--success-soft);
    border-color: rgba(22, 121, 74, 0.12);
}

.ds-alert-warning {
    color: var(--warning-500);
    background: var(--warning-soft);
    border-color: rgba(179, 106, 33, 0.12);
}

.ds-alert-danger {
    color: var(--danger-500);
    background: var(--danger-soft);
    border-color: rgba(180, 35, 24, 0.12);
}

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

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

.ds-field input,
.ds-field select {
    width: 100%;
    min-height: 52px;
    padding: 14px 16px;
    border: 1px solid var(--border-strong);
    border-radius: 16px;
    background: var(--surface-0);
    color: var(--ink-900);
}

.ds-field select {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--ink-600) 50%),
        linear-gradient(135deg, var(--ink-600) 50%, transparent 50%);
    background-position:
        calc(100% - 22px) calc(50% - 2px),
        calc(100% - 16px) calc(50% - 2px);
    background-size: 6px 6px;
    background-repeat: no-repeat;
    padding-right: 42px;
}

.ds-field input:focus,
.ds-field select:focus {
    outline: none;
    border-color: rgba(210, 0, 53, 0.45);
    box-shadow: 0 0 0 4px var(--brand-ring);
}

.ds-asset-logo {
    width: min(320px, 100%);
    object-fit: contain;
}

.ds-asset-logo-small {
    width: min(170px, 100%);
    object-fit: contain;
}

.ds-asset-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.ds-favicon-preview {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: var(--shadow-soft);
}

.ds-table-wrap {
    overflow: auto;
    margin-top: 24px;
    border: 1px solid var(--border-subtle);
    border-radius: 18px;
    background: var(--surface-0);
}

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

.ds-table th,
.ds-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

.ds-table th {
    position: sticky;
    top: 0;
    font-size: 0.75rem;
    color: var(--ink-600);
    background: var(--surface-200);
}

.ds-table td:nth-child(2),
.ds-table td:nth-child(3),
.ds-table td:nth-child(4),
.ds-table td:nth-child(5) {
    font-family: var(--font-mono);
}

.ds-table tbody tr:hover {
    background: var(--brand-soft);
}

@media (max-width: 1200px) {
    .ds-hero-grid,
    .ds-two-col,
    .ds-swatch-grid {
        grid-template-columns: 1fr;
    }
}

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

    .ds-metric-card-wide {
        grid-column: span 1;
    }
}

@media (max-width: 680px) {
    .ds-shell {
        width: min(1480px, calc(100% - 20px));
        padding-top: 20px;
    }

    .ds-hero,
    .ds-panel {
        padding: 20px;
        border-radius: 22px;
    }

    h1 {
        max-width: none;
        line-height: 1.02;
    }

    .ds-asset-inline {
        flex-direction: column;
        align-items: flex-start;
    }
}
