/* ========================================
   Court Date Calculator — Main Styles
   ======================================== */

:root {
  --bg: #FFFFFF;
  --fg: #1A1A2E;
  --muted: #5A5A7A;
  --accent: #1A1A2E;
  --card-border: #E5E7EB;
  --result-bg: #F0F4FF;
  --faq-active: #F8FAFC;
  --radius: 6px;
  --font: 'Inter', system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ========================================
   Breadcrumb
   ======================================== */
.breadcrumb {
  padding-top: 1rem;
  padding-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover,
.breadcrumb a:focus {
  color: var(--fg);
  text-decoration: underline;
}

.breadcrumb span {
  margin-left: 0.375rem;
  margin-right: 0.375rem;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  padding: 2rem 0 0.5rem;
}

.hero h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.hero-description {
  font-size: 1.0625rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ========================================
   Card / Calculator
   ======================================== */
.card {
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 1.5rem 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.375rem;
  color: var(--fg);
}

.form-group input[type="date"],
.form-group input[type="number"] {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font);
  color: var(--fg);
  background: var(--bg);
  transition: border-color 150ms ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(26, 26, 46, 0.08);
}

/* Toggle Buttons */
.toggle-group {
  display: flex;
  gap: 0;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.toggle-option {
  flex: 1;
  padding: 0.625rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: var(--font);
  border: none;
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
  text-align: center;
}

.toggle-option:not(:last-child) {
  border-right: 1px solid var(--card-border);
}

.toggle-option.active {
  background: var(--accent);
  color: #FFFFFF;
}

.toggle-option:hover:not(.active) {
  background: #F5F5F7;
}

/* Primary Button */
.btn-primary {
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: var(--accent);
  color: #FFFFFF;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 26, 46, 0.15);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ========================================
   Result
   ======================================== */
.result-area {
  display: none;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--card-border);
}

.result-area.visible {
  display: block;
  animation: fadeInUp 300ms ease;
}

.result-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.result-date-large {
  font-size: 2.125rem;
  font-weight: 800;
  color: #111111;
  margin-top: 0.5rem;
  margin-bottom: 1.25rem;
  line-height: 1.3;
}

.breakdown {
  background: var(--result-bg);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.breakdown-title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.breakdown-list {
  list-style: none;
  padding: 0;
}

.breakdown-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.375rem 0;
  font-size: 0.9375rem;
}

.breakdown-list li:not(:last-child) {
  border-bottom: 1px solid var(--card-border);
}

.breakdown-list .label {
  color: var(--muted);
}

.breakdown-list .value {
  font-weight: 600;
  color: var(--fg);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   Content Sections
   ======================================== */
.content-section {
  padding: 1.75rem 0;
}

.content-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.content-section h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.content-section p {
  color: var(--muted);
  margin-bottom: 0.75rem;
  line-height: 1.65;
}

.content-ol {
  padding-left: 1.25rem;
  color: var(--muted);
  line-height: 1.75;
}

.content-ol li {
  margin-bottom: 0.375rem;
}

.content-ul {
  padding-left: 1.25rem;
  color: var(--muted);
  line-height: 1.75;
}

.content-ul li {
  margin-bottom: 0.375rem;
}

.content-ul a,
.content-section a {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.content-ul a:hover,
.content-section a:hover {
  color: var(--muted);
}

/* ========================================
   FAQ Section
   ======================================== */
.faq-section {
  padding: 1.75rem 0;
}

.faq-section > h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.faq-item {
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.faq-item.active {
  background: var(--faq-active);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.125rem;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--font);
  color: var(--fg);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  line-height: 1.4;
}

.faq-icon {
  font-size: 1.125rem;
  font-weight: 400;
  flex-shrink: 0;
  margin-left: 0.75rem;
  transition: transform 200ms ease;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 200ms ease;
}

.faq-answer-inner {
  padding: 0 1.125rem 1rem;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* ========================================
   Trust Pages
   ======================================== */
.trust-page {
  padding: 2rem 0 1rem;
}

.trust-page h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.trust-page h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.trust-page p {
  color: var(--muted);
  margin-bottom: 0.75rem;
  line-height: 1.65;
}

.trust-page a {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.trust-updated {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

/* ========================================
   Disclaimer
   ======================================== */
.disclaimer {
  padding: 1.5rem 0;
}

.disclaimer p {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
  margin-top: 2rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--card-border);
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.25rem 1.125rem;
  margin-bottom: 0.75rem;
}

.footer-links a {
  font-size: 0.8125rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 150ms ease;
}

.footer-links a:hover,
.footer-links a:focus {
  color: var(--fg);
  text-decoration: underline;
}

.site-footer p {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 600px) {
  .hero h1 {
    font-size: 1.625rem;
  }

  .card {
    padding: 1.25rem;
  }

  .card h2 {
    font-size: 1.25rem;
  }

  .result-date-large {
    font-size: 1.5rem;
  }

  .content-section h2 {
    font-size: 1.25rem;
  }

  .content-section h3 {
    font-size: 1rem;
  }

  .toggle-option {
    font-size: 0.75rem;
    padding: 0.5rem 0.5rem;
  }
}

@media (max-width: 375px) {
  .hero h1 {
    font-size: 1.375rem;
  }

  .container {
    padding: 0 1rem;
  }

  .card {
    padding: 1rem;
  }

  .result-date-large {
    font-size: 1.375rem;
  }

  .footer-links {
    gap: 0.25rem 0.75rem;
  }
}
