/*
 * AllinAI Begin Child - R0.6 home + core styles.
 *
 * Builds on R0.5.2 (home-r05.css). Reuses R0.5.2 color variables and
 * hero shell. Adds the six R0.6 homepage sections, the five core page
 * renderers, and the six category landing layouts.
 *
 * No animations. No keyframes. No !important. Touch targets >= 44px.
 *
 * Topology map (avoid 1px cliffs):
 *   >= 1152px: 3-column category grid; 3-column path on desktop only.
 *   769 - 1151px: 2-column category grid; 1-column path.
 *   441 - 768px: 1-column category grid; 1-column path; nav collapses.
 *   <= 440px: 1-column everything; nav is toggle-only.
 */

:root {
  --r06-harbor: #16324F;
  --r06-harbor-blue: #2563EB;
  --r06-warm: #B45309;
  --r06-warm-bg: #FFF4E5;
  --r06-sky: #EAF4FF;
  --r06-paper: #FFFFFF;
  --r06-text: #1F2937;
  --r06-muted: #4B5563;
  --r06-line: #E5E7EB;
  --r06-radius: 8px;
}

.r06-section { padding: 32px 16px; border-top: 1px solid var(--r06-line); max-width: 1200px; margin: 0 auto; }
.r06-section:first-of-type { border-top: 0; }
.r06-section--start-here { background: var(--r06-sky); border-top: 0; border-radius: var(--r06-radius); margin-top: 16px; }
.r06-section--trust { background: var(--r06-warm-bg); border-radius: var(--r06-radius); }
.r06-section--trial { border-top: 1px solid var(--r06-line); }
.r06-h2 { font-size: 22px; line-height: 1.35; margin: 0 0 12px; color: var(--r06-harbor); }
.r06-h3 { font-size: 18px; line-height: 1.4; margin: 0 0 10px; color: var(--r06-harbor); }
.r06-lead { font-size: 16px; line-height: 1.75; color: var(--r06-muted); margin: 0 0 16px; }

.r06-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.r06-grid--2 { grid-template-columns: 1fr; }
.r06-grid--3 { grid-template-columns: 1fr; }
@media (min-width: 769px) {
  .r06-grid--2 { grid-template-columns: 1fr 1fr; }
  .r06-grid--3 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .r06-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .r06-grid--3 > .r06-article-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    width: 50%;
    max-width: 50%;
    justify-self: center;
  }

  #home-start-here .r06-grid--3 > .r06-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    width: 50%;
    max-width: 50%;
    justify-self: center;
  }
}
@media (min-width: 1024px) {
  .r06-grid--3 { grid-template-columns: repeat(3, 1fr); }
}

.r06-card,
.r06-cat-card,
.r06-article-card {
  background: var(--r06-paper);
  border: 1px solid var(--r06-line);
  border-radius: var(--r06-radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.r06-card__title,
.r06-cat-card__name,
.r06-article-card__title { margin: 0; font-size: 17px; line-height: 1.4; color: var(--r06-harbor); }
.r06-card__desc,
.r06-cat-card__desc,
.r06-article-card__reader,
.r06-article-card__promise { margin: 0; color: var(--r06-muted); font-size: 15px; line-height: 1.7; }
.r06-cat-card__start { margin: 0; font-size: 14px; color: var(--r06-text); }
.r06-cat-card__start-label {
  display: inline-block;
  background: var(--r06-warm-bg);
  color: var(--r06-warm);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  margin-right: 4px;
}
.r06-article-card__cat { margin: 0; font-size: 13px; color: var(--r06-harbor-blue); font-weight: 600; }
.r06-article-card--draft { border-style: dashed; background: #FAFAFA; }
.r06-article-card__state { margin: 0; color: var(--r06-muted); font-size: 14px; }

.r06-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--r06-radius);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  align-self: flex-start;
}
.r06-btn--primary { background: var(--r06-harbor-blue); color: var(--r06-paper); }
.r06-btn--primary:hover { background: var(--r06-harbor); }
.r06-btn--secondary { background: transparent; color: var(--r06-harbor-blue); border-color: var(--r06-harbor-blue); }
.r06-btn--secondary:hover { background: var(--r06-sky); }
.r06-btn:focus-visible { outline: 3px solid var(--r06-harbor-blue); outline-offset: 2px; }

.r06-steps { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 769px) { .r06-steps { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1152px) { .r06-steps { grid-template-columns: 1fr 1fr 1fr; } }
.r06-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: var(--r06-paper);
  border: 1px solid var(--r06-line);
  border-radius: var(--r06-radius);
}
.r06-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--r06-harbor-blue);
  color: var(--r06-paper);
  font-weight: 700;
  flex-shrink: 0;
}
.r06-step__title { margin: 0; font-size: 16px; color: var(--r06-harbor); }
.r06-step__desc { margin: 0; font-size: 14px; color: var(--r06-muted); }

.r06-trust { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 769px) { .r06-trust { grid-template-columns: 1fr 1fr 1fr; } }
.r06-trust__item { background: var(--r06-paper); border: 1px solid var(--r06-line); border-radius: var(--r06-radius); padding: 14px; }
.r06-trust__title { margin: 0 0 8px; font-size: 16px; color: var(--r06-warm); }

.r06-page-section { margin: 0 0 24px; }
.r06-page-body { margin: 0; line-height: 1.8; max-width: 72ch; }
.r06-problems { padding-left: 20px; margin: 0; color: var(--r06-text); }
.r06-problems li { margin: 0 0 8px; }

.r06-empty {
  border: 1px dashed var(--r06-line);
  background: #FAFAFA;
  padding: 24px;
  border-radius: var(--r06-radius);
}
.r06-empty__list { padding-left: 20px; margin: 12px 0 0; }
.r06-empty__list li { margin-bottom: 6px; }

.r06-main { padding: 32px 16px 48px; max-width: 1200px; margin: 0 auto; }
.r06-h1 { font-size: 28px; line-height: 1.3; margin: 0 0 24px; color: var(--r06-harbor); }
@media (min-width: 769px) { .r06-h1 { font-size: 32px; } .r06-h2 { font-size: 26px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none; transition: none; }
}

/* R0.6 a11y override: bump R0.5.2 hero CTAs to 44px touch targets. */
.allinai-r05-cta { min-height: 44px; }

/* Overflow guard. */
html, body { overflow-x: hidden; }
img, svg { max-width: 100%; height: auto; }
