:root {
  color-scheme: dark;
  --bg: #0d1110;
  --panel: #151b18;
  --panel-strong: #1d2822;
  --text: #eef5ed;
  --muted: #a6b6aa;
  --line: #2d3a32;
  --accent: #7ee787;
  --accent-strong: #b7f7c0;
  --warning: #ffb86b;
  --shadow: rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(135deg, rgba(126, 231, 135, 0.08), transparent 32rem),
    radial-gradient(circle at top right, rgba(255, 184, 107, 0.09), transparent 24rem),
    var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

.app-shell {
  width: min(72rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0;
}

.hero {
  margin-bottom: 2rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 48rem;
  margin-bottom: 0.75rem;
  font-size: clamp(2.35rem, 6vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.intro {
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.converter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.converter-panel,
.reference-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(21, 27, 24, 0.92);
  box-shadow: 0 1.5rem 3rem var(--shadow);
}

.converter-panel {
  display: grid;
  gap: 1.1rem;
  padding: 1.25rem;
}

.panel-heading {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  align-items: start;
}

.badge {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 999px;
  background: var(--panel-strong);
  color: var(--accent-strong);
  font-weight: 800;
}

.panel-heading h2,
.reference-card h2 {
  margin-bottom: 0.25rem;
  font-size: 1.15rem;
  letter-spacing: 0;
}

.panel-heading p,
.reference-card p {
  color: var(--muted);
  line-height: 1.55;
}

label {
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 700;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem;
}

input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f1512;
  color: var(--text);
  padding: 0.85rem 0.95rem;
  outline: none;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(126, 231, 135, 0.18);
}

button {
  border: 1px solid rgba(126, 231, 135, 0.58);
  border-radius: 8px;
  background: #24402c;
  color: var(--accent-strong);
  cursor: pointer;
  font-weight: 800;
  padding: 0.85rem 1rem;
}

button:hover,
button:focus-visible {
  background: #31583b;
}

.result-box {
  min-height: 8.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f1512;
  padding: 1rem;
}

.result-label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

output {
  display: block;
  overflow-wrap: anywhere;
  color: var(--accent-strong);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(1.9rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
}

.error-message {
  min-height: 1.45rem;
  margin: 0.7rem 0 0;
  color: var(--warning);
  font-size: 0.92rem;
  line-height: 1.45;
}

.reference-card {
  margin-top: 1rem;
  padding: 1.25rem;
}

.symbols {
  display: grid;
  grid-template-columns: repeat(7, minmax(4rem, 1fr));
  gap: 0.5rem;
  margin: 1rem 0;
}

.symbols span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f1512;
  color: var(--muted);
  padding: 0.75rem 0.5rem;
  text-align: center;
}

.symbols strong {
  display: block;
  color: var(--accent-strong);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 1.15rem;
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 1rem, 36rem);
    padding: 1rem 0;
  }

  .converter-grid,
  .input-row {
    grid-template-columns: 1fr;
  }

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

  button {
    width: 100%;
  }
}
