:root {
    --ink: #1c1712;
    --muted: #6b5f52;
    --cream: #f7f2ea;
    --paper: #fffdf9;
    --line: #e4d9c8;
    --green: #17352d;
    /* Copper for text and buttons: >= 4.5:1 on cream and white (WCAG AA). */
    --copper: #8a4f1d;
    --copper-hover: #6e3e16;
    --success-bg: #e7f2ea;
    --success-line: #2e7d4f;
    --refused-bg: #f8e9e6;
    --refused-line: #a33a2a;
    font-family: "Georgia", "Times New Roman", serif;
    color: var(--ink);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--cream);
    line-height: 1.55;
}

a {
    color: var(--copper);
}

a:hover {
    color: var(--copper-hover);
}

code {
    font-family: "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: 0.9em;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 32px;
    background: var(--green);
    color: var(--cream);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--cream);
    text-decoration: none;
}

.brand:hover {
    color: var(--cream);
}

.brand span {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand strong {
    font-size: 1.3rem;
    letter-spacing: 0.02em;
}

.brand small {
    font-family: Arial, sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.8;
}

.logo {
    width: 40px;
    height: 40px;
}

.status {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: Arial, sans-serif;
    font-size: 0.85rem;
}

.status form {
    margin: 0;
}

.age-pill {
    padding: 4px 12px;
    border: 1px solid rgba(247, 242, 234, 0.5);
    border-radius: 999px;
}

.age-pill.verified {
    background: var(--success-line);
    border-color: var(--success-line);
}

.link-button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--cream);
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px;
}

main.narrow {
    max-width: 720px;
}

.hero {
    padding: 24px 0 8px;
}

.hero h1 {
    margin: 0 0 12px;
    font-size: 2.2rem;
    font-weight: normal;
}

.hero p {
    max-width: 640px;
    margin: 0;
    color: var(--muted);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 24px;
    margin-top: 28px;
}

.product {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 6px;
}

.product-image {
    display: flex;
    justify-content: center;
    padding: 12px 0;
    background: linear-gradient(180deg, #efe6d8, var(--paper));
    border-radius: 4px;
}

.bottle {
    width: 96px;
    height: 160px;
}

.kind {
    margin: 14px 0 2px;
    color: var(--copper);
    font-family: Arial, sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.product h3,
.summary h2 {
    margin: 0 0 6px;
    font-weight: normal;
}

.notes {
    flex: 1;
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 0.95rem;
}

.meta {
    margin: 0 0 12px;
    color: var(--muted);
    font-family: Arial, sans-serif;
    font-size: 0.8rem;
}

.buy-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.price {
    font-size: 1.2rem;
}

.button {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 4px;
    background: var(--copper);
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-size: 0.95rem;
    text-decoration: none;
}

.button:hover {
    background: var(--copper-hover);
    color: #ffffff;
}

.button.large {
    padding: 12px 28px;
    font-size: 1.05rem;
}

.summary {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 20px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 6px;
}

.summary-image .bottle {
    width: 72px;
    height: 120px;
}

.summary .price {
    margin: 0;
}

.gate,
.received,
.notice {
    margin-top: 24px;
    padding: 24px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 6px;
}

.gate h2,
.notice h2 {
    margin-top: 0;
    font-weight: normal;
}

.steps {
    padding-left: 20px;
}

.steps li {
    margin-bottom: 6px;
}

.muted {
    color: var(--muted);
    font-size: 0.9rem;
}

.notice.success {
    background: var(--success-bg);
    border-left: 4px solid var(--success-line);
}

.notice.refused {
    background: var(--refused-bg);
    border-left: 4px solid var(--refused-line);
}

.received h3 {
    margin-top: 0;
    font-weight: normal;
}

.received table {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    font-size: 0.9rem;
}

.received th,
.received td {
    padding: 8px 6px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.received th {
    white-space: nowrap;
}

.received td {
    overflow-wrap: anywhere;
}

.received td:last-child {
    color: var(--muted);
}

.footer {
    max-width: 1100px;
    margin: 24px auto 0;
    padding: 20px 32px 40px;
    color: var(--muted);
    font-family: Arial, sans-serif;
    font-size: 0.8rem;
}

@media (max-width: 640px) {
    .topbar {
        flex-wrap: wrap;
        padding: 12px 16px;
    }

    main,
    .footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero h1 {
        font-size: 1.7rem;
    }

    .summary {
        align-items: flex-start;
    }
}
