:root {
  color-scheme: light;
  --bg: #fafafa;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: #ffffff;
  --text: #18181b;
  --muted: #71717a;
  --line: #e4e4e7;
  --accent: #ec4899;
  --accent-soft: #fce7f3;
  --shadow: 0 16px 44px rgba(24, 24, 27, 0.06);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 92% -8%, rgba(236, 72, 153, 0.09), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.68;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a, button, input { touch-action: manipulation; }
a:hover { color: var(--accent); }
button, input { font: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid rgba(236, 72, 153, 0.38);
  outline-offset: 3px;
}

.shell { width: min(100% - 40px, 1160px); margin: 0 auto; }
.skip-link {
  position: fixed; left: 16px; top: 12px; z-index: 100;
  padding: 10px 14px; border-radius: 10px; background: var(--text); color: var(--bg);
  transform: translateY(-160%); transition: transform 160ms ease-out;
}
.skip-link:focus { transform: translateY(0); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 860px);
  gap: clamp(36px, 6vw, 84px);
  width: min(100% - 48px, 1240px);
  margin: 0 auto;
  padding: 56px 0 84px;
  align-items: start;
}
.sidebar { position: sticky; top: 24px; min-width: 0; }
.site-header { padding: 0; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.69rem;
  font-weight: 760;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.site-title {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 3.45rem);
  line-height: 1;
  letter-spacing: -0.055em;
}
.site-intro { margin: 18px 0 0; color: var(--muted); font-size: 0.93rem; line-height: 1.65; }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 18px; color: var(--muted); font-size: 0.76rem; }
.meta-row strong { color: var(--text); font-weight: 680; }

.toolbar { margin: 24px 0 18px; }
.search {
  width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--text); padding: 0 14px; font-size: 0.88rem;
  box-shadow: var(--shadow); backdrop-filter: blur(16px);
}
.search::placeholder { color: #a1a1aa; }

.calendar {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 16px;
  box-shadow: var(--shadow);
}
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.section-heading h2 { margin: 0; font-size: 0.84rem; letter-spacing: -0.01em; }
.section-heading span { color: var(--muted); font-size: 0.7rem; }
.calendar-toolbar { display: grid; grid-template-columns: 36px 1fr 36px; align-items: center; gap: 6px; }
.calendar-toolbar strong { text-align: center; font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.calendar-toolbar button {
  display: grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted);
  cursor: pointer; transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}
.calendar-toolbar button:hover:not(:disabled) { color: var(--text); background: var(--accent-soft); border-color: var(--line); }
.calendar-toolbar button:disabled { opacity: 0.28; cursor: default; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.calendar-weekdays { margin: 8px 0 3px; color: var(--muted); font-size: 0.62rem; text-align: center; }
.calendar-day {
  display: grid; place-items: center; min-width: 0; aspect-ratio: 1;
  border-radius: 8px; color: var(--muted); font-size: 0.72rem; font-variant-numeric: tabular-nums;
  text-decoration: none;
}
.calendar-day.has-log {
  color: var(--text); font-weight: 640; background: color-mix(in srgb, var(--accent-soft) 58%, transparent);
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}
.calendar-day.has-log:hover { color: var(--accent); background: var(--accent-soft); }
.calendar-day.has-log.is-active { color: #fff; background: var(--accent); box-shadow: 0 5px 16px rgba(236, 72, 153, 0.28); }
.calendar-day.is-empty { opacity: 0.45; }
.calendar-day.is-blank { visibility: hidden; }
.update-note { margin: 12px 2px 0; color: var(--muted); font-size: 0.7rem; }

.content { min-width: 0; }
.content-heading { margin: 2px 0 22px; }
.content-heading h2 { margin: 0; font-size: 1.1rem; letter-spacing: -0.025em; }
.timeline { display: grid; gap: 20px; padding: 0 0 56px; }
.report-card {
  position: relative;
  display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 22px;
  scroll-margin-top: 24px;
  padding: 24px 26px; border: 1px solid var(--line); border-radius: 17px;
  background: var(--surface); box-shadow: 0 1px 0 rgba(255,255,255,.82) inset;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.report-card:hover { border-color: color-mix(in srgb, var(--accent) 25%, var(--line)); box-shadow: var(--shadow); }
.report-card.is-current { border-color: color-mix(in srgb, var(--accent) 46%, var(--line)); }
.report-card[hidden] { display: none; }
.report-date { color: var(--text); font-size: 0.91rem; font-variant-numeric: tabular-nums; font-weight: 720; letter-spacing: -0.02em; }
.report-date span { display: block; color: var(--muted); font-size: 0.65rem; font-weight: 520; letter-spacing: 0.03em; }
.report-content { min-width: 0; font-size: 0.92rem; }
.report-content h2 { margin: 0 0 10px; font-size: 1.05rem; line-height: 1.45; letter-spacing: -0.02em; }
.report-content h3 { margin: 22px 0 7px; font-size: .72rem; color: var(--accent); letter-spacing: .08em; }
.report-content p { margin: 0 0 12px; }
.report-content ol { margin: 0; padding-left: 1.2rem; }
.report-content li { margin: 0 0 13px; padding-left: .28rem; }
.report-content li:last-child { margin-bottom: 0; }
.report-content .footer-note { margin-top: 20px; color: var(--muted); font-size: .74rem; }
.permalink {
  display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px;
  color: var(--accent); font-size: .76rem; font-weight: 650; text-decoration: none;
}
.empty { padding: 60px 20px; text-align: center; color: var(--muted); }

.detail-header { padding: 42px 0 24px; border-bottom: 1px solid var(--line); }
.back { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 12px; color: var(--muted); text-decoration: none; }
.detail { max-width: 760px; padding: 46px 0 90px; }
.detail h1 { margin: 0; font-size: clamp(2rem, 6vw, 3.5rem); line-height: 1.08; letter-spacing: -0.045em; }
.detail h2 { margin-top: 34px; font-size: 1rem; color: var(--accent); }
.detail ol { padding-left: 1.4rem; }
.detail li { margin-bottom: 20px; padding-left: .4rem; }
.detail .footer-note { margin-top: 42px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 44px; color: var(--muted); font-size: .78rem; }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: minmax(230px, 275px) minmax(0, 1fr); gap: 30px; width: min(100% - 32px, 980px); }
  .report-card { grid-template-columns: 1fr; gap: 10px; padding: 22px; }
  .report-date span { display: inline; margin-right: 7px; }
}

@media (max-width: 720px) {
  .app-shell { display: block; width: min(100% - 28px, 680px); padding: 36px 0 64px; }
  .sidebar { position: static; }
  .site-title { font-size: clamp(2.1rem, 12vw, 3.1rem); }
  .site-intro { max-width: 34rem; }
  .calendar { margin-bottom: 32px; }
  .content-heading { margin-top: 0; }
  .report-card { padding: 20px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0c0c0f;
    --surface: rgba(24, 24, 27, 0.84);
    --surface-strong: #18181b;
    --text: #fafafa;
    --muted: #a1a1aa;
    --line: #29292e;
    --accent-soft: #3b1028;
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
  }
  body { background: radial-gradient(circle at 92% -8%, rgba(236,72,153,.11), transparent 32rem), var(--bg); }
  .report-card { box-shadow: none; }
}
