/* CSS tutorial intro — visuals scoped to /css */

.ci-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1.5rem;
}

.ci-jump a {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #99f6e4;
  background: #f0fdfa;
  color: #0f766e;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

.ci-jump a:hover {
  background: #ccfbf1;
  border-color: #0d9488;
}

.ci-jump a:focus-visible,
.ci-roadmap a:focus-visible,
.ci-theme-controls label:focus-within,
.ci-motion:focus-visible {
  outline: 2px solid #0f766e;
  outline-offset: 2px;
}

.ci-ba {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 0 0 1.35rem;
}

.ci-ba-pane {
  min-width: 0;
  border-radius: 0.9rem;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.ci-ba-label {
  display: block;
  padding: 0.4rem 0.85rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #f1f5f9;
  color: #64748b;
}

.ci-ba-body {
  padding: 1rem 1rem 1.15rem;
}

.ci-ba-pane--plain .ci-ba-body {
  font-family: Georgia, "Times New Roman", serif;
  color: #111;
  background: #fff;
}

.ci-ba-pane--plain .ci-ba-title {
  margin: 0 0 0.45rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: #111;
}

.ci-ba-pane--plain p {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #111;
}

.ci-ba-pane--plain a {
  color: #0000ee;
  text-decoration: underline;
  font-size: 0.95rem;
}

.ci-ba-pane--styled {
  border-color: #99f6e4;
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.08);
}

.ci-ba-pane--styled .ci-ba-label {
  background: #0f766e;
  color: #f0fdfa;
}

.ci-ba-styled-hero {
  margin: 0 0 0.75rem;
  padding: 0.9rem 0.95rem;
  border-radius: 0.7rem;
  background: #0f766e;
  color: #fff;
  font-family: system-ui, sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.ci-ba-pane--styled p {
  margin: 0 0 0.75rem;
  font-family: system-ui, sans-serif;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #334155;
}

.ci-ba-pane--styled a {
  display: inline-flex;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: #ccfbf1;
  color: #0f766e;
  font-family: system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.ci-why,
.ci-methods,
.ci-feature-grid,
.ci-layout-demos,
.ci-split {
  display: grid;
  gap: 0.85rem;
}

.ci-why,
.ci-feature-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 0 0.25rem;
}

.ci-why article,
.ci-method,
.ci-feature,
.ci-layout-card,
.ci-prereq {
  min-width: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.9rem;
  padding: 1rem 1.05rem 1.05rem;
}

.ci-why article:hover,
.ci-method:hover,
.ci-feature:hover,
.ci-layout-card:hover,
a.learn-card:hover {
  border-color: #5eead4;
}

.ci-kicker {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0f766e;
}

.tut-content-inner .section .ci-why h3,
.tut-content-inner .section .ci-method h3,
.tut-content-inner .section .ci-feature h3,
.tut-content-inner .section .ci-layout-card h3,
.tut-content-inner .section .ci-prereq h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.ci-why p,
.ci-method p,
.ci-feature p,
.ci-layout-card p,
.ci-prereq p,
.ci-caption {
  margin: 0;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.6;
}

.ci-caption {
  margin-top: 0.65rem;
}

.ci-caption--center {
  text-align: center;
}

.ci-roadmap {
  margin-bottom: 1rem;
}

.notes-takeaway a {
  color: #166534;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ci-methods {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 1.1rem;
}

.ci-method {
  display: flex;
  flex-direction: column;
  border-top: 3px solid #0d9488;
}

.ci-method code {
  display: block;
  margin-top: 0.75rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.5rem;
  background: #0f172a;
  color: #99f6e4;
  font-size: 0.75rem;
  line-height: 1.45;
  overflow-x: auto;
  white-space: nowrap;
}

.ci-feature-grid {
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.ci-feature {
  border-top: 3px solid #0d9488;
}

.ci-feature--blue { border-top-color: #2563eb; }
.ci-feature--purple { border-top-color: #7c3aed; }
.ci-feature--amber { border-top-color: #d97706; }

.tut-content-inner .section .ci-feature h3 {
  font-size: 0.98rem;
}

.ci-steps {
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.ci-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.75rem 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff;
  color: #334155;
  line-height: 1.55;
}

.ci-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  background: #ccfbf1;
  color: #0f766e;
  font-size: 0.8rem;
  font-weight: 800;
}

.ci-live {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid #99f6e4;
  background: #f8fffd;
}

.ci-live p {
  margin: 0;
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.55;
}

.ci-live .ci-win {
  margin-top: 0.35rem;
  color: #0f766e;
  font-weight: 700;
}

.tut-content-inner .section .ci-method code {
  background: #0f172a;
  color: #99f6e4;
  padding: 0.55rem 0.65rem;
}

.ci-inherit {
  margin: 0.75rem 0 0;
  padding: 0.85rem 1rem;
  border: 1px solid #99f6e4;
  border-radius: 0.75rem;
  color: #0f766e;
  background: #fff;
}

.ci-inherit p {
  margin: 0;
  color: inherit;
  font-size: 0.95rem;
}

.ci-inherit p + p {
  margin-top: 0.35rem;
}

.ci-box {
  max-width: 34rem;
  margin: 0 auto 0.35rem;
}

.ci-box-margin,
.ci-box-border,
.ci-box-pad,
.ci-box-content {
  position: relative;
}

.ci-box-margin {
  padding: 1.7rem 0.9rem 0.9rem;
  border-radius: 1rem;
  background: #fef3c7;
  border: 1px dashed #d97706;
}

.ci-box-border {
  padding: 1.65rem 0.85rem 0.85rem;
  border-radius: 0.7rem;
  background: #cbd5e1;
}

.ci-box-pad {
  padding: 1.6rem 0.8rem 0.8rem;
  background: #ccfbf1;
}

.ci-box-content {
  display: grid;
  place-items: center;
  min-height: 4.25rem;
  padding: 0.75rem;
  border-radius: 0.45rem;
  background: #fff;
  color: #0f172a;
  font-weight: 800;
  text-align: center;
}

.ci-box-tag {
  position: absolute;
  top: 0.35rem;
  left: 0.6rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #92400e;
}

.ci-box-border > .ci-box-tag { color: #334155; }
.ci-box-pad > .ci-box-tag { color: #0f766e; }

.ci-swatches {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0 0 0.9rem;
}

.ci-swatch {
  min-height: 4.4rem;
  padding: 0.65rem;
  border-radius: 0.7rem;
  display: flex;
  align-items: flex-end;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
}

.ci-swatch span {
  display: block;
  font-weight: 500;
  opacity: 0.92;
}

.ci-swatch--teal { background: #0f766e; }
.ci-swatch--blue { background: #2563eb; }
.ci-swatch--amber { background: #b45309; }
.ci-swatch--ink { background: #0f172a; }

.ci-gradient {
  height: 4.25rem;
  border-radius: 0.8rem;
  background: linear-gradient(90deg, #0f766e, #2563eb 55%, #7c3aed);
}

.ci-type {
  display: grid;
  gap: 0.65rem;
  margin: 0 0 1rem;
}

.ci-type-row {
  padding: 0.8rem 0.95rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff;
  color: #0f172a;
}

.ci-type-row small {
  display: block;
  margin-bottom: 0.2rem;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  color: #0f766e;
}

.ci-type-row--sans { font-family: system-ui, sans-serif; font-size: 1.05rem; }
.ci-type-row--serif { font-family: Georgia, "Times New Roman", serif; font-size: 1.15rem; }
.ci-type-row--mono { font-family: ui-monospace, Consolas, monospace; font-size: 0.92rem; }

.ci-layout-demos {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.ci-flex,
.ci-grid,
.ci-pos-stage {
  margin-top: 0.75rem;
}

.ci-flex {
  display: flex;
  gap: 0.45rem;
}

.ci-flex div,
.ci-grid div,
.ci-pos-block {
  padding: 0.55rem 0.4rem;
  border-radius: 0.45rem;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  color: #0f766e;
  font-size: 0.8rem;
  font-weight: 800;
  text-align: center;
}

.ci-flex div { flex: 1; }

.ci-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.ci-grid .ci-span {
  grid-column: 1 / -1;
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

.ci-pos-stage {
  position: relative;
  min-height: 6.5rem;
  padding: 0.7rem;
  border-radius: 0.7rem;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
}

.ci-pos-block {
  width: 46%;
}

.ci-pos-badge {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  padding: 0.3rem 0.5rem;
  border-radius: 999px;
  background: #0f766e;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

.ci-rwd {
  container-type: inline-size;
  margin: 0 0 0.85rem;
  padding: 0.85rem;
  border-radius: 0.9rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.ci-rwd-frame {
  display: grid;
  gap: 0.45rem;
}

.ci-rwd-frame div {
  padding: 0.7rem 0.6rem;
  border-radius: 0.5rem;
  background: #fff;
  border: 1px solid #99f6e4;
  color: #0f766e;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
}

.ci-rwd-frame div:nth-child(2) {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

@container (min-width: 36rem) {
  .ci-rwd-frame {
    grid-template-columns: 0.7fr 1.6fr 0.8fr;
  }
}

.ci-motion {
  display: inline-flex;
  align-items: center;
  margin: 0.35rem 0 0.85rem;
  padding: 0.7rem 1.1rem;
  border: 0;
  border-radius: 0.7rem;
  background: #0f766e;
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 6px 16px rgba(15, 118, 110, 0.18);
}

.ci-motion:hover {
  background: #115e59;
  transform: translateY(-3px) scale(1.03);
}

.ci-theme {
  --brand: #0f766e;
  margin: 0 0 1rem;
  padding: 0.9rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.9rem;
  background: #fff;
}

.ci-theme:has(input[value="blue"]:checked) { --brand: #2563eb; }
.ci-theme:has(input[value="amber"]:checked) { --brand: #b45309; }

.ci-theme-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
}

.ci-theme-controls label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
}

.ci-theme:has(input[value="teal"]:checked) label:has(input[value="teal"]),
.ci-theme:has(input[value="blue"]:checked) label:has(input[value="blue"]),
.ci-theme:has(input[value="amber"]:checked) label:has(input[value="amber"]) {
  border-color: var(--brand);
  color: var(--brand);
  background: #f8fafc;
}

.ci-theme-card {
  padding: 0.95rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  border-top: 4px solid var(--brand);
  background: #f8fafc;
}

.ci-theme-card strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--brand);
  font-size: 1rem;
}

.ci-theme-card p {
  margin: 0;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.55;
}

.ci-roadmap {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.ci-roadmap li {
  margin: 0;
}

.ci-roadmap a,
.ci-roadmap .ci-roadmap-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  align-items: center;
  padding: 0.75rem 0.9rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.8rem;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.ci-roadmap a:hover {
  border-color: #0d9488;
  background: #f0fdfa;
}

.ci-roadmap-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 0.5rem;
  background: #ccfbf1;
  color: #0f766e;
  font-size: 0.8rem;
  font-weight: 800;
}

.ci-roadmap strong {
  display: block;
  color: #0f172a;
  font-size: 0.95rem;
}

.ci-roadmap span span {
  display: block;
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.45;
}

.ci-prereqs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

#learn a.learn-card {
  color: inherit;
  text-decoration: none;
}

.ci-split {
  grid-template-columns: 1fr 1fr;
  margin-top: 0.5rem;
}

@media (max-width: 980px) {
  .ci-methods,
  .ci-layout-demos,
  .ci-prereqs {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .ci-ba,
  .ci-why,
  .ci-feature-grid,
  .ci-methods,
  .ci-layout-demos,
  .ci-prereqs,
  .ci-split,
  .ci-swatches {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ci-motion,
  .ci-motion:hover {
    transition: none;
    transform: none;
  }
}
