:root {
  --bg: #f1eadf;
  --bg-soft: #faf5ec;
  --paper: rgba(255, 250, 243, 0.86);
  --surface: rgba(255, 251, 245, 0.9);
  --surface-strong: #fffdf9;
  --surface-dark: #161d24;
  --surface-dark-2: #212d36;

  --ink: #161d24;
  --ink-soft: #46505b;
  --muted: #787870;
  --muted-strong: #646a73;
  --line: rgba(48, 49, 46, 0.12);
  --line-strong: rgba(29, 35, 42, 0.2);
  --shadow-sm: 0 14px 32px rgba(20, 24, 30, 0.06);
  --shadow-md: 0 22px 56px rgba(20, 24, 30, 0.1);
  --shadow-lg: 0 36px 100px rgba(17, 22, 28, 0.16);

  --accent: #6a7754;
  --accent-soft: rgba(106, 119, 84, 0.12);
  --accent-line: rgba(106, 119, 84, 0.28);
  --accent-deep: #556043;
  --accent-alt: #985b3c;
  --accent-info: #355b76;
  --accent-system: #274d50;
  --on-dark: #f8f2e8;
  --on-dark-soft: rgba(248, 242, 232, 0.72);

  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;

  --type-display: "Newsreader", "Noto Serif SC", Georgia, serif;
  --type-body: "Manrope", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --type-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--type-body);
  font-size: 15px;
  line-height: 1.6;
  background:
    radial-gradient(circle at 0% 0%, rgba(152, 91, 60, 0.12), transparent 24%),
    radial-gradient(circle at 100% 0%, rgba(53, 91, 118, 0.12), transparent 28%),
    radial-gradient(circle at 50% 100%, rgba(106, 119, 84, 0.1), transparent 34%),
    linear-gradient(180deg, #f5eee2 0%, #ede5d7 42%, #f4ecdf 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(152, 91, 60, 0.18);
  color: var(--ink);
}

button,
input,
textarea,
select {
  font: inherit;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

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

code,
.mono {
  font-family: var(--type-mono);
}

.page-shell {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 28px 48px;
  overflow: hidden;
}

.page-shell::before {
  content: "";
  position: absolute;
  inset: 110px 20px 20px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 40px;
  pointer-events: none;
}

.backdrop-blur {
  position: absolute;
  border-radius: 999px;
  filter: blur(22px);
  opacity: 0.75;
  pointer-events: none;
}

.backdrop-blur-a {
  width: 380px;
  height: 380px;
  top: 80px;
  right: -120px;
  background: radial-gradient(circle, rgba(182, 111, 66, 0.18), transparent 70%);
}

.backdrop-blur-b {
  width: 420px;
  height: 420px;
  left: -160px;
  top: 360px;
  background: radial-gradient(circle, rgba(49, 87, 122, 0.14), transparent 74%);
}

.eyebrow {
  margin: 0;
  font-family: var(--type-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-title,
.panel-head h3,
.hero-focus-card h2,
.side-card-hero h3,
.month-label,
.intel-title,
.route-title {
  font-family: var(--type-display);
}

.section-title {
  margin: 8px 0 0;
  font-size: clamp(1.7rem, 2.6vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 24px;
}

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, #202f38 0%, #384b58 100%);
  color: var(--on-dark);
  box-shadow: 0 12px 30px rgba(24, 33, 40, 0.18);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--type-display);
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand-sub {
  font-family: var(--type-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.status-chip,
.clock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 250, 244, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

.status-chip {
  color: var(--ink-soft);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(100, 126, 77, 0.16);
}

.clock {
  font-family: var(--type-mono);
}

.clock-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.clock-time {
  font-size: 13px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.ghost-link {
  color: var(--ink-soft);
  text-decoration: none;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  font-weight: 600;
}

.ghost-link:hover {
  color: var(--accent-deep);
}

.ghost-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.9);
}

.hero-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(360px, 520px);
  gap: 22px;
  padding: 28px;
  border-radius: 38px;
  background:
    linear-gradient(145deg, rgba(18, 26, 33, 0.98) 0%, rgba(28, 39, 48, 0.96) 48%, rgba(45, 49, 52, 0.92) 100%);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.hero-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 10%, rgba(152, 91, 60, 0.22), transparent 24%),
    radial-gradient(circle at 90% 15%, rgba(53, 91, 118, 0.2), transparent 26%),
    linear-gradient(120deg, transparent 40%, rgba(255, 255, 255, 0.04) 100%);
  pointer-events: none;
}

.hero-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent);
  pointer-events: none;
}

.hero-copy,
.hero-rail {
  position: relative;
  z-index: 1;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 26px;
  min-width: 0;
}

.hero-copy .eyebrow {
  color: var(--on-dark-soft);
}

.hero-copy h1 {
  margin: 0;
  max-width: 11.5ch;
  color: var(--on-dark);
  font-family: var(--type-display);
  font-size: clamp(2.9rem, 5vw, 5.7rem);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.055em;
}

.hero-copy em {
  display: block;
  margin-top: 14px;
  font-style: normal;
  color: #e7c08c;
}

.hero-lede {
  margin: 0;
  max-width: 44ch;
  color: rgba(246, 241, 232, 0.8);
  font-size: 1.02rem;
}

.scope-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.scope-label {
  font-family: var(--type-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(246, 241, 232, 0.66);
}

.scope-switches {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.scope-button {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(246, 241, 232, 0.72);
  cursor: pointer;
  transition: 180ms ease;
}

.scope-button:hover {
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--on-dark);
}

.scope-button.active {
  background: var(--on-dark);
  color: #1a232a;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.hero-rail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.hero-focus-card {
  padding: 24px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 249, 238, 0.13) 0%, rgba(255, 249, 238, 0.08) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hero-focus-card .eyebrow {
  color: rgba(246, 241, 232, 0.68);
}

.hero-focus-card h2 {
  margin: 10px 0 12px;
  color: var(--on-dark);
  font-size: clamp(1.9rem, 2.5vw, 2.55rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 0.98;
}

.focus-copy {
  margin: 0;
  color: rgba(246, 241, 232, 0.7);
  font-size: 13.5px;
}

.focus-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin-top: 18px;
}

.meta-tag,
.meta-value {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-family: var(--type-mono);
  font-size: 11px;
}

.meta-tag {
  color: rgba(246, 241, 232, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.meta-value {
  color: var(--on-dark);
  background: rgba(255, 255, 255, 0.08);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  min-height: 150px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 251, 244, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stat-card-strong {
  background: linear-gradient(135deg, rgba(94, 118, 74, 0.9) 0%, rgba(76, 97, 61, 0.96) 100%);
  color: var(--on-dark);
}

.stat-card-muted {
  background: rgba(246, 238, 225, 0.94);
}

.stat-card-accent {
  background: linear-gradient(145deg, rgba(182, 111, 66, 0.16) 0%, rgba(49, 87, 122, 0.18) 100%);
}

.stat-card-strong .stat-label,
.stat-card-strong .stat-foot,
.stat-card-strong .stat-value {
  color: var(--on-dark);
}

.stat-label {
  font-family: var(--type-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-value {
  font-family: var(--type-display);
  font-size: 2.8rem;
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 500;
  color: var(--ink);
}

.stat-value-sm {
  font-family: var(--type-body);
  font-size: 1rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.stat-foot {
  margin-top: auto;
  color: var(--muted-strong);
  font-size: 12px;
}

.dashboard-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 430px);
  gap: 20px;
  margin-top: 22px;
}

.primary-stack,
.rail-stack {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.panel,
.calendar {
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.94) 0%, rgba(252, 248, 241, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
}

.panel {
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.panel::before,
.calendar::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), transparent 28%);
  pointer-events: none;
}

.panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.panel-head-tight {
  margin-bottom: 16px;
}

.panel-head h3 {
  margin: 8px 0 0;
  font-size: 1.55rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.calendar {
  padding: 26px;
}

.calendar-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.calendar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.segment {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(34, 45, 54, 0.06);
  border: 1px solid rgba(34, 45, 54, 0.08);
}

.segment-btn {
  min-height: 34px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
}

.segment-btn.active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 10px 20px rgba(22, 30, 37, 0.08);
}

.month-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  cursor: pointer;
  transition: 180ms ease;
}

.icon-btn:hover {
  border-color: var(--accent-line);
  color: var(--accent-deep);
  transform: translateY(-1px);
}

.month-label {
  min-width: 170px;
  text-align: center;
  font-size: 1.12rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.calendar-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  gap: 18px;
}

.calendar-main {
  min-width: 0;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  background: rgba(49, 54, 60, 0.1);
  border-radius: 24px;
  overflow: hidden;
}

.calendar-weekdays {
  margin-bottom: 8px;
}

.calendar-weekday {
  padding: 12px 14px;
  background: rgba(250, 246, 238, 0.94);
  color: var(--muted);
  font-family: var(--type-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.calendar-day {
  min-height: 124px;
  padding: 12px 12px 10px;
  border: none;
  background: rgba(255, 253, 249, 0.96);
  color: inherit;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.calendar-day:hover {
  background: rgba(249, 245, 236, 0.98);
}

.calendar-day.other-month {
  background: rgba(245, 238, 227, 0.86);
}

.calendar-day.today {
  background:
    linear-gradient(180deg, rgba(100, 126, 77, 0.12) 0%, rgba(255, 255, 255, 0.94) 68%);
}

.calendar-day.selected {
  background: linear-gradient(180deg, rgba(100, 126, 77, 0.14) 0%, rgba(250, 247, 241, 0.98) 100%);
  box-shadow: inset 0 0 0 2px var(--accent-line);
}

.calendar-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.calendar-day-number {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  font-family: var(--type-mono);
  font-size: 12px;
  color: var(--ink);
}

.calendar-day.today .calendar-day-number {
  background: var(--surface-dark);
  color: var(--on-dark);
}

.calendar-day.selected .calendar-day-number {
  background: var(--accent);
  color: #fffdf8;
}

.calendar-dot-row {
  display: inline-flex;
  gap: 5px;
}

.calendar-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}

.calendar-dot.k-reminder {
  background: var(--accent-info);
}

.calendar-dot.k-event {
  background: var(--accent-alt);
}

.calendar-day-list {
  display: grid;
  gap: 4px;
}

.event-chip {
  padding: 5px 8px;
  border-radius: 10px;
  background: rgba(100, 126, 77, 0.12);
  color: var(--accent-deep);
  border: 1px solid rgba(100, 126, 77, 0.14);
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-chip.k-reminder {
  background: rgba(49, 87, 122, 0.12);
  color: #274968;
  border-color: rgba(49, 87, 122, 0.16);
}

.event-chip.k-event {
  background: rgba(182, 111, 66, 0.13);
  color: #8b532f;
  border-color: rgba(182, 111, 66, 0.16);
}

.event-chip.more {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
  padding-left: 2px;
}

.calendar-side {
  display: grid;
  gap: 12px;
}

.side-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.78);
}

.side-card-hero {
  background:
    linear-gradient(160deg, rgba(25, 34, 42, 0.97) 0%, rgba(39, 53, 61, 0.96) 100%);
  color: var(--on-dark);
}

.side-card-hero .eyebrow,
.side-card-hero .side-note {
  color: var(--on-dark-soft);
}

.side-card-hero h3 {
  margin: 8px 0 10px;
  font-size: 1.55rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.side-note {
  margin: 0;
  color: var(--muted-strong);
  font-size: 13px;
}

.side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-family: var(--type-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.badge {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-dark);
  color: var(--on-dark);
  font-size: 11px;
}

.agenda {
  display: grid;
  gap: 8px;
}

.agenda-item {
  padding: 12px;
  border-radius: 16px;
  background: rgba(246, 239, 228, 0.72);
  border: 1px solid rgba(36, 47, 56, 0.08);
  border-left: 3px solid var(--accent);
}

.agenda-item.k-reminder {
  border-left-color: var(--accent-info);
}

.agenda-item.k-event {
  border-left-color: var(--accent-alt);
}

.agenda-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.agenda-title {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.4;
}

.agenda-time {
  font-family: var(--type-mono);
  font-size: 11px;
  color: var(--muted-strong);
  white-space: nowrap;
}

.agenda-meta {
  margin-top: 6px;
  color: var(--muted-strong);
  font-size: 12px;
}

.agenda-empty {
  padding: 14px;
  border-radius: 16px;
  color: var(--muted);
  background: rgba(246, 239, 228, 0.62);
}

.metrics-panel .metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-grid {
  display: grid;
  gap: 12px;
}

.metric-card {
  position: relative;
  min-height: 152px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 254, 250, 0.95) 0%, rgba(248, 243, 233, 0.94) 100%);
  border: 1px solid rgba(34, 45, 54, 0.08);
  overflow: hidden;
}

.metric-grid .metric-card:first-child,
.metric-grid .metric-card:nth-child(2) {
  min-height: 172px;
}

.metric-grid .metric-card:first-child {
  grid-column: 1 / -1;
  background:
    linear-gradient(145deg, rgba(21, 30, 37, 0.96) 0%, rgba(31, 43, 52, 0.94) 100%);
  border-color: rgba(255, 255, 255, 0.08);
}

.metric-grid .metric-card:first-child .label,
.metric-grid .metric-card:first-child .value,
.metric-grid .metric-card:first-child .delta {
  color: var(--on-dark);
}

.metric-grid .metric-card:first-child::before {
  background: linear-gradient(90deg, rgba(248, 242, 232, 0.82), transparent);
}

.metric-grid .metric-card:nth-child(2) {
  background:
    linear-gradient(180deg, rgba(106, 119, 84, 0.18) 0%, rgba(255, 252, 246, 0.94) 100%);
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: auto 18px 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0.55;
}

.metric-card .label {
  font-family: var(--type-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.metric-card .value {
  margin-top: 14px;
  font-family: var(--type-display);
  font-size: 2.45rem;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.metric-card .delta {
  margin-top: 18px;
  color: var(--muted-strong);
  font-size: 12px;
}

.signal-list,
.timeline,
.job-list,
.intel-list,
.notes-list {
  display: grid;
  gap: 10px;
}

.signal-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.signal-list li,
.timeline-item,
.job-card,
.intel-card,
.note-card,
.route-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(247, 241, 231, 0.72);
  border: 1px solid rgba(34, 45, 54, 0.08);
}

.collection-empty {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(247, 241, 231, 0.72);
  border: 1px solid rgba(34, 45, 54, 0.08);
  color: var(--muted);
}

.signal-list strong,
.timeline-title,
.job-card .job-title,
.note-card .job-title {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.45;
}

.signal-list .meta,
.timeline-meta,
.job-card .job-meta,
.note-card .job-meta,
.intel-meta,
.route-card p {
  margin-top: 6px;
  color: var(--muted-strong);
  font-size: 12.5px;
}

.timeline-panel {
  background:
    linear-gradient(145deg, rgba(25, 34, 42, 0.96) 0%, rgba(35, 48, 57, 0.96) 100%);
  color: var(--on-dark);
}

.timeline-panel .panel-head {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.timeline-panel .panel-head h3,
.timeline-panel .eyebrow {
  color: var(--on-dark);
}

.timeline-panel .eyebrow {
  color: rgba(246, 241, 232, 0.68);
}

.timeline-panel .timeline-item {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}

.timeline-panel .timeline-title,
.timeline-panel .timeline-meta {
  color: var(--on-dark);
}

.timeline-panel .timeline-meta {
  color: rgba(246, 241, 232, 0.68);
}

.timeline-item {
  position: relative;
  padding-left: 20px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent) 0%, rgba(100, 126, 77, 0.24) 100%);
}

.intel-title,
.route-title {
  font-size: 1.12rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.18;
}

.split-panels {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 20px;
}

.route-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}

.page-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding: 10px 4px 0;
  color: var(--muted);
  font-family: var(--type-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.hero-shell,
.calendar,
.panel,
.page-foot {
  animation: rise-in 480ms ease both;
}

@media (max-width: 1220px) {
  .hero-shell {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .rail-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .roadmap {
    grid-column: 1 / -1;
  }

  .calendar-body {
    grid-template-columns: 1fr;
  }

  .calendar-side {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .page-shell {
    padding: 18px 16px 34px;
  }

  .topbar {
    flex-wrap: wrap;
  }

  .topbar-meta {
    width: 100%;
    justify-content: space-between;
  }

  .hero-shell,
  .calendar,
  .panel {
    padding: 20px;
    border-radius: 28px;
  }

  .hero-copy h1 {
    max-width: none;
    font-size: clamp(2.3rem, 8vw, 4rem);
  }

  .hero-stats,
  .metrics-panel .metric-grid,
  .rail-stack,
  .split-panels {
    grid-template-columns: 1fr;
  }

  .calendar-side {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 640px) {
  .scope-bar,
  .calendar-head,
  .agenda-head,
  .page-foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-focus-card,
  .stat-card {
    border-radius: 22px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .month-label {
    min-width: 0;
    text-align: left;
  }

  .calendar-weekday {
    padding: 10px 6px;
    font-size: 9px;
  }

  .calendar-day {
    min-height: 88px;
    padding: 8px 7px;
  }

  .calendar-day-list {
    display: none;
  }

  .status-chip,
  .clock,
  .ghost-link-btn {
    width: 100%;
    justify-content: center;
  }
}

/* =====================================================================
 * Task Monitor · 4 列看板（Notion 式）
 * ===================================================================== */

.task-monitor .task-monitor-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.taskboards-summary {
  font-family: var(--type-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--muted-strong);
  white-space: nowrap;
}

.board-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.board {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 14px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 252, 246, 0.78);
  border: 1px solid var(--line);
  min-height: 160px;
}

.board-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 2px 10px;
  border-bottom: 1px dashed var(--line);
}

.board-head h4 {
  margin: 0;
  flex: 1;
  font-family: var(--type-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.board-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(106, 119, 84, 0.14);
}

.board.b-pending  .board-dot { background: var(--accent);         box-shadow: 0 0 0 3px rgba(106, 119, 84, 0.16); }
.board.b-done     .board-dot { background: var(--accent-system);  box-shadow: 0 0 0 3px rgba(39, 77, 80, 0.16); }
.board.b-deferred .board-dot { background: var(--accent-alt);     box-shadow: 0 0 0 3px rgba(152, 91, 60, 0.18); }
.board.b-paused   .board-dot { background: var(--accent-info);    box-shadow: 0 0 0 3px rgba(53, 91, 118, 0.16); }

.board-count {
  font-family: var(--type-mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

.board-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 2px;
}

.board-list::-webkit-scrollbar {
  width: 6px;
}
.board-list::-webkit-scrollbar-thumb {
  background: rgba(90, 90, 80, 0.2);
  border-radius: 999px;
}

.board-empty {
  font-size: 11.5px;
  color: var(--muted);
  padding: 10px 8px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.4);
}

.task-card {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.board.b-done     .task-card { border-left-color: var(--accent-system); }
.board.b-deferred .task-card { border-left-color: var(--accent-alt); }
.board.b-paused   .task-card { border-left-color: var(--accent-info); }

.task-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  border-color: var(--accent-line);
}

.task-card:focus-visible {
  outline: 2px solid var(--accent-alt);
  outline-offset: 2px;
}

.tc-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.tc-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tc-pri {
  font-family: var(--type-mono);
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(152, 91, 60, 0.14);
  color: var(--accent-alt);
  white-space: nowrap;
}

.tc-meta {
  font-family: var(--type-mono);
  font-size: 10.5px;
  color: var(--muted-strong);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 让日历 chip 和 agenda 卡也有"可点"反馈 */
.event-chip[data-item-id],
.agenda-item[data-item-id] {
  cursor: pointer;
  transition: transform 120ms ease, filter 120ms ease;
}
.event-chip[data-item-id]:hover {
  filter: brightness(1.04);
  transform: translateY(-0.5px);
}
.agenda-item[data-item-id]:hover {
  background: rgba(255, 251, 245, 0.92);
  border-color: var(--accent-line);
}
.agenda-item[data-item-id]:focus-visible,
.event-chip[data-item-id]:focus-visible {
  outline: 2px solid var(--accent-alt);
  outline-offset: 2px;
}

/* 响应式：中屏 2 列、窄屏 1 列 */
@media (max-width: 1100px) {
  .board-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .board-grid { grid-template-columns: 1fr; }
  .board-list { max-height: 280px; }
}

/* =====================================================================
 * Detail page (detail.php)
 * ===================================================================== */

.detail-shell {
  display: grid;
  gap: 18px;
  padding: 4px 0 32px;
}

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-soft);
  text-decoration: none;
  cursor: pointer;
}
.detail-back:hover {
  border-color: var(--accent-line);
  color: var(--ink);
}

.detail-hero {
  padding: 24px 26px;
  border-radius: var(--radius-lg);
  background: var(--paper);
  border: 1px solid var(--line);
}

.detail-hero .eyebrow {
  margin-bottom: 6px;
}

.detail-hero h1 {
  font-family: var(--type-display);
  font-weight: 600;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.25;
  margin: 4px 0 10px;
  color: var(--ink);
}

.detail-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--type-mono);
  font-size: 11px;
  color: var(--muted-strong);
}

.detail-chip {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.detail-body {
  padding: 20px 22px;
}

.detail-body pre,
.detail-body .detail-content {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--type-body);
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
  margin: 0;
}

.detail-summary {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0 0 14px;
}

.detail-kv {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 6px 14px;
  font-size: 12.5px;
}
.detail-kv dt {
  color: var(--muted);
  font-family: var(--type-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
}
.detail-kv dd {
  margin: 0;
  color: var(--ink);
  word-break: break-word;
}

.detail-tag {
  display: inline-block;
  padding: 3px 10px;
  margin: 0 6px 6px 0;
  border-radius: 999px;
  font-family: var(--type-mono);
  font-size: 11px;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
}

.detail-reminder {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent-info);
  display: grid;
  gap: 3px;
  margin-bottom: 8px;
}
.detail-reminder .r-time {
  font-family: var(--type-mono);
  font-size: 11.5px;
  color: var(--ink);
}
.detail-reminder .r-meta {
  font-size: 11px;
  color: var(--muted-strong);
}

.detail-error {
  padding: 24px 26px;
  border-radius: var(--radius-lg);
  background: rgba(152, 91, 60, 0.08);
  border: 1px solid rgba(152, 91, 60, 0.22);
  color: var(--accent-alt);
  font-size: 14px;
}

/*
 * Login page
 */

.login-body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(106, 119, 84, 0.14), transparent 30%),
    radial-gradient(circle at bottom right, rgba(53, 91, 118, 0.12), transparent 26%),
    linear-gradient(160deg, #f3ebde 0%, #ece3d6 46%, #e5dccd 100%);
}

.login-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.login-stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.login-panel {
  display: flex;
  justify-content: center;
  width: 100%;
}

.login-card {
  width: min(100%, 440px);
  padding: 34px 30px 30px;
  border-radius: 30px;
  border: 1px solid rgba(32, 40, 48, 0.1);
  background: rgba(255, 251, 243, 0.92);
  box-shadow: 0 26px 70px rgba(20, 24, 30, 0.12);
}

@supports ((-webkit-backdrop-filter: blur(18px)) or (backdrop-filter: blur(18px))) {
  .login-card {
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
  }
}

.login-mark {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0 0 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1f2a32 0%, #344754 100%);
  color: #f6f0e5;
  font-size: 20px;
  box-shadow: 0 14px 34px rgba(22, 29, 36, 0.16);
}

.login-card h1 {
  margin: 8px 0 10px;
  font-family: var(--type-display);
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.login-hint {
  margin: 0 0 22px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-field {
  display: grid;
  gap: 8px;
}

.login-field span {
  font-family: var(--type-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-strong);
}

.login-field input {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(32, 40, 48, 0.16);
  border-radius: 14px;
  padding: 14px 15px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--ink);
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.login-field input:focus {
  outline: none;
  border-color: rgba(53, 91, 118, 0.45);
  box-shadow: 0 0 0 4px rgba(53, 91, 118, 0.12);
  background: #fff;
}

.login-submit {
  border: 0;
  border-radius: 14px;
  min-height: 52px;
  padding: 14px 18px;
  margin-top: 4px;
  background: linear-gradient(135deg, #202830 0%, #2f4758 100%);
  color: #f8f3e8;
  font-family: var(--type-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
  box-shadow: 0 14px 32px rgba(32, 40, 48, 0.16);
}

.login-submit:hover {
  transform: translateY(-1px);
}

.login-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.login-alert {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.6;
}

.login-alert-error {
  background: rgba(152, 91, 60, 0.1);
  border: 1px solid rgba(152, 91, 60, 0.22);
  color: #7f4b31;
}

@media (max-width: 920px) {
  .login-stage {
    padding: 24px 16px;
  }
}
