.im-tutorials {
  --bg: #080806;
  --bg-soft: #10100d;
  --panel: rgba(244, 239, 225, .045);
  --ink: #f4efe1;
  --muted: #a99f86;
  --dim: #665f50;
  --line: rgba(244, 239, 225, .12);
  --accent: #d5a642;
  --accent-2: #f1c86a;
  --teal: #71d1be;
  --shadow: 0 22px 70px rgba(0, 0, 0, .45);
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: Georgia, "Times New Roman", serif;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  background:
    linear-gradient(180deg, rgba(213, 166, 66, .08), transparent 28rem),
    linear-gradient(90deg, rgba(113, 209, 190, .035), transparent 45%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
}

html:not(.dark) .im-tutorials {
  --bg: #f5f2ea;
  --bg-soft: #fffdf7;
  --panel: rgba(255, 255, 255, .82);
  --ink: #171510;
  --muted: #5c5548;
  --dim: #8b8374;
  --line: rgba(23, 21, 16, .13);
  --accent: #9a6a18;
  --accent-2: #b47a1f;
  --teal: #267867;
  --shadow: 0 22px 60px rgba(52, 42, 26, .12);
  background:
    linear-gradient(180deg, rgba(180, 122, 31, .13), transparent 28rem),
    linear-gradient(90deg, rgba(38, 120, 103, .07), transparent 45%),
    var(--bg);
}

/* AstroDuck: noche azul/violeta con acento azul eléctrico, calcado de su manual. */
.im-tutorials[data-theme="astroduck"] {
  --bg: #090717;
  --bg-soft: #15112a;
  --panel: rgba(135, 168, 255, .07);
  --ink: #dce8ff;
  --muted: #9ab3e9;
  --dim: #53639d;
  --line: rgba(88, 114, 230, .26);
  --accent: #55a6ff;
  --accent-2: #bfd8ff;
  --teal: #bfd8ff;
  --display: Inter, ui-sans-serif, system-ui, sans-serif;
  background:
    radial-gradient(circle at 18% 18%, rgba(103, 57, 170, .28), transparent 28rem),
    radial-gradient(circle at 74% 10%, rgba(72, 142, 255, .16), transparent 32rem),
    var(--bg);
}
html:not(.dark) .im-tutorials[data-theme="astroduck"] {
  --bg: #f2f5ff;
  --bg-soft: #ffffff;
  --panel: rgba(255, 255, 255, .76);
  --ink: #171b3a;
  --muted: #526391;
  --dim: #7b86ad;
  --line: rgba(71, 91, 172, .18);
  --accent: #2f73d8;
  --accent-2: #5267ce;
  --teal: #5267ce;
  --shadow: 0 22px 60px rgba(23, 27, 58, .1);
  background:
    radial-gradient(circle at 18% 18%, rgba(112, 91, 210, .18), transparent 28rem),
    linear-gradient(180deg, #eef3ff, #f8faff 34rem),
    var(--bg);
}

/* Astro Notes: negro cálido con ámbar, calcado de su manual. */
.im-tutorials[data-theme="astro-notes"] {
  --bg: #0d0d0c;
  --bg-soft: #171613;
  --panel: rgba(245, 242, 234, .055);
  --ink: #f3f1ea;
  --muted: #aaa39a;
  --dim: #6d675f;
  --line: rgba(245, 242, 234, .13);
  --accent: #c47a18;
  --accent-2: #f0d2a2;
  --teal: #f0d2a2;
  --display: Inter, ui-sans-serif, system-ui, sans-serif;
  background:
    radial-gradient(circle at 20% 14%, rgba(196, 122, 24, .16), transparent 28rem),
    var(--bg);
}
html:not(.dark) .im-tutorials[data-theme="astro-notes"] {
  --bg: #f7f6f3;
  --bg-soft: #ffffff;
  --panel: rgba(255, 255, 255, .84);
  --ink: #191817;
  --muted: #5f5a54;
  --dim: #918a80;
  --line: rgba(25, 24, 23, .13);
  --accent: #a96410;
  --accent-2: #c47a18;
  --teal: #c47a18;
  --shadow: 0 22px 60px rgba(25, 24, 23, .1);
  background:
    radial-gradient(circle at 20% 14%, rgba(196, 122, 24, .13), transparent 28rem),
    linear-gradient(180deg, #fbfaf7, #f7f6f3 34rem),
    var(--bg);
}

/* Astro Vintage: crema de cinta y serif, calcado de su manual. */
.im-tutorials[data-theme="astro-vintage"] {
  --bg: #0b0a09;
  --bg-soft: #161310;
  --panel: rgba(240, 233, 220, .05);
  --ink: #efe9dd;
  --muted: #a8a093;
  --dim: #6f685c;
  --line: rgba(240, 233, 220, .13);
  --accent: #d8c6a4;
  --accent-2: #b8aa8e;
  --teal: #b8aa8e;
  --display: Georgia, "Times New Roman", serif;
  background:
    radial-gradient(circle at 20% 12%, rgba(216, 198, 164, .08), transparent 30rem),
    var(--bg);
}
html:not(.dark) .im-tutorials[data-theme="astro-vintage"] {
  --bg: #f4f1ea;
  --bg-soft: #fffdf7;
  --panel: rgba(255, 255, 255, .82);
  --ink: #1a1712;
  --muted: #5b554b;
  --dim: #8a8276;
  --line: rgba(26, 23, 18, .13);
  --accent: #6b5a3c;
  --accent-2: #8a7148;
  --teal: #8a7148;
  --shadow: 0 22px 60px rgba(26, 23, 18, .1);
  background:
    radial-gradient(circle at 20% 12%, rgba(107, 90, 60, .08), transparent 30rem),
    linear-gradient(180deg, #f7f4ec, #fffdf7 32rem),
    var(--bg);
}

/* Astro Clipper: la vibra NIGHT OPS (negro verdoso, naranja de clip, lima de señal), como su manual. */
.im-tutorials[data-theme="astro-clipper"] {
  --bg: #05090a;
  --bg-soft: #0a1517;
  --panel: rgba(190, 255, 73, .05);
  --ink: #e6f4ef;
  --muted: #9fbcb4;
  --dim: #6c8d85;
  --line: rgba(190, 255, 73, .18);
  --accent: #ff7a28;
  --accent-2: #beff49;
  --teal: #beff49;
  --display: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 122, 40, .14), transparent 28rem),
    radial-gradient(circle at 82% 8%, rgba(190, 255, 73, .10), transparent 26rem),
    var(--bg);
}

html:not(.dark) .im-tutorials[data-theme="astro-clipper"] {
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --panel: rgba(255, 255, 255, .85);
  --ink: #141414;
  --muted: #5f5f5f;
  --dim: #8a8a8a;
  --line: rgba(20, 20, 20, .13);
  --accent: #e04305;
  --accent-2: #ff7a28;
  --teal: #1f7a3d;
  --shadow: 0 22px 60px rgba(20, 20, 20, .1);
  background:
    linear-gradient(180deg, rgba(255, 74, 23, .07), transparent 28rem),
    var(--bg);
}

.im-tutorials,
.im-tutorials * {
  box-sizing: border-box;
}

.im-tutorials * {
  margin: 0;
}

.im-tutorials::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .28;
  background-image:
    linear-gradient(rgba(244, 239, 225, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 239, 225, .028) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
  z-index: 0;
}

html:not(.dark) .im-tutorials::before {
  opacity: .16;
  mix-blend-mode: multiply;
}

.im-tutorials__inner {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--tutorial-padding-top, 76px) 32px var(--tutorial-padding-bottom, 76px);
}

.im-tutorials__kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--accent-2);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.im-tutorials__kicker::before {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--accent-2);
}

.im-tutorials__header {
  max-width: 760px;
  margin-bottom: 34px;
}

.im-tutorials__title {
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(44px, 7vw, 82px);
  font-weight: 600;
  letter-spacing: 0;
  line-height: .92;
  text-transform: uppercase;
}

.im-tutorials__subtitle {
  margin-top: 18px;
  color: var(--accent-2);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0;
}

.im-tutorials__description {
  margin-top: 14px;
  max-width: 660px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.im-tutorials__list {
  display: grid;
  gap: 26px;
}

.im-tutorial-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(244, 239, 225, .045), rgba(244, 239, 225, .02));
  box-shadow: 0 12px 34px rgba(0, 0, 0, .18);
  overflow: hidden;
}

.im-tutorial-card[open] {
  border-color: rgba(213, 166, 66, .32);
}

html:not(.dark) .im-tutorial-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(250, 247, 240, .86));
  box-shadow: var(--shadow);
}

.im-tutorial-card__summary {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 28px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.im-tutorial-card__summary::-webkit-details-marker {
  display: none;
}

.im-tutorial-card__summary-title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.12;
}

.im-tutorial-card__summary-icon {
  position: relative;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, transparent);
  border-radius: 999px;
}

.im-tutorial-card__summary-icon::before,
.im-tutorial-card__summary-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 1px;
  background: var(--accent-2);
  transform: translate(-50%, -50%);
}

.im-tutorial-card__summary-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.im-tutorial-card[open] .im-tutorial-card__summary {
  border-bottom: 1px solid var(--line);
}

.im-tutorial-card[open] .im-tutorial-card__summary-icon::after {
  opacity: 0;
}

.im-tutorial-card__body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.im-tutorial-card__copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px 28px 18px;
}

.im-tutorial-card__eyebrow {
  color: var(--accent-2);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.im-tutorial-card__title {
  color: var(--ink);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.08;
}

.im-tutorial-card__subtitle {
  color: var(--teal);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

.im-tutorial-card__description,
.im-tutorial-card__alt-text {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  max-width: 760px;
}

.im-tutorial-card__alt {
  display: grid;
  gap: 12px;
  padding-top: 14px;
}

.im-tutorial-card__button {
  width: fit-content;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #11100b;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  line-height: 1;
  padding: 0 14px;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform .18s ease, opacity .18s ease;
}

html:not(.dark) .im-tutorial-card__button {
  background: var(--accent);
  border-color: var(--accent);
  color: #fffdf7;
}

.im-tutorial-card__button:hover {
  opacity: .88;
  transform: translateY(-1px);
}

.im-tutorial-card__media {
  padding: 0 28px 28px;
}

.im-tutorial-card__frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(213, 166, 66, .28);
  border-radius: 10px;
  background: #11100b;
  box-shadow: var(--shadow);
}

html:not(.dark) .im-tutorial-card__frame {
  background: #fffdf7;
  border-color: rgba(154, 106, 24, .28);
}

.im-tutorial-card__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.im-tutorial-card__placeholder {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-align: center;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .im-tutorials__inner {
    padding: var(--tutorial-padding-top-mobile, 52px) 18px var(--tutorial-padding-bottom-mobile, 54px);
  }

  .im-tutorials__header {
    margin-bottom: 26px;
  }

  .im-tutorial-card__summary {
    min-height: 64px;
    padding: 18px 20px;
  }

  .im-tutorial-card__summary-title {
    font-size: 20px;
  }

  .im-tutorial-card__copy {
    padding: 20px 20px 14px;
  }

  .im-tutorial-card__media {
    padding: 0 20px 20px;
  }

  .im-tutorial-card__title {
    font-size: 22px;
  }
}

/* Fuentes del storefront (marca del sitio): título en DeFonte, cuerpo en Assistant, igual que los manuales. */
.im-tutorials {
  --display: var(--font-defonte), Georgia, serif;
  --sans: var(--font-assistant), Inter, ui-sans-serif, system-ui, sans-serif;
}
