:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #0f0c09;
  background: var(--bg);
  color: #f7f1e8;
  --bg-card: #1b1510;
  --border: #493a2c;
  --muted: #b8a895;
  --gold: #e2b461;
  --green: #79d0a4;
  --red: #f28d80;
}

* { box-sizing: border-box; }
body { margin: 0; width: 100%; overflow-x: hidden; background: radial-gradient(circle at 90% 0%, #352617 0, transparent 36rem), var(--bg); }
.shell { width: min(100% - 2rem, 900px); margin: 0 auto; padding: 2rem 0 1.5rem; }
.header, .section-heading, .quote-meta, .footer { display: flex; justify-content: space-between; gap: 1rem; }
.header { align-items: center; margin-bottom: 1.5rem; }
.header-brand { display: flex; align-items: center; gap: clamp(.75rem, 2.5vw, 1.25rem); min-width: 0; }
.header-brand > div { min-width: 0; }
.header-logo { width: clamp(3.75rem, 11vw, 5.5rem); height: clamp(3.75rem, 11vw, 5.5rem); flex: 0 0 auto; border: 1px solid var(--border); border-radius: 1rem; object-fit: contain; box-shadow: 0 .5rem 1.5rem #0005; }
.eyebrow { margin: 0 0 .35rem; color: var(--gold); font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: .5rem; font-size: clamp(2rem, 7vw, 3.8rem); line-height: 1; letter-spacing: -.045em; }
h2 { margin-bottom: 0; font-size: 1.15rem; }
.intro { max-width: 34rem; margin-bottom: 0; color: var(--muted); line-height: 1.5; }
.source-pill, .status { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 999px; padding: .45rem .7rem; color: var(--muted); font-size: .8rem; white-space: nowrap; }
.status::before { width: .45rem; height: .45rem; margin-right: .45rem; border-radius: 50%; background: var(--gold); content: ""; }
.status-confirmed { color: var(--green); border-color: #376b53; }
.status-confirmed::before { background: var(--green); }
.status-error { color: var(--red); border-color: #75423b; }
.status-error::before { background: var(--red); }
.quote-card, .calculator-card { border: 1px solid var(--border); border-radius: 1.25rem; background: color-mix(in srgb, var(--bg-card) 94%, transparent); box-shadow: 0 1.5rem 4rem #0003; }
.quote-card { margin-bottom: 1rem; padding: clamp(1.25rem, 4vw, 2rem); }
.calculator-card { padding: clamp(1.25rem, 4vw, 2rem); }
.quote-value { margin: 1.6rem 0 .4rem; color: var(--gold); font-size: clamp(2.8rem, 12vw, 5.5rem); font-weight: 700; letter-spacing: -.06em; line-height: 1; }
.quote-meta { color: var(--muted); font-size: .85rem; }
.notice { max-width: 52rem; margin: 1.2rem 0 0; padding: .8rem 1rem; border-left: 3px solid var(--gold); background: #2a2118; color: #dfd0bc; font-size: .9rem; line-height: 1.45; }
.manual-quote { margin-top: 1.25rem; }
.manual-quote .field { width: 100%; }
.manual-quote-row { display: flex; align-items: stretch; gap: .75rem; }
.manual-quote-row input { flex: 1; min-width: 0; }
.manual-quote-row button { flex-shrink: 0; }
button, .external-link { display: inline-flex; align-items: center; justify-content: center; min-height: 2.9rem; border: 1px solid var(--gold); border-radius: .7rem; padding: .75rem 1rem; background: var(--gold); color: #21170b; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
button:focus-visible, .external-link:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.external-link { margin-top: 1rem; border-color: var(--border); background: transparent; color: var(--gold); }
.fields { margin-top: 1.5rem; }
.field { width: min(100%, 32rem); }
label { display: block; margin-bottom: .5rem; font-weight: 650; }
.input-wrap { display: flex; align-items: center; border: 1px solid var(--border); border-radius: .7rem; background: #110e0b; }
input { width: 100%; border: 0; outline: 0; padding: .85rem 1rem; background: transparent; color: inherit; font: inherit; font-size: 1.1rem; }
.manual-quote input, #gold-purity { border: 1px solid #8f6f3e; border-radius: .7rem; background: #241b12; color: #fff7ed; }
#discount { border: 0; border-radius: .7rem; background: #241b12; color: #fff7ed; }
.input-wrap:has(#discount) { border-color: #8f6f3e; background: #241b12; }
.manual-quote input:hover, #gold-purity:hover, .input-wrap:has(#discount:hover) { border-color: var(--gold); }
.manual-quote input:focus-visible, #gold-purity:focus-visible, #discount:focus-visible { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.input-wrap:has(#discount:focus-visible) { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.manual-quote input::placeholder, #gold-purity::placeholder, #discount::placeholder { color: #c8b59e; opacity: 1; }
.manual-quote input:not(:placeholder-shown), #gold-purity:not(:placeholder-shown), #discount:not(:placeholder-shown), #discount[value]:not([value=""]) { background: #2d2115; }
.manual-quote input[aria-invalid="false"], #gold-purity[aria-invalid="false"], #discount[aria-invalid="false"] { background: #2d2115; }
.manual-quote input[aria-invalid="true"], #gold-purity[aria-invalid="true"] { border-color: var(--red); }
.input-wrap:has(#discount[aria-invalid="true"]) { border-color: var(--red); }
.manual-quote input[aria-invalid="true"]:focus-visible, #gold-purity[aria-invalid="true"]:focus-visible, #discount[aria-invalid="true"]:focus-visible { box-shadow: 0 0 0 2px var(--red); }
.input-wrap:has(#discount[aria-invalid="true"]:focus-visible) { border-color: var(--red); box-shadow: 0 0 0 2px var(--red); }
.manual-quote input:disabled, #gold-purity:disabled { border-color: #3a3026; background: #17130f; color: #76695b; cursor: not-allowed; opacity: 1; }
.input-wrap:has(#discount:disabled) { border-color: #3a3026; background: #17130f; }
.input-wrap #discount:disabled { background: #17130f; color: #76695b; cursor: not-allowed; opacity: 1; }
.manual-quote input:disabled::placeholder, #gold-purity:disabled::placeholder, #discount:disabled::placeholder { color: #76695b; }
.input-wrap span { padding-right: 1rem; color: var(--muted); }
small { display: block; margin-top: .5rem; color: var(--muted); line-height: 1.45; }
.entered-value { display: block; margin-top: .75rem; color: var(--green); line-height: 1.45; overflow-wrap: anywhere; }
.result { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--border); color: var(--muted); }
.result strong { color: var(--green); font-size: clamp(1.7rem, 7vw, 2.6rem); letter-spacing: -.04em; }
.error { margin: 1rem 0 0; color: var(--red); }
.footer { margin-top: 1.2rem; color: var(--muted); font-size: .78rem; line-height: 1.4; }
@media (max-width: 560px) { .header, .quote-meta, .footer, .result { flex-direction: column; align-items: flex-start; } .header-brand { width: 100%; } .header-logo { width: 4rem; height: 4rem; } .manual-quote-row { flex-direction: column; } .source-pill { align-self: flex-start; } .result strong { align-self: flex-end; } }
