:root {
  --bg: #f2ece1;
  --bg-accent: #d9c7a4;
  --card: rgba(255, 252, 246, 0.82);
  --ink: #1c241f;
  --muted: #5f675f;
  --line: rgba(28, 36, 31, 0.14);
  --primary: #1f5c4d;
  --primary-strong: #113a31;
  --shadow: 0 20px 50px rgba(17, 32, 28, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.7), transparent 40%),
    radial-gradient(circle at bottom right, rgba(31, 92, 77, 0.16), transparent 32%),
    linear-gradient(160deg, var(--bg) 0%, #efe6d7 48%, var(--bg-accent) 100%);
}

.app-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.hero {
  margin-bottom: 24px;
}

.top-nav {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  padding: 12px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
}

.nav-link.current {
  background: var(--primary);
  border-color: transparent;
  color: #f8f5ee;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
}

h1,
h2 {
  margin: 0 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
}

h1 {
  font-size: clamp(32px, 5vw, 56px);
  line-height: 0.98;
  max-width: 10ch;
}

h2 {
  font-size: 22px;
}

.lede {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

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

.controls {
  margin-bottom: 20px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

input,
select,
button,
audio {
  width: 100%;
}

input,
select,
button {
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
}

input,
select {
  background: rgba(255, 255, 255, 0.84);
}

button {
  background: var(--primary);
  color: #f8f5ee;
  border-color: transparent;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease;
}

button:hover {
  background: var(--primary-strong);
  transform: translateY(-1px);
}

.actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.collapsible {
  padding: 0;
  overflow: hidden;
}

.collapsible summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px;
  cursor: pointer;
  list-style: none;
}

.collapsible summary::-webkit-details-marker {
  display: none;
}

.collapsible summary::after {
  content: "+";
  flex: 0 0 auto;
  font-size: 24px;
  line-height: 1;
  color: var(--primary);
}

.collapsible[open] summary::after {
  content: "\2212";
}

.collapsible summary h2 {
  margin: 0;
}

.collapsible pre {
  padding: 0 20px 20px;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.5;
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 13px;
  color: var(--muted);
}

.status {
  margin: 12px 0 0;
  color: var(--muted);
}

@media (max-width: 640px) {
  .app-shell {
    padding: 20px 14px 32px;
  }

  .card {
    border-radius: 18px;
    padding: 16px;
  }
}
