/* ZoneSweep styles — compact planner with responsive layout */

:root {
  --teal-900: #1a3a3a;
  --teal-800: #2c5252;
  --teal-700: #3d6b6b;
  --teal-500: #4f8c8c;
  --teal-300: #6ba3a3;
  --teal-100: #d4ecec;
  --teal-50: #f0f8f8;
  --sand: #faf7f2;
  --gray-900: #1a1a1a;
  --gray-700: #4a4a4a;
  --gray-500: #888;
  --gray-300: #ccc;
  --gray-100: #f5f5f5;
  --white: #fff;
  --red: #c0392b;
  --red-light: #fce4e4;
  --green: #2e7d32;
  --green-light: #e8f5e9;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 4px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.1);
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1100px;
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--teal-800);
  color: var(--white);
  padding: 8px 16px;
  border-radius: var(--radius);
  z-index: 1000;
  font-weight: 600;
}
.skip-link:focus {
  top: 8px;
}

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

button {
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-300);
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--teal-900);
  text-decoration: none;
}
.logo:hover { text-decoration: none; }
.logo-text { letter-spacing: -0.02em; }
.site-nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}
.site-nav a {
  font-weight: 500;
  color: var(--gray-700);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"] {
  color: var(--teal-800);
  border-bottom-color: var(--teal-500);
  text-decoration: none;
}

/* Hero */
.hero-section {
  background: linear-gradient(135deg, var(--teal-50) 0%, var(--teal-100) 100%);
  padding: 48px 16px 40px;
  text-align: center;
}
.hero-content {
  max-width: 640px;
  margin: 0 auto;
}
.hero-content h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--teal-900);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 12px;
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--gray-700);
  margin-bottom: 24px;
  line-height: 1.5;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn-primary {
  background: var(--teal-800);
  color: var(--white);
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.15s;
}
.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--teal-700);
}
.btn-secondary {
  background: var(--white);
  color: var(--teal-800);
  border: 2px solid var(--teal-500);
  padding: 10px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.15s;
}
.btn-secondary:hover, .btn-secondary:focus-visible {
  background: var(--teal-50);
}
.btn-text {
  background: none;
  border: none;
  color: var(--teal-700);
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius);
}
.btn-text:hover, .btn-text:focus-visible {
  background: var(--teal-50);
}
.btn-icon {
  background: var(--teal-50);
  border: 1px solid var(--teal-300);
  color: var(--teal-800);
  padding: 6px 14px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
}
.btn-icon:hover, .btn-icon:focus-visible {
  background: var(--teal-100);
}

/* Template Picker */
.template-picker {
  max-width: var(--max-width);
  margin: 24px auto;
  padding: 0 16px;
  text-align: center;
}
.template-picker h2 {
  font-size: 1.25rem;
  color: var(--gray-700);
  margin-bottom: 16px;
}
.template-cards {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.template-card {
  background: var(--white);
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-lg);
  padding: 20px;
  width: 200px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.template-card:hover, .template-card:focus-visible {
  border-color: var(--teal-500);
  box-shadow: var(--shadow-lg);
}
.template-icon { font-size: 2rem; display: block; margin-bottom: 8px; }
.template-name { font-weight: 700; color: var(--gray-900); display: block; }
.template-desc { font-size: 0.85rem; color: var(--gray-500); margin-top: 4px; display: block; }

/* Planner Layout */
.planner-layout {
  max-width: var(--max-width);
  margin: 24px auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 768px) {
  .planner-layout {
    grid-template-columns: 1fr;
  }
}

.panel {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-100);
}
.panel-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--teal-900);
}
.schedule-controls {
  display: flex;
  gap: 8px;
}

/* Zone List */
.zone-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.zone-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--gray-100);
  cursor: pointer;
  transition: background 0.15s;
  border: 2px solid transparent;
}
.zone-item:hover, .zone-item:focus-visible {
  background: var(--teal-50);
  border-color: var(--teal-300);
}
.zone-item-name {
  font-weight: 600;
  color: var(--gray-900);
}
.zone-item-meta {
  font-size: 0.8rem;
  color: var(--gray-500);
}

.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--gray-500);
  font-style: italic;
}

/* Week Grid */
.week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
@media (max-width: 768px) {
  .week-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 480px) {
  .week-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.day-column {
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: 10px 8px;
  min-height: 120px;
}
.day-column.today {
  background: var(--teal-50);
  border: 2px solid var(--teal-300);
}
.day-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--teal-900);
  margin-bottom: 8px;
  text-align: center;
}
.day-zone {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.day-tasks {
  list-style: none;
  font-size: 0.75rem;
}
.day-tasks li {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
  cursor: pointer;
}
.day-tasks li.done {
  text-decoration: line-through;
  color: var(--gray-500);
}
.task-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--teal-500);
  flex-shrink: 0;
}

/* Modal */
.modal {
  border: none;
  border-radius: var(--radius-lg);
  padding: 0;
  max-width: 480px;
  width: 90vw;
  box-shadow: var(--shadow-lg);
}
.modal::backdrop {
  background: rgba(0,0,0,0.4);
}
.modal-content {
  padding: 24px;
}
.modal h3 {
  margin-bottom: 16px;
  color: var(--teal-900);
}
.modal label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--gray-700);
}
.modal input[type="text"] {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  margin-bottom: 16px;
}
.modal fieldset {
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 16px;
}
.modal legend {
  font-weight: 600;
  color: var(--gray-700);
  padding: 0 4px;
}
.task-edit-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.task-edit-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.task-edit-row input[type="text"] {
  flex: 1;
  margin-bottom: 0;
}
.task-edit-row select {
  padding: 6px 8px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.85rem;
}
.task-edit-row button {
  background: none;
  border: none;
  color: var(--red);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 4px;
}
.modal-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Supporting Content */
.supporting-content {
  max-width: var(--max-width);
  margin: 40px auto;
  padding: 0 16px;
}
.supporting-content h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--teal-900);
  margin-bottom: 20px;
}
.supporting-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 24px 0 12px;
}
.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.support-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.support-card h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1rem;
}
.support-card p {
  color: var(--gray-700);
  line-height: 1.5;
}

.mistakes-list {
  list-style: none;
  padding: 0;
  margin-bottom: 24px;
}
.mistakes-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  line-height: 1.5;
}
.mistakes-list li strong {
  color: var(--teal-900);
}

.freq-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.freq-table th, .freq-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.9rem;
}
.freq-table th {
  background: var(--teal-800);
  color: var(--white);
  font-weight: 600;
}
.freq-table tr:last-child td {
  border-bottom: none;
}

.notes-block {
  background: var(--teal-50);
  border-left: 4px solid var(--teal-500);
  padding: 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 24px;
}
.notes-block p {
  margin-bottom: 12px;
  color: var(--gray-700);
  line-height: 1.6;
}
.notes-block p:last-child {
  margin-bottom: 0;
}

/* Footer */
.site-footer {
  background: var(--teal-900);
  color: var(--teal-100);
  padding: 24px 16px;
  margin-top: auto;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
}
.footer-inner nav ul {
  list-style: none;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-inner a {
  color: var(--teal-100);
}
.footer-inner a:hover {
  color: var(--white);
}
.footer-version {
  color: var(--teal-300);
  font-size: 0.75rem;
  width: 100%;
  text-align: center;
  margin-top: 8px;
}

/* Print styles */
@media print {
  .site-header, .site-footer, .hero-section, .template-picker, .panel-zones, .schedule-controls,
  .supporting-content, .btn-primary, .btn-secondary, .btn-text, .btn-icon, .modal {
    display: none !important;
  }
  .planner-layout {
    grid-template-columns: 1fr;
    padding: 0;
    margin: 0;
  }
  .panel-schedule {
    box-shadow: none;
    border: none;
    padding: 0;
  }
  .week-grid {
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
  }
  .day-column {
    border: 1px solid #ccc;
    background: #fff;
  }
  body {
    background: #fff;
    font-size: 10pt;
  }
}

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

/* Utility: hidden attribute */
[hidden] {
  display: none !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;
}
