/* ================================================================
   CodeToFun — Tutorial page layout + sidebar styles
   Matches Figma design: three-column (left sidebar | content | right sidebar)
   Reusable across tutorial pages (MongoDB, HTML, CSS, JS, etc.)
   ================================================================ */

/* ---------- CSS custom properties (theme-able per page) ---------- */
:root {
  --tut-accent: #0d9488;
  --tut-accent-light: #f0fdfa;
  --tut-accent-border: #99f6e4;
  --tut-accent-100: #ccfbf1;
  --tut-accent-700: #0f766e;
  --tut-sidebar-w: 16rem;
  --tut-header-h: 4rem;
}

/* ---------- Base reset for tutorial pages ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body.tut-page {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, sans-serif;
  color: #1e293b;
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
ul {
  list-style: none;
}
button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}
code {
  font-family: ui-monospace, "Cascadia Code", "Courier New", Courier, monospace;
  font-size: 0.9em;
}

/* ---------- Header (shared site-header overrides for tut pages) ---------- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.938rem;
  border-radius: 0.5rem;
  padding: 0.625rem 1.5rem;
  transition: all 0.2s ease;
  text-decoration: none;
  border: none;
  line-height: 1.4;
}
a.btn-primary,
.btn-primary {
  background: #2563eb;
  color: #fff;
}
a.btn-primary:hover,
.btn-primary:hover {
  background: #1d4ed8;
  color: #fff;
}
.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--tut-header-h);
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.logo-icon {
  background: #2563eb;
  padding: 0.5rem;
  border-radius: 0.5rem;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.logo-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
}
.logo-tagline {
  font-size: 0.75rem;
  color: #64748b;
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 2rem;
}
.desktop-nav a:not(.btn) {
  color: #475569;
  font-weight: 500;
  font-size: 0.938rem;
  transition: color 0.2s;
}
.desktop-nav a:not(.btn):hover {
  color: #2563eb;
}
.mobile-menu-btn {
  display: flex;
  padding: 0.5rem;
  color: #475569;
}
.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}
.mobile-nav.open {
  display: flex;
}
.mobile-nav a:not(.btn) {
  color: #475569;
  font-weight: 500;
  font-size: 0.938rem;
}

/* ---------- Three-column layout wrapper ---------- */
.tut-layout {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* ---------- LEFT SIDEBAR ---------- */
.tut-sidebar--left {
  position: fixed;
  top: var(--tut-header-h);
  left: 0;
  z-index: 40;
  width: var(--tut-sidebar-w);
  height: calc(100vh - var(--tut-header-h));
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
  overflow-y: auto;
  scrollbar-width: thin;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}
.tut-sidebar--left.is-open {
  transform: translateX(0);
}

/* ---------- RIGHT SIDEBAR ---------- */
.tut-sidebar--right {
  position: fixed;
  top: var(--tut-header-h);
  right: 0;
  z-index: 40;
  width: var(--tut-sidebar-w);
  height: calc(100vh - var(--tut-header-h));
  background: #f8fafc;
  border-left: 1px solid #e2e8f0;
  overflow-y: auto;
  scrollbar-width: thin;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.tut-sidebar--right.is-open {
  transform: translateX(0);
}

/* ---------- Sidebar inner padding ---------- */
.tut-sidebar-inner {
  padding: 1rem;
}

/* ---------- Sidebar brand panel ---------- */
.tut-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 1rem;
  background: var(--tut-accent-light);
  border: 1px solid var(--tut-accent-border);
  border-radius: 0.5rem;
}
.tut-sidebar-brand-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: var(--tut-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tut-sidebar-brand-icon svg {
  width: 1rem;
  height: 1rem;
}
.tut-sidebar-brand-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.2;
}
.tut-sidebar-brand-sub {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.2;
}

/* ---------- Sidebar heading ---------- */
.tut-sidebar-heading {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #64748b;
  margin-bottom: 0.65rem;
}

/* ---------- Sidebar nav links ---------- */
.tut-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.tut-nav-divider {
  padding: 1rem 0.75rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}
.tut-nav-divider:first-child {
  padding-top: 0.25rem;
}

.tut-nav-link {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 400;
  color: #475569;
  line-height: 1.35;
  transition: background 0.15s, color 0.15s;
}
.tut-nav-link:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.tut-nav-link.is-current {
  background: var(--tut-accent-100);
  color: var(--tut-accent-700);
  font-weight: 500;
  border-left: 3px solid var(--tut-accent);
}

/* Active TOC highlight (set via JS scroll spy) */
.tut-toc-link.is-active {
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 500;
  border-left: 3px solid var(--tut-accent);
}

/* ---------- Mobile overlays ---------- */
.tut-overlay {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--tut-header-h);
  background: rgba(0, 0, 0, 0.3);
  z-index: 30;
}
.tut-overlay.is-visible {
  display: block;
}

/* ---------- TOC FAB (floating action button for right sidebar on mobile) ---------- */
.tut-toc-fab {
  display: flex;
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--tut-accent);
  color: #fff;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: background 0.2s;
  border: none;
  cursor: pointer;
}
.tut-toc-fab:hover {
  background: var(--tut-accent-700);
}

/* Only show FAB on mobile (left sidebar is off-canvas under 700px) */
@media (min-width: 700px) {
  .tut-toc-fab {
    display: none;
  }
}

/* ---------- Main content area ---------- */
.tut-content {
  flex: 1;
  min-width: 0;
}
.tut-content-inner {
  max-width: 56rem;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* ---------- Breadcrumb ---------- */
.tut-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #475569;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.tut-breadcrumb a {
  transition: color 0.15s;
}
.tut-breadcrumb a:hover {
  color: #2563eb;
}
.tut-breadcrumb svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: #94a3b8;
}
.tut-breadcrumb-current {
  color: #0f172a;
  font-weight: 500;
}

/* ---------- Page title ---------- */
.tut-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.tut-title-accent {
  color: var(--tut-accent);
}

/* ---------- Meta bar ---------- */
.tut-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  font-size: 0.875rem;
  color: #475569;
}
.tut-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.tut-meta-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #22c55e;
}

/* ---------- Featured article image ---------- */
.tut-featured-figure {
  margin: 0 0 2rem;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
  line-height: 0;
}
.tut-featured-img {
  width: 100%;
  height: auto;
  display: block;
}
.tut-meta-item svg {
  width: 0.875rem;
  height: 0.875rem;
}

/* ---------- Intro box ---------- */
.tut-intro {
  background: var(--tut-accent-light);
  border-left: 4px solid var(--tut-accent);
  padding: 1.5rem;
  border-radius: 0 0.5rem 0.5rem 0;
  margin-bottom: 2rem;
}
.tut-intro h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.5rem;
}
.tut-intro p {
  color: #334155;
  line-height: 1.7;
  margin-bottom: 0.75rem;
}
.tut-intro p:last-child {
  margin-bottom: 0;
}
.tut-intro code {
  background: var(--tut-accent-100);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  color: var(--tut-accent-700);
}

/* ---------- Quick reference cards ---------- */
.tut-ref-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}
.tut-ref-card {
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  text-align: center;
  min-width: 0;
}
.tut-ref-card-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #64748b;
}
.tut-ref-card-value {
  font-size: 1.125rem;
  font-family: ui-monospace, monospace;
  font-weight: 700;
  color: #0f172a;
  display: block;
  margin-top: 0.25rem;
  overflow-wrap: anywhere;
}
.tut-ref-card-desc {
  font-size: 0.75rem;
  color: #475569;
  margin-top: 0.25rem;
}

/* ---------- Related Topics: flex layout for in-between widths ---------- */
#related-topics .tut-ref-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}
#related-topics .tut-ref-card {
  flex: 1 1 180px;
}
#related-topics .tut-ref-card-value {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: normal;
  word-break: normal;
}

/* ---------- Use-case flex grid (min 220px per card) ---------- */
.tut-usecase-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}
.tut-usecase-grid > .tut-ref-card {
  flex: 1 1 220px;
  min-width: 220px;
}

/* ---------- Code block ---------- */
.tut-code-block {
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid #1e293b;
  background: #0f172a;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.2);
  margin: 1.25rem 0;
}
.tut-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0rem 1rem;
  background: #1e293b;
  border-bottom: 1px solid #334155;
}
.tut-code-dots {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.tut-code-dots span {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
}
.tut-code-dots .dot-red {
  background: #f87171;
}
.tut-code-dots .dot-yellow {
  background: #fbbf24;
}
.tut-code-dots .dot-green {
  background: #4ade80;
}
.tut-code-label {
  margin-left: 0.75rem;
  font-size: 0.875rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.tut-code-label svg {
  width: 0.875rem;
  height: 0.875rem;
}
.tut-code-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s;
}
.tut-code-copy:hover {
  color: #fff;
}
.tut-code-copy.is-copied {
  color: #4ade80;
}
.tut-code-copy svg {
  width: 1rem;
  height: 1rem;
}
.tut-code-body {
  margin: 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
}
.tut-code-body code {
  font-family: ui-monospace, "Cascadia Code", "Courier New", Courier, monospace;
  font-size: 0.8125rem;
  line-height: 1.65;
  color: #e2e8f0;
  white-space: pre;
  display: block;
  /* Avoid programming-font ligatures (e.g. *** ) breaking ASCII column alignment */
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "calt" 0;
}

/* CodeMirror 6 overrides inside code blocks */
.tut-code-body .cm-editor {
  background: transparent;
}
.tut-code-body .cm-editor .cm-scroller {
  overflow-x: auto;
  overflow-y: visible;
  font-family: ui-monospace, "Cascadia Code", "Courier New", Courier, monospace;
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "calt" 0;
}
.tut-code-body .cm-editor .cm-content {
  padding: 0;
}
.tut-code-body .cm-editor .cm-line {
  padding: 0;
}

/* ---------- Try it / output ---------- */
.tut-try-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  background: var(--tut-accent);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  margin-bottom: 1rem;
}
.tut-try-btn:hover {
  background: var(--tut-accent-700);
}
.tut-try-btn svg {
  width: 1rem;
  height: 1rem;
}
.tut-try-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.tut-try-btns .tut-try-btn {
  margin-bottom: 0;
}
a.tut-try-btn--editor {
  background: #2563eb;
  text-decoration: none;
  color: #fff;
}
a.tut-try-btn--editor:hover {
  background: #1d4ed8;
}

.tut-output {
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 0.5rem;
  overflow: hidden;
  margin-bottom: 1rem;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}
.tut-output-header {
  background: #f1f5f9;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
}
.tut-output-body {
  padding: 1rem;
}
.tut-output-body pre {
  font-size: 0.875rem;
  font-family: ui-monospace, monospace;
  color: #15803d;
  background: #f0fdf4;
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid #bbf7d0;
  white-space: pre-wrap;
  margin: 0;
}

/* ---------- Example section layout ---------- */
.tut-example-section {
  margin-bottom: 3.5rem;
}
.tut-example-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.tut-example-title {
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  font-weight: 700;
  color: #0f172a;
}
.tut-example-desc {
  color: #334155;
  margin-bottom: 1rem;
  line-height: 1.7;
}

/* ---------- How-it-works timeline ---------- */
.hiw-heading {
  font-size: clamp(1.15rem, 3vw, 1.35rem);
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
}
.hiw-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.hiw-step {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 1rem;
  position: relative;
}
.hiw-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hiw-marker-num {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8125rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 4px #fff;
}
.hiw-marker-line {
  flex: 1;
  width: 2px;
  min-height: 1rem;
}
.hiw-step--result .hiw-marker-line {
  display: none;
}
[data-color="orange"] .hiw-marker-num { background: linear-gradient(135deg, #f97316, #fb923c); color: #fff; }
[data-color="orange"] .hiw-marker-line { background: #fed7aa; }
[data-color="teal"]   .hiw-marker-num { background: linear-gradient(135deg, #14b8a6, #2dd4bf); color: #fff; }
[data-color="teal"]   .hiw-marker-line { background: #99f6e4; }
[data-color="purple"] .hiw-marker-num { background: linear-gradient(135deg, #8b5cf6, #a78bfa); color: #fff; }
[data-color="purple"] .hiw-marker-line { background: #ddd6fe; }
[data-color="blue"]   .hiw-marker-num { background: linear-gradient(135deg, #3b82f6, #60a5fa); color: #fff; }
[data-color="blue"]   .hiw-marker-line { background: #bfdbfe; }
[data-color="green"]  .hiw-marker-num { background: linear-gradient(135deg, #16a34a, #4ade80); color: #fff; }

.hiw-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.hiw-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}
[data-color="orange"] .hiw-card { border-left: 3px solid #f97316; }
[data-color="teal"]   .hiw-card { border-left: 3px solid #14b8a6; }
[data-color="purple"] .hiw-card { border-left: 3px solid #8b5cf6; }
[data-color="blue"]   .hiw-card { border-left: 3px solid #3b82f6; }
[data-color="green"]  .hiw-card { border-left: 3px solid #16a34a; }

.hiw-card--result {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  border-color: #bbf7d0;
}
.hiw-result-glyph {
  font-size: 2.75rem;
  line-height: 1;
  color: #16a34a;
  flex-shrink: 0;
}
.hiw-card-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.3rem;
}
.hiw-card-text {
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.65;
  margin: 0;
}
.hiw-code {
  padding: 0.125rem 0.4rem;
  border-radius: 0.3rem;
  font-size: 0.8125em;
  font-family: ui-monospace, "Cascadia Code", "Courier New", Courier, monospace;
  background: #f1f5f9;
  color: #6d28d9;
}
.hiw-chip {
  display: inline-block;
  margin-top: 0.55rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}
@media (max-width: 699px) {
  .hiw-step {
    grid-template-columns: 2rem 1fr;
    gap: 0.65rem;
  }
  .hiw-marker-num {
    width: 1.85rem;
    height: 1.85rem;
    font-size: 0.75rem;
  }
  .hiw-card {
    padding: 0.85rem 0.95rem;
  }
}

/* ---------- Example section numbering ---------- */
.tut-example-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--tut-accent);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ---------- Explanation box ---------- */
.tut-explanation {
  background: #f8fafc;
  border-radius: 0.5rem;
  padding: 1.5rem;
  border: 1px solid #e2e8f0;
  margin: 1rem 0 2rem;
}
.tut-explanation h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.75rem;
}
.tut-explanation ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.tut-explanation li {
  color: #334155;
  font-size: 0.875rem;
  line-height: 1.6;
}
.tut-explanation li code {
  background: #e2e8f0;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.8125rem;
  color: var(--tut-accent-700);
  white-space: nowrap;
}

/* ---------- Warning box ---------- */
.tut-warning {
  margin-bottom: 2.5rem;
  background: #fffbeb;
  border: 2px solid #fde68a;
  border-radius: 0.75rem;
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.tut-warning-icon {
  width: 1.5rem;
  height: 1.5rem;
  color: #d97706;
  flex-shrink: 0;
  margin-top: 0.125rem;
}
.tut-warning h4 {
  font-weight: 700;
  color: #92400e;
  margin-bottom: 0.5rem;
}
.tut-warning p {
  font-size: 0.875rem;
  color: #334155;
  margin-bottom: 0.5rem;
}
.tut-warning p:last-child {
  margin-bottom: 0;
}
.tut-warning-footnote {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.5rem;
}
.tut-warning-hint {
  color: #94a3b8;
}
.tut-warning-code {
  background: #fff;
  border-radius: 0.5rem;
  padding: 0.75rem;
  border: 1px solid #fde68a;
  font-family: ui-monospace, monospace;
  font-size: 0.875rem;
  line-height: 1.8;
}

/* ---------- Key takeaways ---------- */
.tut-takeaways {
  background: var(--tut-accent-light);
  border-left: 4px solid var(--tut-accent);
  padding: 1.5rem;
  border-radius: 0 0.5rem 0.5rem 0;
  margin-bottom: 2.5rem;
}
.tut-takeaways h4 {
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.5rem;
}
.tut-takeaways ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.tut-takeaways li {
  font-size: 0.875rem;
  color: #334155;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.6;
}
.tut-takeaway-bullet {
  color: var(--tut-accent);
  font-weight: 700;
}
.tut-takeaways li code {
  background: var(--tut-accent-100);
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
  color: var(--tut-accent-700);
}

/* ---------- Recap / Key takeaways (mobile-first cards) ---------- */
.tut-recap {
  margin-bottom: 2.5rem;
}
.tut-recap-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin: 0 0 0.85rem;
}
.tut-recap-cards {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.tut-recap-card {
  position: relative;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  padding: 0.85rem 0.95rem 0.85rem 3rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.tut-recap-card:hover {
  border-color: #c7d2fe;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.08);
}
.tut-recap-num {
  position: absolute;
  left: 0.85rem;
  top: 0.85rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tut-recap-card p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #334155;
}
.tut-recap-card p strong {
  color: #0f172a;
}
.tut-recap-card p code,
.tut-recap-codes code {
  padding: 0.125rem 0.4rem;
  border-radius: 0.3rem;
  font-size: 0.8125em;
  font-family: ui-monospace, "Cascadia Code", "Courier New", Courier, monospace;
  background: #eef2ff;
  color: #4338ca;
  white-space: nowrap;
}
.tut-recap-codes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}
.tut-recap-codes code {
  font-size: 0.8125rem;
  padding: 0.2rem 0.55rem;
  background: #e0e7ff;
  border: 1px solid #c7d2fe;
}
@media (min-width: 700px) {
  .tut-recap-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }
  .tut-recap-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

/* ---------- Do's / Don'ts grid ---------- */
.tut-dos-donts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.tut-dos-card,
.tut-donts-card {
  border-radius: 0.75rem;
  padding: 1.25rem;
  border: 1px solid;
}
.tut-dos-card {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.tut-donts-card {
  background: #fef2f2;
  border-color: #fecaca;
}
.tut-dos-card h4 {
  font-weight: 700;
  color: #166534;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.tut-donts-card h4 {
  font-weight: 700;
  color: #991b1b;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.tut-dos-card h4 svg,
.tut-donts-card h4 svg {
  width: 1.25rem;
  height: 1.25rem;
}
.tut-dos-card ul,
.tut-donts-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.tut-dos-card li,
.tut-donts-card li {
  font-size: 0.8125rem;
  line-height: 1.55;
  padding-left: 1.35rem;
  position: relative;
}
.tut-dos-card li::before,
.tut-donts-card li::before {
  position: absolute;
  left: 0;
  top: 0;
  font-size: 0.75rem;
  line-height: 1.55;
}
.tut-dos-card li::before {
  content: "\2713";
  color: #16a34a;
  font-weight: 700;
}
.tut-donts-card li::before {
  content: "\2717";
  color: #dc2626;
  font-weight: 700;
}
.tut-dos-card li {
  color: #15803d;
}
.tut-donts-card li {
  color: #b91c1c;
}
.tut-dos-card li code,
.tut-donts-card li code {
  font-size: 0.8em;
  padding: 0.1rem 0.3rem;
  border-radius: 0.25rem;
  background: rgba(0,0,0,0.06);
}

/* ---------- FAQ ---------- */
.tut-faq {
  margin-bottom: 2.5rem;
}
.tut-faq-item {
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.tut-faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  text-align: left;
  font-size: 0.938rem;
  font-weight: 500;
  color: #0f172a;
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
.tut-faq-q:hover {
  background: #f8fafc;
}
.tut-faq-q svg {
  width: 1.25rem;
  height: 1.25rem;
  color: #94a3b8;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.tut-faq-item.is-open .tut-faq-q svg {
  transform: rotate(180deg);
}
.tut-faq-a {
  display: none;
  padding: 0 1.25rem 1rem;
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.65;
  border-top: 1px solid #f1f5f9;
  padding-top: 0.75rem;
}
.tut-faq-item.is-open .tut-faq-a {
  display: block;
}
.tut-faq-list {
  margin-top: 1.5rem;
}

/* ---------- CTA banner ---------- */
.tut-cta {
  background: linear-gradient(135deg, var(--tut-accent), #059669);
  border-radius: 0.75rem;
  padding: 1.5rem 2rem;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
  margin-bottom: 2.5rem;
}
.tut-cta-icon {
  width: 4rem;
  height: 4rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tut-cta-icon svg {
  width: 2rem;
  height: 2rem;
}
.tut-cta-body {
  flex: 1;
}
.tut-cta h3 {
  font-size: 1.25rem;
  font-weight: 700;
}
.tut-cta p {
  font-size: 0.875rem;
  opacity: 0.9;
}
.tut-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  color: var(--tut-accent-700);
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  transition: background 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.tut-cta-btn:hover {
  background: #f0fdfa;
  color: var(--tut-accent-700);
}

/* ---------- Author (article byline) ---------- */
.tut-author {
  margin-bottom: 2.5rem;
}
.tut-author-heading {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 1rem;
}
.tut-author-card {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 1.5rem;
  align-items: flex-start;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.5rem;
}
.tut-author-photo-wrap {
  flex-shrink: 0;
  position: relative;
  width: 7rem;
  height: 7rem;
}
.tut-author-photo {
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}
.tut-author-aws-badge {
  position: absolute;
  right: -0.2rem;
  bottom: -0.2rem;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.125rem;
  border-radius: 0.375rem;
  background: #fff;
  border: 2px solid #fff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.18);
  line-height: 0;
  transition: transform 0.15s, box-shadow 0.15s;
}
.tut-author-aws-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.22);
}
.tut-author-aws-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0.25rem;
}
.tut-author-body {
  flex: 1;
  min-width: min(100%, 16rem);
}
.tut-author-name-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}
.tut-author-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}
.tut-author-profile-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  border-radius: 0.25rem;
  transition: color 0.15s, background 0.15s;
}
.tut-author-profile-link:hover {
  color: #0a66c2;
  background: rgba(10, 102, 194, 0.08);
}
.tut-author-profile-link:focus-visible {
  outline: 2px solid var(--tut-accent);
  outline-offset: 2px;
}
.tut-author-profile-link-icon {
  display: block;
  flex-shrink: 0;
}
.tut-author-role {
  font-size: 0.875rem;
  color: var(--tut-accent-700);
  font-weight: 600;
  margin-bottom: 1rem;
}
.tut-author-meta {
  margin-bottom: 1rem;
}
.tut-author-meta li {
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.5;
  padding-left: 0;
  margin-bottom: 0.5rem;
}
.tut-author-meta li:last-child {
  margin-bottom: 0;
}
.tut-author-meta-label {
  display: inline-block;
  min-width: 5.5rem;
  font-weight: 600;
  color: #334155;
}
.tut-author-bio {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 1rem;
}
.tut-author-credentials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tut-author-badge-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0f172a;
  background: #fff;
  border: 1px solid #e2e8f0;
  padding: 0.5rem 0.875rem;
  border-radius: 0.5rem;
  transition: border-color 0.15s, box-shadow 0.15s, color 0.15s;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.tut-author-badge-link:hover {
  border-color: var(--tut-accent-border);
  color: var(--tut-accent-700);
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.12);
}
.tut-author-badge-icon {
  display: flex;
  color: var(--tut-accent-700);
}
@media (max-width: 480px) {
  .tut-author-meta-label {
    display: block;
    min-width: 0;
    margin-bottom: 0.125rem;
  }
}

/* ---------- Helpful stat (social proof above actions) ---------- */
.tut-helpful-stat {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0 0 1rem;
  line-height: 1.5;
}

/* ---------- Action buttons (helpful/share/discuss) ---------- */
.tut-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  align-items: center;
}
.tut-share-feedback {
  flex-basis: 100%;
  width: 100%;
  font-size: 0.875rem;
  color: #64748b;
  min-height: 1.35em;
  margin: 0;
}
.tut-share-feedback--ok {
  color: var(--tut-accent-700);
  font-weight: 600;
}

/* ---------- Suggestion form (toggle below actions) ---------- */
.tut-suggestion-panel {
  margin-top: -1.5rem;
  margin-bottom: 2.5rem;
  padding: 1.25rem 1.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
}
.tut-suggestion-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.tut-suggestion-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}
.tut-suggestion-textarea {
  width: 100%;
  min-height: 6rem;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #0f172a;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.tut-suggestion-textarea::placeholder {
  color: #94a3b8;
}
.tut-suggestion-textarea:hover {
  border-color: #94a3b8;
}
.tut-suggestion-textarea:focus {
  outline: none;
  border-color: var(--tut-accent);
  box-shadow: 0 0 0 3px var(--tut-accent-100);
}
.tut-suggestion-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.tut-suggestion-status {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--tut-accent-700);
}
.tut-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.15s;
  border: none;
  cursor: pointer;
}
.tut-action-btn svg {
  width: 1rem;
  height: 1rem;
}
.tut-action-btn--accent {
  background: var(--tut-accent-100);
  color: var(--tut-accent-700);
}
.tut-action-btn--accent:hover {
  background: var(--tut-accent-border);
}
.tut-action-btn--default {
  background: #f1f5f9;
  color: #475569;
}
.tut-action-btn--default:hover {
  background: #e2e8f0;
}

/* ---------- Prev/Next navigation ---------- */
.tut-page-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
}
.tut-page-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #475569;
  transition: color 0.15s;
}
.tut-page-nav a:hover {
  color: var(--tut-accent);
}
.tut-page-nav a svg {
  width: 1rem;
  height: 1rem;
}
.tut-page-nav-next {
  background: var(--tut-accent);
  color: #fff !important;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
}
.tut-page-nav-next:hover {
  background: var(--tut-accent-700);
  color: #fff !important;
}

/* ================================================================
   FOOTER (shared)
   ================================================================ */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 3rem 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
.footer-brand p {
  color: #94a3b8;
  line-height: 1.6;
  margin: 1rem 0 1.5rem;
}
.footer-brand .logo-name {
  color: #fff;
}
.footer-brand .logo-tagline {
  color: #94a3b8;
}
.follow-heading {
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.social-links {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.social-links a {
  background: #1e293b;
  padding: 0.625rem;
  border-radius: 0.5rem;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.social-links a:hover {
  background: #334155;
}
.trusted-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #1e293b;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  border: 1px solid #334155;
}
.trusted-badge .dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #3b82f6;
}
.footer-links-col h4 {
  color: #fff;
  font-size: 0.938rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.footer-links-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-links-col a {
  font-size: 0.875rem;
  transition: color 0.2s;
}
.footer-links-col a:hover {
  color: #60a5fa;
}
.footer-all-links ul {
  columns: 2;
  column-gap: 1.5rem;
}
.footer-all-links li {
  break-inside: avoid;
}
.footer-bottom {
  border-top: 1px solid #1e293b;
  padding: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
}
.footer-bottom p {
  font-size: 0.875rem;
  color: #94a3b8;
}
.footer-legal-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
}
.footer-legal-links a:hover {
  color: #60a5fa;
}
.heart-icon {
  vertical-align: -0.15em;
}

/* ---------- Cookie notice ---------- */
.cookie-notice {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0f172a;
  color: #cbd5e1;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  z-index: 200;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
}
.cookie-notice[hidden] {
  display: none;
}
.cookie-notice p {
  font-size: 0.813rem;
  text-align: center;
}
.cookie-notice a:not(.btn) {
  color: #60a5fa;
  text-decoration: underline;
}
.cookie-notice .btn-primary {
  background: #2563eb;
  color: #fff;
}

/* ================================================================
   RESPONSIVE BREAKPOINTS
   ================================================================ */

/* Mobile-first: small screens */
@media (max-width: 699px) {
  .tut-author-heading {
    text-align: center;
  }
  .tut-author-card {
    flex-direction: column;
    align-items: center;
  }
  .tut-author-photo-wrap {
    margin: 0 auto;
  }
  .tut-author-name-row {
    justify-content: center;
  }
  .tut-author-body {
    width: 100%;
    text-align: left;
  }
  .tut-author-meta,
  .tut-author-bio {
    text-align: left;
  }
  .tut-author-credentials {
    justify-content: flex-start;
  }
  .tut-ref-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  .tut-cta {
    text-align: center;
  }
  .tut-cta-icon {
    margin: 0 auto;
  }
  .tut-code-body {
    padding: 0.75rem;
  }
  .tut-faq-q {
    min-height: 2.75rem;
  }
  .tut-example-header {
    gap: 0.5rem;
  }
}

/* Touch-target enforcement (44×44 min per WCAG 2.5.5) */
.tut-code-copy {
  min-width: 2.75rem;
  min-height: 2.75rem;
}
.tut-try-btn {
  min-height: 2.75rem;
}
.tut-faq-q {
  min-height: 2.75rem;
}
.tut-action-btn {
  min-height: 2.75rem;
}
.tut-breadcrumb a,
.tut-breadcrumb span {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
}

/* 700px+: left sidebar always visible */
@media (min-width: 700px) {
  .tut-sidebar--left {
    position: sticky;
    transform: none;
  }
  .tut-content-inner {
    padding: 2rem 1.5rem;
  }
  .tut-ref-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .tut-dos-donts {
    grid-template-columns: repeat(2, 1fr);
  }
  .desktop-nav {
    display: flex;
  }
  .mobile-menu-btn {
    display: none;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* 1024px+: larger content area */
@media (min-width: 1024px) {
  .tut-content-inner {
    padding: 2rem 2rem;
  }
  .tut-cta {
    flex-direction: row;
    text-align: left;
  }
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
  .footer-brand {
    grid-column: auto;
  }
  .cookie-notice {
    flex-direction: row;
    justify-content: center;
    gap: 1.5rem;
  }
}

/* 1100px+: right sidebar always visible, FAB hidden */
@media (min-width: 1100px) {
  .tut-sidebar--right {
    position: sticky;
    transform: none;
    flex-shrink: 0;
  }
  .tut-toc-fab {
    display: none;
  }
}

/* Hamburger button to open left sidebar (mobile only) */
.tut-sidebar-hamburger {
  position: fixed;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  color: #475569;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: background 0.15s;
}
.tut-sidebar-hamburger:hover {
  background: #f1f5f9;
}
.tut-sidebar-hamburger svg {
  width: 1.5rem;
  height: 1.5rem;
}
@media (min-width: 700px) {
  .tut-sidebar-hamburger {
    display: none;
  }
}

/* ---------- Browser compatibility grid ---------- */
.tut-compat-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}
.tut-compat-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 0.8125rem;
  flex: 1 1 auto;
  min-width: 120px;
}
.tut-compat--yes .tut-compat-icon {
  color: #16a34a;
}
.tut-compat-name {
  font-weight: 600;
  color: #0f172a;
}
.tut-compat-ver {
  color: #64748b;
  margin-left: auto;
  font-size: 0.75rem;
}

/* ---------- Live preview ---------- */
.tut-live-preview {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 2.5rem;
}
.tut-preview-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f5f9;
}
.tut-preview-row:last-child {
  border-bottom: none;
}
.tut-preview-label {
  flex-shrink: 0;
  width: 6.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
}
.tut-preview-value {
  font-size: 0.9375rem;
  color: #0f172a;
  line-height: 1.5;
}
@media (max-width: 499px) {
  .tut-preview-row {
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.65rem 0.85rem;
  }
  .tut-preview-label {
    width: auto;
  }
  .tut-compat-item {
    min-width: 100px;
  }
}

/* ---------- Did-you-know callout ---------- */
.tut-didyouknow {
  margin: 2rem 0 2.5rem;
  padding: 1.5rem 1.75rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
  border: 1px solid #c7d2fe;
}
.tut-didyouknow-badge {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  background: #6366f1;
  border-radius: 999px;
}
.tut-didyouknow p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: #1e1b4b;
}
.tut-didyouknow a {
  color: #4f46e5;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
