/* Gambit Studio — editorial dark theme */

:root {
  --bg: #0b0d0c;
  --bg-soft: #101411;
  --bg-raised: #141916;
  --bg-deep: #080a09;
  --cream: #f4ecdf;
  --cream-dim: #d8cfc1;
  --muted: #929b91;
  --muted-2: #737c73;
  --gold: #d4af6a;
  --gold-bright: #efd29b;
  --gold-deep: #a78347;
  --green: #7da98a;
  --red: #d17161;
  --line: rgba(232, 221, 201, 0.12);
  --line-strong: rgba(232, 221, 201, 0.22);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --radius: 22px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "DM Mono", "SFMono-Regular", Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

section[id] {
  scroll-margin-top: 104px;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 78% -8%, rgba(212, 175, 106, 0.11), transparent 38rem),
    radial-gradient(circle at 12% 18%, rgba(93, 128, 101, 0.08), transparent 34rem),
    var(--bg);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(244, 236, 223, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 236, 223, 0.018) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 50% 0%, black, transparent 78%);
}

::selection {
  background: var(--gold);
  color: var(--bg);
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.container {
  width: min(1200px, calc(100% - 48px));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.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;
}

.skip-link {
  position: fixed;
  left: 20px;
  top: -100px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--gold);
  color: var(--bg);
  border-radius: 8px;
  font-weight: 600;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 20px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 13, 12, 0.72);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(232, 221, 201, 0.08);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 78px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  color: var(--gold);
  border: 1px solid rgba(212, 175, 106, 0.45);
  border-radius: 50%;
}

.brand-mark svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.brand-word {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
}

.brand-word span {
  color: var(--gold);
  font-style: italic;
  margin-left: 4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: auto;
  font-size: 13px;
  color: var(--cream-dim);
}

.nav-links a {
  position: relative;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -6px;
  height: 1px;
  background: var(--gold);
  transition: right 0.25s ease;
}

.nav-links a:hover {
  color: var(--gold-bright);
}

.nav-links a:hover::after {
  right: 0;
}

.nav-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted-2);
  box-shadow: 0 0 0 0 rgba(125, 169, 138, 0);
}

.status-dot.is-online {
  background: var(--green);
  animation: status-pulse 2.6s infinite;
}

.status-dot.is-offline {
  background: var(--red);
}

@keyframes status-pulse {
  0% { box-shadow: 0 0 0 0 rgba(125, 169, 138, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(125, 169, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(125, 169, 138, 0); }
}

/* ---------- Typography helpers ---------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow-line {
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.mini-label {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

h1 {
  font-family: var(--serif);
  font-size: clamp(52px, 6.4vw, 82px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin-bottom: 24px;
}

h1 em {
  color: var(--gold-bright);
  font-weight: 400;
}

h2 {
  font-family: var(--serif);
  font-size: clamp(38px, 4.3vw, 54px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

h3 {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* ---------- Buttons ---------- */

.btn {
  --btn-bg: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 21px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--cream);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: #17140d;
  border-color: transparent;
  box-shadow: 0 12px 32px rgba(212, 175, 106, 0.16);
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #f7dda9, var(--gold-bright));
  box-shadow: 0 16px 38px rgba(212, 175, 106, 0.24);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--cream-dim);
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}

.btn-outline {
  border-color: var(--line-strong);
  color: var(--cream-dim);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}

.btn-wide {
  width: 100%;
  min-height: 56px;
  font-size: 12px;
  margin-top: 6px;
}

.btn-small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 10px;
}

.btn-arrow {
  font-size: 17px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.btn:hover .btn-arrow {
  transform: translateX(3px);
}

.btn-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.35) 48%, transparent 65%);
  transform: translateX(-120%);
  transition: transform 0.7s ease;
}

.btn-primary:hover .btn-shine {
  transform: translateX(120%);
}

.link-btn {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.link-btn:hover {
  color: var(--gold-bright);
}

.link-btn.danger {
  color: var(--red);
}

.link-btn.danger:hover {
  color: #f0a092;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(380px, 0.98fr);
  gap: 64px;
  align-items: center;
  padding-top: 86px;
  padding-bottom: 100px;
}

.hero-copy {
  max-width: 610px;
}

.hero-lede {
  max-width: 520px;
  color: var(--cream-dim);
  font-size: 17px;
  line-height: 1.75;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 42px;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin: 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  color: var(--cream-dim);
  font-size: 12px;
}

.hero-proof li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-proof span {
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-visual {
  position: relative;
  min-height: 500px;
  display: grid;
  place-items: center;
}

.hero-visual::before {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  border: 1px solid rgba(212, 175, 106, 0.16);
  border-radius: 50%;
  transform: rotate(12deg);
}

.hero-visual::after {
  content: "";
  position: absolute;
  width: 470px;
  height: 470px;
  border: 1px solid rgba(232, 221, 201, 0.05);
  border-radius: 50%;
}

.take-card {
  position: relative;
  width: min(400px, 100%);
  padding: 26px 26px 24px;
  background:
    linear-gradient(160deg, rgba(28, 34, 29, 0.96), rgba(13, 16, 14, 0.98));
  border: 1px solid rgba(212, 175, 106, 0.28);
  border-radius: 20px;
  box-shadow: var(--shadow);
  transform: rotate(-2.4deg);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: hidden;
  z-index: 1;
}

.take-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background-image:
    linear-gradient(45deg, rgba(212, 175, 106, 0.07) 25%, transparent 25%, transparent 75%, rgba(212, 175, 106, 0.07) 75%),
    linear-gradient(45deg, rgba(212, 175, 106, 0.07) 25%, transparent 25%, transparent 75%, rgba(212, 175, 106, 0.07) 75%);
  background-size: 44px 44px;
  background-position: 0 0, 22px 22px;
  mask-image: linear-gradient(to bottom, transparent 35%, black);
  pointer-events: none;
}

.take-card > * {
  position: relative;
  z-index: 1;
}

.hero-visual:hover .take-card {
  transform: rotate(0deg) translateY(-5px);
}

.take-top {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.rec-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 12px rgba(209, 113, 97, 0.7);
  animation: rec-blink 1.6s infinite;
}

@keyframes rec-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.take-no {
  margin-left: auto;
  color: var(--gold);
}

.take-title {
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.05;
  margin-top: 22px;
  color: var(--cream);
}

.take-sub {
  color: var(--muted);
  font-size: 11px;
  margin: 8px 0 20px;
}

.take-pgn {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--cream-dim);
}

.take-pgn span:nth-child(odd) {
  color: var(--muted-2);
}

.wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 60px;
  margin: 20px 0 14px;
}

.wave i {
  flex: 1;
  height: var(--h);
  min-height: 4px;
  border-radius: 2px;
  background: linear-gradient(to top, rgba(212, 175, 106, 0.35), var(--gold));
  animation: wave-pulse 1.8s ease-in-out infinite alternate;
  animation-delay: calc(var(--i, 1) * -0.06s);
  opacity: 0.85;
}

.wave i:nth-child(3n) { animation-delay: -0.3s; }
.wave i:nth-child(4n) { animation-delay: -0.7s; }
.wave i:nth-child(5n) { animation-delay: -1.1s; }

@keyframes wave-pulse {
  0% { transform: scaleY(0.62); opacity: 0.55; }
  100% { transform: scaleY(1); opacity: 1; }
}

.take-foot {
  display: flex;
  justify-content: space-between;
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.take-stamp {
  position: absolute;
  right: 20px;
  bottom: 54px;
  padding: 5px 9px;
  border: 1px solid rgba(212, 175, 106, 0.45);
  border-radius: 4px;
  color: var(--gold);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.18em;
  transform: rotate(-6deg);
  opacity: 0.8;
}

.float-tag {
  position: absolute;
  z-index: 2;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 20, 17, 0.92);
  color: var(--cream-dim);
  font-size: 10px;
  letter-spacing: 0.02em;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
}

.float-tag::before {
  content: "✦";
  color: var(--gold);
  margin-right: 7px;
}

.float-tag-one {
  top: -4px;
  left: -18px;
  transform: rotate(-3deg);
}

.float-tag-two {
  right: 0;
  bottom: -12px;
  transform: rotate(2deg);
}

/* ---------- Studio ---------- */

.studio-section {
  padding-bottom: 110px;
}

.section-heading {
  max-width: 700px;
  margin-bottom: 34px;
}

.section-heading h2 {
  margin-bottom: 0;
}

.studio-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  background:
    linear-gradient(150deg, rgba(25, 31, 26, 0.72), rgba(12, 15, 13, 0.94));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.studio-main {
  padding: 34px 34px 30px;
  min-width: 0;
}

.studio-side {
  padding: 34px 32px 30px;
  background: rgba(8, 10, 9, 0.38);
  border-left: 1px solid var(--line);
  min-width: 0;
}

.step-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.step-index {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid rgba(212, 175, 106, 0.36);
  border-radius: 50%;
  color: var(--gold);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.step-head h3 {
  margin: 2px 0 4px;
}

.step-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.pgn-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(5, 7, 6, 0.55);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pgn-wrap:focus-within {
  border-color: rgba(212, 175, 106, 0.55);
  box-shadow: 0 0 0 3px rgba(212, 175, 106, 0.08);
}

.pgn-wrap textarea {
  display: block;
  width: 100%;
  min-height: 272px;
  max-height: 430px;
  padding: 18px 18px 10px;
  resize: vertical;
  border: 0;
  background: transparent;
  color: var(--cream-dim);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.8;
  outline: none;
}

.pgn-wrap textarea::placeholder {
  color: rgba(146, 155, 145, 0.55);
}

.pgn-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px 11px;
  border-top: 1px solid rgba(232, 221, 201, 0.07);
  color: var(--muted-2);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.pgn-meta-actions {
  display: flex;
  gap: 16px;
}

.samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.sample-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.02em;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.sample-chip:hover,
.sample-chip.is-active {
  border-color: rgba(212, 175, 106, 0.5);
  color: var(--gold-bright);
  background: rgba(212, 175, 106, 0.06);
}

.sample-chip span {
  color: var(--muted-2);
  font-size: 9px;
}

.aside-note {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.aside-note p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.aside-note strong {
  color: var(--cream-dim);
  font-weight: 500;
}

.note-mark {
  color: var(--gold);
  font-size: 13px;
}

.field-group {
  margin: 0 0 20px;
  padding: 0;
  border: 0;
  min-width: 0;
}

.field-group legend,
.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 8px;
  padding: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.field-label output {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 10px;
}

.optional {
  color: var(--muted-2);
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(5, 7, 6, 0.45);
}

.segmented button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 9px 4px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease;
}

.segmented button span {
  font-size: 11px;
  font-weight: 600;
}

.segmented button small {
  color: var(--muted-2);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.segmented button:hover {
  color: var(--cream-dim);
}

.segmented button.is-active {
  background: rgba(212, 175, 106, 0.14);
  color: var(--gold-bright);
  box-shadow: inset 0 0 0 1px rgba(212, 175, 106, 0.28);
}

.segmented button.is-active small {
  color: var(--gold);
}

.select-wrap {
  position: relative;
}

.select-wrap select {
  width: 100%;
  min-height: 44px;
  padding: 0 38px 0 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(5, 7, 6, 0.45);
  color: var(--cream-dim);
  font-size: 12px;
  appearance: none;
  transition: border-color 0.2s ease;
}

.select-wrap select:hover,
.select-wrap select:focus {
  border-color: rgba(212, 175, 106, 0.45);
}

.select-chevron {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-54%);
  color: var(--gold);
  pointer-events: none;
}

.field-note {
  margin: 7px 0 0;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.6;
}

#pgnError {
  color: var(--red);
  margin-top: 12px;
}

.voice-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin: 4px 0 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(5, 7, 6, 0.32);
}

.voice-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(212, 175, 106, 0.28), rgba(212, 175, 106, 0.08));
  border: 1px solid rgba(212, 175, 106, 0.4);
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: 20px;
}

.voice-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.voice-label {
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.voice-info strong {
  font-size: 13px;
  font-weight: 500;
  color: var(--cream);
}

.voice-info strong span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}

.listen-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 6px 10px;
  border: 1px solid rgba(212, 175, 106, 0.3);
  border-radius: 999px;
  background: transparent;
  color: var(--gold);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease;
}

.listen-btn:hover {
  background: rgba(212, 175, 106, 0.12);
  color: var(--gold-bright);
}

.play-triangle {
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid currentColor;
}

.advanced-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--cream-dim);
  font-size: 11px;
  text-align: left;
}

.advanced-state {
  margin-left: auto;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.02em;
  text-transform: none;
}

.advanced-caret {
  color: var(--gold);
  transition: transform 0.2s ease;
}

.advanced-toggle[aria-expanded="true"] .advanced-caret {
  transform: rotate(180deg);
}

.advanced-panel {
  padding: 18px 0 2px;
}

.field-row {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 16px;
}

.field-group.compact {
  margin-bottom: 16px;
}

input[type="number"],
input[type="text"],
input[type="password"] {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 7, 6, 0.45);
  color: var(--cream-dim);
  font-size: 12px;
  transition: border-color 0.2s ease;
}

input[type="number"]:focus,
input[type="text"]:focus,
input[type="password"]:focus {
  border-color: rgba(212, 175, 106, 0.5);
}

input[type="range"] {
  width: 100%;
  height: 28px;
  accent-color: var(--gold);
  --range: 66%;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold) var(--range), rgba(232, 221, 201, 0.15) var(--range));
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5.5px;
  border-radius: 50%;
  background: var(--gold-bright);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px rgba(212, 175, 106, 0.6);
}

.estimate {
  margin: 10px 0 0;
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.03em;
  text-align: center;
}

.trust-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.02em;
  text-align: center;
}

.trust-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--green);
}

/* ---------- Progress ---------- */

.progress-section {
  padding-bottom: 110px;
  scroll-margin-top: 96px;
}

.progress-card {
  padding: 32px 34px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 82% 6%, rgba(212, 175, 106, 0.1), transparent 26rem),
    linear-gradient(150deg, rgba(25, 31, 26, 0.82), rgba(10, 13, 11, 0.96));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.progress-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.progress-head h2 {
  font-size: clamp(32px, 3.6vw, 46px);
  margin-bottom: 0;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 26px 0 14px;
}

.progress-track {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(232, 221, 201, 0.1);
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright));
  transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
}

.progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  animation: progress-shine 2.2s infinite;
}

@keyframes progress-shine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.progress-percent {
  min-width: 45px;
  color: var(--gold-bright);
  font-family: var(--mono);
  font-size: 12px;
  text-align: right;
}

.progress-detail {
  margin: 0 0 24px;
  color: var(--cream-dim);
  font-size: 13px;
  min-height: 21px;
}

.progress-detail.is-error {
  color: var(--red);
}

.stage-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stage-list li {
  display: flex;
  gap: 11px;
  padding: 18px 16px 18px 0;
  border-right: 1px solid var(--line);
  opacity: 0.46;
  transition: opacity 0.3s ease;
}

.stage-list li:last-child {
  border-right: 0;
  padding-right: 0;
}

.stage-list li.is-active,
.stage-list li.is-done {
  opacity: 1;
}

.stage-num {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}

.stage-list li.is-active .stage-num {
  border-color: var(--gold);
  color: var(--gold-bright);
  box-shadow: 0 0 0 4px rgba(212, 175, 106, 0.08);
}

.stage-list li.is-done .stage-num {
  border-color: rgba(125, 169, 138, 0.55);
  background: rgba(125, 169, 138, 0.12);
  color: var(--green);
}

.stage-list li.is-error .stage-num {
  border-color: var(--red);
  color: var(--red);
}

.stage-list strong {
  display: block;
  margin: 1px 0 3px;
  font-size: 12px;
  font-weight: 600;
  color: var(--cream);
}

.stage-list small {
  display: block;
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.45;
}

.progress-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.04em;
}

/* ---------- Result ---------- */

.result-section {
  padding-bottom: 110px;
  scroll-margin-top: 140px;
}

.result-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.result-head .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.result-head h2 {
  margin-bottom: 6px;
}

.result-meta {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 18px;
}

.audio-card,
.report-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(150deg, rgba(25, 31, 26, 0.7), rgba(10, 13, 11, 0.9));
  padding: 24px;
}

.audio-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.audio-card-head strong {
  display: block;
  margin-top: 3px;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
}

.audio-duration {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 11px;
}

.audio-shell {
  position: relative;
  padding: 16px;
  border: 1px solid rgba(212, 175, 106, 0.18);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 20%, rgba(212, 175, 106, 0.08), transparent 20rem),
    rgba(5, 7, 6, 0.55);
}

.audio-bars {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 44px;
  margin-bottom: 12px;
  opacity: 0.55;
}

.audio-bars i {
  flex: 1;
  height: 34%;
  max-height: 100%;
  border-radius: 2px;
  background: linear-gradient(to top, rgba(212, 175, 106, 0.25), var(--gold));
}

.audio-bars i:nth-child(2n) { height: 42%; }
.audio-bars i:nth-child(3n) { height: 74%; }
.audio-bars i:nth-child(4n) { height: 32%; }
.audio-bars i:nth-child(5n) { height: 88%; }
.audio-bars i:nth-child(7n) { height: 56%; }
.audio-bars i:nth-child(11n) { height: 96%; }

.player {
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid rgba(212, 175, 106, 0.38);
  border-radius: 50%;
  background: rgba(212, 175, 106, 0.08);
  color: var(--gold-bright);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.player-btn:hover {
  background: var(--gold);
  color: #17140d;
  transform: scale(1.03);
}

.player-btn.is-playing {
  background: var(--gold);
  color: #17140d;
}

.player-icon {
  display: block;
  margin-left: 1px;
  font-size: 11px;
  line-height: 1;
}

.player-btn.is-playing .player-icon {
  margin-left: 0;
  font-size: 9px;
  letter-spacing: -0.15em;
}

.player-time {
  min-width: 34px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  text-align: center;
}

.player-seek {
  flex: 1;
  height: 26px;
  --range: 0%;
}

.player-seek::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold) var(--range), rgba(232, 221, 201, 0.18) var(--range));
}

.player-small .player-btn {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}

.player-small .player-time {
  min-width: 30px;
}

.download-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.audio-note {
  margin: 14px 0 0;
  color: var(--muted-2);
  font-size: 10px;
  letter-spacing: 0.02em;
}

.report-card {
  display: flex;
  flex-direction: column;
}

.report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.source-badge {
  padding: 4px 8px;
  border: 1px solid rgba(125, 169, 138, 0.45);
  border-radius: 999px;
  background: rgba(125, 169, 138, 0.1);
  color: var(--green);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.source-badge.is-local {
  border-color: rgba(212, 175, 106, 0.4);
  background: rgba(212, 175, 106, 0.08);
  color: var(--gold);
}

.report-card h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
}

.report-card > p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.report-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: auto;
}

.stat {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.015);
}

.stat span {
  display: block;
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stat strong {
  display: block;
  margin-top: 3px;
  color: var(--cream-dim);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
}

.report-opening {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 10px;
}

.report-opening strong {
  color: var(--gold);
  font-weight: 500;
}

.warnings {
  margin-top: 16px;
  padding: 12px 16px;
  border: 1px solid rgba(212, 175, 106, 0.25);
  border-radius: 10px;
  background: rgba(212, 175, 106, 0.06);
  color: var(--muted);
  font-size: 11px;
}

.warnings strong {
  color: var(--gold);
}

.script-card {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(150deg, rgba(25, 31, 26, 0.62), rgba(10, 13, 11, 0.92));
  padding: 28px;
}

.script-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.script-head h3 {
  margin-bottom: 6px;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 500;
}

.script-meta {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.script-actions {
  display: flex;
  gap: 14px;
}

.script-segments {
  display: flex;
  flex-direction: column;
}

.script-segment {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(232, 221, 201, 0.07);
}

.script-segment:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.segment-time {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 10px;
  padding-top: 3px;
}

.segment-body {
  min-width: 0;
}

.segment-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

.segment-beat {
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.move-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border: 1px solid rgba(212, 175, 106, 0.25);
  border-radius: 4px;
  background: rgba(212, 175, 106, 0.05);
  color: var(--gold);
  font-family: var(--mono);
  font-size: 9px;
}

.segment-body p {
  max-width: 920px;
  margin: 0;
  color: var(--cream-dim);
  font-size: 14px;
  line-height: 1.75;
}

/* ---------- How ---------- */

.how {
  padding-bottom: 110px;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--line);
  overflow: hidden;
}

.how-card {
  padding: 26px 24px 28px;
  background: linear-gradient(160deg, rgba(18, 23, 19, 0.96), rgba(10, 13, 11, 0.98));
}

.how-num {
  display: block;
  margin-bottom: 28px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 10px;
}

.how-card h3 {
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 500;
}

.how-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

/* ---------- Voice ---------- */

.voice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.78fr);
  gap: 70px;
  align-items: center;
  padding-bottom: 110px;
  border-top: 1px solid var(--line);
  padding-top: 90px;
}

.voice-lede {
  max-width: 520px;
  color: var(--cream-dim);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 28px;
}

.voice-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  max-width: 480px;
  margin: 0 0 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--line);
  overflow: hidden;
}

.voice-specs div {
  padding: 12px 14px;
  background: var(--bg-soft);
}

.voice-specs dt {
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.voice-specs dd {
  margin: 3px 0 0;
  color: var(--cream-dim);
  font-family: var(--mono);
  font-size: 11px;
}

.consent-note {
  color: var(--muted-2);
  font-size: 10px;
  margin: 0;
}

.voice-playback {
  display: grid;
  place-items: center;
}

.playback-card {
  width: min(390px, 100%);
  padding: 26px;
  border: 1px solid rgba(212, 175, 106, 0.25);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(212, 175, 106, 0.12), transparent 18rem),
    linear-gradient(155deg, rgba(25, 31, 26, 0.95), rgba(9, 12, 10, 0.98));
  box-shadow: var(--shadow);
}

.playback-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.playback-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--green);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.playback-live span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--green);
}

.playback-title {
  margin-top: 22px;
  font-family: var(--serif);
  font-size: 52px;
  line-height: 1;
  color: var(--cream);
}

.playback-sub {
  margin: 8px 0 20px;
  color: var(--muted);
  font-size: 11px;
}

.playback-card .player {
  margin-top: 4px;
}

.playback-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.02em;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(6, 8, 7, 0.65);
  padding: 56px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr 0.8fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-brand .brand-word {
  font-size: 27px;
}

.footer-brand p {
  max-width: 280px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}

.footer-label {
  margin-bottom: 4px;
  color: var(--gold);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-col a {
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--gold-bright);
}

.footer-note {
  color: var(--muted-2);
  line-height: 1.65;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.04em;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 80;
  max-width: min(520px, calc(100% - 32px));
  padding: 12px 18px;
  border: 1px solid rgba(212, 175, 106, 0.4);
  border-radius: 10px;
  background: rgba(16, 20, 17, 0.96);
  color: var(--cream-dim);
  font-size: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  transform: translate(-50%, 12px);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  backdrop-filter: blur(10px);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.is-error {
  border-color: rgba(209, 113, 97, 0.5);
}

/* ---------- Responsive ---------- */

@media (max-width: 1040px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 0.82fr);
    gap: 36px;
  }

  .hero-visual {
    min-height: 430px;
  }

  .float-tag-one {
    left: -12px;
  }

  .how-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1.2fr 0.8fr 0.8fr;
  }

  .footer-note {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 64px;
    padding-bottom: 72px;
  }

  .hero-copy {
    max-width: 720px;
  }

  .hero-visual {
    min-height: 470px;
    margin-top: -10px;
  }

  .studio-shell {
    grid-template-columns: 1fr;
  }

  .studio-side {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .result-grid {
    grid-template-columns: 1fr;
  }

  .voice {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .voice-playback {
    justify-items: start;
  }

  .playback-card {
    width: min(440px, 100%);
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 32px, 1200px);
  }

  .nav {
    min-height: 68px;
    gap: 14px;
  }

  .nav-links {
    display: none;
  }

  .nav-status {
    margin-left: auto;
  }

  .brand-word {
    font-size: 21px;
  }

  .hero {
    padding-top: 48px;
    padding-bottom: 64px;
  }

  h1 {
    font-size: clamp(46px, 13vw, 64px);
  }

  .hero-lede {
    font-size: 15px;
  }

  .hero-proof {
    gap: 18px;
  }

  .hero-visual {
    min-height: 420px;
  }

  .take-card {
    width: min(360px, 100%);
    padding: 22px;
  }

  .float-tag {
    display: none;
  }

  .studio-main,
  .studio-side {
    padding: 24px 20px;
  }

  .pgn-wrap textarea {
    min-height: 220px;
  }

  .stage-list {
    grid-template-columns: 1fr 1fr;
  }

  .stage-list li {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 14px 10px 14px 0;
  }

  .stage-list li:nth-child(2n) {
    padding-left: 14px;
    border-left: 1px solid var(--line);
  }

  .stage-list li:nth-child(n + 3) {
    border-bottom: 0;
  }

  .progress-head,
  .result-head,
  .script-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .progress-card,
  .script-card {
    padding: 24px 20px;
  }

  .progress-foot {
    flex-direction: column;
    gap: 4px;
  }

  .script-segment {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
  }

  .how-grid {
    grid-template-columns: 1fr;
  }

  .how-card {
    padding: 22px 20px;
  }

  .how-num {
    margin-bottom: 18px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 4px;
  }

  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
