:root {
  --paper: #f7f0df;
  --paper-strong: #fffaf0;
  --ink: #1e2430;
  --ink-soft: #2e3441;
  --muted: #5f6673;
  --accent: #0d6c63;
  --accent-soft: #cce8e0;
  --gold: #c58c2b;
  --berry: #6d3952;
  --card: rgba(255, 250, 240, 0.88);
  --shadow: 0 18px 50px rgba(30, 36, 48, 0.12);
  --shadow-soft: 0 10px 24px rgba(30, 36, 48, 0.08);
  --border: rgba(30, 36, 48, 0.08);
  --danger: #b0493a;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(13, 108, 99, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(197, 140, 43, 0.18), transparent 26%),
    linear-gradient(180deg, #efe3c6 0%, var(--paper) 45%, #f6f3ea 100%);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.18;
}

.shell {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 64px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
  padding: 14px 18px;
  border-radius: 24px;
  background: rgba(255, 252, 247, 0.72);
  border: 1px solid rgba(30, 36, 48, 0.08);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.85), transparent 35%),
    linear-gradient(135deg, var(--accent), var(--berry));
  box-shadow: 0 10px 24px rgba(13, 108, 99, 0.22);
  position: relative;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.92);
}

.brand-mark::before {
  width: 22px;
  height: 4px;
  left: 13px;
  top: 18px;
  transform: rotate(-28deg);
}

.brand-mark::after {
  width: 18px;
  height: 4px;
  left: 17px;
  top: 26px;
  transform: rotate(32deg);
}

.brand-copy strong {
  display: block;
  color: var(--ink);
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.brand-copy span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 2px;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.hero h1,
.hero h2,
.hero h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.02em;
}

.hero h1 {
  font-size: clamp(2.6rem, 5vw, 4.5rem);
  line-height: 0.95;
  color: var(--ink-soft);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

.lede {
  max-width: 640px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.05rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(30, 36, 48, 0.08);
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 28px;
  margin-bottom: 24px;
  background:
    radial-gradient(circle at top right, rgba(197, 140, 43, 0.16), transparent 28%),
    radial-gradient(circle at left center, rgba(13, 108, 99, 0.14), transparent 26%),
    var(--card);
}

.hero-panel::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -48px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(109, 57, 82, 0.1), transparent 62%);
  pointer-events: none;
}

.panel,
.card,
.metric,
.response-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.panel {
  padding: 24px;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.two {
  grid-template-columns: 1.2fr 0.8fr;
}

.grid.cards {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.stack {
  display: grid;
  gap: 14px;
}

.card {
  padding: 20px;
  animation: rise 420ms ease both;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.card h3,
.card h4 {
  margin: 0 0 10px;
  font-family: Georgia, "Times New Roman", serif;
}

.card:hover,
.response-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px rgba(30, 36, 48, 0.1);
  border-color: rgba(13, 108, 99, 0.16);
}

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

.small {
  font-size: 0.9rem;
}

.metric {
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.65), rgba(255,255,255,0.35)),
    var(--card);
}

.metric .value {
  font-size: 1.8rem;
  font-family: Georgia, "Times New Roman", serif;
}

.metric .label {
  color: var(--muted);
  font-size: 0.9rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

button,
.button-link {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  font: inherit;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
  text-decoration: none;
}

button.primary,
.button-link.primary {
  background: linear-gradient(135deg, var(--accent), #0b8a7e);
  color: white;
  box-shadow: 0 12px 24px rgba(13, 108, 99, 0.24);
}

button.secondary,
.button-link.secondary {
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  border: 1px solid rgba(30, 36, 48, 0.1);
}

button.ghost,
.button-link.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px dashed rgba(30, 36, 48, 0.16);
}

button:hover,
.button-link:hover {
  transform: translateY(-1px);
}

input,
textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(30, 36, 48, 0.14);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: inherit;
  padding: 14px 16px;
}

textarea {
  min-height: 180px;
  resize: vertical;
  line-height: 1.6;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

label span {
  color: var(--ink-soft);
  font-weight: 600;
}

.progress-track {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: rgba(30, 36, 48, 0.08);
  overflow: hidden;
}

.progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--accent));
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.84rem;
  background: var(--accent-soft);
  color: var(--accent);
}

.pill.warn {
  background: rgba(197, 140, 43, 0.16);
  color: #8b631f;
}

.pill.danger {
  background: rgba(176, 73, 58, 0.12);
  color: var(--danger);
}

.checklist,
.issues,
.rubric-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.response-box {
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.4), rgba(255,255,255,0.18)),
    rgba(255, 250, 240, 0.72);
}

.response-box h3 {
  margin-top: 0;
  font-family: Georgia, "Times New Roman", serif;
}

.empty {
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.error {
  color: var(--danger);
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
}

.section-title h2 {
  margin: 0 0 6px;
  font-family: Georgia, "Times New Roman", serif;
}

.hidden {
  display: none !important;
}

.walkthrough {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(30, 36, 48, 0.34);
  backdrop-filter: blur(6px);
}

.walkthrough-card {
  width: min(720px, 100%);
  padding: 28px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(197, 140, 43, 0.12), transparent 24%),
    radial-gradient(circle at left center, rgba(13, 108, 99, 0.12), transparent 26%),
    rgba(255, 250, 240, 0.98);
  border: 1px solid rgba(30, 36, 48, 0.08);
  box-shadow: 0 24px 80px rgba(30, 36, 48, 0.22);
}

.walkthrough-card h2 {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink-soft);
}

.walkthrough-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.walkthrough-card ul {
  margin: 18px 0 0;
  padding-left: 20px;
  color: var(--ink-soft);
  line-height: 1.7;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .hero {
    flex-direction: column;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}
