:root {
    color-scheme: light;
    --ink: #101714;
    --muted: #65716b;
    --paper: #f6f4ee;
    --surface: #fffef9;
    --line: #dcdcd3;
    --accent: #bb8a44;
    --accent-dark: #8f6429;
    --forest: #183c30;
    --danger: #9b342c;
    --shadow: 0 24px 70px rgba(16, 23, 20, .09);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.55; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button, select { cursor: pointer; }

.landing-shell, .market-shell, .admin-shell { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }
.landing-shell { min-height: calc(100vh - 76px); padding: clamp(64px, 10vw, 140px) 0 80px; }
.domain-hero { max-width: 830px; margin: 0 auto; text-align: center; }
.eyebrow { margin: 0 0 16px; color: var(--accent-dark); font-size: .76rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: -.035em; line-height: 1.04; }
h1 { margin: 0; font-size: clamp(3.25rem, 10vw, 7.5rem); overflow-wrap: anywhere; }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 14px; }
.category-pill { display: inline-block; margin: 24px 0 0; padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .82rem; }
.domain-title { max-width: 720px; margin: 30px auto 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.5rem, 3vw, 2.15rem); line-height: 1.22; }
.domain-description { max-width: 650px; margin: 28px auto; color: var(--muted); font-size: clamp(1.05rem, 2.2vw, 1.28rem); }
.price-block { display: flex; flex-direction: column; margin: 34px 0 30px; }
.price-label { color: var(--muted); font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.price-block strong { font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 500; }
.hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 12px 24px; border: 1px solid transparent; border-radius: 4px; font-weight: 750; text-decoration: none; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.button:hover { transform: translateY(-1px); }
.button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid rgba(187, 138, 68, .35); outline-offset: 2px; }
.button-primary { background: var(--forest); color: white; }
.button-primary:hover { background: #102e24; }
.button-secondary { border-color: #aeb5b0; background: transparent; color: var(--forest); }
.button-danger { border-color: #ddb9b6; color: var(--danger); background: transparent; }
.offer-card { display: grid; grid-template-columns: .85fr 1.4fr; gap: clamp(32px, 6vw, 80px); margin: clamp(70px, 12vw, 150px) auto 0; padding: clamp(28px, 6vw, 72px); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.offer-card > div > p:last-child { color: var(--muted); max-width: 36ch; }
.offer-form, .admin-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > span, .toggle-group legend { color: #34423c; font-size: .78rem; font-weight: 750; letter-spacing: .035em; }
.field small { color: var(--muted); font-weight: 500; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid #c9ccc5; border-radius: 3px; background: #fff; color: var(--ink); padding: 12px 13px; }
.field textarea { resize: vertical; }
.field-wide { grid-column: 1 / -1; }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.privacy-note { margin: -6px 0 0; color: var(--muted); font-size: .78rem; }
.form-error { grid-column: 1 / -1; padding: 12px 14px; border-left: 3px solid var(--danger); background: #fff4f2; color: #772b25; }
.notice { max-width: 680px; margin: 80px auto 0; padding: 34px; text-align: center; background: var(--surface); border: 1px solid var(--line); }
.notice p { margin-bottom: 0; color: var(--muted); }
.site-footer { min-height: 76px; padding: 24px 20px; color: var(--muted); text-align: center; font-size: .78rem; }

.market-shell { padding: clamp(58px, 9vw, 110px) 0 90px; }
.market-header { max-width: 720px; }
.market-header h1 { font-size: clamp(3.2rem, 8vw, 6.3rem); }
.market-header > p:last-child { color: var(--muted); font-size: 1.16rem; max-width: 570px; }
.filters { display: grid; grid-template-columns: 2fr repeat(3, 1fr) auto; align-items: end; gap: 12px; margin: 55px 0 32px; padding: 22px; background: var(--surface); border: 1px solid var(--line); }
.domain-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.domain-card { position: relative; min-height: 285px; display: flex; flex-direction: column; padding: 28px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.domain-card.featured { border-color: #c8a46f; }
.featured-label { position: absolute; right: 0; top: 0; padding: 6px 10px; background: var(--accent); color: #231b10; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.domain-card .extension { margin: 0 0 30px; color: var(--accent-dark); font-size: .75rem; font-weight: 800; text-transform: uppercase; }
.domain-card h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); overflow-wrap: anywhere; }
.domain-card > p:not(.extension) { color: var(--muted); }
.card-footer { display: flex; justify-content: space-between; align-items: end; gap: 14px; margin-top: auto; padding-top: 24px; border-top: 1px solid var(--line); }
.card-footer a { color: var(--forest); font-size: .86rem; font-weight: 800; text-decoration: none; }
.empty-state { grid-column: 1 / -1; padding: 60px; text-align: center; background: var(--surface); border: 1px solid var(--line); }

.error-shell, .login-shell { min-height: calc(100vh - 76px); display: grid; place-content: center; padding: 40px; text-align: center; }
.error-shell h1 { font-size: clamp(3rem, 8vw, 6rem); }
.error-shell > p:last-child { color: var(--muted); }
.login-card { width: min(430px, calc(100vw - 40px)); padding: 42px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); text-align: left; }
.login-card h1 { margin-bottom: 28px; font-size: 3.3rem; }
.login-card form { display: grid; gap: 18px; }

.admin-bar { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 0 max(20px, calc((100% - 1160px) / 2)); background: var(--ink); color: #fff; }
.admin-brand { font-family: Georgia, "Times New Roman", serif; font-size: 1.3rem; text-decoration: none; }
.admin-bar nav { display: flex; align-items: center; gap: 22px; }
.admin-bar nav a, .admin-bar nav button { color: #d9dfdb; background: transparent; border: 0; text-decoration: none; font-size: .86rem; }
.admin-bar nav form { margin: 0; }
.admin-shell { min-height: calc(100vh - 142px); padding: 60px 0 80px; }
.admin-shell.narrow { max-width: 850px; }
.admin-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 34px; }
.admin-heading h1 { font-size: clamp(2.7rem, 6vw, 4.8rem); }
.text-link { color: var(--forest); font-weight: 750; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; vertical-align: middle; }
th { color: var(--muted); background: #eeede7; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
td small { display: block; color: var(--muted); }
.status { display: inline-block; padding: 4px 8px; border-radius: 20px; background: #eceeea; font-size: .72rem; font-weight: 750; }
.status-active, .status-accepted { background: #dcece3; color: #245139; }
.status-sold, .status-rejected, .status-spam { background: #f2dfdd; color: #79362f; }
.status-reserved, .status-countered, .status-contacted { background: #f3e9d6; color: #6a4a1b; }
.dns-state { display: block; font-size: .72rem; }.dns-state.ok { color: #266044; }.dns-state.no { color: var(--muted); }
.actions { display: flex; align-items: center; gap: 10px; }
.actions form { margin: 0; }.actions button { padding: 0; border: 0; background: transparent; color: var(--forest); text-decoration: underline; }
.empty-cell { padding: 50px; color: var(--muted); text-align: center; }
.admin-form { padding: 30px; background: var(--surface); border: 1px solid var(--line); }
.toggle-group { display: flex; flex-wrap: wrap; gap: 16px 24px; padding: 18px; border: 1px solid var(--line); }
.toggle-group label { display: flex; align-items: center; gap: 8px; font-size: .85rem; }
.archive-form { margin-top: 22px; }
.offer-detail { margin-bottom: 24px; padding: 30px; background: var(--surface); border: 1px solid var(--line); }
.offer-detail dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 0 0 28px; }
.offer-detail dt { color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }.offer-detail dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.message-box { padding-top: 24px; border-top: 1px solid var(--line); }.message-box h2, .history h2 { font-size: 1.5rem; }
.history { margin-top: 42px; }.history article { padding: 18px 0; border-top: 1px solid var(--line); }.history article > div { display: flex; justify-content: space-between; gap: 20px; }.history time { color: var(--muted); font-size: .78rem; }.history p { color: var(--muted); }
.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; }

@media (max-width: 900px) {
    .offer-card { grid-template-columns: 1fr; }
    .filters { grid-template-columns: 1fr 1fr; }.filter-search { grid-column: 1 / -1; }
    .domain-grid { grid-template-columns: 1fr 1fr; }
    .offer-detail dl { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
    .landing-shell, .market-shell, .admin-shell { width: min(100% - 24px, 1160px); }
    .landing-shell { padding-top: 56px; }.offer-card { padding: 24px; }.offer-form, .admin-form { grid-template-columns: 1fr; }.field-wide { grid-column: auto; }
    .filters, .domain-grid { grid-template-columns: 1fr; }.filter-search { grid-column: auto; }
    .domain-card { min-height: 250px; }
    .admin-bar { align-items: flex-start; padding: 15px 12px; }.admin-bar nav { gap: 11px; flex-wrap: wrap; justify-content: flex-end; }.admin-brand { font-size: 1rem; }
    .admin-heading { align-items: flex-start; flex-direction: column; }.admin-heading .button { width: 100%; }
    .admin-form, .login-card, .offer-detail { padding: 22px; }
    .offer-detail dl { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
