*, *::before, *::after { box-sizing: border-box; }
html { background: var(--pc-night); color: var(--pc-champagne); font: 400 1.125rem/1.6 var(--font-body); }
body { margin: 0; }
a { color: var(--pc-gold); text-underline-offset: .2em; }
:focus-visible { outline: 2px solid var(--pc-gold); outline-offset: 3px; }
h1, h2 { font-family: var(--font-display); font-weight: 400; line-height: 1.1; margin: 0 0 .5em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--pc-gold); }
p { margin: 0 0 1em; max-width: 62ch; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* Hero: a gilt sunburst fans open behind the title, the page's one moment of motion. */
.hero { position: relative; min-height: 92vh; display: grid; place-content: center; text-align: center; padding: 4rem 1.5rem; overflow: hidden; isolation: isolate; }
.hero-frame { position: absolute; inset: 1.25rem; border: 1px solid var(--pc-gold); z-index: -1; }
.hero-frame::before { content: ""; position: absolute; inset: .5rem; border: 1px solid color-mix(in srgb, var(--pc-gold) 45%, transparent); }
.fan { position: absolute; left: 50%; bottom: -1px; width: min(140vw, 1500px); aspect-ratio: 2 / 1; translate: -50% 0;
  border-radius: 100% 100% 0 0 / 200% 200% 0 0;
  background: repeating-conic-gradient(from -90deg at 50% 100%, color-mix(in srgb, var(--pc-purple) 70%, transparent) 0 4deg, transparent 4deg 9deg);
  mask: radial-gradient(circle at 50% 100%, #000 30%, transparent 70%);
  transform-origin: 50% 100%; animation: fan-open 1.6s cubic-bezier(.2,.7,.2,1) both; }
@keyframes fan-open { from { transform: scaleY(0) scaleX(.3); opacity: 0; } }
.hero-host { margin: 0 auto 1.5rem; color: var(--pc-smoke); letter-spacing: .08em; }
.hero-title { font-size: clamp(3.2rem, 13vw, 9.5rem); color: var(--pc-champagne); display: flex; flex-direction: column; align-items: center; gap: .05em; }
.hero-title span:first-child { font-size: .35em; color: var(--pc-gold); }
.hero-sub { margin: 1rem auto .25rem; font-size: 1.35rem; }
.hero-when { margin: 0 auto 2.5rem; color: var(--pc-gold); }
.hero-nav { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-nav a { padding: .7rem 1.4rem; border: 1px solid var(--pc-gold); text-decoration: none; color: var(--pc-champagne); }
.hero-nav a:hover { background: var(--pc-gold); color: var(--pc-night); }

main > section { padding: clamp(3rem, 8vw, 6rem) clamp(1.25rem, 6vw, 5rem); max-width: 1180px; margin: 0 auto; }
.tbc { color: var(--pc-smoke); }

/* Speakeasy: a door panel beside the room. */
.speakeasy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 3rem; align-items: start; }
.speak-door { border: 1px solid var(--pc-gold); padding: 2rem; position: relative; background: color-mix(in srgb, var(--pc-purple) 25%, var(--pc-night)); }
.speak-door::after { content: ""; position: absolute; top: 1rem; right: 1rem; width: 3.5rem; height: 1.2rem; border: 1px solid var(--pc-gold); }
.speak-log { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; gap: .75rem; max-height: 26rem; overflow-y: auto; }
.speak-log:empty::before { content: "The room is quiet. Ask the first question."; color: var(--pc-smoke); }
.speak-log li { padding: .8rem 1.1rem; max-width: 85%; white-space: pre-wrap; }
.speak-log .user { align-self: end; background: var(--pc-purple); }
.speak-log .assistant { align-self: start; border-left: 2px solid var(--pc-gold); background: color-mix(in srgb, var(--pc-champagne) 6%, transparent); }
.speak-log .pending { color: var(--pc-smoke); }
.speak-form { display: flex; gap: .5rem; }
.speak-form input { flex: 1; min-width: 0; padding: .85rem 1rem; font: inherit; background: transparent; color: var(--pc-champagne); border: 1px solid var(--pc-smoke); }
.speak-form button, .speak-form input:focus { border-color: var(--pc-gold); }
.speak-form button { padding: .85rem 1.6rem; font: 600 1rem var(--font-body); background: var(--pc-gold); color: var(--pc-night); border: 1px solid var(--pc-gold); cursor: pointer; }
.speak-form button:disabled { opacity: .5; cursor: wait; }
.speak-note, .calc-note { font-size: .9rem; color: var(--pc-smoke); margin-top: .75rem; }

/* Calculator: the result sits under a deco gauge whose needle is the interest share. */
.calc-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; align-items: center; }
.calc-inputs { display: grid; gap: 1.4rem; }
.calc-inputs > label { display: grid; gap: .4rem; }
.calc-inputs output { font-family: var(--font-display); color: var(--pc-gold); font-size: 1.4rem; }
input[type=range] { width: 100%; accent-color: var(--pc-gold); }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
legend { margin-bottom: .4rem; }
fieldset label { display: flex; gap: .4rem; align-items: center; }
input[type=radio] { accent-color: var(--pc-gold); }
.calc-result { text-align: center; border: 1px solid var(--pc-gold); padding: 2.5rem 1.5rem 1.5rem; }
.dial { --share: 0; position: relative; width: min(100%, 320px); aspect-ratio: 2 / 1; margin: 0 auto 1.25rem; overflow: hidden;
  border-radius: 999px 999px 0 0;
  background:
    radial-gradient(circle at 50% 100%, var(--pc-night) 0 38%, transparent 38.5%),
    repeating-conic-gradient(from -90deg at 50% 100%, var(--pc-gold) 0 1deg, transparent 1deg 15deg),
    conic-gradient(from -90deg at 50% 100%, var(--pc-purple) calc(var(--share) * 180deg), color-mix(in srgb, var(--pc-gold) 25%, transparent) 0 180deg, transparent 0); }
.dial-needle { position: absolute; left: 50%; bottom: 0; width: 3px; height: 92%; background: var(--pc-champagne); transform-origin: 50% 100%;
  translate: -50% 0; rotate: calc(var(--share) * 180deg - 90deg); transition: rotate .5s cubic-bezier(.3,1.4,.5,1); }
.calc-each { font-family: var(--font-display); font-size: clamp(2.4rem, 6vw, 3.6rem); color: var(--pc-champagne); margin: 0 auto .5rem; max-width: none; line-height: 1.1; }
.calc-each [data-out=freq] { display: block; font: 400 1.1rem var(--font-body); color: var(--pc-smoke); }
.calc-result dl { display: flex; justify-content: center; gap: 2.5rem; margin: 1rem 0; }
.calc-result dt { color: var(--pc-smoke); font-size: .95rem; }
.calc-result dd { margin: 0; font-family: var(--font-display); font-size: 1.5rem; color: var(--pc-gold); }
.calc-note { margin-inline: auto; }

.foot { text-align: center; padding: 2rem 1.5rem 3rem; color: var(--pc-smoke); font-size: .9rem; border-top: 1px solid color-mix(in srgb, var(--pc-gold) 35%, transparent); }
.foot p { margin: 0 auto; }

@media (max-width: 820px) { .speakeasy, .calc-form { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .fan { animation: none; } .dial-needle { transition: none; } }
