:root {
  --ink: #1d1d1f;
  --muted: #86868b;
  --paper: #f5f5f7;
  --card: #ffffff;
  --line: rgba(0, 0, 0, .075);
  --brand: #ef4444;
  --brand-soft: #fff1f1;
  --accent: #fb923c;
  --accent-soft: #fff4ec;
  --shadow: 0 2px 8px rgba(0, 0, 0, .035), 0 24px 70px rgba(0, 0, 0, .07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, select, input { font: inherit; }
button, a, select, input { -webkit-tap-highlight-color: transparent; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  height: 64px;
  padding: 0 max(24px, calc((100vw - 1240px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .78);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 650; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.brand span { display: grid; gap: 1px; }
.brand small { color: var(--muted); font-size: 9px; font-weight: 450; letter-spacing: .04em; }
.home-link { color: #515154; text-decoration: none; font-size: 12px; transition: color .2s ease; }
.home-link:hover { color: var(--brand); }

.calendar-section, .details-section { padding-left: max(24px, calc((100vw - 1240px) / 2)); padding-right: max(24px, calc((100vw - 1240px) / 2)); }
.calendar-section { padding-top: 28px; padding-bottom: 28px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 32px; }
.eyebrow { margin: 0 0 12px; color: var(--brand); font-size: 13px; font-weight: 600; letter-spacing: -.01em; }
.section-heading h1, .details-heading h2 { margin: 0; font-size: 46px; font-weight: 700; line-height: 1.08; letter-spacing: -.045em; }
.filters { display: flex; align-items: end; gap: 10px; }
.filters label { display: grid; gap: 7px; }
.filters label span { padding-left: 4px; color: var(--muted); font-size: 10px; font-weight: 500; }
.filters select, .filters input { height: 44px; min-width: 170px; padding: 0 38px 0 14px; border: 0; border-radius: 12px; outline: 0; background: #e9e9ec; color: var(--ink); font-size: 13px; }
.filters input { min-width: 190px; padding-right: 14px; }
.filters select { cursor: pointer; }
.filters select:focus-visible, .filters input:focus-visible { box-shadow: 0 0 0 3px rgba(239, 68, 68, .22); }
.filters input::placeholder { color: #9a9a9f; }
.reminder-button { height: 44px; padding: 0 18px; border: 0; border-radius: 12px; color: #fff; background: var(--brand); cursor: pointer; font-size: 12px; font-weight: 600; white-space: nowrap; transition: transform .2s ease, opacity .2s ease; }
.reminder-button:hover { transform: translateY(-1px); opacity: .9; }

.calendar-card { overflow: hidden; border-radius: 26px; background: var(--card); box-shadow: var(--shadow); }
.calendar-toolbar { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.icon-button { width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--paper); color: #515154; cursor: pointer; font-size: 17px; transition: .2s ease; }
.icon-button:hover { color: #fff; background: var(--brand); transform: scale(1.04); }
.icon-button:disabled { opacity: .28; pointer-events: none; }
.month-title { text-align: center; }
.month-title strong { display: block; font-size: 25px; font-weight: 650; line-height: 1.25; letter-spacing: -.025em; }
.weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.weekdays span { padding: 15px 8px; border-right: 1px solid var(--line); color: #6e6e73; text-align: center; font-size: 13px; font-weight: 650; }
.weekdays span:last-child { border-right: 0; }
.day-cell { position: relative; min-width: 0; min-height: 112px; padding: 10px 9px; border: 0; border-top: 1px solid var(--line); border-right: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; transition: background .2s ease; }
.day-cell:nth-child(7n) { border-right: 0; }
.day-cell:hover { background: #fafafa; }
.day-cell.outside { background: #fbfbfd; color: #c7c7cc; }
.day-cell.selected { z-index: 1; background: var(--brand-soft); box-shadow: inset 0 0 0 2px var(--brand); }
.day-cell.today .day-number { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; background: var(--brand); }
.day-top { display: flex; justify-content: space-between; min-height: 32px; }
.day-number { font-size: 16px; font-weight: 680; line-height: 30px; }
.holiday-count { color: var(--muted); font-size: 10px; line-height: 30px; }
.holiday-chip { display: flex; align-items: center; gap: 5px; width: 100%; margin-top: 5px; padding: 6px 7px; overflow: hidden; border-radius: 7px; background: var(--brand-soft); color: #b42323; text-align: left; white-space: nowrap; text-overflow: ellipsis; font-size: 10px; font-weight: 520; }
.holiday-chip.medium { background: var(--accent-soft); color: #a84813; }
.more-holidays { margin: 6px 0 0 6px; color: var(--muted); font-size: 9px; }
.legend { display: flex; align-items: center; gap: 24px; padding: 16px 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.legend i { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; }
.legend i.high { background: var(--brand); }
.legend i.medium { background: var(--accent); }

.details-section { padding-top: 32px; padding-bottom: 112px; }
.details-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 24px; }
.selected-date { color: var(--muted); font-size: 14px; }
.holiday-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.holiday-card { overflow: hidden; border-radius: 24px; background: #fff; box-shadow: 0 2px 7px rgba(0, 0, 0, .03), 0 16px 50px rgba(0, 0, 0, .055); }
.holiday-card:only-child { grid-column: 1 / -1; }
.card-header { display: flex; justify-content: space-between; gap: 20px; padding: 30px 30px 24px; border-bottom: 1px solid var(--line); }
.country-line { margin: 0 0 8px; color: var(--brand); font-size: 11px; font-weight: 650; }
.card-header h3 { margin: 0; font-size: 28px; font-weight: 650; letter-spacing: -.025em; }
.original-name { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.impact-badge { align-self: start; flex: 0 0 auto; padding: 7px 10px; border-radius: 999px; color: #b42323; background: var(--brand-soft); font-size: 10px; font-weight: 600; }
.impact-badge.medium { color: #a84813; background: var(--accent-soft); }
.card-actions { display: grid; justify-items: end; gap: 8px; }
.holiday-reminder-button { padding: 5px 9px; border: 1px solid rgba(239, 68, 68, .2); border-radius: 999px; color: var(--brand); background: #fff; cursor: pointer; font-size: 9px; font-weight: 600; white-space: nowrap; }
.holiday-reminder-button:hover { background: var(--brand-soft); }
.holiday-reminder-button.is-active { color: #fff; background: var(--brand); }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); margin: 20px 24px 0; overflow: hidden; border-radius: 14px; background: var(--paper); }
.metric { padding: 16px 17px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 9px; }
.metric strong { font-size: 12px; font-weight: 600; line-height: 1.45; }
.business-window { margin: 20px 24px 0; padding: 20px; border: 1px solid var(--line); border-radius: 16px; }
.business-window-title { margin-bottom: 15px; }
.business-window-title strong { font-size: 12px; font-weight: 650; }
.business-timeline { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.business-timeline li { display: grid; grid-template-columns: 70px minmax(16px, 1fr) minmax(210px, 38%); align-items: center; gap: 12px; min-height: 49px; border-top: 1px solid var(--line); }
.business-timeline li:first-child { border-top: 0; }
.business-timeline time { color: var(--muted); font-size: 10px; }
.business-timeline li > span { grid-column: 3; display: grid; gap: 2px; }
.business-timeline li strong { font-size: 11px; font-weight: 600; }
.business-timeline li small { color: var(--muted); font-size: 9px; }
.business-impact { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: #6e6e73; font-size: 10px; line-height: 1.65; }
.business-impact strong { margin-right: 8px; color: var(--brand); font-weight: 650; }
.card-stories { margin: 0 30px; padding: 21px 0; border-top: 1px solid var(--line); }
.card-story { margin: 0 0 12px; color: #6e6e73; font-size: 12px; line-height: 1.75; }
.card-story:last-child { margin-bottom: 0; }
.card-story strong { color: var(--ink); font-weight: 600; }
.card-story.conversation { padding-left: 12px; border-left: 2px solid var(--brand); }
.card-story.conversation strong { color: var(--brand); }
.outreach-script { margin-top: 18px; padding: 17px 18px; border-radius: 14px; background: var(--paper); }
.outreach-script > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.outreach-script strong { color: var(--brand); font-size: 12px; font-weight: 650; }
.outreach-script button { flex: 0 0 auto; padding: 6px 10px; border: 1px solid rgba(239, 68, 68, .2); border-radius: 999px; color: var(--brand); background: #fff; cursor: pointer; font-size: 9px; font-weight: 600; }
.outreach-script button:hover { background: var(--brand-soft); }
.outreach-script p { margin: 11px 0 0; color: var(--ink); font-size: 11px; line-height: 1.7; }
.trade-tip { margin: 0 30px 28px; color: var(--ink); background: transparent; font-size: 12px; line-height: 1.75; }
.trade-tip strong { display: block; margin-bottom: 4px; color: var(--brand); font-size: 13px; font-weight: 650; }
.empty-state { grid-column: 1 / -1; padding: 64px; border-radius: 24px; color: var(--muted); text-align: center; background: #fff; box-shadow: var(--shadow); }
.empty-state strong { display: block; margin-bottom: 8px; color: var(--ink); font-size: 22px; }

.reminder-dialog { width: min(680px, calc(100vw - 32px)); max-height: min(820px, calc(100vh - 32px)); padding: 0; overflow: auto; border: 0; border-radius: 26px; color: var(--ink); background: #fff; box-shadow: 0 30px 100px rgba(0, 0, 0, .2); }
.reminder-dialog::backdrop { background: rgba(0, 0, 0, .28); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.dialog-header { display: flex; justify-content: space-between; gap: 24px; padding: 30px 32px 0; }
.dialog-header .eyebrow { margin-bottom: 8px; }
.dialog-header h2 { margin: 0; font-size: 29px; line-height: 1.2; letter-spacing: -.035em; }
.dialog-close { flex: 0 0 auto; width: 34px; height: 34px; border: 0; border-radius: 50%; color: #6e6e73; background: var(--paper); cursor: pointer; font-size: 22px; line-height: 1; }
.dialog-intro { margin: 16px 32px 24px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.reminder-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 0 32px; }
.reminder-grid.country-only { grid-template-columns: 1fr; }
.reminder-panel { min-width: 0; padding: 18px; border-radius: 18px; background: var(--paper); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.panel-heading h3 { margin: 0; font-size: 15px; }
.panel-heading span { color: var(--muted); font-size: 10px; }
.picker-search { width: 100%; height: 40px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; outline: 0; color: var(--ink); background: #fff; font-size: 12px; }
.picker-search:focus { border-color: rgba(239, 68, 68, .45); box-shadow: 0 0 0 3px rgba(239, 68, 68, .1); }
.choice-list { height: 230px; margin-top: 10px; overflow: auto; }
.choice-option { display: flex; align-items: start; gap: 9px; padding: 8px 7px; border-radius: 9px; cursor: pointer; font-size: 11px; line-height: 1.4; }
.choice-option:hover { background: #fff; }
.choice-option input { flex: 0 0 auto; margin: 2px 0 0; accent-color: var(--brand); }
.choice-option span { min-width: 0; }
.choice-option small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
.choice-hint { margin: 16px 6px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.reminder-settings { display: flex; gap: 12px; padding: 20px 32px 0; }
.reminder-settings label { display: grid; flex: 1; gap: 7px; }
.reminder-settings label > span { color: var(--muted); font-size: 10px; }
.reminder-settings select, .reminder-settings input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; outline: 0; color: var(--ink); background: #fff; font-size: 12px; }
.upcoming-panel { margin: 18px 32px 0; padding: 16px 18px; border-radius: 16px; background: var(--paper); }
.upcoming-panel .panel-heading { margin-bottom: 8px; }
.upcoming-list { display: grid; max-height: 180px; overflow: auto; }
.upcoming-list button { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 7px; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); background: transparent; cursor: pointer; text-align: left; font-size: 10px; }
.upcoming-list button:last-child { border-bottom: 0; }
.upcoming-list button:hover { color: var(--brand); }
.upcoming-list time { flex: 0 0 auto; color: var(--muted); }
.reminder-range { margin: 14px 32px 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.reminder-status { min-height: 18px; margin: 10px 32px 0; color: var(--brand); font-size: 11px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 32px 30px; }
.secondary-button, .primary-button { min-height: 42px; padding: 0 17px; border: 0; border-radius: 11px; cursor: pointer; font-size: 12px; font-weight: 600; }
.secondary-button { color: #515154; background: var(--paper); }
.primary-button { color: #fff; background: var(--brand); }
.holiday-reminder-dialog { width: min(520px, calc(100vw - 32px)); }
.auth-gate-dialog { width: min(470px, calc(100vw - 32px)); }
.auth-gate-actions { display: grid; grid-template-columns: 1fr 1fr; padding-top: 0; }
.auth-gate-actions button { width: 100%; }
.auth-gate-status { margin-top: -14px; padding-bottom: 24px; text-align: center; }
.holiday-reminder-target { margin: 18px 32px 0; padding: 16px 18px; border-radius: 14px; background: var(--paper); }
.holiday-reminder-target strong { display: block; margin-bottom: 5px; font-size: 16px; }
.holiday-reminder-target span { color: var(--muted); font-size: 11px; }
.browser-reminder-toast { position: fixed; right: 22px; bottom: 22px; z-index: 40; width: min(370px, calc(100vw - 32px)); padding: 20px; border: 1px solid rgba(239, 68, 68, .16); border-radius: 18px; background: rgba(255, 255, 255, .96); box-shadow: 0 20px 60px rgba(0, 0, 0, .16); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.browser-reminder-toast[hidden] { display: none; }
.browser-reminder-toast > button:first-child { position: absolute; top: 10px; right: 11px; width: 28px; height: 28px; border: 0; border-radius: 50%; color: var(--muted); background: var(--paper); cursor: pointer; }
.browser-reminder-toast strong { display: block; padding-right: 26px; font-size: 15px; }
.browser-reminder-toast p { margin: 8px 0 14px; color: #6e6e73; font-size: 11px; line-height: 1.6; }
.toast-action { padding: 7px 11px; border: 0; border-radius: 9px; color: #fff; background: var(--brand); cursor: pointer; font-size: 10px; font-weight: 600; }

@media (max-width: 920px) {
  .section-heading { align-items: start; flex-direction: column; }
  .filters { flex-wrap: wrap; width: 100%; }
  .filters label { flex: 1; }
  .reminder-button { align-self: end; }
  .day-cell { min-height: 96px; padding: 7px 5px; }
  .holiday-chip { padding: 5px 4px; }
  .holiday-cards { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .site-header { height: 60px; padding-inline: 16px; }
  .brand img { width: 34px; height: 34px; border-radius: 9px; }
  .brand { font-size: 13px; }
  .home-link { font-size: 11px; }
  .calendar-section, .details-section { padding-left: 16px; padding-right: 16px; }
  .calendar-section { padding-top: 24px; padding-bottom: 20px; }
  .section-heading { gap: 24px; margin-bottom: 24px; }
  .section-heading h1, .details-heading h2 { font-size: 34px; }
  .filters { width: 100%; }
  .filters label { width: 100%; flex-basis: 100%; }
  .filters select, .filters input { width: 100%; min-width: 0; padding-right: 20px; font-size: 11px; }
  .reminder-button { width: 100%; }
  .calendar-card { border-radius: 20px; box-shadow: 0 10px 40px rgba(0, 0, 0, .06); }
  .calendar-toolbar { padding: 16px 12px; }
  .month-title strong { font-size: 20px; }
  .day-cell { min-height: 72px; padding: 5px 3px; }
  .weekdays span { padding: 11px 4px; font-size: 12px; }
  .day-cell.today .day-number { width: 26px; height: 26px; }
  .day-top { min-height: 28px; }
  .day-number { font-size: 14px; line-height: 26px; }
  .holiday-count { line-height: 26px; }
  .holiday-count { display: none; }
  .holiday-chip { justify-content: center; height: 23px; padding: 3px; font-size: 0; }
  .holiday-chip .flag { font-size: 13px; }
  .more-holidays { margin: 3px 0 0; text-align: center; font-size: 8px; }
  .legend { flex-wrap: wrap; gap: 10px 18px; padding: 13px 14px; }
  .details-section { padding-top: 28px; padding-bottom: 80px; }
  .details-heading { align-items: start; flex-direction: column; gap: 10px; margin-bottom: 22px; }
  .holiday-card { border-radius: 20px; }
  .card-header { padding: 25px 22px 20px; }
  .metrics { grid-template-columns: 1fr; margin: 16px 18px 0; }
  .metric { padding: 11px 15px; border-right: 0; border-bottom: 1px solid var(--line); }
  .metric:last-child { border-bottom: 0; }
  .business-window { margin: 16px 18px 0; padding: 16px; }
  .business-timeline li { grid-template-columns: 60px minmax(0, 1fr); padding: 8px 0; }
  .business-timeline li > span { grid-column: 2; }
  .card-stories { margin: 0 22px; }
  .trade-tip { margin: 0 22px 24px; }
  .reminder-dialog { border-radius: 22px; }
  .dialog-header { padding: 24px 20px 0; }
  .dialog-header h2 { font-size: 24px; }
  .dialog-intro { margin: 14px 20px 20px; }
  .holiday-reminder-target { margin-right: 20px; margin-left: 20px; }
  .reminder-grid { grid-template-columns: 1fr; padding: 0 20px; }
  .choice-list { height: 190px; }
  .reminder-settings { flex-direction: column; padding: 18px 20px 0; }
  .upcoming-panel { margin-right: 20px; margin-left: 20px; }
  .reminder-range, .reminder-status { margin-right: 20px; margin-left: 20px; }
  .dialog-actions { padding: 10px 20px 24px; }
  .auth-gate-actions { grid-template-columns: 1fr; }
  .auth-gate-status { padding-bottom: 20px; }
  .browser-reminder-toast { right: 10px; bottom: 10px; }
}
