:root {
    color-scheme: light;
    --ink: #211b22;
    --muted: #665d67;
    --paper: #fffaf3;
    --rose: #b85b70;
    --plum: #56324d;
    --gold: #c49343;
    --mint: #dbe9df;
    --line: rgba(86, 50, 77, 0.18);
    --shadow: 0 24px 70px rgba(48, 31, 44, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

main {
    min-height: 100vh;
}

.hero {
    min-height: 46vh;
    display: grid;
    align-items: end;
    padding: clamp(56px, 9vw, 120px) 24px 42px;
    color: #fff;
    background:
        linear-gradient(115deg, rgba(37, 26, 43, 0.92), rgba(91, 49, 70, 0.72)),
        radial-gradient(circle at 78% 20%, rgba(196, 147, 67, 0.42), transparent 34%),
        linear-gradient(145deg, #2a1d30, #704154 54%, #c49343);
}

.hero__inner,
.shell {
    width: min(1120px, calc(100vw - 40px));
    margin: 0 auto;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero .eyebrow {
    color: #f0d99b;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 14px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3.8rem, 10vw, 8rem);
    line-height: 0.9;
    font-weight: 500;
    letter-spacing: 0;
}

h2 {
    margin-bottom: 12px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.05;
    font-weight: 500;
}

h3 {
    margin-bottom: 8px;
    font-size: 1.05rem;
    line-height: 1.25;
}

.lead {
    max-width: 650px;
    margin-bottom: 0;
    font-size: clamp(1.12rem, 2.2vw, 1.45rem);
    color: rgba(255, 255, 255, 0.86);
}

.form-band,
.result-band {
    padding: clamp(42px, 7vw, 86px) 0;
}

.form-band {
    background:
        linear-gradient(180deg, rgba(255, 250, 243, 0.95), rgba(219, 233, 223, 0.55)),
        repeating-linear-gradient(90deg, rgba(196, 147, 67, 0.08) 0 1px, transparent 1px 84px);
}

.intro {
    max-width: 720px;
    margin-bottom: 30px;
}

.intro p:not(.eyebrow) {
    color: var(--muted);
}

.reading-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding: clamp(20px, 4vw, 34px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.field {
    display: grid;
    gap: 7px;
}

.span-2 {
    grid-column: span 2;
}

label {
    font-weight: 750;
    color: var(--plum);
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid rgba(86, 50, 77, 0.22);
    border-radius: 8px;
    padding: 13px 14px;
    background: #fffdf9;
    color: var(--ink);
    font: inherit;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

select {
    appearance: none;
    min-width: 0;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--plum) 50%),
        linear-gradient(135deg, var(--plum) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 50%,
        calc(100% - 12px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 34px;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--rose);
    box-shadow: 0 0 0 4px rgba(184, 91, 112, 0.16);
    background: #fff;
}

.date-selects {
    display: grid;
    grid-template-columns: 0.74fr 1.18fr 0.9fr;
    gap: 10px;
}

.error,
.form-message {
    color: #9c2438;
    font-weight: 700;
}

.actions {
    display: flex;
    justify-content: flex-end;
}

button {
    min-height: 50px;
    border: 0;
    border-radius: 8px;
    padding: 0 24px;
    background: var(--plum);
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(86, 50, 77, 0.22);
    transition: transform 160ms ease, background 160ms ease;
}

button:hover {
    transform: translateY(-1px);
    background: #6a3d60;
}

.result-band {
    background: #fffdf9;
}

.result-intro {
    margin-bottom: 22px;
}

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

.metric {
    min-height: 150px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(48, 31, 44, 0.07);
}

.metric span,
.matrix-facts span,
.line-list span {
    display: block;
    color: var(--rose);
    font-size: 0.75rem;
    font-weight: 850;
    text-transform: uppercase;
}

.metric strong {
    display: block;
    margin: 3px 0 6px;
    color: var(--plum);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.5rem;
    font-weight: 500;
    line-height: 1;
}

.metric p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.45;
}

.matrix-section {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
    gap: 18px;
    align-items: stretch;
    margin-bottom: 28px;
}

.matrix-panel,
.matrix-facts,
.deep-card,
.line-reading {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(48, 31, 44, 0.08);
}

.matrix-panel {
    padding: clamp(20px, 4vw, 32px);
}

.matrix-panel > p:not(.eyebrow),
.matrix-note {
    color: var(--muted);
}

.birth-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    max-width: 560px;
    margin: 22px 0 14px;
}

.birth-grid__cell {
    position: relative;
    display: grid;
    min-height: 116px;
    padding: 14px;
    border: 1px solid rgba(86, 50, 77, 0.16);
    border-radius: 8px;
    background: #fffaf3;
    overflow: hidden;
}

.birth-grid__cell.is-present {
    background: linear-gradient(145deg, rgba(219, 233, 223, 0.96), rgba(255, 250, 243, 0.9));
    border-color: rgba(86, 50, 77, 0.3);
}

.birth-grid__number {
    color: rgba(86, 50, 77, 0.42);
    font-size: 0.82rem;
    font-weight: 850;
}

.birth-grid__digits {
    align-self: end;
    color: var(--plum);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.8rem, 4vw, 3.1rem);
    line-height: 1;
}

.birth-grid__cell.is-missing .birth-grid__digits {
    color: rgba(102, 93, 103, 0.52);
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 750;
}

.birth-grid__markers {
    position: absolute;
    right: 12px;
    bottom: 12px;
    color: var(--rose);
    font-weight: 850;
}

.matrix-note {
    margin-bottom: 0;
    font-size: 0.92rem;
}

.matrix-facts {
    display: grid;
    align-content: center;
    gap: 16px;
    padding: 22px;
}

.matrix-facts div {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.matrix-facts div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.matrix-facts strong {
    display: block;
    margin-top: 4px;
    color: var(--plum);
    font-size: 1.45rem;
}

.story {
    max-width: 900px;
    margin-bottom: 28px;
    padding: clamp(22px, 4vw, 34px);
    border-left: 5px solid var(--gold);
    background: linear-gradient(90deg, rgba(196, 147, 67, 0.15), rgba(219, 233, 223, 0.3));
    border-radius: 8px;
}

.story p:last-child {
    margin-bottom: 0;
}

.deep-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.deep-card,
.line-reading {
    padding: 22px;
}

.mini-reading {
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid var(--line);
}

.mini-reading h4,
.line-list h4 {
    margin: 0 0 6px;
    color: var(--plum);
    font-size: 1rem;
}

.mini-reading p,
.line-list p {
    margin-bottom: 0;
    color: var(--muted);
}

.line-reading {
    margin-bottom: 28px;
}

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

.line-list section {
    padding: 16px;
    border-radius: 8px;
    background: rgba(219, 233, 223, 0.45);
}

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

.number-card {
    display: grid;
    gap: 16px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(48, 31, 44, 0.08);
}

.number-card__top {
    display: flex;
    gap: 15px;
    align-items: center;
}

.number {
    display: grid;
    place-items: center;
    flex: 0 0 62px;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: var(--mint);
    color: var(--plum);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2rem;
    line-height: 1;
}

.number-card__top p,
.muted {
    margin-bottom: 0;
    color: var(--muted);
}

dl {
    display: grid;
    gap: 12px;
    margin: 0;
}

dt {
    color: var(--rose);
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

dd {
    margin: 2px 0 0;
    color: var(--ink);
}

@media (max-width: 760px) {
    .hero {
        min-height: 42vh;
        padding-inline: 20px;
    }

    .reading-form,
    .result-overview,
    .matrix-section,
    .deep-grid,
    .line-list,
    .number-grid {
        grid-template-columns: 1fr;
    }

    .date-selects {
        grid-template-columns: 1fr;
    }

    .span-2 {
        grid-column: span 1;
    }

    .actions {
        justify-content: stretch;
    }

    button {
        width: 100%;
    }

    .number-card__top {
        align-items: flex-start;
    }
}
