
/* ===========================================================================
   1. TOKENS  (authoritative — Design System v1.1)
   =========================================================================== */
:root {
  /* Neutrals */
  --al-ink:      #171717;
  --al-body:     #4d4d4d;
  --al-mute:     #737373;
  --al-hairline: #e5e5e5;
  --al-canvas:   #fafafa;
  --al-surface:  #ffffff;

  /* Brand accent */
  --al-accent:      #0761d1;
  --al-accent-ink:  #0059c7;
  --al-accent-soft: rgb(7 97 209 / .09);
  --al-on-accent:   #ffffff;

  /* Semantic status */
  --al-success: #15803d;  --al-success-soft: rgb(21 128 61 / .10);
  --al-locked:  #b45309;  --al-locked-soft:  rgb(180 83 9 / .10);
  --al-danger:  #b91c1c;  --al-danger-soft:  rgb(185 28 28 / .10);

  --al-focus:  #0059c7;
  --al-header: rgb(250 250 250 / .86);

  /* Radius */
  --al-r-xs:   4px;
  --al-r-sm:   8px;
  --al-r-md:   10px;
  --al-r-pill: 100px;
  --al-radius: var(--al-r-md);   /* legacy alias */

  /* Elevation */
  --al-shadow-sm: 0 1px 2px rgb(23 23 23 / .05);
  --al-shadow-md: 0 6px 16px -10px rgb(23 23 23 / .22);

  /* Layout */
  --al-max:     1200px;
  --al-reading: 700px;
  --al-gutter:  clamp(20px, 4vw, 48px);

  /* Spacing */
  --al-sp-xs: 8px;  --al-sp-s: 12px;  --al-sp-m: 16px;  --al-sp-l: 24px;
  --al-sp-xl: 32px; --al-sp-2xl: 48px; --al-sp-3xl: 72px; --al-sp-4xl: 96px;

  /* Type */
  --al-font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", sans-serif;
  --al-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Dark theme — redefine tokens only. */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark;
  --al-ink: #ededed; --al-body: #b8b8b8; --al-mute: #8f8f8f;
  --al-hairline: #2b2b2b; --al-canvas: #131313; --al-surface: #191919;
  --al-accent: #5aa7ff; --al-accent-ink: #8cc2ff; --al-accent-soft: rgb(90 167 255 / .12); --al-on-accent: #0b1120;
  --al-success: #4ade80; --al-success-soft: rgb(74 222 128 / .13);
  --al-locked:  #fbbf24; --al-locked-soft:  rgb(251 191 36 / .13);
  --al-danger:  #f87171; --al-danger-soft:  rgb(248 113 113 / .13);
  --al-focus: #8cc2ff; --al-header: rgb(19 19 19 / .86);
  --al-shadow-sm: 0 1px 2px rgb(0 0 0 / .4);
  --al-shadow-md: 0 6px 16px -10px rgb(0 0 0 / .6);
} }
:root[data-theme="dark"] { color-scheme: dark;
  --al-ink: #ededed; --al-body: #b8b8b8; --al-mute: #8f8f8f;
  --al-hairline: #2b2b2b; --al-canvas: #131313; --al-surface: #191919;
  --al-accent: #5aa7ff; --al-accent-ink: #8cc2ff; --al-accent-soft: rgb(90 167 255 / .12); --al-on-accent: #0b1120;
  --al-success: #4ade80; --al-success-soft: rgb(74 222 128 / .13);
  --al-locked:  #fbbf24; --al-locked-soft:  rgb(251 191 36 / .13);
  --al-danger:  #f87171; --al-danger-soft:  rgb(248 113 113 / .13);
  --al-focus: #8cc2ff; --al-header: rgb(19 19 19 / .86);
  --al-shadow-sm: 0 1px 2px rgb(0 0 0 / .4);
  --al-shadow-md: 0 6px 16px -10px rgb(0 0 0 / .6);
}

/* ===========================================================================
   2. BASE
   =========================================================================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; max-width: 100%; } /* clip, not hidden: hidden on both html and body turns body into a second scroll container (overflow-y computes to auto), which can trap or cut short page scrolling */
body { margin: 0; background: var(--al-canvas); color: var(--al-ink); font-family: var(--al-font); font-size: 15px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
body, button, input, textarea, select { font-family: var(--al-font); }

h1, h2, h3, h4, h5, h6 { font-optical-sizing: auto; overflow-wrap: break-word; text-wrap: balance; word-break: keep-all; line-height: 1.25; font-weight: 600; margin: 0; }
p, li, label { overflow-wrap: anywhere; word-break: keep-all; }
img { height: auto; max-width: 100%; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--al-accent-ink); }
a:focus { outline: none; }
:focus-visible { outline: 2px solid var(--al-focus); outline-offset: 2px; border-radius: 2px; }
/* Clicked links do not retain a rectangle; keyboard navigation still does. */
a:focus-visible { outline: 2px solid var(--al-focus); outline-offset: 2px; border-radius: 2px; }
svg { flex: 0 0 auto; }

/* Parent-theme (TT5), Sensei and UM screens indent via WordPress's root-padding
   vars; our own shells indent via --al-gutter. Alias them so every surface —
   authored here or inherited — shares one gutter at every viewport. */
body { --wp--style--root--padding-left: var(--al-gutter); --wp--style--root--padding-right: var(--al-gutter); }

.al-shell   { margin-inline: auto; max-width: var(--al-max); padding-inline: var(--al-gutter); }
.al-reading { margin-inline: auto; max-width: var(--al-reading); padding-inline: var(--al-gutter); width: 100%; }
.al-main    { padding-block: clamp(40px, 7vw, 88px); }
/* Landing: hero + course grid supply their own vertical rhythm — drop the redundant
   .al-main padding that stacked into a large void above the hero (H1 polish). */
.al-main.al-landing { padding-block: 0; }

/* ===========================================================================
   3. SITE CHROME  (header · nav · footer · UM forms · utility)
   =========================================================================== */
/* Sticky translucent header */
.al-header { align-items: center; backdrop-filter: blur(20px) saturate(160%); background: var(--al-header); border-bottom: 1px solid var(--al-hairline); display: flex; min-height: 68px; position: sticky; top: 0; z-index: 20; }
.al-header__inner { align-items: center; display: flex; gap: 16px; justify-content: space-between; min-width: 0; width: 100%; }
.al-header__inner > * { margin-block-start: 0; }
.al-header .wp-block-site-title { font-size: 1.125rem; font-weight: 600; letter-spacing: -.025em; margin: 0; white-space: nowrap; }
.al-header .wp-block-site-title a { align-items: center; display: inline-flex; gap: 8px; min-height: 44px; text-decoration: none; }
.al-header .wp-block-site-title a::before { background: url("assets/images/applebear-logo.svg") center / contain no-repeat; content: ""; flex: 0 0 20px; height: 20px; transform: translateY(-1px); width: 20px; }
.al-header .wp-block-navigation { gap: 4px; }
.al-header .wp-block-navigation-item__content { font-size: .875rem; min-height: 44px; }
.al-header .wp-block-navigation-item__content a { text-decoration: none; }

/* Header navigation (shortcode) */
.al-nav { align-items: center; display: flex; flex-wrap: wrap; gap: 6px 22px; justify-content: flex-end; }
.al-nav__primary { align-items: center; display: inline-flex; flex-wrap: wrap; gap: 6px 22px; }
.al-nav__link { color: var(--al-body); font-size: .9375rem; font-weight: 500; min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
.al-nav__link:hover { color: var(--al-ink); }
.al-nav__link[aria-current="page"] { color: var(--al-ink); font-weight: 600; }
.al-nav__auth { align-items: center; display: inline-flex; gap: 12px; margin-inline-start: 8px; padding-inline-start: 20px; border-inline-start: 1px solid var(--al-hairline); }
.al-nav__link--ext .al-ext { color: var(--al-mute); font-size: .8em; margin-inline-start: 3px; }

/* Anchor pill + ghost (nav + hero) */
.al-pill { align-items: center; background: var(--al-ink); border: 1px solid var(--al-ink); border-radius: var(--al-r-pill); color: var(--al-canvas); display: inline-flex; font-size: .9375rem; font-weight: 500; justify-content: center; line-height: 1; min-height: 46px; padding: 0 24px; text-decoration: none; white-space: nowrap; }
.al-pill:hover { filter: brightness(.9); color: var(--al-canvas); }
.al-pill--sm { font-size: .8125rem; min-height: 38px; padding: 0 16px; }
.al-ghost { align-items: center; color: var(--al-ink); display: inline-flex; font-size: .9375rem; font-weight: 500; min-height: 46px; text-decoration: none; }
.al-ghost:hover { color: var(--al-accent-ink); }

/* Forms — UM inputs styled to the token system (loads after um_styles). */
.um-form input[type="text"], .um-form input[type="email"], .um-form input[type="password"],
.um-form input[type="url"], .um-form input[type="tel"], .um-form input[type="number"],
.um-form input[type="search"], .um-form textarea,
.um input[type="text"], .um input[type="email"], .um input[type="password"],
.um input[type="url"], .um input[type="tel"], .um input[type="number"],
.um input[type="search"], .um textarea,
input[type="text"], input[type="email"], input[type="password"], input[type="url"],
input[type="tel"], textarea {
  background: var(--al-surface) !important; border: 1px solid var(--al-hairline) !important;
  border-radius: var(--al-r-sm) !important; color: var(--al-ink) !important; font-size: 1rem !important;
  padding: 12px 14px !important; width: 100% !important; box-sizing: border-box !important;
}
.um-form input:focus, .um-form textarea:focus, .um input:focus, .um textarea:focus {
  border-color: var(--al-accent) !important; outline: 2px solid var(--al-accent) !important; outline-offset: 0 !important;
}

/* Global button — ink pill (UM submit, WP block buttons). Scoped out of Sensei + .al-* components. */
.um-form input[type="submit"], .um-form button[type="submit"],
.um input[type="submit"], .um button[type="submit"],
.wp-element-button, .wp-block-button__link, input[type="submit"],
button:not(.wp-block-navigation-item__content):not([class*="sensei-"]):not([class*="al-"]) {
  background: var(--al-ink) !important; border: 0 !important; border-radius: var(--al-r-pill) !important;
  color: var(--al-canvas) !important; cursor: pointer !important; font-size: .875rem !important;
  font-weight: 500 !important; min-height: 44px !important; padding: 10px 18px !important;
}
.wp-element-button:hover, .wp-block-button__link:hover,
.um-form input[type="submit"]:hover, .um input[type="submit"]:hover,
input[type="submit"]:hover { filter: brightness(.9) !important; color: var(--al-canvas) !important; }

/* Secondary UM button (the "go to login/register" toggle is an <a>, so it
   misses the submit-button rule above and keeps UM's stock gray 4px box).
   Style it as an outline pill so it matches the ink pill it sits beside. */
.um-form a.um-button.um-alt, .um a.um-button.um-alt, a.um-button.um-alt {
  background: transparent !important; border: 1px solid var(--al-hairline) !important;
  border-radius: var(--al-r-pill) !important; color: var(--al-ink) !important;
  cursor: pointer !important; font-size: .875rem !important; font-weight: 500 !important;
  height: 44px !important; padding: 0 18px !important; box-shadow: none !important;
  box-sizing: border-box !important; line-height: 1 !important; width: 100% !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  text-decoration: none !important;
}
.um-form a.um-button.um-alt:hover, .um a.um-button.um-alt:hover, a.um-button.um-alt:hover {
  background: var(--al-canvas) !important; border-color: var(--al-mute) !important; color: var(--al-ink) !important; filter: none !important;
}

/* UM form wrapper + labels */
.um-form { margin-inline: auto; max-width: var(--al-reading); }
.um-form h1, .um-form h2, .um .um-form-title { font-size: clamp(1.5rem, 3vw, 1.875rem); letter-spacing: -.025em; margin: 0 0 24px; }
.um-form .um-field-label { color: var(--al-mute); font-size: .875rem; font-weight: 500; }

/* Utility pages (UM login/register) */
.al-utility { min-height: 60dvh; padding-block: clamp(72px, 12vw, 144px); }
.al-utility h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); letter-spacing: -.03em; margin: 0 0 24px; max-width: 16ch; }

/* Footer */
.al-footer { background: transparent; border-top: 1px solid var(--al-hairline); margin-top: 0; padding-block: clamp(48px, 6vw, 72px) 32px; }
.al-footer__inner { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; }
.al-footer__name { font-size: 1.0625rem; font-weight: 600; letter-spacing: -.02em; margin: 0 0 6px; }
.al-footer__desc { color: var(--al-mute); font-size: .875rem; margin: 0; max-width: 32ch; }
.al-footer__copy { color: var(--al-mute); font-size: .8125rem; margin: 40px auto 0; }
.al-footer__copy a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ===========================================================================
   4. TYPOGRAPHY UTILITIES
   =========================================================================== */
.al-display { font-size: clamp(1.75rem, 3.4vw, 2.5rem); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
.al-h1      { font-size: clamp(1.5rem, 2.4vw, 1.875rem); letter-spacing: -.025em; line-height: 1.2; }
.al-h2      { font-size: clamp(1.1875rem, 1.6vw, 1.375rem); letter-spacing: -.02em; }
.al-h3      { font-size: clamp(1.0625rem, 1.1vw, 1.125rem); letter-spacing: -.015em; }
.al-title   { font-size: 1.0625rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.4; }
.al-body    { font-size: .9375rem; line-height: 1.75; color: var(--al-body); }
.al-small   { font-size: .8125rem; line-height: 1.6; }
.al-caption { font-size: .75rem; line-height: 1.5; color: var(--al-mute); }
.al-meta    { font-family: var(--al-mono); font-size: .75rem; letter-spacing: .01em; color: var(--al-mute); font-variant-numeric: tabular-nums; }
.al-eyebrow { font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--al-mute); }

/* ===========================================================================
   5. BUTTONS  (.al-btn — anchor/button component)
   =========================================================================== */
.al-btn {
  --_bg: var(--al-ink); --_fg: var(--al-canvas); --_bd: transparent;
  align-items: center; background: var(--_bg); border: 1px solid var(--_bd);
  border-radius: var(--al-r-pill); color: var(--_fg); cursor: pointer;
  display: inline-flex; font: inherit; font-size: .875rem; font-weight: 500;
  gap: 7px; justify-content: center; line-height: 1; min-height: 42px;
  padding: 0 20px; text-decoration: none; white-space: nowrap;
}
.al-btn:hover        { color: var(--_fg); filter: brightness(.93); }
.al-btn--primary     { --_bg: var(--al-ink);    --_fg: var(--al-canvas); }
.al-btn--accent      { --_bg: var(--al-accent);  --_fg: var(--al-on-accent); }
.al-btn--ghost       { --_bg: transparent; --_fg: var(--al-ink); --_bd: var(--al-hairline); }
.al-btn--ghost:hover { filter: none; border-color: var(--al-ink); background: transparent; }
.al-btn--link        { --_bg: transparent; --_fg: var(--al-accent-ink); border: 0; min-height: 0; padding: 0; font-weight: 600; }
.al-btn--link:hover  { filter: none; text-decoration: underline; }
.al-btn--sm { min-height: 34px; font-size: .8125rem; padding: 0 14px; }
.al-btn--lg { min-height: 48px; font-size: .9375rem; padding: 0 26px; }
.al-btn--block { display: flex; width: 100%; }
.al-btn[disabled], .al-btn[aria-disabled="true"] { cursor: not-allowed; opacity: .45; filter: none; }

/* ===========================================================================
   6. CHIPS / BADGES  (status = form + color: dot/icon + label)
   =========================================================================== */
.al-chip {
  --_c: var(--al-mute); --_bg: transparent; --_bd: var(--al-hairline);
  align-items: center; background: var(--_bg); border: 1px solid var(--_bd);
  border-radius: var(--al-r-pill); color: var(--_c); display: inline-flex;
  font-size: .75rem; font-weight: 600; gap: 5px; letter-spacing: .01em;
  line-height: 1; padding: 5px 10px; white-space: nowrap;
}
.al-chip svg { width: 12px; height: 12px; }
.al-chip__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.al-chip--free     { --_c: var(--al-accent-ink); --_bg: var(--al-accent-soft); --_bd: transparent; }
.al-chip--locked   { --_c: var(--al-locked);  --_bg: var(--al-locked-soft);  --_bd: transparent; }
.al-chip--done     { --_c: var(--al-success); --_bg: var(--al-success-soft); --_bd: transparent; }
.al-chip--progress { --_c: var(--al-accent-ink); --_bg: var(--al-accent-soft); --_bd: transparent; }
.al-chip--count    { --_c: var(--al-mute); }
.al-chip--solid    { --_c: var(--al-canvas); --_bg: var(--al-ink); --_bd: transparent; }

/* ===========================================================================
   7. CARDS  (text-forward; hairline at rest, faint lift on hover)
   =========================================================================== */
.al-card { background: var(--al-surface); border: 1px solid var(--al-hairline); border-radius: var(--al-r-md); padding: clamp(18px, 2.2vw, 24px); }

.al-course-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); list-style: none; margin: 0; padding: 0; }
.al-course-card {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  background: var(--al-surface); border: 1px solid var(--al-hairline);
  border-radius: var(--al-r-md); color: inherit; padding: 22px 22px 20px;
  text-decoration: none; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.al-course-card:hover { border-color: var(--al-mute); box-shadow: var(--al-shadow-md); transform: translateY(-2px); }
.al-course-card__meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.al-course-card__title { font-size: 1.0625rem; font-weight: 600; letter-spacing: -.015em; line-height: 1.4; margin: 2px 0 0; }
.al-course-card:hover .al-course-card__title { color: var(--al-accent-ink); }
.al-course-card__desc { color: var(--al-body); font-size: .875rem; line-height: 1.6; margin: 0; flex: 1; }
.al-course-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--al-hairline); }
.al-course-card__lessons { color: var(--al-mute); font-size: .75rem; }
.al-course-card__cta { color: var(--al-mute); font-size: .8125rem; font-weight: 600; }
.al-course-card:hover .al-course-card__cta { color: var(--al-accent-ink); }

/* Course hero (single-course header component) */
.al-course-hero { display: grid; gap: 16px; border-bottom: 1px solid var(--al-hairline); padding-block: clamp(24px, 4vw, 44px); }
.al-course-hero__eyebrow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.al-course-hero__title { font-size: clamp(1.5rem, 2.4vw, 2rem); letter-spacing: -.025em; line-height: 1.2; margin: 0; }
.al-course-hero__desc { color: var(--al-body); font-size: 1rem; line-height: 1.65; margin: 0; max-width: 62ch; }
.al-course-hero__facts { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; color: var(--al-mute); font-size: .8125rem; }
.al-course-hero__facts b { color: var(--al-ink); font-weight: 600; }
.al-course-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 2px; }

/* ===========================================================================
   8. PROGRESS
   =========================================================================== */
.al-progress { display: flex; flex-direction: column; gap: 7px; }
.al-progress__bar { position: relative; height: 6px; border-radius: var(--al-r-pill); background: var(--al-hairline); overflow: hidden; }
.al-progress__fill { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--al-accent); width: var(--al-value, 0%); transition: width .5s cubic-bezier(.2,.7,.2,1); }
.al-progress--done .al-progress__fill { background: var(--al-success); }
.al-progress__label { display: flex; justify-content: space-between; gap: 12px; color: var(--al-mute); font-size: .75rem; font-variant-numeric: tabular-nums; }
.al-progress__label b { color: var(--al-ink); font-weight: 600; }

/* ===========================================================================
   9. CURRICULUM  (module → lesson rows)
   =========================================================================== */
.al-curriculum { border: 1px solid var(--al-hairline); border-radius: var(--al-r-md); overflow: hidden; background: var(--al-surface); }
.al-curriculum__module { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 13px 18px; background: var(--al-canvas); border-bottom: 1px solid var(--al-hairline); }
.al-curriculum__module h3 { font-size: .9375rem; font-weight: 600; letter-spacing: -.01em; margin: 0; }
.al-curriculum__module span { color: var(--al-mute); font-size: .75rem; font-variant-numeric: tabular-nums; }

.al-lesson-row { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--al-hairline); color: inherit; text-decoration: none; transition: background-color .15s ease; }
.al-lesson-row:last-child { border-bottom: 0; }
.al-lesson-row:hover { background: var(--al-canvas); color: inherit; }
.al-lesson-row__icon { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--al-hairline); color: var(--al-mute); }
.al-lesson-row__icon svg { width: 11px; height: 11px; }
.al-lesson-row__title { font-size: .875rem; font-weight: 500; letter-spacing: -.005em; min-width: 0; }
.al-lesson-row__dur { color: var(--al-mute); font-size: .75rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.al-lesson-row.is-done .al-lesson-row__icon { border-color: var(--al-success); background: var(--al-success); color: var(--al-on-accent); }
.al-lesson-row.is-current { background: var(--al-accent-soft); }
.al-lesson-row.is-current .al-lesson-row__icon { border-color: var(--al-accent); color: var(--al-accent-ink); }
.al-lesson-row.is-current .al-lesson-row__title { color: var(--al-accent-ink); font-weight: 600; }
.al-lesson-row.is-locked { color: var(--al-mute); }
.al-lesson-row.is-locked .al-lesson-row__icon { color: var(--al-locked); }

/* ===========================================================================
   10. ACCESS / LOCKED STATE  (plain card — no rail, no gradient)
   =========================================================================== */
.al-access { display: grid; gap: 12px; justify-items: start; background: var(--al-surface); border: 1px solid var(--al-hairline); border-radius: var(--al-r-md); padding: clamp(22px, 3vw, 30px); max-width: var(--al-reading); }
.al-access__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: var(--al-r-sm); border: 1px solid var(--al-hairline); background: var(--al-canvas); color: var(--al-mute); }
.al-access__icon svg { width: 17px; height: 17px; }
.al-access__eyebrow { color: var(--al-mute); font-size: .75rem; font-weight: 600; letter-spacing: .04em; }
.al-access__title { font-size: clamp(1.125rem, 1.4vw, 1.25rem); letter-spacing: -.02em; margin: 0; }
.al-access__text { color: var(--al-body); font-size: .9375rem; line-height: 1.65; margin: 0; max-width: 50ch; }

/* ===========================================================================
   11. FORMS + NOTICES  (.al-field / .al-notice)
   =========================================================================== */
.al-field { display: flex; flex-direction: column; gap: 6px; }
.al-label { color: var(--al-mute); font-size: .8125rem; font-weight: 500; }
.al-input, .al-textarea, .al-select { background: var(--al-surface); border: 1px solid var(--al-hairline); border-radius: var(--al-r-sm); color: var(--al-ink); font: inherit; font-size: .9375rem; padding: 11px 13px; width: 100%; }
.al-input:focus, .al-textarea:focus, .al-select:focus { border-color: var(--al-accent); outline: 2px solid var(--al-accent); outline-offset: 0; }
.al-textarea { min-height: 140px; resize: vertical; }
.al-notice { display: flex; gap: 9px; align-items: flex-start; border-radius: var(--al-r-sm); font-size: .875rem; line-height: 1.5; padding: 11px 14px; }
.al-notice svg { width: 15px; height: 15px; margin-top: 2px; }
.al-notice--info    { background: var(--al-accent-soft);  color: var(--al-accent-ink); }
.al-notice--success { background: var(--al-success-soft); color: var(--al-success); }
.al-notice--warn    { background: var(--al-locked-soft);  color: var(--al-locked); }
.al-notice--danger  { background: var(--al-danger-soft);  color: var(--al-danger); }

/* ===========================================================================
   12. LANDING (home hero — restrained per HARD RULE #4)
   =========================================================================== */
.al-hero { max-width: var(--al-max); margin-inline: auto; padding: clamp(56px, 9vw, 104px) var(--al-gutter) clamp(36px, 6vw, 64px); text-align: center; }
.al-hero__eyebrow { color: var(--al-accent-ink); font-size: .75rem; font-weight: 600; letter-spacing: .06em; margin: 0 0 18px; text-transform: uppercase; }
.al-hero__title { font-size: clamp(1.875rem, 3.6vw, 2.6rem); font-weight: 600; letter-spacing: -.03em; line-height: 1.14; margin: 0 auto 20px; max-width: 18ch; }
.al-hero__sub { color: var(--al-body); font-size: clamp(1rem, 1.6vw, 1.125rem); line-height: 1.6; margin: 0 auto 32px; max-width: 46ch; }
.al-hero__actions { align-items: center; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* Home + archive card grid wrappers (cards use .al-course-card above) */
.al-courses { max-width: var(--al-max); margin-inline: auto; padding-inline: var(--al-gutter); padding-bottom: clamp(48px, 8vw, 96px); }
/* /courses/ and /my-courses/ render these inside WordPress's globally padded
   wrapper, which already supplies the gutter — a second one pushed the grid past
   the header. Drop ours there and cap the column so it still lands on the same
   1200px grid as the header and the landing page. */
.has-global-padding > .al-courses,
.has-global-padding .al-archive-head { padding-inline: 0; max-width: calc(var(--al-max) - 2 * var(--al-gutter)); margin-inline: auto; }
.al-empty { color: var(--al-mute); }

/* ===========================================================================
   13. 강의 ARCHIVE  (Sensei legacy loop + block → DS card grid)
   =========================================================================== */
/* Archive heading (the_content swap prepends a real <h1>; Sensei's own hidden
   "과정" header stays suppressed via .sensei-archive-controls below). */
/* The constrained entry-content pins children to the ~720px content column while the
   .al-courses grid runs at --al-max — widen the controls wrapper so the heading's left
   edge lines up with the card grid below it. */
.is-layout-constrained > .sensei-archive-controls { max-width: var(--al-max); margin-inline: auto; }
.al-archive-head { padding-block: 0 clamp(20px, 3vw, 32px); padding-inline: var(--al-gutter); }
.al-archive-head .al-h1 { margin: 0; }
.al-archive-head__sub { color: var(--al-mute); font-size: .9375rem; line-height: 1.6; margin: 10px 0 0; max-width: 54ch; }

/* Keep .sensei-archive-controls visible (it now hosts our injected .al-archive-head via
   the sensei_archive_before_course_loop hook) but suppress Sensei's own noise: the
   sort/filter controls and its default "과정" header. */
.sensei-archive-controls .sensei-ordering, .sensei-archive-controls form.sensei-ordering,
.sensei-archive-controls .sensei-course-filters, .sensei-archive-controls > header.archive-header,
.wp-block-sensei-lms-course-list-filter,
.sensei-pagination, nav.pagination, .archive-pagination,
.course-container + .navigation, ul.course-container ~ nav { display: none !important; }

/* Author byline is redundant (single instructor) and rendered "유철웅 제공" — hide it (H5). */
ul.course-container .course-author { display: none !important; }

.wp-block-post-content:has(.course-container), .entry-content:has(.course-container) { max-width: var(--al-max) !important; }

ul.course-container {
  display: grid !important; grid-template-columns: repeat(auto-fit, minmax(280px, 380px));
  justify-content: center; gap: 16px; list-style: none; margin: 8px auto 0; padding: 0;
  border: 0 !important; max-width: var(--al-max); width: 100%;
}
ul.course-container > li.course {
  position: relative; margin: 0 !important; background: var(--al-surface); border: 1px solid var(--al-hairline);
  border-radius: var(--al-r-md); padding: 22px; display: flex; flex-direction: column; gap: 10px;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
ul.course-container > li.course:hover { border-color: var(--al-mute); transform: translateY(-2px); box-shadow: var(--al-shadow-md); }
ul.course-container .course-content, ul.course-container .entry { display: contents; }
ul.course-container .course-image, ul.course-container .course-thumbnail { display: none; }
ul.course-container .course-title { font-size: 1.0625rem !important; line-height: 1.4 !important; margin: 0 !important; font-weight: 600; letter-spacing: -.015em; }
ul.course-container .course-title a { color: var(--al-ink); text-decoration: none; }
ul.course-container .course-title a:hover { color: var(--al-accent-ink); }
ul.course-container .course-author { color: var(--al-mute); font-size: .75rem; display: block; font-style: normal !important; }
ul.course-container .course-author a { color: var(--al-mute); text-decoration: none; }
ul.course-container .sensei-course-meta, ul.course-container .sensei-course-meta span { color: var(--al-mute); font-size: .75rem; margin: 0; font-style: normal !important; }
ul.course-container .sensei-course-meta span { margin-right: 10px; }
ul.course-container .course-excerpt { color: var(--al-body); font-size: .875rem; line-height: 1.6; margin: 0; }
ul.course-container .course-excerpt p { margin: 0; }

/* Block-based course list (belt-and-suspenders — replaced by [applebear_courses] via render_block) */
.wp-block-sensei-lms-course-list { max-width: var(--al-max); margin-inline: auto; }
.wp-block-sensei-lms-course-list .wp-block-post-template { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(280px, 380px)) !important; justify-content: center; gap: 16px; list-style: none; margin: 0; padding: 0; }
.wp-block-sensei-lms-course-list .wp-block-post-template > li.wp-block-post { position: relative; display: flex; flex-direction: column; gap: 10px; margin: 0; background: var(--al-surface); border: 1px solid var(--al-hairline); border-radius: var(--al-r-md); padding: 22px; transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.wp-block-sensei-lms-course-list .wp-block-post-template > li.wp-block-post:hover { border-color: var(--al-mute); transform: translateY(-2px); box-shadow: var(--al-shadow-md); }
.wp-block-sensei-lms-course-list .wp-block-post-title { font-size: 1.0625rem !important; line-height: 1.4 !important; letter-spacing: -.015em; font-weight: 600; margin: 0 !important; padding: 0 !important; }
.wp-block-sensei-lms-course-list .wp-block-post-title a { color: var(--al-ink); }
.wp-block-sensei-lms-course-list .wp-block-post-title a:hover { color: var(--al-accent-ink); }
.wp-block-sensei-lms-course-list .wp-block-post-excerpt, .wp-block-sensei-lms-course-list .wp-block-post-excerpt p { color: var(--al-body); font-size: .875rem; line-height: 1.6; margin: 0; }
.wp-block-sensei-lms-course-list .wp-block-sensei-lms-button-take-course, .wp-block-sensei-lms-course-list .sensei-cta { display: none !important; }
.wp-block-sensei-lms-course-list .wp-block-sensei-lms-course-overview { margin-top: auto; }
.wp-block-sensei-lms-course-list .wp-block-sensei-lms-course-overview a { font-weight: 600; color: var(--al-mute); font-size: .8125rem; text-decoration: none; }
.wp-block-sensei-lms-course-list .wp-block-sensei-lms-course-overview a:hover { color: var(--al-accent-ink); }

/* ===========================================================================
   14. SINGLE-COURSE  (Sensei legacy the_content → DS hero + curriculum)
   =========================================================================== */
body.single-course .entry-content { max-width: var(--al-reading); margin-inline: auto; padding-inline: 0; }
body.single-course .entry-content > header:first-of-type { display: none; }  /* empty Sensei h1 */
/* TT5 renders the title outside Sensei's reading column — give it the same box,
   then prevent the generic post-title rule below from shrinking this course H1. */
body.single-course h1.wp-block-post-title {
  max-width: var(--al-reading) !important;
  margin: 0 auto 12px !important; font-size: clamp(1.375rem, 2.2vw, 1.875rem) !important;
  letter-spacing: -.025em; line-height: 1.2;
}
body.single-course .entry-content > p { color: var(--al-body); font-size: 1rem; line-height: 1.65; margin-inline: 0 !important; max-width: none; }
body.single-course .course-meta.course-enrolment { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 8px; }
body.single-course .entry-content > header h2,
body.single-course .course-lessons > header h2 { font-size: 1.0625rem !important; font-weight: 600; letter-spacing: -.01em; line-height: 1.4; margin: 28px 0 12px; }

body.single-course section.course-lessons { border: 1px solid var(--al-hairline); border-radius: var(--al-r-md); overflow: hidden; background: var(--al-surface); padding: 0; }
body.single-course article.lesson { display: grid; grid-template-columns: 20px 1fr; align-items: start; column-gap: 12px; row-gap: 2px; margin: 0 !important; padding: 13px 18px; border-bottom: 1px solid var(--al-hairline); transition: background-color .15s ease; }
body.single-course article.lesson:last-child { border-bottom: 0; }
body.single-course article.lesson:hover { background: var(--al-canvas); }
body.single-course article.lesson::before { content: ""; width: 16px; height: 16px; margin-top: 3px; border-radius: 50%; border: 1.5px solid var(--al-hairline); grid-row: 1 / span 3; }
body.single-course article.lesson .lesson-title { margin: 0 !important; grid-column: 2; }
body.single-course article.lesson .lesson-title h2 { font-size: .9375rem !important; font-weight: 500 !important; line-height: 1.4 !important; letter-spacing: -.005em; margin: 0 !important; }
body.single-course article.lesson .lesson-title h2 a { color: var(--al-ink); text-decoration: none; }
body.single-course article.lesson:hover .lesson-title h2 a { color: var(--al-accent-ink); }
body.single-course article.lesson .lesson-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; grid-column: 2; color: var(--al-mute); font-size: .75rem; margin: 0 !important; }
body.single-course article.lesson .lesson-author { grid-column: 2; color: var(--al-mute); font-size: .75rem; margin: 0 !important; }
body.single-course article.lesson .lesson-author a { color: var(--al-mute); text-decoration: none; }
body.single-course article.lesson .entry { grid-column: 2; color: var(--al-body); font-size: .8125rem; }
body.single-course article.lesson .entry p { margin: 2px 0 0; }
body.single-course nav#post-entries, body.single-course .post-entries { display: none !important; }

/* ===========================================================================
   15. SINGLE-LESSON  (Sensei Learning Mode skin → Applebear DS)
   =========================================================================== */
body.sensei-course-theme,
body.sensei-course-theme .sensei-course-theme__frame,
body.sensei-course-theme .wp-block-sensei-lms-ui,
body.sensei-course-theme button, body.sensei-course-theme input, body.sensei-course-theme a,
body.sensei-course-theme h1, body.sensei-course-theme h2, body.sensei-course-theme h3,
body.sensei-course-theme p, body.sensei-course-theme span, body.sensei-course-theme li {
  font-family: var(--al-font) !important;
}
body.sensei-course-theme {
  background: var(--al-canvas); color: var(--al-ink);
  /* Retint Sensei's default teal primaries (#155E65 primary, #30968B progress) to our brand
     accent, so Learning Mode buttons/focus/accents/progress match the site in EVERY context —
     the front-end and the logged-in "학생으로 미리 보기" preview (where the raw teal leaks through). */
  --sensei-primary-color: var(--al-accent);
  --sensei-primary-color-global: var(--al-accent);
  --sensei-course-theme-primary-color: var(--al-accent);
  --sensei-course-progress-bar-inner-color: var(--al-accent);
}
body.sensei-course-theme .sensei-course-theme__frame { background: var(--al-surface); border-color: var(--al-hairline); }
body.sensei-course-theme .wp-block-sensei-lms-course-title, body.sensei-course-theme h1, body.sensei-course-theme h2 { color: var(--al-ink); letter-spacing: -.02em; }
body.sensei-course-theme .sensei-course-theme__header { background: var(--al-header); border-bottom: 1px solid var(--al-hairline); backdrop-filter: blur(20px) saturate(160%); }

/* Progress */
body.sensei-course-theme .sensei-course-theme-course-progress { color: var(--al-mute); font-size: .75rem; font-variant-numeric: tabular-nums; }
body.sensei-course-theme .sensei-course-theme-course-progress-bar { height: 6px; border-radius: var(--al-r-pill); background: var(--al-hairline); overflow: hidden; }
body.sensei-course-theme .sensei-course-theme-course-progress-bar-inner { background: var(--al-accent); border-radius: inherit; }
body.sensei-course-theme .wp-block-sensei-lms-exit-course a { color: var(--al-mute); font-size: .8125rem; text-decoration: none; }
body.sensei-course-theme .wp-block-sensei-lms-exit-course a:hover { color: var(--al-accent-ink); }

/* Sidebar lesson nav → lesson-row visuals */
body.sensei-course-theme .sensei-lms-course-navigation__lessons { list-style: none; margin: 0; padding: 0; }
body.sensei-course-theme .sensei-lms-course-navigation-lesson { border-bottom: 1px solid var(--al-hairline); }
body.sensei-course-theme .sensei-lms-course-navigation-lesson:last-child { border-bottom: 0; }
body.sensei-course-theme .sensei-lms-course-navigation-lesson__link { display: grid; grid-template-columns: 20px 1fr; align-items: center; gap: 12px; padding: 11px 14px; color: var(--al-body); text-decoration: none; transition: background-color .15s ease; }
body.sensei-course-theme .sensei-lms-course-navigation-lesson__link:hover { background: var(--al-canvas); }
body.sensei-course-theme .sensei-lms-course-navigation-lesson__status { width: 16px; height: 16px; color: var(--al-mute); }
body.sensei-course-theme .sensei-lms-course-navigation-lesson__title { font-size: .875rem; font-weight: 700; min-width: 0; }
body.sensei-course-theme .sensei-lms-course-navigation-lesson.status-locked .sensei-lms-course-navigation-lesson__status { color: var(--al-locked); }
body.sensei-course-theme .sensei-lms-course-navigation-lesson.status-completed .sensei-lms-course-navigation-lesson__status { color: var(--al-success); }
body.sensei-course-theme .sensei-lms-course-navigation-lesson.current-lesson { background: var(--al-accent-soft); }
body.sensei-course-theme .sensei-lms-course-navigation-lesson.current-lesson .sensei-lms-course-navigation-lesson__title { color: var(--al-accent-ink); font-weight: 700; }

/* Locked-lesson notice → access panel */
body.sensei-course-theme .sensei-course-theme-locked-lesson-notice { display: grid; gap: 12px; justify-items: start; background: var(--al-surface) !important; border: 1px solid var(--al-hairline) !important; border-radius: var(--al-r-md); padding: clamp(22px, 3vw, 30px); max-width: var(--al-reading); box-shadow: none !important; }
body.sensei-course-theme .sensei-course-theme-locked-lesson-notice__header { display: flex; align-items: center; gap: 12px; }
body.sensei-course-theme .sensei-course-theme-locked-lesson-notice__icon { position: relative !important; display: grid !important; place-items: center !important; width: 38px; height: 38px; border-radius: var(--al-r-sm); border: 1px solid var(--al-hairline); background: var(--al-canvas); color: var(--al-mute); }
/* Sensei's lock is a viewBox-less <use> sprite that renders top-left of the box (not centered).
   Hide it and draw our own lock via a CSS mask. Positioned ABSOLUTELY-centered (not via grid
   place-items) because the logged-in Learning Mode preview overrides the icon's place-items,
   which left the mask pinned top-left. Absolute + translate can't be knocked off-center. */
body.sensei-course-theme .sensei-course-theme-locked-lesson-notice__icon svg { display: none !important; }
body.sensei-course-theme .sensei-course-theme-locked-lesson-notice__icon::before {
  content: ""; position: absolute !important; top: 50% !important; left: 50% !important;
  transform: translate(-50%, -50%) !important; margin: 0 !important;
  width: 18px !important; height: 18px !important; background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8V5.5a3 3 0 1 1 6 0V8m-7 0h8a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8V5.5a3 3 0 1 1 6 0V8m-7 0h8a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
body.sensei-course-theme .sensei-course-theme-locked-lesson-notice__title { font-size: clamp(1.125rem, 1.4vw, 1.25rem); font-weight: 600; letter-spacing: -.02em; color: var(--al-ink); }
body.sensei-course-theme .sensei-course-theme-locked-lesson-notice__text { color: var(--al-body); font-size: .9375rem; line-height: 1.65; margin: 0; max-width: 50ch; }
body.sensei-course-theme .sensei-course-theme-locked-lesson-notice__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Learning Mode buttons */
body.sensei-course-theme .sensei-course-theme__button.is-primary { background: var(--al-ink) !important; color: var(--al-canvas) !important; border: 0 !important; border-radius: var(--al-r-pill) !important; box-shadow: none !important; min-height: 42px; padding: 0 20px; font-weight: 500; }
body.sensei-course-theme .sensei-course-theme__button.is-primary:hover { filter: brightness(.9); }
body.sensei-course-theme .sensei-course-theme__button.is-secondary { background: transparent !important; color: var(--al-ink) !important; border: 1px solid var(--al-hairline) !important; border-radius: var(--al-r-pill) !important; box-shadow: none !important; min-height: 42px; padding: 0 20px; }
body.sensei-course-theme .sensei-course-theme__button.is-secondary:hover { border-color: var(--al-ink) !important; }

/* Locked-notice action buttons — kill the teal "green outer box" that composites behind the
   ink pill in the logged-in preview (a Sensei fill/pseudo, not a shadow — hence the flat offset
   block). Force the button ink, strip any pseudo, and make every wrapper transparent. Scoped
   tight to the notice actions so nothing else is touched. */
body.sensei-course-theme .sensei-course-theme-locked-lesson-notice__actions,
body.sensei-course-theme .sensei-course-theme-locked-lesson-notice__actions > div,
body.sensei-course-theme .sensei-course-theme-locked-lesson-notice__actions .wp-block-button {
  background: transparent !important; background-image: none !important; box-shadow: none !important; border: 0 !important;
}
body.sensei-course-theme .sensei-course-theme-locked-lesson-notice__actions .sensei-course-theme__button.is-primary,
body.sensei-course-theme .sensei-course-theme-locked-lesson-notice__actions a.is-primary {
  background: var(--al-ink) !important; background-image: none !important; box-shadow: none !important; color: var(--al-canvas) !important;
}
body.sensei-course-theme .sensei-course-theme-locked-lesson-notice__actions .sensei-course-theme__button::before,
body.sensei-course-theme .sensei-course-theme-locked-lesson-notice__actions .sensei-course-theme__button::after,
body.sensei-course-theme .sensei-course-theme-locked-lesson-notice__actions .wp-block-button__link::before,
body.sensei-course-theme .sensei-course-theme-locked-lesson-notice__actions .wp-block-button__link::after {
  content: none !important; display: none !important; background: transparent !important; box-shadow: none !important;
}

/* Locked-notice header: vertically center the lock-icon square with the title. Logged-out this
   is already centered (align-items:center); in the logged-in preview a Sensei sheet forces the
   header to flex-start, so we ALSO set align-self:center on the direct children — align-self
   wins over the parent's align-items no matter what Sensei sets — and zero any injected margin. */
body.sensei-course-theme .sensei-course-theme-locked-lesson-notice__header { display: flex !important; align-items: center !important; gap: 14px !important; }
body.sensei-course-theme .sensei-course-theme-locked-lesson-notice__header > * { align-self: center !important; margin-block: 0 !important; }
body.sensei-course-theme .sensei-course-theme-locked-lesson-notice__icon { flex: 0 0 auto !important; }

/* Lesson reading column + complete button */
body.sensei-course-theme .sensei-course-theme__main-content { max-width: var(--al-reading); margin-inline: auto; color: var(--al-body); font-size: .9375rem; line-height: 1.8; }
body.sensei-course-theme .sensei-course-theme__main-content .wp-block-post-title { font-size: clamp(1.375rem, 2.2vw, 1.75rem); font-weight: 700; letter-spacing: -.025em; line-height: 1.25; color: var(--al-ink); margin: 0 0 20px; }
body.sensei-course-theme .sensei-course-theme__main-content h2 { color: var(--al-ink); font-size: 1.1875rem; margin-top: 1.8em; }
body.sensei-course-theme .sensei-course-theme__main-content h3 { color: var(--al-ink); font-size: 1.0625rem; margin-top: 1.5em; }
body.sensei-course-theme .sensei-course-theme__main-content a { color: var(--al-accent-ink); }
/* Lesson prompts are rendered by Pandoc as <pre><code>. Sensei's inherited
   no-wrap code styling exceeded the reading column and was clipped by the
   page-level overflow guard. Keep prompts in the column and wrap long text. */
body.sensei-course-theme .sensei-course-theme__main-content pre {
  background: var(--al-canvas);
  border: 1px solid var(--al-hairline);
  border-radius: var(--al-r-sm);
  box-sizing: border-box;
  color: var(--al-body);
  margin-block: 1.25em;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  padding: clamp(14px, 3vw, 18px);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
body.sensei-course-theme .sensei-course-theme__main-content pre code {
  background: transparent;
  color: inherit;
  font-size: clamp(.75rem, 2.3vw, .875rem);
  line-height: 1.65;
  padding: 0;
  white-space: inherit;
  overflow-wrap: inherit;
  word-break: inherit;
}
body.sensei-course-theme .wp-block-sensei-lms-lesson-actions .wp-block-button__link,
body.sensei-course-theme .sensei-buttons-container .wp-block-button__link { background: var(--al-accent) !important; color: var(--al-on-accent) !important; border-radius: var(--al-r-pill) !important; }

/* ===========================================================================
   16. 공지 (posts index) + single post — restrained typography
   =========================================================================== */
/* margin-block only: a full `margin: 0 0 32px !important` also zeroed the inline margins,
   beating core's `.is-layout-constrained > * { margin-inline: auto !important }` (same
   specificity, later source order) — which pinned page titles to the left gutter while
   the constrained content column stayed centered. */
.al-index__heading, .wp-block-post-title { font-size: clamp(1.125rem, 1.35vw, 1.25rem) !important; letter-spacing: -.015em; margin-block: 0 32px !important; }

/* Sensei My Courses sits in an alignfull content wrapper. Keep its replacement
   card grid on the same 720px rail as the page title; archive grid stays wide. */
body.al-my-courses-page .al-courses { max-width: var(--wp--style--global--content-size, 720px); padding-inline: 0; width: 100%; }
/* Messages button: right-align within the 720px column, still on its own row. */
body.al-my-courses-page .wp-block-sensei-lms-button-learner-messages { text-align: right; }
body.al-my-courses-page .wp-block-sensei-lms-button-learner-messages .wp-block-button__link { margin-inline-start: auto; }
.al-post-list { margin-top: 0; }
.al-post-row { border-top: 1px solid var(--al-hairline); column-gap: clamp(20px, 4vw, 48px); display: grid; grid-template-columns: minmax(96px, 12.5%) minmax(0, 1fr); padding: 28px 0; }
.al-post-row > * { margin-block-start: 0 !important; min-width: 0; }
.al-post-list .wp-block-post-template { list-style: none; margin: 0; padding: 0; }
.al-post-list .wp-block-post-template > li { margin: 0; }
.al-post-list .wp-block-post-template > li:first-child .al-post-row, .al-post-list > .al-post-row:first-of-type { border-top: 0; padding-top: 0; }
.al-post-row__meta { color: var(--al-mute); font-family: var(--al-mono); font-size: .75rem; line-height: 1.6; margin: 0 !important; padding-top: 3px; }
.al-post-row__content { min-width: 0; }
.al-post-row__title { font-size: clamp(1.25rem, 1.7vw, 1.5rem) !important; font-weight: 600; letter-spacing: -.02em; line-height: 1.2 !important; margin: 0 !important; }
.al-post-row__title a { text-decoration: none; }
.al-post-row__title a:hover { color: var(--al-accent-ink); }
.al-post-row__excerpt, .al-post-row__excerpt p { color: var(--al-body); font-size: .875rem; line-height: 1.65; margin: 8px 0 0 !important; }
.al-post-row__excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.al-article__meta { color: var(--al-mute); font-family: var(--al-mono); font-size: .75rem; margin: 0 !important; }
.al-article__title { font-size: clamp(1.375rem, 2.5vw, 1.875rem) !important; font-weight: 600; letter-spacing: -.03em; line-height: 1.2 !important; margin: 16px 0 32px !important; }
.al-article .wp-block-post-content { color: var(--al-body); font-size: clamp(.9375rem, 1.1vw, 1rem); line-height: 1.75; }
.al-article .wp-block-post-content h2 { color: var(--al-ink); font-size: 1.375rem !important; letter-spacing: -.02em; line-height: 1.3; margin: 2.4em 0 .55em; }
.al-article .wp-block-post-content h3 { color: var(--al-ink); font-size: 1.1875rem !important; letter-spacing: -.015em; line-height: 1.35; margin: 2.1em 0 .5em; }
.al-article .wp-block-post-content h4 { color: var(--al-ink); font-size: 1.0625rem !important; letter-spacing: -.01em; line-height: 1.4; margin: 1.8em 0 .45em; }
.al-article__back { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--al-hairline); }
.al-article__back a { color: var(--al-mute); font-size: .875rem; text-decoration: none; }
.al-article__back a:hover { color: var(--al-accent-ink); }
.al-pagination { margin-top: 40px; }
.al-cat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.al-chip--cat { background: var(--al-surface); border: 1px solid var(--al-hairline); border-radius: var(--al-r-pill); color: var(--al-body); font-size: .8125rem; font-weight: 500; padding: 6px 14px; text-decoration: none; white-space: nowrap; }
.al-chip--cat:hover { border-color: var(--al-accent); color: var(--al-accent-ink); }

/* ===========================================================================
   17. REDEEM  (invite-code form — .alme-* restyled to DS, no mu-plugin edit)
   =========================================================================== */
/* Width tracks the theme content column (720px) so the box's left edge lines up with the
   constrained paragraphs above it; --al-reading (700px) left a 10px offset. */
.alme-redeem-box { margin-inline: auto; max-width: var(--wp--style--global--content-size, var(--al-reading)); display: grid; gap: 12px; background: var(--al-surface); border: 1px solid var(--al-hairline); border-radius: var(--al-r-md); padding: clamp(22px, 3vw, 30px); }
.alme-redeem-box p { margin: 0; }
.alme-redeem-box label { color: var(--al-mute); font-size: .8125rem; font-weight: 500; display: block; margin: 0; }
.alme-redeem-box input[type="text"] { background: var(--al-surface); border: 1px solid var(--al-hairline); border-radius: var(--al-r-sm); color: var(--al-ink); font: inherit; font-size: .9375rem; padding: 11px 13px; width: 100%; margin: 0; }
.alme-redeem-box input[type="text"]:focus { border-color: var(--al-accent); outline: 2px solid var(--al-accent); outline-offset: 0; }
.alme-redeem-btn { align-self: start; background: var(--al-ink); color: var(--al-canvas); border: 0; border-radius: var(--al-r-pill); min-height: 42px; padding: 0 20px; font-size: .875rem; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; text-decoration: none; }
.alme-redeem-btn:hover { filter: brightness(.93); color: var(--al-canvas); }
.alme-redeem-notice { border-radius: var(--al-r-sm); font-size: .875rem; padding: 11px 14px; margin: 0; }
.alme-redeem-notice.alme-ok { background: var(--al-success-soft); color: var(--al-success); }
.alme-redeem-notice.alme-fail { background: var(--al-danger-soft); color: var(--al-danger); }

/* ===========================================================================
   18. LESSON RESOURCE TABLE
   =========================================================================== */
.al-resource-table-note { color: var(--al-mute); font-size: .8125rem; margin-block: -8px 20px !important; }
figure.wp-block-table.al-resource-table { background: var(--al-surface); border: 1px solid var(--al-hairline); border-radius: var(--al-r-md); box-shadow: none; margin-block: 24px 0; overflow: hidden; }
.al-resource-table table { border: 0; border-collapse: collapse; table-layout: fixed; width: 100%; font-size: .8125rem; line-height: 1.55; }
.al-resource-table th, .al-resource-table td { border: 0; border-bottom: 1px solid var(--al-hairline); padding: 11px 10px; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.al-resource-table th { background: var(--al-canvas); color: var(--al-ink); font-size: .75rem; font-weight: 600; letter-spacing: .01em; }
.al-resource-table th:nth-child(1), .al-resource-table td:nth-child(1) { width: 94px; white-space: nowrap; }
.al-resource-table th:nth-child(2), .al-resource-table td:nth-child(2) { width: 128px; }
.al-resource-table th:nth-child(3), .al-resource-table td:nth-child(3) { width: 160px; }
.al-resource-table th:nth-child(5), .al-resource-table td:nth-child(5) { width: 116px; }
.al-resource-table tbody tr:last-child td { border-bottom: 0; }
.al-resource-table tbody tr:hover { background: var(--al-accent-soft); }
.al-resource-table td:nth-child(3) a { color: var(--al-accent-ink); font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.al-resource-table figcaption { background: var(--al-canvas); border-top: 1px solid var(--al-hairline); color: var(--al-mute); font-size: .75rem; margin: 0; padding: 10px 12px; text-align: right; }

@media (max-width: 700px) {
  figure.wp-block-table.al-resource-table { background: transparent; border: 0; border-radius: 0; overflow: visible; }
  .al-resource-table table { display: block; table-layout: auto; width: auto; min-width: 0; max-width: none; }
  .al-resource-table tbody, .al-resource-table tr { display: block; width: auto; min-width: 0; max-width: none; }
  .al-resource-table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .al-resource-table tbody { display: grid; gap: 12px; }
  .al-resource-table tbody tr { background: var(--al-surface); border: 1px solid var(--al-hairline); border-radius: var(--al-r-md); overflow: hidden; }
  .al-resource-table tbody tr:hover { background: var(--al-surface); }
  .al-resource-table td, .al-resource-table td:nth-child(n) { box-sizing: border-box; display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; width: auto; min-width: 0; max-width: none; border-bottom: 1px solid var(--al-hairline); padding: 9px 11px; white-space: normal; }
  .al-resource-table td:last-child { border-bottom: 0; }
  .al-resource-table td::before { color: var(--al-mute); font-size: .75rem; font-weight: 500; }
  .al-resource-table td:nth-child(1)::before { content: "날짜"; }
  .al-resource-table td:nth-child(2)::before { content: "분류"; }
  .al-resource-table td:nth-child(3)::before { content: "자료"; }
  .al-resource-table td:nth-child(4)::before { content: "설명"; }
  .al-resource-table td:nth-child(5)::before { content: "출처"; }
  .al-resource-table figcaption { background: transparent; border-top: 0; padding-inline: 0; }
}

/* ===========================================================================
   19. MOTION / A11Y
   =========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  a, .al-pill, .al-ghost, input[type="submit"] { transition: color .2s ease, background-color .2s ease, filter .2s ease, transform 100ms ease-out; }
  .al-btn:active, .al-pill:active, input[type="submit"]:active, .wp-element-button:active { transform: scale(.98); }
  .al-reveal { animation: al-rise .5s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--al-i, 0) * .07s); }
  @keyframes al-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

@media (prefers-reduced-transparency: reduce) {
  :root { --al-header: var(--al-canvas); }
  .al-header, body.sensei-course-theme .sensei-course-theme__header { backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --al-hairline: var(--al-mute); }
  .al-header { backdrop-filter: none; border-bottom-color: var(--al-ink); }
  .al-input, .al-textarea, .al-select,
  input[type="text"], input[type="email"], input[type="password"], input[type="url"], textarea { border-color: var(--al-ink) !important; }
}

/* Header logo invert in dark mode */
@media (prefers-color-scheme: dark) { .al-header .wp-block-site-title a::before { filter: invert(1); } }
:root[data-theme="dark"] .al-header .wp-block-site-title a::before { filter: invert(1); }
:root[data-theme="light"] .al-header .wp-block-site-title a::before { filter: none; }

/* ===========================================================================
   20. RESPONSIVE
   =========================================================================== */
@media (max-width: 900px) {
  .al-lesson { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .al-shell { padding-inline: 20px; }
  /* Sensei bleeds the locked-lesson card past its padded column, so a bordered
     card touches both screen edges. Drop the bleed — align it with the title. */
  body.sensei-course-theme .sensei-course-theme-locked-lesson-notice { margin-inline: 0; }
  .al-header { backdrop-filter: none; background: var(--al-canvas); }
  .al-post-row { grid-template-columns: 1fr; row-gap: 12px; padding-block: 24px; }
  .al-post-row__meta { padding-top: 0; }
  .al-article .wp-block-post-content { font-size: .9375rem; line-height: 1.75; }
  .al-article .wp-block-post-content h2 { font-size: 1.1875rem !important; line-height: 1.3; }
  .al-article .wp-block-post-content h3 { font-size: 1.0625rem !important; line-height: 1.35; }
  .al-article .wp-block-post-content h4 { font-size: 1rem !important; line-height: 1.4; }
}
@media (max-width: 680px) {
  .al-header { min-height: 56px; padding-block: 8px; }
  .al-header__inner { align-items: center; display: grid; gap: 8px 12px; grid-template-areas: "brand auth" "primary primary"; grid-template-columns: minmax(0, 1fr) auto; }
  .al-header .wp-block-site-title { grid-area: brand; min-width: 0; }
  .al-nav { display: contents; }
  .al-nav__primary { align-items: center; border-top: 1px solid var(--al-hairline); display: flex; flex-wrap: nowrap; gap: 12px; grid-area: primary; justify-content: flex-start; margin-inline: -20px; overflow-x: auto; padding: 8px 20px 0; scrollbar-width: none; width: auto; }
  .al-nav__primary::-webkit-scrollbar { display: none; }
  .al-nav__link { flex: 0 0 auto; font-size: .8125rem; min-height: 38px; }
  .al-nav__auth { border-inline-start: 0; gap: 8px; grid-area: auth; margin-inline-start: 0; padding-inline-start: 0; }
  .al-pill--sm { font-size: .75rem; min-height: 34px; padding: 0 13px; }
  .al-nav__logout { background: transparent; border-color: var(--al-hairline); color: var(--al-body); }
  .al-nav__logout:hover { background: var(--al-surface); color: var(--al-ink); filter: none; }
  .al-hero__actions .al-pill, .al-hero__actions .al-ghost { width: 100%; }
}
@media (max-width: 360px) {
  .al-header__inner { gap: 8px; }
  .al-header .wp-block-site-title { font-size: 1rem; }
  .al-header .wp-block-site-title a { gap: 6px; }
  .al-header .wp-block-site-title a::before { flex-basis: 18px; height: 18px; width: 18px; }
  .al-nav__auth { gap: 4px; }
  .al-pill--sm { padding-inline: 10px; }
}
@media (max-width: 560px) {
  .al-course-grid, ul.course-container, .wp-block-sensei-lms-course-list .wp-block-post-template { grid-template-columns: 1fr !important; }
}

/* -----------------------------------------------------------------------------
 * 19. 과외 (tutoring) — embedded Google Form
 * -------------------------------------------------------------------------- */
.al-tutoring { margin-block-start: 8px; }
.al-tutoring__intro { color: var(--al-body); margin: 0 0 24px; }
.al-tutoring__embed {
  background: var(--al-surface);
  border: 1px solid var(--al-hairline);
  border-radius: var(--al-r-md);
  overflow: hidden;
}
.al-tutoring__frame {
  border: 0;
  display: block;
  width: 100%;
  height: 2240px;
}
.al-tutoring__fallback { color: var(--al-mute); font-size: .9375rem; margin: 16px 0 0; text-align: center; }
@media (max-width: 700px) {
  .al-tutoring__frame { height: 2500px; }
}

/* 과외 신청 페이지 — 수강생 입장 버튼 (Task: tutoring access) */
.al-tutoring__enter { margin: 0 0 1.75rem; }

/* ===========================================================================
   21. FRONT PAGE — article-first (2026-11-20, NYT/WSJ-style, kept simple)
   =========================================================================== */
.al-front-page { padding-block: 0 clamp(48px, 7vw, 80px); }
.al-dateline { align-items: center; border-bottom: 1px solid var(--al-ink); color: var(--al-mute); display: flex; font-size: .75rem; gap: 16px; justify-content: space-between; padding-block: 16px 12px; }
.al-dateline strong { color: var(--al-ink); font-weight: 600; }
.al-sections { border-bottom: 1px solid var(--al-hairline); display: flex; font-size: .8125rem; gap: 20px; overflow-x: auto; padding-block: 10px; scrollbar-width: none; white-space: nowrap; }
.al-sections::-webkit-scrollbar { display: none; }
.al-sections a { color: var(--al-body); text-decoration: none; }
.al-sections a:hover, .al-sections a[aria-current] { color: var(--al-ink); }
.al-sections a[aria-current] { font-weight: 600; }
.al-kicker { color: var(--al-accent-ink); font-size: .75rem; font-weight: 600; text-decoration: none; }
.al-dek { color: var(--al-body); margin: 0; }
.al-front-page .al-meta { margin: 0; }
.al-media { background: var(--al-hairline); border-radius: var(--al-r-xs); display: block; overflow: hidden; aspect-ratio: 16 / 9; }
.al-media img { display: block; height: 100%; object-fit: cover; width: 100%; }
.al-front { display: grid; gap: 40px; grid-template-columns: minmax(0, 1fr) 320px; padding-block: 28px 44px; }
.al-front--solo { grid-template-columns: minmax(0, 1fr); }
.al-lead { align-content: start; display: grid; gap: 12px; }
.al-lead__title { font-size: clamp(1.5rem, 2.6vw, 1.875rem); letter-spacing: -.025em; line-height: 1.22; margin: 0; }
.al-lead__title a, .al-story__title a, .al-brief { color: var(--al-ink); text-decoration: none; }
.al-lead__title a:hover, .al-story__title a:hover, .al-brief:hover .al-brief__title { color: var(--al-accent-ink); }
.al-lead .al-dek { font-size: 1rem; line-height: 1.7; }
.al-rail { border-left: 1px solid var(--al-hairline); padding-left: 32px; }
.al-rail__title { font-size: .8125rem; font-weight: 600; margin: 0 0 4px; }
/* Every rail item has one height: a one-line title and three summary lines, reserved even when shorter. */
.al-brief { border-bottom: 1px solid var(--al-hairline); display: grid; gap: 0; grid-template-columns: minmax(0, 1fr); padding-block: 14px; }
.al-brief time { color: var(--al-mute); font-family: var(--al-mono); font-size: .75rem; line-height: 1; }
.al-brief__title { font-size: .9375rem; font-weight: 600; height: 1.4em; line-height: 1.4; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.al-brief__dek { -webkit-box-orient: vertical; -webkit-line-clamp: 3; color: var(--al-body); display: -webkit-box; font-size: .8125rem; height: calc(4.65em + 2px); line-height: 1.55; margin-top: 4px; overflow: hidden; overflow-wrap: anywhere; word-break: keep-all; }
.al-brief.has-thumb { column-gap: 14px; grid-template-columns: 80px minmax(0, 1fr); }
.al-brief.has-thumb time, .al-brief.has-thumb .al-brief__title, .al-brief.has-thumb .al-brief__dek { grid-column: 2; }
.al-brief__thumb { align-self: start; aspect-ratio: 1; grid-column: 1; grid-row: 1 / span 3; }
.al-more { color: var(--al-mute); display: inline-block; font-size: .8125rem; margin-top: 10px; text-decoration: none; }
.al-more:hover { color: var(--al-ink); }
.al-promo { align-items: center; background: var(--al-surface); border: 1px solid var(--al-hairline); border-radius: var(--al-r-md); display: flex; gap: 24px; justify-content: space-between; margin-block-end: 48px; padding: 20px 24px; }
.al-promo p { margin: 0; }
.al-promo__eyebrow { color: var(--al-mute); font-size: .8125rem; }
.al-promo__title { font-size: 1.0625rem; font-weight: 600; letter-spacing: -.015em; }
.al-section-head { align-items: baseline; border-top: 1px solid var(--al-ink); display: flex; justify-content: space-between; margin-block-end: 20px; padding-top: 12px; }
.al-section-head h2 { font-size: .9375rem; margin: 0; }
.al-section-head a { color: var(--al-mute); font-size: .8125rem; text-decoration: none; }
.al-section-head a:hover { color: var(--al-ink); }
.al-trio { display: grid; gap: 32px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-block-end: 56px; }
.al-story { align-content: start; display: grid; gap: 10px; }
.al-story__title { font-size: 1.0625rem; line-height: 1.4; margin: 0; }
.al-story .al-dek { display: -webkit-box; font-size: .875rem; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.al-front-list .al-post-row { padding-block: 18px; }
.al-front-list .al-post-row__title { font-size: 1.0625rem !important; line-height: 1.4 !important; }
.al-front-list .al-post-row__excerpt { -webkit-line-clamp: 1; }

/* 정보 list: counts on chips, optional right thumbnail */
.al-chip--cat[aria-current] { background: var(--al-ink); border-color: var(--al-ink); color: var(--al-canvas); }
.al-chip__count { font-family: var(--al-mono); font-size: .6875rem; margin-inline-start: 2px; opacity: .65; }
.al-post-row.has-thumb { grid-template-columns: minmax(96px, 12.5%) minmax(0, 1fr) 144px; }
.al-post-row__thumb { align-self: start; }

/* Header search (details/summary — no JS) */
.al-search { position: relative; }
.al-search__toggle { align-items: center; border-radius: var(--al-r-pill); color: var(--al-ink); cursor: pointer; display: grid; height: 36px; list-style: none; place-items: center; width: 36px; }
.al-search__toggle::-webkit-details-marker { display: none; }
.al-search__toggle:hover, .al-search[open] .al-search__toggle { background: var(--al-accent-soft); }
.al-search__form { background: var(--al-surface); border: 1px solid var(--al-hairline); border-radius: var(--al-r-md); box-shadow: var(--al-shadow-md); display: flex; gap: 8px; padding: 8px; position: absolute; right: 0; top: calc(100% + 10px); width: min(320px, calc(100vw - 40px)); z-index: 30; }
.al-search__input { background: var(--al-canvas); border: 1px solid var(--al-hairline); border-radius: var(--al-r-pill); color: var(--al-ink); flex: 1; font: inherit; font-size: .875rem; min-width: 0; padding: 0 14px; }
.al-search__input:focus { border-color: var(--al-accent); outline: none; }
.al-main.al-landing { margin-block-start: 0; }
.al-search__toggle:focus { outline: none; }
.al-search__toggle:focus-visible { outline: 2px solid var(--al-focus); outline-offset: 2px; }
.al-search__submit { background: var(--al-ink); border: 0; border-radius: var(--al-r-pill); color: var(--al-canvas); cursor: pointer; font: inherit; font-size: .8125rem; font-weight: 500; min-height: 38px; padding: 0 16px; }
.al-search__submit:hover { filter: brightness(.93); }

@media (max-width: 960px) {
  .al-front { grid-template-columns: minmax(0, 1fr); }
  .al-rail { border-left: 0; border-top: 1px solid var(--al-ink); padding: 12px 0 0; }
  .al-trio { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .al-dateline span { display: none; }
  .al-search__form { left: 20px; position: fixed; right: 20px; top: 62px; width: auto; }
  .al-front { padding-top: 20px; }
  .al-promo { align-items: flex-start; flex-direction: column; gap: 14px; }
  .al-trio { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .al-post-row.has-thumb { grid-template-columns: minmax(0, 1fr) 104px; }
  .al-post-row.has-thumb .al-post-row__meta { grid-column: 1 / -1; }
}

/* ==========================================================================
   22. SINGLE POST — newspaper article (theme 1.7.0)
   Headline block and lead art sit above a 680px reading column. Section heads
   are ruled, fact rows are labelled, figures and captions stay quiet.
   ========================================================================== */
.al-main.al-post-main { margin-block-start: 0; padding-block-start: 0; }
.al-post-head { margin-inline: auto; max-width: calc(960px + 2 * var(--al-gutter)); padding: clamp(32px, 5vw, 56px) var(--al-gutter) 0; }
.al-post-head__inner { margin-inline: auto; max-width: 680px; }
.al-post-head .al-kicker { display: inline-block; margin-block-end: 14px; }
.al-post-head__title { color: var(--al-ink); font-size: clamp(1.625rem, 3.4vw, 1.875rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.22; margin: 0; text-wrap: balance; }
.al-post-head__dek { color: var(--al-body); font-size: 1.125rem; line-height: 1.6; margin: 14px 0 0; }
.al-byline { align-items: center; border-block: 1px solid var(--al-hairline); color: var(--al-mute); display: flex; flex-wrap: wrap; font-size: .8125rem; gap: 6px 14px; margin: 24px 0 0; padding-block: 12px; }
.al-byline__name { color: var(--al-ink); font-weight: 600; }
.al-byline > * + *::before { color: var(--al-hairline); content: "·"; margin-inline-end: 14px; }
.al-post-lead { margin: clamp(28px, 4vw, 40px) 0 0; }
.al-post-lead__media { aspect-ratio: 16 / 9; background: var(--al-hairline); border-radius: var(--al-r-xs); overflow: hidden; }
.al-post-lead__media img { display: block; height: 100%; object-fit: cover; width: 100%; }
.al-post-lead figcaption { color: var(--al-mute); font-size: .75rem; margin: 10px auto 0; max-width: 680px; }
.al-post-lead figcaption a, .al-post figcaption a { color: inherit; }

.al-article.al-post { max-width: calc(680px + 2 * var(--al-gutter)); padding-block-start: clamp(28px, 4vw, 40px); }
.al-post .wp-block-post-content { color: var(--al-body); font-size: 1.0625rem !important; line-height: 1.85; }
.al-post .wp-block-post-content > * { margin-block: 0 1.15em; }
.al-post .wp-block-post-content p { margin-block: 0 1.15em; }
.al-post .wp-block-post-content strong { color: var(--al-ink); font-weight: 600; }
.al-post .wp-block-post-content a { color: var(--al-ink); text-decoration-color: var(--al-hairline); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.al-post .wp-block-post-content a:hover { color: var(--al-accent-ink); text-decoration-color: currentColor; }
.al-post .wp-block-post-content ul, .al-post .wp-block-post-content ol { padding-inline-start: 1.15em; }
.al-post .wp-block-post-content li { margin-block: 0 .55em; }
.al-post .wp-block-post-content li::marker { color: var(--al-mute); }
.al-post .wp-block-post-content hr { border: 0; border-top: 1px solid var(--al-hairline); margin-block: 40px; }
.al-post .wp-block-post-content code { background: var(--al-surface); border: 1px solid var(--al-hairline); border-radius: var(--al-r-xs); font-family: var(--al-mono); font-size: .8125em; padding: .1em .35em; }
.al-post .wp-block-post-content blockquote { border-block: 1px solid var(--al-hairline); margin-inline: 0; padding: 18px 0; }
.al-post .wp-block-post-content h2 { font-size: 1.375rem !important; font-weight: 700; margin: 2.2em 0 .6em; }
.al-post .wp-block-post-content h3 { font-size: 1.1875rem !important; font-weight: 700; margin: 2em 0 .6em; }
.al-post .wp-block-post-content h4 { color: var(--al-ink); font-size: 1.125rem !important; font-weight: 700; letter-spacing: -.02em; line-height: 1.4; margin: 2.2em 0 .7em; }
.al-post .wp-block-post-content h3.al-sec { border-top: 1px solid var(--al-ink); font-size: 1.25rem !important; letter-spacing: -.025em; margin: 3.2em 0 1em; padding-top: 14px; }
.al-sec__num { color: var(--al-mute); display: block; font-family: var(--al-mono); font-size: .75rem; font-weight: 500; letter-spacing: 0; margin-block-end: 6px; }
.al-post .wp-block-post-content h3.al-sec + h4 { margin-top: 1.2em; }

.al-disclaimer { color: var(--al-mute); font-size: .8125rem; line-height: 1.6; }
.al-post .wp-block-post-content .al-disclaimer { margin-block-end: 20px; }
.al-summary { background: var(--al-surface); border: 1px solid var(--al-hairline); border-radius: var(--al-r-sm); margin-block: 0 8px !important; padding: 20px 24px; }
.al-summary p { margin: 0 !important; }
.al-summary p + p { color: var(--al-ink); font-size: 1rem; line-height: 1.8; }
.al-summary__label { color: var(--al-ink); font-size: .8125rem; font-weight: 700; margin-block-end: 8px !important; }

.al-post .wp-block-post-content ul.al-facts { border-top: 1px solid var(--al-hairline); list-style: none; padding: 0; }
.al-facts li { border-bottom: 1px solid var(--al-hairline); display: grid; gap: 4px 16px; grid-template-columns: 64px minmax(0, 1fr); margin: 0 !important; padding-block: 12px; }
.al-facts__label { color: var(--al-mute); font-size: .8125rem; font-weight: 600; line-height: 1.85rem; white-space: nowrap; }
.al-facts__text { font-size: 1rem; line-height: 1.8; min-width: 0; overflow-wrap: anywhere; }

.al-post .wp-block-post-content figure { margin: 32px 0; }
.al-post .wp-block-post-content figure img { border-radius: var(--al-r-xs); display: block; height: auto; margin: 0; max-width: 100%; width: 100%; }
.al-post figcaption { color: var(--al-mute); font-size: .75rem; line-height: 1.5; margin-top: 10px; text-align: left; }
.al-post figcaption em, .al-post-lead figcaption em { font-style: normal; }

.al-post-end { margin-top: 64px; }
.al-post-nav { border-top: 1px solid var(--al-ink); display: grid; gap: 24px; grid-template-columns: 1fr 1fr; margin-block-end: 40px; padding-top: 16px; }
.al-post-nav__item { color: var(--al-ink); display: grid; gap: 6px; text-decoration: none; }
.al-post-nav__item span { color: var(--al-mute); font-size: .75rem; }
.al-post-nav__item strong { font-size: 1rem; font-weight: 600; line-height: 1.4; }
.al-post-nav__item:hover strong { color: var(--al-accent-ink); }
.al-post-nav__item--next { text-align: right; }
.al-post-end .al-article__back { border-top: 1px solid var(--al-hairline); margin-top: 0; padding-top: 20px; }
.al-post-end .al-article__back p { margin: 0; }

@media (max-width: 680px) {
  .al-post-head__title { font-size: 1.625rem; }
  .al-post .wp-block-post-content { font-size: 1rem !important; line-height: 1.8; }
  .al-post-lead { margin-inline: calc(-1 * var(--al-gutter)); }
  .al-post-lead__media { border-radius: 0; }
  .al-post-lead figcaption { padding-inline: var(--al-gutter); }
  .al-summary { padding: 18px; }
  .al-summary p + p { font-size: .9375rem; line-height: 1.75; }
  .al-facts li { grid-template-columns: 1fr; gap: 2px; }
  .al-facts__label { line-height: 1.5; }
  .al-post-nav { grid-template-columns: 1fr; gap: 16px; }
  .al-post-nav__item--next { text-align: left; }
}

/* ===========================================================================
   23. POST CODE BLOCKS (copy button: assets/js/code-copy.js)
   =========================================================================== */
.al-post .wp-block-post-content pre { background: var(--al-surface); border: 1px solid var(--al-hairline); border-radius: var(--al-r-sm); box-sizing: border-box; color: var(--al-ink); font-family: var(--al-mono); font-size: .875rem; line-height: 1.7; margin-block: 0 1.5em; max-width: 100%; overflow-wrap: anywhere; padding: 16px 18px; white-space: pre-wrap; word-break: keep-all; }
.al-post .wp-block-post-content pre code { background: none; border: 0; color: inherit; display: block; font-size: inherit; padding: 0; white-space: inherit; }
.al-post .wp-block-post-content .al-code { margin-block: 0 1.5em; position: relative; }
.al-post .wp-block-post-content .al-code pre { margin: 0; padding-block-start: 52px; }
.al-code__copy { background: var(--al-canvas); border: 1px solid var(--al-hairline); border-radius: var(--al-r-xs); color: var(--al-ink); cursor: pointer; font-size: .75rem; inset-block-start: 8px; inset-inline-end: 8px; line-height: 1; min-height: 32px; min-width: 56px; padding: 0 12px; position: absolute; }
.al-code__copy:hover { color: var(--al-accent-ink); }
