:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  --background: #020611;
  --surface: #0e1114;
  --raised: #14181d;
  --border: #252b33;
  --text: #f5f7fb;
  --muted: #a4afc1;
  --azure: #3cb2fb;
  --translation: #6dc9ff;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--text); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, p, figure, dl, dd { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--translation); outline-offset: 4px; }
[id] { scroll-margin-top: 1.5rem; }

.shell { width: min(72rem, calc(100% - 5rem)); margin-inline: auto; }

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  padding: .75rem 1rem;
  border-radius: .5rem;
  color: var(--background);
  background: var(--azure);
  transform: translateY(calc(-100% - 1.5rem));
}

.skip-link:focus { transform: none; }

.site-header { border-bottom: 1px solid #19222f; }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.header-inner { min-height: 4.75rem; }

.wordmark { display: inline-flex; align-items: center; gap: .55rem; font-size: 1.25rem; font-weight: 700; letter-spacing: -.035em; }
.brand-mark {
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  background: url("chatslator-icon.png") center / contain no-repeat;
}

.site-footer a:not(.wordmark) { color: var(--muted); font-size: .9rem; }
.site-footer a:hover { color: var(--translation); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: 3.125rem;
  padding: .65rem 1rem;
  border: 1px solid transparent;
  border-radius: .65rem;
  font-size: .95rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.button-small { min-height: 2.5rem; border-color: #28506b; background: #112131; color: var(--translation); font-size: .875rem; }
.button-small:hover { background: #1b3449; border-color: var(--translation); }
.button-primary { color: #02101d; background: var(--azure); }
.button-primary:hover { background: #82d1ff; }
.button-secondary { background: var(--raised); border-color: #373f49; }
.button-secondary:hover { background: #222b36; border-color: #6d7c91; }
.buttons { display: flex; flex-wrap: wrap; gap: .65rem; }

.browser-icon { width: 1.25rem; height: 1.25rem; flex: none; object-fit: contain; }

.hero { position: relative; isolation: isolate; overflow: clip; border-bottom: 1px solid #19222f; }
.hero::before, .hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero::before { background: radial-gradient(ellipse at 78% 47%, #09213a 0%, #061020 31%, transparent 65%); }
.hero::after {
  background: radial-gradient(circle, #28649a 1px, transparent 1.3px) 0 0 / 16px 16px;
  mask-image: radial-gradient(ellipse at 84% 45%, #0009, transparent 64%), radial-gradient(ellipse at 1% 95%, #0006, transparent 40%);
}

.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(24rem, .95fr); gap: clamp(2rem, 6vw, 5.5rem); align-items: center; padding-block: clamp(4rem, 7.6vw, 7.25rem); }
.eyebrow { color: var(--translation); font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }

.hero h1 {
  margin-top: 1.125rem;
  font-size: clamp(3.75rem, 6.35vw, 6.25rem);
  line-height: .98;
  letter-spacing: -.064em;
  font-weight: 750;
}

.hero h1 span { color: var(--azure); }
.hero-description { max-width: 29rem; margin-top: 1.6rem; color: var(--muted); font-size: 1.15rem; line-height: 1.6; }
.hero .buttons { margin-top: 1.75rem; }
.platforms { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.35rem; margin-top: 2rem; }
.platforms span { display: inline-flex; align-items: center; gap: .45rem; color: #c5cddd; font-size: .875rem; font-weight: 600; }
.platform-icon { width: 1rem; height: 1rem; flex: none; object-fit: contain; }
.kick-wordmark { width: 2.3rem; flex: none; }

.demo {
  padding: 1.25rem;
  border: 1px solid #293c52;
  border-radius: 1.15rem;
  background: var(--surface);
  box-shadow: 0 1.4rem 4rem #0007, 0 0 2rem #2776af1c;
}

.demo-header, .demo-heading { display: flex; align-items: center; }
.demo-header { justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.demo-heading { gap: .75rem; }
.demo-symbol { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border: 1px solid #25435a; border-radius: .65rem; background: #102332; color: var(--translation); font-size: 1rem; font-weight: 750; grid-template-columns: 1fr 1fr; padding-inline: .35rem; }
.demo-symbol span { font-size: .7rem; align-self: end; margin-bottom: .46rem; }
.demo-heading h2 { font-size: 1.05rem; }
.demo-heading p { margin-top: .18rem; color: var(--muted); font-size: .825rem; }
.target-language { padding: .35rem .6rem; border: 1px solid #284158; border-radius: .4rem; background: #10202e; color: var(--translation); font-size: .825rem; font-weight: 650; white-space: nowrap; }
.target-language span { margin-inline-end: .15rem; }

.messages { display: grid; margin: 0; padding: .125rem .85rem; list-style: none; border: 1px solid #212932; border-radius: .75rem; background: #090d13; }
.message { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: .65rem; align-items: start; padding: .8rem 0; }
.message + .message { border-top: 1px solid #1c252f; }
.avatar { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; font-size: .875rem; font-weight: 700; }
.avatar-purple { color: #cbbbff; background: #302549; }
.avatar-green { color: #90e2c4; background: #20382f; }
.avatar-orange { color: #ffc493; background: #402d27; }
.handle { color: #c4cddd; font-size: .825rem; font-weight: 650; }
.message-text { display: flex; flex-wrap: wrap; gap: .2rem .55rem; margin-top: .2rem; color: var(--text); font-size: .94rem; line-height: 1.4; }
.translation { color: var(--translation); }
[data-original][hidden] + .translation .translation-parenthesis { display: none; }

.display-controls { min-inline-size: 0; padding: 0; margin: 0 0 1rem; border: 0; }
.display-controls legend { padding: 0; margin-bottom: .5rem; color: var(--muted); font-size: .825rem; font-weight: 600; }
.mode-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; }
.mode-options label { position: relative; }
.mode-options input { position: absolute; inset: 0; margin: 0; inline-size: 100%; block-size: 100%; opacity: 0; cursor: pointer; }
.mode-options label span { display: grid; place-items: center; min-height: 2.35rem; padding: .2rem; border: 1px solid var(--border); border-radius: .45rem; background: var(--raised); color: var(--muted); font-size: .875rem; font-weight: 600; }
.mode-options label:hover span { background: #1b2531; }
.mode-options input:checked + span { border-color: #326286; background: #102537; color: var(--translation); }
.mode-options input:focus-visible + span { outline: 2px solid var(--translation); outline-offset: 3px; }

.settings-section { padding-block: clamp(3.75rem, 7vw, 6.5rem); }
.section-heading h2, .install-panel h2 { font-size: clamp(2rem, 4.25vw, 3.25rem); line-height: 1.1; letter-spacing: -.055em; }
.section-heading h2 { margin-top: .55rem; }
.settings-summary { max-width: 36rem; margin-top: .75rem; color: var(--muted); line-height: 1.6; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(1.5rem, 4.8vw, 4rem); margin-top: 2rem; }
.settings-preview { padding: clamp(1rem, 3vw, 2rem); border: 1px solid #263344; border-radius: 1rem; background: linear-gradient(150deg, #101f30, var(--surface) 70%); }
.settings-preview figcaption { margin-bottom: 1rem; font-size: 1.05rem; font-weight: 700; }
.filter-example { margin: 0; padding: 0 .9rem; list-style: none; border: 1px solid #273342; border-radius: .65rem; background: #090d13; }
.filter-example li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem .75rem; padding: .9rem 0; }
.filter-example li + li { border-top: 1px solid #273342; }
.filter-example p { line-height: 1.5; }
.filter-status { padding: .2rem .5rem; border: 1px solid var(--border); border-radius: .4rem; background: var(--raised); color: var(--muted); font-size: .8125rem; }
.filter-status-translated { border-color: #284158; background: #10202e; color: var(--translation); }
.feature-list div { position: relative; padding: 1.15rem 0 1.15rem 1.05rem; border-bottom: 1px solid #202937; }
.feature-list div:first-child { border-top: 1px solid #202937; }
.feature-list div::before { content: ""; position: absolute; top: 1.68rem; left: 0; width: .36rem; height: .36rem; border-radius: 50%; background: var(--azure); }
.feature-list dt { font-size: 1.05rem; font-weight: 700; }
.feature-list dd, .install-panel p { color: var(--muted); line-height: 1.55; }
.feature-list dd { margin-top: .35rem; }

.install-section { padding-bottom: clamp(3.75rem, 7vw, 6.5rem); }
.install-panel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; padding: clamp(1.5rem, 4vw, 3rem); border: 1px solid #27445c; border-radius: 1rem; background: linear-gradient(115deg, #101d2a, var(--surface) 70%); }
.install-panel p { margin-top: .5rem; }
.site-footer { border-top: 1px solid #19222f; }
.footer-inner { flex-wrap: wrap; min-height: 5.25rem; padding-block: 1rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; }

.legal-page { display: flex; flex-direction: column; min-height: 100vh; }
.legal-content { flex: 1; }
.legal-header {
  position: relative;
  isolation: isolate;
  padding-block: clamp(2.25rem, 5vw, 4.75rem);
  border-bottom: 1px solid #202b3a;
  background: radial-gradient(ellipse at 77% 0%, #11263c, transparent 72%);
}

.legal-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle, #28649a 1px, transparent 1.3px) 0 0 / 16px 16px;
  mask-image: radial-gradient(ellipse at 83% 22%, #0008, transparent 66%);
}

.legal-pages { display: flex; flex-wrap: wrap; gap: .25rem; width: fit-content; padding: .25rem; border: 1px solid #2b3b50; border-radius: .75rem; background: #090f18; }
.legal-pages a { padding: .5rem .75rem; border-radius: .5rem; color: var(--muted); font-size: .875rem; font-weight: 650; }
.legal-pages a:hover { background: var(--raised); color: var(--text); }
.legal-pages a[aria-current="page"] { background: #152b40; color: var(--translation); }
.legal-header h1 { margin-top: 1.5rem; font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1.05; letter-spacing: -.055em; }
.legal-updated { margin-top: .85rem; color: var(--muted); font-size: .95rem; }

.legal-layout {
  display: grid;
  grid-template-columns: clamp(12rem, 22vw, 15rem) minmax(0, 46rem);
  align-items: start;
  gap: clamp(1.5rem, 5.5vw, 5rem);
  padding-block: clamp(1.75rem, 4.5vw, 3.75rem) clamp(3.5rem, 8vw, 6.5rem);
}

.legal-nav { position: sticky; top: 1.5rem; padding: 1rem; border: 1px solid #253344; border-radius: .9rem; background: var(--surface); }
.legal-nav p { padding-inline: .5rem; color: var(--text); font-size: .9rem; font-weight: 700; }
.legal-nav ul { display: grid; gap: .15rem; margin: .5rem 0 0; padding: 0; list-style: none; }
.legal-nav a { display: block; padding: .5rem; border-radius: .35rem; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.legal-nav a:hover, .legal-nav a:focus-visible { background: #142131; color: var(--translation); }

.legal-prose {
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
.legal-prose > p { padding: clamp(1rem, 2.5vw, 1.5rem); border: 1px solid #29465e; border-inline-start: 3px solid var(--azure); border-radius: .7rem; background: #0e1a28; color: #d6deeb; }
.legal-prose section { padding-block: 1.75rem; border-bottom: 1px solid #202b3a; }
.legal-prose section:last-child { padding-bottom: 0; border-bottom: 0; }
.legal-prose h2 { margin-bottom: .6rem; color: var(--text); font-size: clamp(1.25rem, 2.2vw, 1.55rem); line-height: 1.25; letter-spacing: -.025em; }
.legal-prose h2:target { color: var(--translation); }
.legal-prose p + p { margin-top: .75rem; }
.legal-prose strong { color: var(--text); }
.legal-prose a { color: var(--translation); text-decoration: underline; text-underline-offset: .18em; }
.legal-page .footer-links a[aria-current="page"] { color: var(--translation); }

@media (max-width: 58rem) {
  .shell { width: min(72rem, calc(100% - 3.5rem)); }
  .hero-grid { gap: 2rem; grid-template-columns: minmax(0, 1fr) minmax(21rem, 1fr); }
  .hero h1 { font-size: clamp(3.25rem, 7vw, 4.5rem); }
}

@media (max-width: 47rem) {
  .hero-grid, .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-grid { gap: 2.75rem; }
  .hero-copy { max-width: 35rem; }
  .hero h1 { font-size: clamp(3.5rem, 11vw, 5.5rem); }
  .hero::before { background: radial-gradient(ellipse at 85% 57%, #0b2037, transparent 70%); }
  .hero::after { mask-image: radial-gradient(ellipse at 96% 54%, #0009, transparent 65%); }
  .legal-layout { grid-template-columns: minmax(0, 1fr); }
  .legal-nav { position: static; }
  .legal-nav ul { grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); }
}

@media (max-width: 33rem) {
  .shell { width: calc(100% - 2rem); }
  .header-inner { min-height: 4.25rem; }
  .hero-grid { padding-block: 3.25rem; }
  .hero-description { font-size: 1.05rem; }
  .demo { padding: .85rem; }
  .filter-example li { flex-direction: column; align-items: flex-start; }
  .install-panel .buttons { width: 100%; }
  .install-panel .button { flex: 1 1 9.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}
