:root {
  --black: #000000;
  --panel: #0a0a0b;
  --panel-2: #101012;
  --line: #1e1e22;
  --line-strong: #2c2c32;
  --text: #f4f4f5;
  --muted: #8b8b95;
  --good: #8ff0a4;
  --bad: #ff8f8f;
  --radius: 14px;
  --wrap: 1140px;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--black);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.6rem;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
}

h2 {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

h3 {
  font-size: 1rem;
}

p {
  margin: 0 0 0.8rem;
}

a {
  color: var(--text);
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.visually-hidden,
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
  clip: auto;
  display: inline-block;
  margin: 12px 20px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter:blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  background: var(--panel);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text strong {
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.brand-text small {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04);
}

.dot.is-online {
  background: var(--good);
}

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

/* Hero */

.hero {
  padding: 56px 20px 32px;
  max-width: 820px;
}

.lede {
  color: var(--muted);
  font-size: 1.02rem;
  margin: 0;
}

/* Layout */

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

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

.panel-head h2 {
  margin: 0;
}

.panel-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

/* Form */

.fields {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field-wide {
  grid-column: 1 / -1;
}

.field > span {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

select,
textarea,
input {
  width: 100%;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 11px 12px;
  font-family: var(--sans);
  font-size: 0.95rem;
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
  cursor: pointer;
}

textarea {
  resize: vertical;
  min-height: 150px;
  line-height: 1.55;
}

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

textarea::placeholder {
  color: #5c5c66;
}

.swap {
  background: var(--panel-2);
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 11px 12px;
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.swap:hover {
  color: var(--text);
  border-color: #4a4a54;
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.btn {
  border-radius: 10px;
  padding: 12px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: opacity 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--text);
  color: var(--black);
}

.btn-primary:hover {
  opacity: 0.85;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: #4a4a54;
}

.btn[disabled] {
  opacity: 0.5;
  cursor: progress;
}

.hint {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: #5c5c66;
}

.examples {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.examples-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-right: 2px;
}

.chip {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.8rem;
  cursor: pointer;
}

.chip:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

/* Output */

.panel-output {
  min-height: 320px;
}

.placeholder {
  color: var(--muted);
  font-size: 0.92rem;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  padding: 20px;
  margin: 0;
}

.result-block + .result-block {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.result-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}

.slang {
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
  word-break: break-word;
  white-space: pre-wrap;
}

.original-text {
  color: var(--muted);
  margin: 0;
  word-break: break-word;
  white-space: pre-wrap;
}

.vibe {
  margin: 0;
  color: #cfcfd6;
  font-size: 0.92rem;
}

.copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.copy-btn {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 5px 12px;
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.copy-btn:hover {
  color: var(--text);
}

.breakdown {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.breakdown li {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}

.breakdown .term {
  font-family: var(--mono);
  font-size: 0.86rem;
  display: block;
  margin-bottom: 4px;
}

.breakdown .meaning {
  margin: 0 0 4px;
  font-size: 0.9rem;
}

.breakdown .why {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.alert {
  border: 1px solid #4a2323;
  background: #170b0b;
  color: var(--bad);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0;
  font-size: 0.9rem;
}

.loading {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.85rem;
  margin: 0;
}

.loading::after {
  content: "";
  animation: dots 1.2s steps(4, end) infinite;
}

@keyframes dots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
}

/* Corrections and alternatives */

.ar {
  font-family: var(--sans);
  white-space: nowrap;
}

.corrected-original {
  margin: 0;
  font-size: 1.02rem;
  color: var(--good);
  word-break: break-word;
  white-space: pre-wrap;
}

.corrections {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.corrections li {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
}

.fix-swap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0;
  font-size: 0.95rem;
}

.fix-wrong {
  color: var(--bad);
  text-decoration: line-through;
  word-break: break-word;
}

.fix-arrow {
  color: var(--muted);
}

.fix-right {
  color: var(--good);
  word-break: break-word;
}

.fix-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.alternatives {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.alternatives li {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.95rem;
  word-break: break-word;
}

/* Sections */

.how,
.use-cases {
  margin-top: 64px;
}

.steps {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.steps li {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.step-number {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  display: block;
  margin-bottom: 10px;
}

.steps h3 {
  margin-bottom: 4px;
}

.steps p,
.card p {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 20px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

/* Footer */

.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 22px;
  padding-bottom: 34px;
}

.footer-brand {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.footer-credit {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}

/* Responsive */

@media (max-width: 900px) {
  .grid,
  .steps,
  .cards {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 40px;
  }
}

@media (max-width: 560px) {
  .fields {
    grid-template-columns: 1fr;
  }

  .swap {
    justify-self: start;
  }

  .actions {
    flex-wrap: wrap;
  }

  .hint {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
