@import url("https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,300;1,9..144,400&family=Inter:wght@300;400;500;600&display=swap");

:root {
  --bg: #faf6ee;
  --bg-2: #f3ecdf;
  --paper: #fffbf3;
  --paper-soft: #fff7ea;
  --ink: #241f1a;
  --ink-soft: #6a5c4f;
  --ink-mute: #9c8e7e;
  --line: rgba(36, 31, 26, 0.1);
  --line-strong: rgba(36, 31, 26, 0.16);
  --terra: #c77d5a;
  --terra-deep: #9b5837;
  --gold: #c9a66b;
  --sage: #8c9f87;
  --plum: #876a7a;
  --shadow-soft: 0 1px 2px rgba(36, 31, 26, 0.04), 0 16px 40px rgba(36, 31, 26, 0.06);
  --shadow-deep: 0 2px 6px rgba(36, 31, 26, 0.05), 0 32px 64px rgba(36, 31, 26, 0.1);
  --radius: 20px;
  --radius-lg: 28px;
  --radius-xl: 34px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 12%, rgba(199, 125, 90, 0.1), transparent 20%),
    radial-gradient(circle at 84% 16%, rgba(201, 166, 107, 0.08), transparent 18%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.44;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.14 0 0 0 0 0.12 0 0 0 0 0.10 0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

main,
header,
footer,
.period-modal {
  position: relative;
  z-index: 3;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

h1,
h2,
h3,
h4,
.eyebrow,
.back-link,
.brand {
  font-family: "Fraunces", Georgia, serif;
}

.page-shell {
  width: min(1240px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 72px;
}

.page-card {
  padding: 28px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: rgba(255, 251, 243, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-soft);
}

.back-link {
  color: var(--ink-soft);
  text-decoration: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 10px;
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--terra-deep);
  font-weight: 500;
}

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

h1 {
  margin: 0;
  font-size: clamp(38px, 5vw, 58px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.lead {
  margin: 16px 0 0;
  max-width: 760px;
  color: var(--ink-soft);
  line-height: 1.7;
  font-size: 18px;
}

.widget-topline,
.summary-topline,
.stage-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.widget-badge,
.summary-badge,
.stage-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(199, 125, 90, 0.12);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.widget-total,
.summary-meta,
.stage-total,
.panel-label,
.field-hint {
  color: var(--ink-mute);
  font-size: 13px;
}

.button,
.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.button-primary,
.primary-btn {
  color: var(--paper);
  background: var(--ink);
  box-shadow: var(--shadow-soft);
}

.button-primary:hover,
.primary-btn:hover {
  background: var(--terra-deep);
  transform: translateY(-1px);
  box-shadow: var(--shadow-deep);
}

.button-ghost,
.ghost-btn {
  color: var(--ink);
  background: transparent;
  border-color: var(--line-strong);
}

.button-ghost:hover,
.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.56);
  border-color: rgba(36, 31, 26, 0.28);
}

.inline-error {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  color: #8b4431;
  background: rgba(199, 125, 90, 0.12);
  border: 1px solid rgba(155, 88, 55, 0.18);
}

.topbar-lite {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 28px;
  background: rgba(250, 246, 238, 0.82);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.nav-links-lite {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-links-lite a {
  font-size: 14px;
  color: var(--ink-soft);
  padding: 8px 14px;
  border-radius: 999px;
  transition: all 0.25s ease;
}

.nav-links-lite a:hover,
.nav-links-lite a.is-active {
  color: var(--ink);
  background: rgba(199, 125, 90, 0.1);
}

.featured-card {
  background:
    linear-gradient(180deg, rgba(255, 251, 243, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 30% 15%, #4a3d32 0%, #2a2520 55%, #14110d 100%);
  color: var(--paper);
  border-color: transparent;
  box-shadow: 0 16px 40px rgba(58, 47, 38, 0.18);
}

.featured-card .widget-badge,
.featured-card .summary-badge,
.featured-card .stage-badge {
  color: var(--paper);
  background: rgba(201, 166, 107, 0.14);
}

.featured-card .widget-total,
.featured-card .summary-meta,
.featured-card .stage-total,
.featured-card .lead,
.featured-card p,
.featured-card .panel-label,
.featured-card .field-hint,
.featured-card .stat-label,
.featured-card .progress-note,
.featured-card .progress-label {
  color: rgba(255, 251, 243, 0.74);
}

.featured-card .button-primary,
.featured-card .primary-btn {
  background: var(--paper);
  color: var(--ink);
}

.featured-card .button-primary:hover,
.featured-card .primary-btn:hover {
  background: var(--gold);
}

.featured-card .button-ghost,
.featured-card .ghost-btn {
  color: var(--paper);
  border-color: rgba(255, 251, 243, 0.2);
}

.featured-card .button-ghost:hover,
.featured-card .ghost-btn:hover {
  background: rgba(255, 251, 243, 0.08);
  border-color: rgba(255, 251, 243, 0.36);
}

@media (max-width: 900px) {
  .topbar-lite {
    padding: 16px 20px;
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100vw - 16px, 1240px);
    padding-top: 12px;
  }

  .page-card {
    padding: 22px 16px;
    border-radius: 24px;
  }

  .lead {
    font-size: 16px;
  }
}
