:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #182230;
  --muted: #5c6b7a;
  --border: #d9e1ea;
  --primary: #2363eb;
  --primary-dark: #174cc0;
  --success-bg: #9ef0bc;
  --success-text: #075c31;
  --holiday-bg: #ffb894;
  --holiday-text: #8f250a;
  --weekend-bg: #cfd8e6;
  --weekend-text: #243041;
  --shadow: 0 14px 40px rgba(18, 38, 63, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
  color: var(--text);
}

.page {
  min-height: 100vh;
  padding: 22px 20px 48px;
}

.hero,
.calculator-card {
  width: min(100%, 1320px);
  margin: 0 auto;
}

.hero {
  margin-bottom: 14px;
}

.hero-copy {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  line-height: 1.08;
}

.subcopy {
  margin: 8px auto 0;
  max-width: 500px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.calculator-card {
  background: var(--card);
  border: 1px solid rgba(217, 225, 234, 0.9);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.card-header h2,
.detail-card-header h4 {
  margin: 0 0 6px;
}

.card-header p,
.detail-card-header p {
  margin: 0;
  color: var(--muted);
}

.calculator-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.grid {
  display: grid;
  gap: 14px;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field span {
  font-weight: 600;
  font-size: 0.95rem;
}

.field-compact {
  justify-content: flex-end;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  color: var(--text);
}

input:focus,
select:focus {
  outline: 2px solid rgba(35, 99, 235, 0.15);
  border-color: var(--primary);
}

.toggle-option {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 500;
  min-height: 44px;
}

.toggle-option input {
  width: 18px;
  height: 18px;
}

.actions {
  display: flex;
  gap: 12px;
}

.more-tools-actions {
  margin-top: 18px;
}

.primary-btn,
.secondary-btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
}

.tool-link-btn {
  text-decoration: none;
}

.primary-btn {
  background: var(--primary);
  color: white;
}

.primary-btn:hover {
  background: var(--primary-dark);
}

.secondary-btn {
  background: #eef3f8;
  color: var(--text);
}

.result-card,
.detail-card {
  border: 1px solid var(--border);
  background: #fbfdff;
  border-radius: 18px;
  padding: 18px;
}

.result-card {
  margin-top: 14px;
}

.result-label {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 700;
}

.result-card h3 {
  margin: 0;
  font-size: 1.3rem;
}

.result-summary {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.result-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
}

.result-pill.pill-total {
  background: #dbe8ff;
  color: #1f4aa8;
}

.result-pill.pill-working,
.legend-working .legend-swatch {
  background: var(--success-bg);
  color: var(--success-text);
}

.result-pill.pill-weekend,
.legend-weekend .legend-swatch {
  background: var(--weekend-bg);
  color: var(--weekend-text);
}

.result-pill.pill-holiday,
.legend-holiday .legend-swatch {
  background: var(--holiday-bg);
  color: var(--holiday-text);
}

.detail-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.detail-card {
  min-height: 220px;
}

.detail-card-header {
  margin-bottom: 10px;
}

.holiday-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.month-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: white;
  padding: 12px;
}

.month-card-header {
  margin-bottom: 10px;
}

.month-card-header h5 {
  margin: 0;
  font-size: 0.96rem;
}

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

.month-weekdays {
  margin-bottom: 6px;
}

.month-weekdays span {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.calendar-cell {
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}

.calendar-cell.spacer {
  min-height: 48px;
  border: 0;
  background: transparent;
}

.calendar-cell.weekday {
  background: var(--success-bg);
  border-color: #46cf79;
  color: var(--success-text);
}

.calendar-cell.weekend {
  background: var(--weekend-bg);
  border-color: #94a5bd;
  color: var(--weekend-text);
}

.calendar-cell.holiday {
  background: var(--holiday-bg);
  border-color: #ff7e45;
  color: var(--holiday-text);
}

.calendar-cell.out-of-range {
  background: #f8fafc;
  color: #b1bac5;
  border-style: dashed;
  opacity: 0.75;
}

.calendar-cell.boundary {
  background: var(--primary);
  border-color: var(--primary-dark);
  color: white;
  box-shadow: 0 6px 14px rgba(35, 99, 235, 0.22);
}

.calendar-cell.boundary.weekday,
.calendar-cell.boundary.weekend,
.calendar-cell.boundary.holiday {
  background: var(--primary);
  border-color: var(--primary-dark);
  color: white;
}

.calendar-date {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
}

.empty-state {
  color: var(--muted);
  line-height: 1.6;
}

.holiday-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  background: var(--holiday-bg);
  border-color: #ff7e45;
}

.holiday-item strong {
  display: block;
  margin-bottom: 4px;
}

.holiday-item span {
  color: var(--muted);
  font-size: 0.92rem;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  margin-bottom: 10px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  display: inline-block;
  border: 1px solid transparent;
}

.legend-working .legend-swatch {
  border-color: #46cf79;
}

.legend-weekend .legend-swatch {
  border-color: #94a5bd;
}

.legend-holiday .legend-swatch {
  border-color: #ff7e45;
}

.legend-boundary .legend-swatch {
  background: var(--primary);
  border-color: var(--primary-dark);
}

.info-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.info-card {
  margin-top: 0;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.info-panel {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fbfdff;
  padding: 16px;
}

.info-panel h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.info-panel p,
.info-stack p,
.legal-copy p,
.legal-copy li {
  color: var(--muted);
  line-height: 1.6;
}

.info-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 14px;
}

.wrap-actions {
  flex-wrap: wrap;
}

.text-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.text-link:hover {
  color: var(--primary-dark);
}

.site-footer {
  padding: 0 20px 34px;
}

.site-footer-inner {
  width: min(100%, 1320px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.site-footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.site-footer-links a:hover {
  color: var(--text);
}

.contact-form {
  margin-top: 18px;
}

.contact-grid {
  margin-top: 0;
}

.contact-subject-field {
  grid-column: 1 / -1;
}

textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  color: var(--text);
  resize: vertical;
}

textarea:focus {
  outline: 2px solid rgba(35, 99, 235, 0.15);
  border-color: var(--primary);
}

.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.contact-status {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 600;
}

.contact-status.success {
  background: #e8fff1;
  color: #08613a;
  border: 1px solid #7ad8a0;
}

.contact-status.error {
  background: #fff0f0;
  color: #9f1d1d;
  border: 1px solid #f0b0b0;
}

.legal-copy h3 {
  margin: 18px 0 8px;
  font-size: 1rem;
}

.legal-copy ul {
  margin: 0;
  padding-left: 20px;
}

.cookie-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 40px rgba(18, 38, 63, 0.16);
}

.cookie-banner-copy strong {
  display: block;
  margin-bottom: 6px;
}

.cookie-banner-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.cookie-banner-copy a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.cookie-banner-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-banner[hidden] {
  display: none !important;
}

@media (max-width: 860px) {
  .detail-grid,
  .calendar-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .page {
    padding: 18px 14px 36px;
  }

  .calculator-card {
    padding: 16px;
    border-radius: 20px;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .actions {
    flex-direction: column;
  }

  .primary-btn,
  .secondary-btn {
    width: 100%;
  }

  .site-footer {
    padding: 0 14px 26px;
  }

  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-banner {
    left: 14px;
    right: 14px;
    bottom: 14px;
    padding: 14px;
  }

  .cookie-banner-actions {
    width: 100%;
    flex-direction: column;
  }
}

.mode-switch {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  background: #f8fbff;
}

.mode-switch legend {
  font-weight: 800;
  color: var(--muted);
  padding: 0 6px;
}

.mode-switch label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  font-weight: 700;
  cursor: pointer;
}

.mode-switch input {
  width: auto;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.share-status {
  color: var(--success-text);
  font-weight: 800;
  font-size: 0.92rem;
}

[hidden] {
  display: none !important;
}
.calendar-actions{display:flex;flex-wrap:wrap;gap:10px}.google-calendar-btn,.calendar-file-btn{display:inline-flex;align-items:center;gap:8px;background:#fff;border:1px solid var(--border);box-shadow:0 6px 18px rgba(18,38,63,.08)}.google-calendar-btn:hover,.calendar-file-btn:hover{border-color:rgba(35,99,235,.55);background:#f8fbff}.google-calendar-icon{width:22px;height:22px;display:inline-flex;flex:0 0 auto}.google-calendar-icon svg{width:22px;height:22px;display:block}


/* FAQ / milestone card format � matched to complaint-deadline-tracker style */
.mode-card,
.result-card,
.upload-card,
.sample-card,
.table-card {
  background: var(--card, #ffffff);
  border: 1px solid rgba(217, 225, 234, 0.9);
  border-radius: 24px;
  box-shadow: var(--shadow, 0 4px 6px -1px rgba(0, 0, 0, 0.07));
}
.mode-card {
  padding: 20px;
}
.mode-card.faq-section {
  padding-left: 20px;
  padding-right: 20px;
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
}
.mode-card .card-header > div {
  width: 100%;
}
.mode-card .card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.mode-card .card-header h2 {
  margin: 0 0 8px;
  font-size: 1.375rem;
  font-weight: 700;
  color: #1a202c;
}
.mode-card .card-header p {
  margin: 0;
  color: #718096;
  font-size: 0.9375rem;
  line-height: 1.5;
}
.mode-card .milestone-strip {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 18px;
}
.mode-card .milestone-card {
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 16px;
  padding: 14px 18px;
  background: var(--soft-bg, #f8fafc);
}
.mode-card .milestone-card strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
  color: #1a202c;
  font-size: 1rem;
}
.mode-card .milestone-card span {
  color: #718096;
  font-size: 0.92rem;
  line-height: 1.6;
}

