/* HydraPlan - Hydration Reminder Schedule */
:root {
  --teal-50: #f0fdfa;
  --teal-100: #ccfbf1;
  --teal-200: #99f6e4;
  --teal-300: #5eead4;
  --teal-400: #2dd4bf;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;
  --teal-700: #0f766e;
  --teal-800: #115e59;
  --teal-900: #134e4a;
  --coral-400: #fb7185;
  --coral-500: #f43f5e;
  --coral-600: #e11d48;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max-width: 1120px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--teal-600);
  text-decoration: none;
}
a:hover, a:focus-visible {
  color: var(--teal-700);
  text-decoration: underline;
}

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--teal-600);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 100;
  font-weight: 600;
}
.skip-link:focus {
  top: 1rem;
}

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--teal-700);
}
.logo:hover, .logo:focus-visible {
  text-decoration: none;
  color: var(--teal-800);
}
.main-nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}
.main-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-600);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a[aria-current="page"] {
  color: var(--teal-600);
  border-bottom-color: var(--teal-400);
  text-decoration: none;
}

/* Hero */
.hero-section {
  background: linear-gradient(135deg, var(--teal-50) 0%, var(--white) 60%, var(--teal-50) 100%);
  padding: 3.5rem 0 3rem;
}
.hero-content {
  max-width: 640px;
}
.hero-content h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--gray-900);
  margin-bottom: 1rem;
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--gray-600);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}
.hero-stats {
  display: flex;
  gap: 2rem;
}
.stat {
  display: flex;
  flex-direction: column;
}
.stat strong {
  font-size: 1.3rem;
  color: var(--teal-600);
  font-weight: 700;
}
.stat span {
  font-size: 0.8rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Planner */
.planner-section {
  padding: 3rem 0;
}
.planner-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 2.5rem;
  align-items: start;
}
.planner-controls {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 80px;
}
.planner-controls h2 {
  font-size: 1.2rem;
  margin-bottom: 1.25rem;
  color: var(--gray-900);
}
.control-group {
  margin-bottom: 1.1rem;
}
.control-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.3rem;
}
.control-group input[type="time"],
.control-group input[type="number"],
.control-group select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.control-group input:focus,
.control-group select:focus {
  outline: none;
  border-color: var(--teal-400);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}
.goal-input-wrap {
  display: flex;
  gap: 0.5rem;
}
.goal-input-wrap input {
  flex: 1;
}
.goal-input-wrap select,
.goal-input-wrap .unit-label {
  width: 70px;
  flex-shrink: 0;
}
.unit-label {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-600);
}
.hint {
  font-size: 0.78rem;
  color: var(--gray-500);
  margin-top: 0.25rem;
}
.preset-group {
  border: none;
  padding: 0;
}
.preset-group legend {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}
.preset-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.preset-btn {
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--gray-300);
  border-radius: 999px;
  background: var(--white);
  font-size: 0.82rem;
  font-family: inherit;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.15s;
}
.preset-btn:hover {
  border-color: var(--teal-400);
  color: var(--teal-700);
  background: var(--teal-50);
}
.preset-btn[aria-pressed="true"] {
  background: var(--teal-600);
  color: var(--white);
  border-color: var(--teal-600);
}

/* Output */
.planner-output {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
}
.output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.output-header h2 {
  font-size: 1.2rem;
  color: var(--gray-900);
}
.output-actions {
  display: flex;
  gap: 0.5rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 0.85rem;
  font-family: inherit;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.15s;
}
.btn:hover {
  background: var(--gray-100);
  border-color: var(--gray-400);
}
.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
}
.btn-primary {
  background: var(--teal-600);
  color: var(--white);
  border-color: var(--teal-600);
}
.btn-primary:hover {
  background: var(--teal-700);
}

/* Schedule summary */
.schedule-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.summary-item {
  background: var(--teal-50);
  border: 1px solid var(--teal-200);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  text-align: center;
}
.summary-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--teal-700);
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.summary-value {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--teal-800);
}

/* Schedule list */
.schedule-list {
  max-height: 480px;
  overflow-y: auto;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
}
.schedule-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--gray-100);
}
.schedule-row:last-child {
  border-bottom: none;
}
.schedule-row:hover {
  background: var(--teal-50);
}
.schedule-time {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--teal-700);
  min-width: 65px;
  font-variant-numeric: tabular-nums;
}
.schedule-amount {
  font-size: 0.85rem;
  color: var(--gray-600);
  flex: 1;
}
.schedule-glass {
  font-size: 0.8rem;
  color: var(--gray-500);
  background: var(--gray-100);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}
.schedule-check {
  width: 22px;
  height: 22px;
  border: 2px solid var(--gray-300);
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
.schedule-check:hover {
  border-color: var(--teal-400);
}
.schedule-check.checked {
  background: var(--teal-500);
  border-color: var(--teal-500);
}
.schedule-check.checked::after {
  content: "";
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-1px);
}
.empty-state {
  padding: 2rem;
  text-align: center;
  color: var(--gray-500);
  font-size: 0.9rem;
}
.copy-feedback,
.share-feedback {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--teal-50);
  border: 1px solid var(--teal-200);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--teal-700);
  text-align: center;
}

/* Examples */
.examples-section {
  padding: 3rem 0;
  background: var(--white);
}
.examples-section h2,
.mistakes-section h2,
.faq-section h2,
.assumptions-section h2 {
  font-size: 1.5rem;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}
.section-intro {
  color: var(--gray-600);
  margin-bottom: 1.5rem;
  max-width: 600px;
}
.example-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.example-card {
  background: var(--gray-50);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.example-card:hover {
  border-color: var(--teal-400);
  background: var(--teal-50);
  box-shadow: var(--shadow-sm);
}
.example-card h3 {
  font-size: 1rem;
  color: var(--teal-700);
  margin-bottom: 0.4rem;
}
.example-card p {
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}
.example-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--teal-600);
  background: var(--teal-100);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

/* Mistakes */
.mistakes-section {
  padding: 3rem 0;
}
.mistakes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.mistake-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-left: 4px solid var(--coral-500);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.mistake-card h3 {
  font-size: 1rem;
  color: var(--gray-900);
  margin-bottom: 0.4rem;
}
.mistake-card p {
  font-size: 0.88rem;
  color: var(--gray-600);
  line-height: 1.6;
}

/* FAQ */
.faq-section {
  padding: 3rem 0;
  background: var(--white);
}
.faq-list {
  max-width: 720px;
}
.faq-item {
  border-bottom: 1px solid var(--gray-200);
}
.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
  padding: 1rem 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.faq-question::after {
  content: "+";
  font-size: 1.2rem;
  color: var(--teal-500);
  flex-shrink: 0;
}
.faq-question[aria-expanded="true"]::after {
  content: "−";
}
.faq-question:hover {
  color: var(--teal-700);
}
.faq-item dd {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.7;
  padding-bottom: 1rem;
  padding-right: 2rem;
}

/* Assumptions */
.assumptions-section {
  padding: 3rem 0;
}
.assumptions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.assumption-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.assumption-card h3 {
  font-size: 0.95rem;
  color: var(--teal-700);
  margin-bottom: 0.4rem;
}
.assumption-card p {
  font-size: 0.88rem;
  color: var(--gray-600);
  line-height: 1.6;
}

/* Footer */
.site-footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 2.5rem 0 1.5rem;
  margin-top: auto;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-brand {
  max-width: 280px;
}
.footer-logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--teal-400);
  display: block;
  margin-bottom: 0.4rem;
}
.footer-brand p {
  font-size: 0.85rem;
  line-height: 1.6;
}
.footer-brand a {
  color: var(--teal-400);
}
.footer-nav ul {
  display: flex;
  list-style: none;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.footer-nav a {
  font-size: 0.85rem;
  color: var(--gray-400);
}
.footer-nav a:hover {
  color: var(--teal-400);
}
.footer-copy {
  width: 100%;
  text-align: center;
  font-size: 0.8rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-800);
  margin-top: 1.5rem;
}

/* Print */
@media print {
  .site-header,
  .site-footer,
  .planner-controls,
  .output-actions,
  .examples-section,
  .mistakes-section,
  .faq-section,
  .assumptions-section,
  .hero-section {
    display: none !important;
  }
  .planner-section {
    padding: 0;
  }
  .planner-grid {
    display: block;
  }
  .planner-output {
    border: none;
    box-shadow: none;
    padding: 0;
  }
  .schedule-list {
    max-height: none;
    overflow: visible;
  }
  .schedule-check {
    border: 2px solid #333;
  }
}

/* Responsive */
@media (max-width: 900px) {
  .planner-grid {
    grid-template-columns: 1fr;
  }
  .planner-controls {
    position: static;
  }
  .schedule-summary {
    grid-template-columns: repeat(2, 1fr);
  }
  .example-cards {
    grid-template-columns: 1fr;
  }
  .mistakes-grid {
    grid-template-columns: 1fr;
  }
  .assumptions-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 1rem;
  }
  .hero-section {
    padding: 2.5rem 0 2rem;
  }
  .hero-stats {
    gap: 1.25rem;
  }
  .schedule-summary {
    grid-template-columns: 1fr 1fr;
  }
  .output-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-inner {
    flex-direction: column;
  }
}

/* Focus visible */
*:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
  }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
