:root {
  --primary-color: #c7792a;
  --ink: #251a12;
  --muted: #725f50;
  --paper: #fffaf4;
  --surface: #ffffff;
  --line: #e9ddd2;
  --danger: #a72c2c;
  --success: #237348;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, color-mix(in srgb, var(--primary-color) 13%, transparent), transparent 35rem),
    var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: var(--primary-color);
  text-underline-offset: 0.2em;
}

.topbar {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 800;
  text-decoration: none;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.inline-form {
  display: inline;
}

.link-button {
  border: 0;
  padding: 0;
  color: var(--primary-color);
  background: transparent;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.page {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 170px);
  display: grid;
  align-content: center;
  justify-items: start;
  max-width: 780px;
  padding: 5rem 0;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--primary-color);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.2rem, 8vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.intro {
  max-width: 680px;
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  line-height: 1.7;
  white-space: pre-line;
}

.primary-button {
  display: inline-flex;
  justify-content: center;
  border: 0;
  border-radius: 0.75rem;
  padding: 0.85rem 1.2rem;
  color: white;
  background: var(--primary-color);
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid color-mix(in srgb, var(--primary-color) 25%, var(--line));
  border-radius: 999px;
  padding: 0.65rem 0.9rem;
  color: var(--primary-color);
  background: color-mix(in srgb, var(--primary-color) 7%, white);
  font-size: 0.9rem;
  font-weight: 750;
}

.status-pill span {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--primary-color);
  box-shadow: 0 0 0 0.3rem color-mix(in srgb, var(--primary-color) 14%, transparent);
}

.site-footer {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.panel {
  margin: 4rem auto;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  box-shadow: 0 24px 80px rgb(69 42 20 / 8%);
}

.panel.narrow {
  max-width: 520px;
}

.panel h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.panel-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.stacked-form,
.settings-form {
  display: grid;
  gap: 1.2rem;
}

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

.full-width {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  padding: 0.8rem 0.9rem;
  color: var(--ink);
  background: white;
  font: inherit;
}

input:focus,
textarea:focus {
  outline: 3px solid color-mix(in srgb, var(--primary-color) 20%, transparent);
  border-color: var(--primary-color);
}

input[type="color"] {
  min-height: 48px;
  padding: 0.3rem;
}

.messages {
  max-width: 760px;
  margin: 1.5rem auto 0;
}

.message {
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  padding: 0.85rem 1rem;
  background: white;
}

.message.error {
  border-color: color-mix(in srgb, var(--danger) 30%, var(--line));
  color: var(--danger);
}

.message.success {
  border-color: color-mix(in srgb, var(--success) 30%, var(--line));
  color: var(--success);
}

@media (max-width: 680px) {
  .topbar,
  .site-footer,
  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    padding: 1rem 0;
  }

  .topbar nav {
    flex-wrap: wrap;
  }

  .settings-form {
    grid-template-columns: 1fr;
  }

  .full-width {
    grid-column: auto;
  }
}
