/* ============================================================
   tutorials.css  —  Tutorials & Guides surfaces
   Loads AFTER main.css + product-page.css.
   Reuses existing tokens (--bg, --ink, accents, fonts) + the
   .eyebrow / header / footer patterns from the blog. Adds only
   the new middle-of-page components.

   Tokens expected from main.css:
     --bg --bg-soft --ink --ink-soft --ink-muted
     --line --line-strong --accent --card
     --radius-sm --radius-md --radius-lg --max --shadow-sm
   ============================================================ */

/* Track-scoped accents + local fallbacks.
   Fallbacks ensure radii/max still resolve even if main.css load
   order ever changes. Safe to keep. */
.t-page {
  --teal: #1E5F69;
  --teal-tint: #E3EEEF;
  --lime: #C2F734;
  --terra: #B8451E;
  --rail-w: 220px;

  /* fallbacks — only used if not already inherited from main.css */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --max: 1240px;
  --shadow-sm: 0 1px 2px rgba(21,20,15,0.04), 0 2px 6px rgba(21,20,15,0.04);
}

/* ---------- Breadcrumb ---------- */
.t-breadcrumb {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 32px 0;
  position: relative;
  z-index: 1;
}
.t-breadcrumb-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
}
.t-breadcrumb a { color: var(--ink-muted); transition: color 0.15s; }
.t-breadcrumb a:hover { color: var(--teal); }
.t-breadcrumb-sep { color: var(--line-strong); }
.t-breadcrumb-current { color: var(--ink-soft); }

/* ---------- Header / answer block ---------- */
.t-head {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 32px 8px;
  position: relative;
  z-index: 1;
}
.t-head .eyebrow { color: var(--teal); }
.t-head-title {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 14px 0 0;
  max-width: 18ch;
}
.t-head-title em {
  font-style: italic;
  color: var(--teal);
}

/* answer block — the AEO/GEO extract surface */
.t-answer {
  margin: 22px 0 0;
  max-width: 64ch;
  font-size: 18px;
  line-height: 1.62;
  color: var(--ink-soft);
}
.t-answer strong { color: var(--ink); font-weight: 500; }

.t-stat {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 18px 0 0;
  font-family: 'Geist Mono', monospace;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
}
.t-stat-dot { color: var(--line-strong); }
.t-stat b { color: var(--teal); font-weight: 500; }

/* ---------- Hero: two columns (copy left, career card right) ---------- */
.t-hero-2col {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  align-items: start;
}
.t-hero-2col .t-head-title { max-width: none; }
.t-hero-2col .t-answer { max-width: none; }

/* ---------- Career card (hero-scope, student audience) ---------- */
.t-career-card {
  margin-top: 46px;
  background: var(--teal);
  border-radius: var(--radius-lg);
  padding: 26px 26px 24px;
  color: #fff;
}
.t-career-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'Geist Mono', monospace;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--lime);
  margin: 0 0 12px;
}
.t-career-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
}
.t-career-title {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 23px;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 0 0 10px;
}
.t-career-desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(255,255,255,0.8);
  margin: 0 0 18px;
}
.t-career-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 46px;
  border-radius: 100px;
  background: var(--lime);
  color: var(--ink);
  font-family: 'Geist', sans-serif;
  font-size: 14.5px;
  font-weight: 500;
  transition: transform 0.14s, box-shadow 0.14s;
}
.t-career-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}
.t-career-cta svg { width: 15px; height: 15px; }
.t-career-note {
  display: block;
  text-align: center;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  margin-top: 10px;
}

/* ---------- Search (full-width) + auto-suggest ---------- */
.t-search {
  max-width: var(--max);
  margin: 0 auto;
  padding: 26px 32px 0;
  position: relative;
  z-index: 1;
}
.t-search--full .t-search-field { max-width: none; }
.t-search-field {
  position: relative;
  max-width: 560px;
}
.t-search-field svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--ink-muted);
  pointer-events: none;
}
.t-search-input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 44px;
  font-family: 'Geist', sans-serif;
  font-size: 15px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.t-search-input::placeholder { color: var(--ink-muted); }
.t-search-input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-tint);
}

/* auto-suggest panel (structure present; backend populates) */
.t-search-field.t-has-suggest { position: relative; }
.t-suggest {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 28px rgba(21,20,15,0.10);
  padding: 8px;
  z-index: 20;
}
.t-suggest[hidden] { display: none; }
.t-suggest-label {
  font-family: 'Geist Mono', monospace;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 8px 10px 6px;
  margin: 0;
}
.t-suggest-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  transition: background 0.12s;
}
.t-suggest-row:hover,
.t-suggest-row[aria-selected="true"] { background: var(--bg-soft); }
.t-suggest-title { font-size: 14.5px; color: var(--ink); }
.t-suggest-title mark { background: transparent; color: var(--teal); font-weight: 500; }
.t-suggest-meta {
  margin-left: auto;
  font-family: 'Geist Mono', monospace;
  font-size: 11.5px;
  color: var(--ink-muted);
}
.t-suggest-series-ic {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--bg-soft);
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.t-suggest-empty { padding: 18px 12px; font-size: 14px; color: var(--ink-soft); }

/* ---------- Body: rail + grid ---------- */
.t-body {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 32px 0;
  display: grid;
  grid-template-columns: var(--rail-w) 1fr;
  gap: 40px;
  align-items: start;
  position: relative;
  z-index: 1;
}

/* ---------- Left rail ---------- */
.t-rail {
  position: sticky;
  top: 88px;
}
.t-rail-group { margin: 0 0 26px; }
.t-rail-label {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 12px;
}
.t-rail-list { list-style: none; margin: 0; padding: 0; }
.t-rail-list li { margin: 0; }
.t-rail-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  color: var(--ink-soft);
  transition: background 0.13s, color 0.13s;
}
.t-rail-link:hover { background: var(--bg-soft); color: var(--ink); }
.t-rail-link.is-active {
  background: var(--teal-tint);
  color: var(--teal);
  font-weight: 500;
}
.t-rail-count {
  font-family: 'Geist Mono', monospace;
  font-size: 11.5px;
  color: var(--ink-muted);
}
.t-rail-link.is-active .t-rail-count { color: var(--teal); }

.t-diff-dots {
  display: inline-flex;
  gap: 3px;
  margin-right: 2px;
}
.t-diff-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
}
.t-diff-dots span.on { background: var(--teal); }

/* ---------- Card grid ---------- */
.t-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.t-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.t-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.t-card-link::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
}

.t-card-cover {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}
.t-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 7px;
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.t-chip[data-lang="python"]  { background: #E3EEEF; color: #1E5F69; }
.t-chip[data-lang="java"]    { background: #F3E7DF; color: #8A3414; }
.t-chip[data-lang="js"]      { background: #F5F0DA; color: #7A6A12; }
.t-chip[data-lang="sql"]     { background: #E7EAF0; color: #3A4A6B; }
.t-chip[data-lang="mysql"]   { background: #E7EAF0; color: #3A4A6B; }
.t-chip[data-lang="tool"]    { background: var(--bg-soft); color: var(--ink-soft); }

.t-diff {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'Geist Mono', monospace;
  font-size: 11.5px;
  color: var(--ink-muted);
}
.t-diff .t-diff-dots span { width: 7px; height: 7px; }

.t-card-title {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 19px;
  line-height: 1.22;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 8px;
}
.t-card-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 16px;
  flex: 1;
}
.t-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Geist Mono', monospace;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--teal);
}
.t-card-cta svg { width: 14px; height: 14px; transition: transform 0.15s; }
.t-card:hover .t-card-cta svg { transform: translateX(3px); }

.t-card-series {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 10px;
}

/* ---------- Pagination ---------- */
.t-pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 36px 0 0;
}
.t-page-link {
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  font-family: 'Geist Mono', monospace;
  font-size: 13.5px;
  color: var(--ink-soft);
  border: 1px solid transparent;
  transition: background 0.13s, border-color 0.13s;
}
.t-page-link:hover { background: var(--bg-soft); }
.t-page-link.is-active {
  border-color: var(--teal);
  color: var(--teal);
  font-weight: 500;
}
.t-page-divider { color: var(--ink-muted); padding: 0 4px; }
.t-page-next {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  padding: 0 16px;
  height: 36px;
  border-radius: 100px;
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--teal);
  border: 1px solid var(--line-strong);
  transition: border-color 0.13s, background 0.13s;
}
.t-page-next:hover { border-color: var(--teal); background: var(--teal-tint); }
.t-page-next svg { width: 15px; height: 15px; }

/* ---------- Enterprise band (bottom CTA, the other audience) ---------- */
.t-band {
  max-width: var(--max);
  margin: 48px auto 0;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}
.t-band-inner {
  display: grid;
  grid-template-columns: 1.5fr auto;
  gap: 40px;
  align-items: center;
  background: var(--teal);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  color: #fff;
}
.t-band-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lime);
  margin: 0 0 14px;
}
.t-band-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
}
.t-band-title {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(26px, 3.2vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 0 0 14px;
  max-width: 36ch;
}
.t-band-desc {
  font-size: 15.5px;
  line-height: 1.55;
  color: rgba(255,255,255,0.82);
  margin: 0;
  max-width: 81ch;
}
.t-band-desc strong { color: #fff; font-weight: 500; }
.t-band-cta-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.t-band-cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 50px;
  padding: 0 75px;
  border-radius: 100px;
  background: var(--lime);
  color: var(--ink);
  font-family: 'Geist', sans-serif;
  font-size: 15px;
  font-weight: 500;
  transition: transform 0.14s, box-shadow 0.14s;
  white-space: nowrap;
}
.t-band-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,0.18); }
.t-band-cta svg { width: 16px; height: 16px; }
.t-band-note {
  font-family: 'Geist Mono', monospace;
  font-size: 11.5px;
  color: rgba(255,255,255,0.6);
}
.t-band-note a { color: inherit; text-decoration: underline; }

/* ---------- SEO / AEO tail ---------- */
.t-tail {
  max-width: var(--max);
  margin: 56px auto 0;
  padding: 0px 20px;
  border-top: 1px solid var(--line);
  position: relative;
  z-index: 1;
}
.t-tail-grid {
    display: grid;
    gap: 40px;
    align-items: center;
    border-radius: var(--radius-lg);
    padding: 21px 20px;
    color: #fff;
}
.t-tail-intro p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 12px;
  max-width: 100ch;
}
.t-tail-intro h2 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 26px;
  color: var(--ink);
  margin: 0 0 16px;
}

/* FAQ */
.t-faq { margin: 32px 0 0; }
.t-faq-item {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}
.t-faq-item:last-child { border-bottom: 1px solid var(--line); }
.t-faq-q {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 17px;
  color: var(--ink);
  margin: 0 0 8px;
}
.t-faq-a {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
  max-width: 72ch;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .t-hero-2col { grid-template-columns: 1fr; gap: 28px; }
  .t-career-card { margin-top: 4px; }
  .t-body,
  .t-tail-grid { grid-template-columns: 1fr; }
  .t-rail {
    position: static;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 16px;
    margin: 0 0 4px;
  }
  .t-rail.is-collapsed .t-rail-body { display: none; }
  .t-rail-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    font-family: 'Geist Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink);
    cursor: pointer;
  }
}
@media (min-width: 901px) {
  .t-rail-toggle { display: none; }
}
@media (max-width: 780px) {
  .t-band-inner { grid-template-columns: 1fr; gap: 24px; padding: 28px 26px; }
  .t-band-cta-wrap { align-items: stretch; }
  .t-band-cta { justify-content: center; }
}
@media (max-width: 620px) {
  .t-grid { grid-template-columns: 1fr; }
  .t-head,
  .t-search,
  .t-body,
  .t-breadcrumb,
  .t-tail,
  .t-band { padding-left: 20px; padding-right: 20px; }
}