:root {
  color-scheme: light;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --color-bg: #f4f0e8;
  --color-paper: #fffdf8;
  --color-surface: rgba(255, 253, 248, 0.84);
  --color-text: #24332e;
  --color-muted: #65736e;
  --color-accent: #356c5a;
  --color-accent-dark: #245243;
  --color-accent-muted: #6f9488;
  --color-accent-soft: #dcebe4;
  --color-warm-title: #a86243;
  --color-line: #d7ded9;
  --color-warm: #d99a62;
  --color-danger: #9b3f3f;
  --color-danger-soft: #f8e8e5;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 30px;
  --shadow-soft: 0 2px 4px rgba(36, 51, 46, 0.04), 0 18px 50px rgba(36, 51, 46, 0.1);
  font-family: var(--font-sans);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 92% 4%, rgba(217, 154, 98, 0.18), transparent 27rem),
    linear-gradient(180deg, #f7f3eb 0%, var(--color-bg) 75%);
  color: var(--color-text);
  line-height: 1.55;
}

button, textarea { font: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

a { color: var(--color-accent-dark); }

button:focus-visible, textarea:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(53, 108, 90, 0.32);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--color-text);
  color: white;
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.site-header, main, footer {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  border-bottom: 1px solid rgba(36, 51, 46, 0.12);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
  font-weight: 720;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: inline-flex;
  width: 31px;
  height: 25px;
}

.brand-mark i {
  position: absolute;
  top: 2px;
  width: 17px;
  height: 22px;
  border: 2px solid var(--color-accent);
  border-radius: 50% 50% 45% 45%;
}

.brand-mark i:first-child { left: 1px; transform: rotate(-18deg); }
.brand-mark i:last-child { right: 1px; transform: rotate(18deg); }

.demo-label {
  color: var(--color-muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(500px, 1.18fr);
  gap: clamp(40px, 8vw, 110px);
  align-items: start;
  padding: clamp(54px, 8vw, 108px) 0 58px;
}

.hero-copy { position: sticky; top: 32px; padding-top: 22px; }

.eyebrow, .result-kicker {
  margin: 0 0 14px;
  color: var(--color-accent-dark);
  font-size: 0.76rem;
  font-weight: 760;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

h1 {
  max-width: 650px;
  margin: 0;
  font-size: clamp(3.1rem, 6.1vw, 5.6rem);
  font-weight: 650;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.hero-title { color: var(--color-warm-title); }

.hero-title-main { display: block; }

.hero-title-row {
  display: flex;
  align-items: center;
  gap: 0.24em;
  color: var(--color-accent-muted);
}

.hero-title-symbol {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 0.78em;
  height: 0.56em;
}

.hero-title-symbol i {
  position: absolute;
  top: 0.02em;
  width: 0.42em;
  height: 0.52em;
  border: 0.035em solid currentColor;
  border-radius: 50% 50% 45% 45%;
}

.hero-title-symbol i:first-child {
  left: 0.04em;
  color: var(--color-warm-title);
  transform: rotate(-16deg);
}

.hero-title-symbol i:last-child {
  right: 0.04em;
  color: var(--color-accent-muted);
  transform: rotate(16deg);
}

.intro {
  max-width: 530px;
  margin: 28px 0 0;
  color: var(--color-muted);
  font-size: clamp(1rem, 1.4vw, 1.17rem);
}

.workspace { min-width: 0; }

.situation-form {
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.situation-form > label {
  display: block;
  margin-bottom: 10px;
  font-weight: 720;
}

.input-shell {
  overflow: hidden;
  border: 1px solid #cdd6d1;
  border-radius: var(--radius-md);
  background: var(--color-paper);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.input-shell:focus-within {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(53, 108, 90, 0.11);
}

textarea {
  display: block;
  width: 100%;
  min-height: 184px;
  padding: 18px 18px 10px;
  resize: vertical;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.55;
}

textarea::placeholder { color: #8a9691; }

.input-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px 14px;
  color: var(--color-muted);
  font-size: 0.76rem;
}

.voice-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.voice-button, .example-chip, .copy-button, .button-secondary, .button-primary {
  border: 0;
  cursor: pointer;
}

.voice-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text);
  font-weight: 650;
}

.voice-button svg, .dialog-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.voice-button:hover { background: var(--color-accent-soft); }
.voice-button:disabled { cursor: not-allowed; opacity: 0.52; }
.voice-button.is-listening { border-color: var(--color-warm); background: #fff0e1; }
.voice-status { color: var(--color-muted); font-size: 0.78rem; }

.examples-block { margin-top: 22px; }
.examples-block > span { color: var(--color-muted); font-size: 0.82rem; }
.examples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }

.example-chip {
  padding: 8px 11px;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--color-text);
  font-size: 0.8rem;
}

.example-chip:hover { border-color: #9eb3a9; background: var(--color-accent-soft); }
.form-error { min-height: 24px; margin: 10px 0 4px; color: var(--color-danger); font-size: 0.88rem; }

.submit-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 58px;
  padding: 0 18px 0 21px;
  border: 0;
  border-radius: 14px;
  background: var(--color-accent);
  color: white;
  cursor: pointer;
  font-weight: 750;
  box-shadow: 0 8px 22px rgba(36, 82, 67, 0.22);
  transition: background 150ms ease, transform 150ms ease;
}

.submit-button:hover { background: var(--color-accent-dark); }
.submit-button:active { transform: translateY(1px); }
.submit-button:disabled { cursor: wait; opacity: 0.72; }
.submit-button svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.8; }

.safety-note {
  display: flex;
  gap: 12px;
  margin: 18px 8px 0;
  color: var(--color-muted);
  font-size: 0.83rem;
}

.safety-note p { margin: 0; }
.safety-note strong { color: var(--color-text); }
.safety-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 1px solid #bdc9c3;
  border-radius: 50%;
  color: var(--color-accent-dark);
  font-weight: 800;
}

.result {
  max-width: 780px;
  margin: 12px auto 92px;
  padding: clamp(24px, 5vw, 48px);
  scroll-margin-top: 24px;
  border: 1px solid #cedbd4;
  border-radius: var(--radius-lg);
  background: var(--color-paper);
  box-shadow: var(--shadow-soft);
}

.result--urgent { border-color: #d9a3a0; background: #fffaf9; }
.result h2 { margin: 0; font-size: clamp(1.75rem, 4vw, 2.6rem); letter-spacing: -0.035em; outline: 0; }
.empathy-note {
  margin-top: 24px;
  padding: 18px 20px;
  border-left: 3px solid var(--color-accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(237, 242, 236, 0.72);
}
.empathy-note .result-kicker { display: block; margin-bottom: 7px; }
.empathy-note p { margin: 0; color: var(--color-text); font-size: 1.04rem; font-weight: 610; line-height: 1.55; }
.explanation-label { display: block; margin-top: 26px; }
.result .explanation { margin: 8px 0 0; color: var(--color-muted); font-size: 1.03rem; line-height: 1.65; }

.one-step {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 15px;
  margin-top: 30px;
  padding-top: 25px;
  border-top: 1px solid var(--color-line);
}

.step-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--color-accent);
  color: white;
  font-size: 1.2rem;
  font-weight: 750;
}

.one-step p { margin: 0; font-size: 1.18rem; font-weight: 680; line-height: 1.42; }
.phrase-card { margin-top: 26px; padding: 21px; border-radius: var(--radius-md); background: var(--color-accent-soft); }
.phrase-card blockquote { margin: 7px 0 16px; font-size: 1.1rem; font-weight: 620; }
.copy-button { padding: 8px 0; background: transparent; color: var(--color-accent-dark); font-weight: 720; text-decoration: underline; text-underline-offset: 4px; }
.result details { margin-top: 22px; color: var(--color-muted); }
.result summary { cursor: pointer; color: var(--color-text); font-weight: 680; }
.result details p { margin-bottom: 0; }
.watch-note { margin-top: 22px; padding: 18px 20px; border: 1px solid #d8c8a9; border-radius: var(--radius-sm); background: #fffaf0; }
.watch-note .result-kicker { display: block; margin-bottom: 7px; color: #705c34; }
.watch-note p { margin: 0; color: var(--color-muted); font-size: 0.94rem; line-height: 1.55; }
.source-note { margin: 24px 0 0; color: var(--color-muted); font-size: 0.78rem; }
.question-card { margin-top: 26px; padding: 21px; border-radius: var(--radius-md); background: var(--color-accent-soft); }
.question-card .result-kicker { display: block; margin-bottom: 7px; }
.question-card p { margin: 0; font-size: 1.1rem; font-weight: 650; line-height: 1.5; }
.safety-answer { margin: 16px 0 0; padding: 15px 17px; border: 1px solid #d9a3a0; border-radius: var(--radius-sm); background: var(--color-danger-soft); color: var(--color-danger); font-weight: 650; }
.return-button { margin-top: 20px; padding: 11px 15px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: white; color: var(--color-accent-dark); cursor: pointer; font-weight: 720; }
.return-button:hover { background: var(--color-accent-soft); }

.urgent-strip {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(30px, 7vw, 90px);
  margin: 0 auto;
  padding: 38px 0;
  border-top: 1px solid rgba(36, 51, 46, 0.16);
  border-bottom: 1px solid rgba(36, 51, 46, 0.16);
}

.urgent-strip h2 { margin: 0; font-size: clamp(1.45rem, 3vw, 2.15rem); line-height: 1.18; letter-spacing: -0.03em; }
.urgent-strip > p { margin: 4px 0 0; color: var(--color-muted); font-size: 1rem; }
.urgent-strip a { font-weight: 800; }

footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  padding: 34px 0 54px;
  color: var(--color-muted);
  font-size: 0.78rem;
}

footer p { margin: 0; }
footer p:last-child { text-align: right; }

.voice-dialog {
  width: min(460px, calc(100% - 28px));
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: var(--color-paper);
  color: var(--color-text);
  box-shadow: 0 28px 80px rgba(20, 35, 29, 0.28);
}

.voice-dialog::backdrop { background: rgba(25, 35, 31, 0.5); backdrop-filter: blur(3px); }
.voice-dialog form { padding: 28px; }
.dialog-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--color-accent-soft); color: var(--color-accent-dark); }
.voice-dialog h2 { margin: 18px 0 8px; font-size: 1.5rem; }
.voice-dialog p { margin: 0; color: var(--color-muted); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; }
.button-secondary, .button-primary { padding: 11px 15px; border-radius: var(--radius-sm); font-weight: 700; }
.button-secondary { background: #edf0ed; color: var(--color-text); }
.button-primary { background: var(--color-accent); color: white; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 34px; padding-top: 48px; }
  .hero-copy { position: static; padding-top: 0; }
  h1 { font-size: clamp(2.85rem, 13vw, 4.8rem); }
  .intro { margin-top: 21px; }
  .urgent-strip { grid-template-columns: 1fr; gap: 17px; }
}

@media (max-width: 560px) {
  .site-header, main, footer { width: min(100% - 24px, 1180px); }
  .site-header { min-height: 68px; }
  .demo-label { font-size: 0.68rem; }
  .hero { padding: 24px 0 44px; gap: 22px; }
  .hero-copy .eyebrow { display: none; }
  h1 { font-size: clamp(2.25rem, 10.5vw, 2.85rem); line-height: 1.02; }
  .intro { margin-top: 14px; font-size: 0.94rem; line-height: 1.45; }
  .situation-form { padding: 18px; border-radius: 24px; }
  textarea { min-height: 166px; padding: 15px 15px 9px; }
  .input-meta { align-items: flex-end; padding: 0 15px 12px; }
  .input-meta span:first-child { max-width: 190px; }
  .voice-row { align-items: flex-start; flex-direction: column; gap: 6px; }
  .voice-button { width: 100%; justify-content: center; }
  .examples { display: grid; grid-template-columns: 1fr 1fr; }
  .example-chip:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .result { margin-bottom: 62px; border-radius: 24px; }
  .one-step { grid-template-columns: 39px 1fr; gap: 12px; }
  .step-number { width: 36px; height: 36px; }
  .one-step p { font-size: 1.06rem; }
  .urgent-strip { padding: 31px 0; }
  footer { grid-template-columns: 1fr; gap: 13px; padding-bottom: 38px; }
  footer p:last-child { text-align: left; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions button { width: 100%; }
}

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