:root {
  color-scheme: light;
  --bg: #f6efe5;
  --panel: rgba(255, 252, 247, 0.88);
  --panel-strong: #fffaf2;
  --text: #1f1a17;
  --muted: #6e6259;
  --line: rgba(86, 63, 47, 0.16);
  --accent: #b6542f;
  --accent-dark: #7f3318;
  --ok-bg: #ecf7ef;
  --ok-line: #b7ddbe;
  --err-bg: #fff0eb;
  --err-line: #efc0b1;
  --shadow: 0 18px 48px rgba(84, 56, 39, 0.12);
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(206, 112, 70, 0.20), transparent 34%),
    radial-gradient(circle at right, rgba(111, 146, 120, 0.16), transparent 28%),
    linear-gradient(180deg, #fbf6ee 0%, var(--bg) 100%);
  color: var(--text);
}

main {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 72px;
}

.hero {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0;
  color: var(--accent-dark);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 4.8rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
  max-width: 11ch;
}

.lead {
  margin: 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
  gap: 22px;
  align-items: start;
}

.card {
  background: var(--panel);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.lookup {
  padding: 24px;
}

.panel-title {
  margin: 0 0 8px;
  font-size: 1.45rem;
}

.panel-copy {
  margin: 0 0 18px;
  color: var(--muted);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.55;
}

label {
  display: block;
  margin-bottom: 10px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
}

textarea {
  width: 100%;
  min-height: 164px;
  resize: vertical;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(86, 63, 47, 0.22);
  background: var(--panel-strong);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

textarea:focus {
  outline: 2px solid rgba(182, 84, 47, 0.18);
  border-color: var(--accent);
}

.actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
  flex-wrap: wrap;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: white;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(127, 51, 24, 0.22);
}

.hint {
  color: var(--muted);
  font-size: 0.92rem;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.notice {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

.notice.error {
  background: var(--err-bg);
  border-color: var(--err-line);
  color: #7a2d14;
}

.notice.success {
  background: var(--ok-bg);
  border-color: var(--ok-line);
  color: #214f2d;
}

.result-grid {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.result-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stat {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 250, 242, 0.82);
  border: 1px solid var(--line);
}

.stat-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-value {
  word-break: break-word;
  font-size: 1rem;
}

pre {
  margin: 0;
  overflow-x: auto;
  padding: 18px;
  border-radius: 18px;
  background: #1d1f24;
  color: #f3f1eb;
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.92rem;
  line-height: 1.55;
}

.sidebar {
  display: grid;
  gap: 22px;
}

.stack {
  padding: 22px;
}

.stack h2 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}

.stack p,
.stack li {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--muted);
  line-height: 1.55;
}

.stack ul {
  margin: 0;
  padding-left: 18px;
}

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

.format-list li {
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
}

.format-list li:first-child {
  padding-top: 0;
  border-top: 0;
}

.format-list strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

@media (max-width: 840px) {
  main {
    width: min(100% - 20px, 1040px);
    padding-top: 28px;
  }

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

  .lookup,
  .stack {
    padding: 20px;
  }

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