/* Reset and base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
: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;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --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: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --radius: 8px;
  --radius-lg: 12px;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--teal-600); text-decoration: none; }
a:hover { color: var(--teal-700); text-decoration: underline; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.skip-link {
  position: absolute; top: -40px; left: 0;
  background: var(--teal-600); color: var(--white);
  padding: 8px 16px; z-index: 100; font-weight: 600;
}
.skip-link:focus { top: 0; }

/* 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: 10px;
  text-decoration: none; color: var(--gray-900);
}
.logo:hover { text-decoration: none; }
.logo-text {
  font-size: 1.25rem; font-weight: 700;
}
.logo-accent { color: var(--teal-600); }
.main-nav ul {
  display: flex; list-style: none; gap: 24px;
}
.main-nav a {
  color: var(--gray-600); font-weight: 500; font-size: 0.95rem;
  text-decoration: none; padding: 4px 0;
}
.main-nav a:hover { color: var(--teal-600); text-decoration: none; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--teal-50) 0%, var(--white) 100%);
  padding: 80px 0 60px;
}
.hero h1 {
  font-size: 2.5rem; font-weight: 800; line-height: 1.2;
  color: var(--gray-900); max-width: 600px; margin-bottom: 16px;
}
.hero-sub {
  font-size: 1.15rem; color: var(--gray-600);
  max-width: 540px; margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 20px; border-radius: var(--radius);
  font-weight: 600; font-size: 0.95rem; cursor: pointer;
  border: 2px solid transparent; transition: all 0.15s ease;
  text-decoration: none; line-height: 1.4;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--teal-600); color: var(--white); border-color: var(--teal-600);
}
.btn-primary:hover { background: var(--teal-700); border-color: var(--teal-700); color: var(--white); }
.btn-ghost {
  background: transparent; color: var(--teal-700); border-color: var(--teal-300);
}
.btn-ghost:hover { background: var(--teal-50); color: var(--teal-800); border-color: var(--teal-400); }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn-danger {
  background: transparent; color: #dc2626; border-color: #fca5a5;
}
.btn-danger:hover { background: #fef2f2; color: #b91c1c; border-color: #f87171; }
.btn-add { margin-top: 16px; }
.btn-preset {
  background: var(--teal-50); color: var(--teal-700); border-color: var(--teal-200);
}
.btn-preset:hover { background: var(--teal-100); }

/* Section styles */
.section-desc {
  color: var(--gray-600); font-size: 1.05rem;
  max-width: 680px; margin-bottom: 24px;
}
section h2 {
  font-size: 1.75rem; font-weight: 700; color: var(--gray-900);
  margin-bottom: 8px;
}

/* Planner section */
.planner-section {
  padding: 60px 0;
}
.planner-layout {
  display: grid; grid-template-columns: 1fr 320px; gap: 40px;
  align-items: start;
}
.planner-main { min-width: 0; }
.planner-sidebar {
  position: sticky; top: 80px;
  display: flex; flex-direction: column; gap: 20px;
}
.sidebar-card {
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 20px;
}
.sidebar-card h3 {
  font-size: 1rem; font-weight: 700; color: var(--gray-800);
  margin-bottom: 12px;
}
.timing-guide dt {
  font-weight: 600; color: var(--teal-700); margin-top: 12px;
}
.timing-guide dd {
  font-size: 0.9rem; color: var(--gray-600); margin-top: 4px;
}
.tips-list {
  list-style: none; font-size: 0.9rem; color: var(--gray-600);
}
.tips-list li {
  padding: 6px 0; padding-left: 20px; position: relative;
}
.tips-list li::before {
  content: ""; position: absolute; left: 0; top: 12px;
  width: 8px; height: 8px; background: var(--teal-400); border-radius: 50%;
}
.sidebar-card p { font-size: 0.9rem; color: var(--gray-600); }

/* Preset bar */
.preset-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 20px; padding: 12px 16px;
  background: var(--teal-50); border-radius: var(--radius);
}
.preset-label { font-weight: 600; color: var(--teal-800); font-size: 0.9rem; }

/* Form */
.app-form {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 24px;
  box-shadow: var(--shadow-sm); margin-bottom: 32px;
}
.form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.form-group { display: flex; flex-direction: column; }
.form-group label {
  font-weight: 600; font-size: 0.9rem; color: var(--gray-700);
  margin-bottom: 4px;
}
.optional { font-weight: 400; color: var(--gray-400); font-size: 0.85rem; }
.form-group input, .form-group select {
  padding: 10px 12px; border: 1px solid var(--gray-300);
  border-radius: var(--radius); font-size: 0.95rem;
  background: var(--white); color: var(--gray-800);
  transition: border-color 0.15s;
}
.form-group input:focus, .form-group select:focus {
  outline: none; border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

/* Applications list */
.applications-list { margin-bottom: 32px; }
.empty-state {
  text-align: center; padding: 40px 20px;
  color: var(--gray-500); border: 2px dashed var(--gray-200);
  border-radius: var(--radius-lg);
}
.empty-state svg { margin-bottom: 12px; }
.app-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 20px; margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.app-card-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 12px;
}
.app-card-title { font-weight: 700; font-size: 1.1rem; color: var(--gray-900); }
.app-card-company { color: var(--teal-600); font-weight: 600; }
.app-card-meta {
  display: flex; flex-wrap: wrap; gap: 16px;
  font-size: 0.9rem; color: var(--gray-600);
}
.app-card-meta span { display: flex; align-items: center; gap: 4px; }
.app-card-notes {
  margin-top: 10px; font-size: 0.9rem; color: var(--gray-500);
  font-style: italic;
}
.app-card-remove {
  background: none; border: none; color: var(--gray-400);
  cursor: pointer; font-size: 1.2rem; padding: 4px 8px;
  border-radius: 4px; line-height: 1;
}
.app-card-remove:hover { color: #dc2626; background: #fef2f2; }

/* Plan output */
.plan-output {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 24px;
  box-shadow: var(--shadow-md);
}
.plan-header {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px; margin-bottom: 20px;
}
.plan-header h3 { font-size: 1.2rem; font-weight: 700; }
.plan-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Schedule */
.schedule-group {
  margin-bottom: 24px; padding-bottom: 20px;
  border-bottom: 1px solid var(--gray-100);
}
.schedule-group:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.schedule-group-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
}
.schedule-group-header h4 {
  font-size: 1.05rem; font-weight: 700; color: var(--gray-900);
}
.schedule-tag {
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px; padding: 2px 8px; border-radius: 4px;
}
.tag-standard { background: #dbeafe; color: #1d4ed8; }
.tag-gentle { background: #fef3c7; color: #b45309; }
.tag-active { background: #d1fae5; color: #047857; }

.follow-up-item {
  display: grid; grid-template-columns: 140px 1fr; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--gray-100);
  align-items: start;
}
.follow-up-item:last-child { border-bottom: none; }
.follow-up-date {
  font-weight: 600; color: var(--teal-700); font-size: 0.9rem;
  padding-top: 2px;
}
.follow-up-content p { font-size: 0.9rem; color: var(--gray-600); margin-bottom: 8px; }
.email-draft {
  background: var(--gray-50); border-left: 3px solid var(--teal-400);
  padding: 12px 16px; border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.9rem; color: var(--gray-700); position: relative;
}
.email-draft-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.email-draft-label {
  font-weight: 600; font-size: 0.8rem; color: var(--teal-600);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.btn-copy-email {
  background: none; border: 1px solid var(--gray-300);
  padding: 4px 10px; border-radius: 4px; font-size: 0.8rem;
  cursor: pointer; color: var(--gray-600); font-weight: 500;
}
.btn-copy-email:hover { background: var(--teal-50); border-color: var(--teal-300); color: var(--teal-700); }
.btn-copy-email.copied { background: #d1fae5; border-color: #6ee7b7; color: #047857; }

/* Examples section */
.examples-section {
  padding: 60px 0; background: var(--gray-50);
}
.examples-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  margin-top: 32px;
}
.example-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 24px;
  box-shadow: var(--shadow-sm);
}
.example-header { margin-bottom: 16px; }
.example-tag {
  display: inline-block; font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
  padding: 3px 10px; border-radius: 4px; margin-bottom: 8px;
}
.example-header h3 {
  font-size: 1.05rem; font-weight: 700; color: var(--gray-900);
}
.example-details { margin-bottom: 16px; }
.example-details dt {
  font-weight: 600; font-size: 0.85rem; color: var(--gray-700);
  margin-top: 10px;
}
.example-details dd {
  font-size: 0.9rem; color: var(--gray-600); margin-top: 2px;
}
.example-email {
  background: var(--teal-50); border-radius: var(--radius);
  padding: 14px; font-size: 0.9rem;
}
.example-email strong {
  display: block; font-size: 0.8rem; color: var(--teal-700);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px;
}
.example-email p { color: var(--gray-700); font-style: italic; }

/* Tips section */
.tips-section { padding: 60px 0; }
.tips-layout {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
  margin: 32px 0;
}
.tip-block {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 24px;
  box-shadow: var(--shadow-sm);
}
.tip-block h3 {
  font-size: 1.05rem; font-weight: 700; color: var(--gray-900);
  margin-bottom: 8px;
}
.tip-block p { font-size: 0.95rem; color: var(--gray-600); }
.assumptions-block {
  background: #fffbeb; border: 1px solid #fde68a;
  border-radius: var(--radius-lg); padding: 24px; margin-top: 32px;
}
.assumptions-block h3 {
  font-size: 1.05rem; font-weight: 700; color: #92400e;
  margin-bottom: 12px;
}
.assumptions-block ul {
  list-style: none; font-size: 0.95rem; color: #78350f;
}
.assumptions-block li {
  padding: 4px 0; padding-left: 20px; position: relative;
}
.assumptions-block li::before {
  content: ""; position: absolute; left: 0; top: 10px;
  width: 8px; height: 8px; background: var(--amber-500); border-radius: 50%;
}

/* Footer */
.site-footer {
  background: var(--gray-900); color: var(--gray-400);
  padding: 40px 0; margin-top: 40px;
}
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 32px;
  justify-content: space-between; align-items: flex-start;
}
.footer-brand p { font-size: 0.9rem; margin-top: 4px; }
.footer-nav ul {
  display: flex; list-style: none; gap: 20px; flex-wrap: wrap;
}
.footer-nav a { color: var(--gray-400); text-decoration: none; font-size: 0.9rem; }
.footer-nav a:hover { color: var(--teal-400); text-decoration: none; }
.footer-note {
  width: 100%; font-size: 0.8rem; color: var(--gray-500);
  margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--gray-800);
}

/* Toast notification */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--gray-900); color: var(--white);
  padding: 12px 20px; border-radius: var(--radius);
  font-size: 0.9rem; font-weight: 500;
  box-shadow: var(--shadow-lg); z-index: 100;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 1024px) {
  .planner-layout { grid-template-columns: 1fr; }
  .planner-sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .sidebar-card { flex: 1; min-width: 260px; }
  .examples-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .hero { padding: 48px 0 40px; }
  .hero h1 { font-size: 1.8rem; }
  .hero-sub { font-size: 1rem; }
  .form-grid { grid-template-columns: 1fr; }
  .examples-grid { grid-template-columns: 1fr; }
  .tips-layout { grid-template-columns: 1fr; }
  .follow-up-item { grid-template-columns: 1fr; gap: 8px; }
  .main-nav ul { gap: 16px; }
  .main-nav a { font-size: 0.85rem; }
  .plan-header { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero h1 { font-size: 1.5rem; }
  .preset-bar { flex-direction: column; align-items: flex-start; }
  .footer-inner { flex-direction: column; gap: 20px; }
}

/* Print styles */
@media print {
  .site-header, .site-footer, .planner-sidebar, .preset-bar,
  .app-form, .hero, .examples-section, .tips-section,
  .plan-actions, .btn-copy-email, .app-card-remove { display: none !important; }
  .plan-output { border: none; box-shadow: none; padding: 0; }
  body { color: #000; background: #fff; }
  .email-draft { border: 1px solid #ccc; background: #f9f9f9; }
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .toast { animation: none; }
}



/* 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;
}
