:root {
  --bg: #f4f2ee;
  --bg-soft: #f9f8f5;
  --surface: #ffffff;
  --surface-tint: #fcfbf8;
  --line: #d8d1c5;
  --line-strong: #b8ada0;
  --text: #1b1a18;
  --muted: #5a544c;
  --accent: #8c6a2f;
  --focus: #0a5ad8;
  --responded: #14532d;
  --partial: #1d4ed8;
  --pending: #9a3412;
  --radius: 16px;
  --radius-lg: 22px;
  --max: 76rem;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background:
    radial-gradient(circle at 5% 0%, #fffefb 0%, transparent 42%),
    radial-gradient(circle at 90% 18%, #ece6dc 0%, transparent 30%),
    var(--bg);
}

body {
  font-family: "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.58;
}

a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
  text-underline-offset: 0.16em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.site-header,
main,
.site-footer {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  margin-top: 0.9rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, #ffffff 90%, transparent);
  backdrop-filter: blur(7px);
}

.brand {
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav-links {
  display: inline-flex;
  gap: 0.35rem;
  background: var(--surface-tint);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.22rem;
}

.nav-links a {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
}

.nav-links a[aria-current="page"] {
  background: #fff;
  border: 1px solid var(--line);
}

main {
  padding: 0.5rem 0 3rem;
}

.hero {
  position: relative;
  background: linear-gradient(145deg, #ffffff 0%, #f8f4ed 100%);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  box-shadow:
    0 1px 0 #ffffff,
    0 26px 60px -52px #2b2316;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, #e7d7ba 0%, transparent 72%);
  top: -96px;
  right: -74px;
  pointer-events: none;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.16;
}

h1 {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  font-size: clamp(2.35rem, 7vw, 4.7rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.55rem;
}

h2 {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  font-size: clamp(1.45rem, 3.4vw, 2.35rem);
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.06rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
}

p {
  margin: 0.42rem 0;
}

.question {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid #d3c7b4;
  border-radius: 12px;
  background: linear-gradient(180deg, #fffdfa 0%, #f7f1e6 100%);
  font-weight: 600;
}

.stats {
  margin: 1.05rem 0 1.35rem;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat {
  background: linear-gradient(180deg, #ffffff 0%, #faf8f3 100%);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.8rem;
}

.stat strong {
  display: block;
  margin-top: 0.3rem;
  font-size: 1.86rem;
  line-height: 1;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, serif;
}

.meta {
  color: var(--muted);
  font-size: 0.93rem;
}

.controls {
  margin: 1rem 0 1.2rem;
  display: grid;
  gap: 0.72rem;
}

label {
  display: block;
  margin-bottom: 0.34rem;
  color: var(--muted);
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #fff;
  padding: 0.63rem 0.72rem;
  font: inherit;
  color: var(--text);
}

.timeline,
.leader-grid {
  display: grid;
  gap: 0.8rem;
}

.card,
.detail-panel {
  background: linear-gradient(180deg, #fff 0%, #fefcf9 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow:
    0 1px 0 #fff,
    0 14px 30px -28px #2b2316;
  animation: lift-in 280ms ease-out;
}

.card {
  display: grid;
  gap: 0.42rem;
}

.weekline {
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: color-mix(in srgb, var(--accent) 80%, #2f271d);
  text-transform: uppercase;
}

.card-title {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  font-size: 1.25rem;
}

.card-subtitle {
  margin: 0;
  color: var(--text);
}

.status-row {
  margin-top: 0.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.badge-pending {
  color: var(--pending);
}

.badge-partial {
  color: var(--partial);
}

.badge-responded {
  color: var(--responded);
}

.action-link {
  font-weight: 700;
  font-size: 0.9rem;
  color: color-mix(in srgb, var(--accent) 75%, #1f1b16);
  text-decoration: none;
}

.action-link:hover {
  text-decoration: underline;
}

.detail-panel {
  padding: 1.2rem;
}

.reply-image {
  width: 100%;
  max-width: 760px;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-top: 0.65rem;
  background: #fff;
}

.key-summary {
  margin-top: 0.9rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-tint);
}

.summary-block + .summary-block {
  margin-top: 0.6rem;
}

.summary-block h3 {
  margin: 0 0 0.3rem;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
}

.summary-block ul {
  margin: 0;
  padding-left: 1rem;
}

.summary-block li {
  margin: 0.18rem 0;
}

.pager {
  margin-top: 1.15rem;
  border-top: 1px solid var(--line);
  padding-top: 0.95rem;
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1rem 0 1.85rem;
  color: var(--muted);
  font-size: 0.9rem;
}

@keyframes lift-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 740px) {
  .controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .hero,
  .detail-panel {
    padding: 1.6rem;
  }
}

@media (min-width: 1100px) {
  .timeline,
  .leader-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
