@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --ink-950: #102136;
  --ink-900: #17314d;
  --ink-700: #4a6177;
  --ink-500: #6d8091;
  --sand-50: #fbf8f2;
  --sand-100: #f4ede1;
  --sand-200: #e8dcc5;
  --sky-100: #dcebF4;
  --sky-300: #90c4d4;
  --teal-600: #176b84;
  --teal-700: #0f566b;
  --coral-400: #ef7f60;
  --leaf-400: #6ea88b;
  --holiday: #b94b53;
  --white: #ffffff;
  --line: rgba(16, 33, 54, 0.1);
  --line-strong: rgba(16, 33, 54, 0.16);
  --shadow-soft: 0 18px 40px rgba(16, 33, 54, 0.08);
  --shadow-strong: 0 28px 70px rgba(16, 33, 54, 0.14);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --pill: 999px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink-950);
  font-family: "Manrope", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 16% 10%, rgba(144, 196, 212, 0.28), transparent 28%),
    radial-gradient(circle at 84% 8%, rgba(239, 127, 96, 0.16), transparent 24%),
    linear-gradient(180deg, #f8f7f3 0%, #f4efe5 100%);
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

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

.app-shell {
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto;
  padding: 20px 0 48px;
}

.app-header,
.card,
.tool-card,
.update-card,
.event-card,
.timeline-card,
.month-day,
.day-event {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.app-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  padding: 24px;
  border-radius: var(--radius-xl);
}

.app-header__brand {
  display: flex;
  gap: 16px;
  align-items: start;
}

.app-header__brand img {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 26px rgba(16, 33, 54, 0.14);
  object-fit: contain;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal-700);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.header-copy h1,
.section-title h2,
.calendar-toolbar h2,
.tool-card h3,
.update-card h3,
.event-body h3,
.timeline-card h3,
.month-detail h3 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  letter-spacing: -0.03em;
  color: var(--ink-950);
}

.header-copy h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 0.98;
}

.header-intro {
  margin: 10px 0 0;
  max-width: 56ch;
  color: var(--ink-700);
}

.header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 14px;
  color: var(--ink-500);
  font-size: 13px;
  font-weight: 700;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: start;
  justify-content: end;
}

.soft-btn,
.ghost-btn,
.primary-btn,
.link-chip,
.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--pill);
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.soft-btn {
  background: rgba(16, 33, 54, 0.06);
  color: var(--ink-950);
  border-color: rgba(16, 33, 54, 0.08);
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink-900);
  border-color: rgba(16, 33, 54, 0.12);
}

.primary-btn {
  background: linear-gradient(135deg, var(--teal-700), var(--teal-600));
  color: var(--white);
  box-shadow: 0 16px 34px rgba(15, 86, 107, 0.2);
}

.soft-btn:hover,
.ghost-btn:hover,
.primary-btn:hover,
.link-chip:hover,
.action-link:hover,
.tab-btn:hover {
  transform: translateY(-1px);
}

.tabs {
  display: flex;
  gap: 10px;
  margin: 18px 0;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  flex: 0 0 auto;
  min-width: 128px;
  border: 1px solid rgba(16, 33, 54, 0.08);
  border-radius: var(--pill);
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink-700);
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.tab-btn.active {
  color: var(--white);
  background: linear-gradient(135deg, var(--ink-900), var(--teal-600));
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.card,
.tool-card,
.update-card {
  border-radius: var(--radius-lg);
}

.card {
  padding: 22px;
  margin-bottom: 16px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
  margin-bottom: 16px;
}

.section-title h2 {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
}

.section-title span {
  color: var(--ink-500);
  font-size: 13px;
  font-weight: 700;
}

.spotlight-card {
  overflow: hidden;
}

.metrics-grid,
.overview-grid,
.filters-grid,
.tools-grid,
.updates-feed,
.mini-grid,
.tool-actions,
.event-actions,
.legend-row,
.term-list {
  display: grid;
  gap: 14px;
}

.metrics-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.metric {
  padding: 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(244, 237, 225, 0.68), rgba(255, 255, 255, 0.9));
  border: 1px solid rgba(16, 33, 54, 0.06);
}

.metric strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.45rem;
  line-height: 1;
}

.metric span {
  display: block;
  color: var(--ink-700);
  font-size: 13px;
  font-weight: 700;
}

.feature-banner {
  min-height: 90px;
}

.feature-callout {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--ink-900), var(--teal-600));
  color: var(--white);
}

.feature-callout h3 {
  margin: 0 0 8px;
  color: var(--white);
}

.feature-callout p {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.82);
}

.feature-callout .action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.action-link {
  min-height: 40px;
  padding: 0 14px;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.overview-grid {
  grid-template-columns: 1.1fr 0.9fr;
}

.filters-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.filter-control,
.settings-group {
  display: grid;
  gap: 8px;
}

.filter-control span,
.settings-group label {
  font-size: 14px;
  font-weight: 800;
}

.filter-control input,
.filter-control select,
.settings-group select,
.settings-group input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-950);
}

.filter-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.timeline-card p,
.tool-card p,
.update-card p,
.month-detail p,
.notice,
.muted,
.event-meta,
.term-item span {
  color: var(--ink-700);
}

.timeline-card h3,
.month-detail h3,
.tool-card h3,
.update-card h3 {
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.notice {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(23, 107, 132, 0.08);
  border: 1px solid rgba(23, 107, 132, 0.1);
}

.notice--subtle {
  font-size: 14px;
}

.term-list {
  grid-template-columns: 1fr;
}

.term-item {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(244, 237, 225, 0.62);
  border: 1px solid rgba(16, 33, 54, 0.08);
}

.term-item strong {
  font-size: 15px;
}

.term-item.is-current {
  border-color: rgba(23, 107, 132, 0.28);
  background: rgba(23, 107, 132, 0.1);
}

.upcoming-day {
  margin-bottom: 16px;
}

.upcoming-day__header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.upcoming-day__header h3 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
}

.upcoming-day__header span {
  color: var(--ink-500);
  font-size: 13px;
  font-weight: 700;
}

.event-stack {
  display: grid;
  gap: 12px;
}

.event-card,
.day-event {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-md);
}

.event-date {
  padding: 12px 10px;
  border-radius: 16px;
  background: rgba(23, 107, 132, 0.1);
  text-align: center;
}

.event-date .day {
  display: block;
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
}

.event-date .month {
  display: block;
  margin-top: 6px;
  color: var(--ink-700);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.event-body {
  display: grid;
  gap: 10px;
}

.event-body h3 {
  font-size: 1.12rem;
}

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 13px;
  font-weight: 700;
}

.event-desc {
  font-size: 14px;
}

.chips,
.event-actions,
.tool-actions,
.legend-row {
  display: flex;
  flex-wrap: wrap;
}

.chips {
  gap: 8px;
}

.chip,
.link-chip {
  min-height: 34px;
  padding: 0 12px;
  border-radius: var(--pill);
  font-size: 12px;
  font-weight: 800;
}

.chip {
  display: inline-flex;
  align-items: center;
  background: rgba(239, 127, 96, 0.12);
  color: #9d4d3c;
}

.chip--soft {
  background: rgba(16, 33, 54, 0.06);
  color: var(--ink-700);
}

.link-chip {
  background: rgba(23, 107, 132, 0.08);
  color: var(--teal-700);
  border: 1px solid rgba(23, 107, 132, 0.12);
}

.event-actions,
.tool-actions {
  gap: 10px;
}

.calendar-shell {
  overflow: hidden;
}

.calendar-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 14px;
}

.calendar-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.calendar-weekdays,
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.calendar-weekdays {
  margin-bottom: 10px;
  color: var(--ink-500);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.month-day {
  display: grid;
  gap: 10px;
  min-height: 132px;
  padding: 12px;
  border-radius: 18px;
  cursor: pointer;
}

.month-day.outside {
  opacity: 0.46;
}

.month-day.today {
  border-color: rgba(23, 107, 132, 0.28);
  box-shadow: 0 0 0 1px rgba(23, 107, 132, 0.12), var(--shadow-soft);
}

.month-day.selected {
  background: linear-gradient(180deg, rgba(23, 107, 132, 0.12), rgba(255, 255, 255, 0.92));
}

.month-day__top {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  align-items: start;
}

.month-day__top strong {
  font-size: 15px;
}

.month-day__count {
  display: inline-flex;
  min-width: 28px;
  min-height: 28px;
  padding: 0 8px;
  align-items: center;
  justify-content: center;
  border-radius: var(--pill);
  background: rgba(16, 33, 54, 0.06);
  color: var(--ink-700);
  font-size: 12px;
  font-weight: 800;
}

.month-day__events {
  display: grid;
  gap: 6px;
}

.day-marker {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(23, 107, 132, 0.08);
  color: var(--ink-900);
}

.day-marker.category-school-calendar {
  background: rgba(23, 107, 132, 0.1);
}

.day-marker.category-public-holiday {
  background: rgba(185, 75, 83, 0.12);
  color: var(--holiday);
}

.day-marker.category-school-holiday {
  background: rgba(110, 168, 139, 0.14);
  color: #406e57;
}

.legend-row {
  gap: 8px;
  margin-bottom: 14px;
}

.legend-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: var(--pill);
  font-size: 12px;
  font-weight: 800;
  background: rgba(16, 33, 54, 0.06);
}

.legend-pill::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal-600);
}

.legend-pill.public-holiday::before {
  background: var(--holiday);
}

.legend-pill.school-holiday::before {
  background: var(--leaf-400);
}

.day-event + .day-event {
  margin-top: 12px;
}

.updates-feed,
.tools-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.update-card,
.tool-card {
  padding: 18px;
}

.update-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--ink-500);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.update-card p {
  margin: 10px 0 0;
  font-size: 14px;
}

.tool-card p {
  margin: 10px 0 16px;
  font-size: 14px;
}

.tool-card .tool-actions {
  gap: 10px;
}

.muted {
  color: var(--ink-500);
  font-size: 12px;
}

code {
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(16, 33, 54, 0.06);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

@media (max-width: 980px) {
  .metrics-grid,
  .overview-grid,
  .filters-grid,
  .updates-feed,
  .tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 720px) {
  .app-shell {
    width: min(1180px, calc(100% - 18px));
    padding-top: 14px;
  }

  .app-header {
    grid-template-columns: 1fr;
  }

  .header-actions {
    justify-content: start;
  }

  .metrics-grid,
  .overview-grid,
  .filters-grid,
  .updates-feed,
  .tools-grid,
  .month-grid {
    grid-template-columns: 1fr;
  }

  .calendar-weekdays {
    display: none;
  }

  .month-day {
    min-height: auto;
  }

  .event-card,
  .day-event {
    grid-template-columns: 1fr;
  }

  .event-date {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .event-date .month {
    margin-top: 0;
  }
}
