/* Memory Care Conversation Prep — Styles */

:root {
  --sage-900: #2C4A3A;
  --sage-800: #3A5F4C;
  --sage-700: #4A755E;
  --sage-600: #5B8C74;
  --sage-500: #6DA38A;
  --sage-400: #8FBCA6;
  --sage-300: #B2D4C2;
  --sage-200: #D5EBE0;
  --sage-100: #EDF6F2;
  --sage-50: #F7FBF9;

  --blue-700: #3B6B8A;
  --blue-600: #4A82A3;
  --blue-500: #5A99BC;
  --blue-100: #D6E8F2;
  --blue-50: #EDF4F8;

  --cream-50: #FDFCF8;
  --cream-100: #F8F5EF;
  --cream-200: #F0EBE0;

  --gray-900: #1A1D23;
  --gray-800: #2D3139;
  --gray-700: #444954;
  --gray-600: #5C6270;
  --gray-500: #767D8C;
  --gray-400: #9AA1AE;
  --gray-300: #C0C5D0;
  --gray-200: #DDE1E8;
  --gray-100: #EEF0F4;

  --red-500: #C0554A;
  --red-100: #F5DCD9;
  --amber-500: #C49A3C;
  --amber-100: #F5ECD9;
  --green-600: #4A8A5C;
  --green-100: #D9F0E0;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;

  --max-width: 1200px;
  --content-width: 1100px;
}

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

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

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

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

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

/* Header */
.site-header {
  background: var(--sage-50);
  border-bottom: 1px solid var(--sage-200);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--sage-900);
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
}
.logo:hover, .logo:focus {
  text-decoration: none;
  color: var(--sage-700);
}

.logo-accent {
  color: var(--sage-500);
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.site-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-600);
  padding: 0.25rem 0;
}

.site-nav a:hover, .site-nav a:focus {
  color: var(--sage-700);
}

/* Main Grid Layout */
.main-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  flex: 1;
}

/* Panels */
.panel {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2rem;
}

.panel-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--sage-900);
  margin-bottom: 0.5rem;
}

.panel-desc {
  color: var(--gray-500);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.55;
}

/* Form Steps */
.form-step {
  border: none;
  padding: 0;
  margin: 0 0 1.75rem;
}

.form-step legend {
  font-weight: 600;
  font-size: 1rem;
  color: var(--gray-800);
  margin-bottom: 0.5rem;
  padding: 0;
}

.field-hint {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 0.75rem;
}

/* Checkboxes */
.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.cb-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--gray-700);
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
  line-height: 1.4;
}

.cb-item:hover {
  background: var(--sage-50);
}

.cb-item input[type="checkbox"] {
  margin-top: 0.2rem;
  accent-color: var(--sage-600);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Radios */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.radio-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--gray-700);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}

.radio-item:hover {
  background: var(--sage-50);
}

.radio-item input[type="radio"] {
  accent-color: var(--sage-600);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Text inputs */
.text-input, .text-area {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  color: var(--gray-800);
  background: var(--cream-50);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.text-input:focus, .text-area:focus {
  outline: none;
  border-color: var(--sage-500);
  box-shadow: 0 0 0 3px var(--sage-200);
}

.text-area {
  resize: vertical;
  min-height: 80px;
}

.text-input::placeholder, .text-area::placeholder {
  color: var(--gray-400);
}

/* Buttons */
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-100);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border: 1.5px solid transparent;
  font-family: var(--font-sans);
}

.btn-primary {
  background: var(--sage-700);
  color: #fff;
  border-color: var(--sage-700);
}

.btn-primary:hover {
  background: var(--sage-800);
  border-color: var(--sage-800);
  color: #fff;
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--gray-600);
  border-color: var(--gray-200);
}

.btn-ghost:hover {
  background: var(--sage-50);
  color: var(--sage-800);
  border-color: var(--sage-300);
  text-decoration: none;
}

/* Status message */
.status-msg {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--gray-500);
  min-height: 1.2em;
}
.status-msg.success {
  color: var(--green-600);
}
.status-msg.error {
  color: var(--red-500);
}

/* Guide Output */
.guide-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.guide-block {
  padding: 1.25rem;
  background: var(--sage-50);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--sage-500);
}

.guide-block h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--sage-900);
  margin-bottom: 0.5rem;
}

.guide-text {
  font-size: 0.92rem;
  color: var(--gray-700);
  line-height: 1.6;
}

.script-box {
  margin-top: 0.75rem;
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 1rem;
  border: 1px solid var(--sage-200);
}

.script-line {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--gray-800);
  padding: 0.35rem 0;
  border-bottom: 1px dashed var(--cream-200);
  line-height: 1.55;
}

.script-line:last-child {
  border-bottom: none;
}

.example-empty {
  color: var(--gray-400);
  font-style: italic;
}

.reaction-tip-box {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--blue-50);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--gray-700);
  border-left: 3px solid var(--blue-500);
}

.next-steps-list {
  padding-left: 1.25rem;
  margin-top: 0.5rem;
}

.next-steps-list li {
  font-size: 0.92rem;
  color: var(--gray-700);
  margin-bottom: 0.4rem;
  line-height: 1.55;
}

.avoid-list {
  padding-left: 1.25rem;
  margin-top: 0.5rem;
  list-style-type: "✕  ";
}

.avoid-list li {
  font-size: 0.92rem;
  color: var(--gray-700);
  margin-bottom: 0.4rem;
  line-height: 1.55;
}

/* Support Content */
.support-content {
  background: var(--sage-100);
  border-top: 1px solid var(--sage-200);
  padding: 3rem 1.5rem;
}

.support-inner {
  max-width: var(--content-width);
  margin: 0 auto;
}

.support-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--sage-900);
  margin-bottom: 1.5rem;
  text-align: center;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.support-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.support-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--sage-800);
  margin-bottom: 0.5rem;
}

.support-card p {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.6;
}

/* FAQ */
.faq-section {
  max-width: 800px;
  margin: 0 auto;
}

.faq-section h2 {
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  text-align: left;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.faq-list dt {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--sage-900);
  margin-bottom: 0.3rem;
}

.faq-list dd {
  font-size: 0.92rem;
  color: var(--gray-600);
  line-height: 1.6;
}

/* Footer */
.site-footer {
  background: var(--sage-900);
  color: var(--sage-300);
  padding: 2rem 1.5rem;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.footer-tagline {
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  color: var(--sage-400);
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 0.75rem;
}

.footer-nav a {
  color: var(--sage-400);
  font-size: 0.85rem;
}

.footer-nav a:hover, .footer-nav a:focus {
  color: #fff;
}

.footer-meta {
  font-size: 0.8rem;
  color: var(--sage-400);
  opacity: 0.7;
}

/* Print */
@media print {
  .site-header, .site-footer, .panel-input, .action-row, .status-msg, .site-nav {
    display: none !important;
  }
  .main-grid {
    display: block;
    padding: 0;
  }
  .panel-output {
    box-shadow: none;
    padding: 0;
  }
  .guide-block {
    break-inside: avoid;
  }
  .support-content {
    display: none;
  }
}

/* Responsive */
@media (max-width: 900px) {
  .main-grid {
    grid-template-columns: 1fr;
    padding: 1.25rem;
    gap: 1.5rem;
  }
  .panel {
    padding: 1.25rem;
  }
  .support-grid {
    grid-template-columns: 1fr 1fr;
  }
  .checkbox-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .header-inner {
    padding: 0.6rem 1rem;
  }
  .site-nav {
    gap: 0.75rem;
  }
  .site-nav a {
    font-size: 0.82rem;
  }
  .logo-text {
    font-size: 1.1rem;
  }
  .support-grid {
    grid-template-columns: 1fr;
  }
  .action-row {
    flex-direction: column;
  }
  .btn {
    width: 100%;
    justify-content: center;
  }
  .support-content {
    padding: 2rem 1rem;
  }
  .faq-list {
    gap: 1rem;
  }
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    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;
}
