/* =============================================================
   Learn Venice — guides stylesheet
   Lesson/guide detail pages, guide cards, track-page helpers, and
   the "From the Commons" forum cross-link module. Brand tokens
   come from base.css / site.css (Midnight ground, Canela + Aeonik,
   Venetian Blue accent only, Sea/Stucco for callouts).
   ============================================================= */

/* ---------------- Segment hero (track + guide pages) ---------------- */
.seg-hero { padding: 46px 0 18px; }
.seg-hero .eyebrow {
  font-size: 12.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--stucco); font-weight: 400; margin-bottom: 14px;
}
.seg-hero h1 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(34px, 5.2vw, 58px); line-height: 1.02;
  letter-spacing: -0.015em; margin: 0 0 16px; max-width: 20ch;
}
.seg-hero h1 em { font-style: italic; color: var(--sea-light); }
.seg-hero p { font-size: 18px; color: var(--ink-dim); max-width: 60ch; margin: 0; }
.seg-hero .hero-cta { margin-top: 26px; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; font-size: 15px; font-weight: 400;
  cursor: pointer; border: 1px solid transparent; font-family: var(--sans);
}
.btn-primary { background: var(--venetian-deep); color: var(--on-accent); }
.btn-primary:hover { background: var(--venetian); color: var(--on-accent); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--venetian); background: rgba(60,143,221,0.08); color: var(--ink); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------------- Lesson/guide content body ---------------- */
.section.lesson { max-width: 760px; }
.lesson h2 {
  font-family: var(--display); font-weight: 400; font-size: 27px;
  letter-spacing: -0.01em; margin: 44px 0 14px; padding-top: 6px; line-height: 1.12;
}
.lesson h3 { font-family: var(--display); font-weight: 400; font-size: 21px; margin: 30px 0 10px; }
.lesson h4 {
  font-size: 12.5px; margin: 24px 0 8px; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--stucco); font-weight: 400;
}
.lesson p { margin: 0 0 15px; color: var(--ink-dim); }
.lesson ul, .lesson ol { margin: 0 0 16px; padding-left: 22px; color: var(--ink-dim); }
.lesson li { margin: 6px 0; }
.lesson li::marker { color: var(--venetian); }
.lesson strong { color: var(--ink); font-weight: 400; }
.lesson a { color: var(--venetian); }
.lesson a:hover { color: var(--sea-light); }
.lesson hr { border: none; border-top: 1px solid var(--border); margin: 36px 0; }
.lesson blockquote {
  margin: 0 0 16px; padding: 4px 18px; border-left: 3px solid var(--stucco);
  color: var(--ink-dim); font-style: italic;
}

/* code */
.lesson code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em; background: var(--surface-2); padding: 2px 6px;
  border-radius: 5px; border: 1px solid var(--border); color: var(--ink);
}
.lesson pre {
  background: var(--sea-dark); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; overflow-x: auto; margin: 0 0 18px;
}
.lesson pre code { background: none; border: none; padding: 0; font-size: 13.5px; line-height: 1.6; color: var(--ink); white-space: pre; }

/* "What you'll learn" panel */
.l-learn {
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--mid-sea);
  border-radius: var(--radius); padding: 18px 20px; margin: 0 0 26px;
}
.l-learn-t { font-family: var(--display); font-weight: 400; font-size: 17px; margin-bottom: 8px; color: var(--ink); }
.l-learn ul { margin: 0; padding-left: 20px; color: var(--ink-dim); }
.l-learn li { margin: 5px 0; }

/* source / attribution */
.l-source { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--border); }
.l-source p { font-size: 13.5px; color: var(--ink-faint); margin: 0; }

/* ---------------- Callouts (reference guides) ---------------- */
.callout { border: 1px solid var(--border); border-left: 3px solid var(--mid-sea); border-radius: var(--radius); padding: 16px 18px; margin: 0 0 18px; background: var(--surface); }
.callout p { color: var(--ink-dim); }
.callout p:last-child { margin-bottom: 0; }
.callout-title { font-family: var(--display); font-weight: 400; font-size: 17px; margin-bottom: 5px; color: var(--ink); }
.callout.info, .callout.tip { border-left-color: var(--mid-sea); }
.callout.warn, .callout.danger, .callout.consent { border-left-color: var(--stucco); }
.callout.consent { background: linear-gradient(180deg, rgba(190,169,137,0.09), rgba(190,169,137,0)), var(--surface); }
.callout.danger .callout-title, .callout.consent .callout-title, .callout.warn .callout-title { color: var(--stucco); }

/* ---------------- YouTube facade (click-to-play, blurred frame-grab poster) ----------------
   A blurred poster sits behind a brand scrim + centered overlay: play button,
   bold timecode (the focal label), and a quiet section heading beneath it.
   embed.js adds .yt-live on click, which hides the poster + overlay and shows
   the youtube-nocookie iframe. Without the poster it falls back to the gradient. */
.yt-facade {
  position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9;
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
  cursor: pointer; text-decoration: none; margin: 0 0 16px;
  background: radial-gradient(120% 120% at 50% 0%, var(--surface-2) 0%, var(--surface) 45%, var(--midnight) 100%);
}
.yt-facade:hover { border-color: var(--venetian); text-decoration: none; }
/* blurred frame-grab layer (scaled up so blurred edges never show) — light blur
   so the actual frame is recognizable behind the overlay */
.yt-bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(7px) saturate(1.08); transform: scale(1.1); }
/* center vignette + scrim so white overlay text stays legible on any frame/theme */
.yt-facade::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; transition: opacity .15s ease;
  background: radial-gradient(82% 82% at 50% 48%, rgba(8,14,20,.42) 0%, rgba(8,14,20,.54) 62%, rgba(8,14,20,.72) 100%);
}
.yt-facade:hover::before { opacity: .88; }
.yt-overlay { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 14px; text-align: center; max-width: 100%; }
.yt-play {
  width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center; background: var(--venetian); color: #fff;
  transition: transform .15s ease, background .15s ease; box-shadow: 0 6px 24px rgba(0,0,0,.45);
}
.yt-facade:hover .yt-play { transform: scale(1.07); background: var(--venetian-deep); }
.yt-play svg { width: 24px; height: 24px; margin-left: 3px; }
/* the timecode is the focal "title" of the thumbnail */
.yt-time { margin-top: 2px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: .01em; line-height: 1.1; font-size: clamp(18px, 3.4vw, 24px); text-shadow: 0 1px 2px rgba(0,0,0,.6), 0 2px 14px rgba(0,0,0,.55); }
/* the section heading repeated quietly, as a description of the timecode */
.yt-sub { font-size: 12.5px; font-weight: 400; color: rgba(255,255,255,.86); line-height: 1.3; max-width: 30ch; text-shadow: 0 1px 2px rgba(0,0,0,.7), 0 1px 10px rgba(0,0,0,.6); }
.yt-facade.lesson-hero { margin: 6px 0 24px; }
.yt-facade.lesson-hero .yt-time { font-size: clamp(15px, 2.4vw, 18px); font-weight: 600; }
.yt-facade.yt-live { cursor: default; background: #000; }
.yt-facade.yt-live .yt-overlay, .yt-facade.yt-live .yt-bg, .yt-facade.yt-live::before { display: none; }
.yt-facade iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lesson-clip { margin: 8px 0 16px; max-width: 680px; }

/* ---------------- Guide cards (grids on home, tracks, index) ---------------- */
.tut-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.tut-card {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 22px 20px;
  color: var(--ink); transition: border-color .18s, transform .18s, background .18s;
}
.tut-card:hover { border-color: var(--venetian); transform: translateY(-2px); background: var(--surface-2); color: var(--ink); }
.tut-meta { font-size: 12px; letter-spacing: 0.04em; color: var(--ink-faint); margin-bottom: 10px; }
.tut-card h3 { font-family: var(--display); font-weight: 400; font-size: 19px; line-height: 1.2; margin: 0 0 8px; letter-spacing: -0.01em; }
.tut-card p { margin: 0; font-size: 14px; color: var(--ink-dim); }
.tut-card .tut-go { margin-top: auto; padding-top: 14px; font-size: 13.5px; color: var(--venetian); }

/* ---------------- Track landing helpers ---------------- */
.ref-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ref-list li { margin: 0; }
.ref-list a {
  display: flex; align-items: baseline; gap: 12px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; color: var(--ink);
}
.ref-list a:hover { border-color: var(--venetian); background: var(--surface-2); color: var(--ink); }
.ref-list b { font-weight: 400; flex: none; }
.ref-list span { color: var(--ink-dim); font-size: 14px; }

/* ---------------- Page prev/next ---------------- */
.page-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 50px; padding-top: 24px; border-top: 1px solid var(--border); }
.page-nav a { display: block; padding: 14px 18px; border: 1px solid var(--border); border-radius: 10px; flex: 1; color: var(--ink); }
.page-nav a:hover { border-color: var(--venetian); }
.page-nav .lbl { font-size: 12px; color: var(--ink-faint); }
.page-nav .ttl { font-weight: 400; }
.page-nav .next { text-align: right; }

/* ---------------- "From the Commons" forum cross-link module ---------------- */
.commons-rel {
  margin: 40px 0 8px; background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: 24px 24px 20px; position: relative; overflow: hidden;
}
.commons-rel .cr-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.commons-rel .cr-k { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--stucco); }
.commons-rel h3 { font-family: var(--display); font-weight: 400; font-size: 22px; margin: 0; letter-spacing: -0.01em; }
.commons-rel .cr-ask { margin-left: auto; }
.cr-list { list-style: none; margin: 0; padding: 0; }
.cr-post { display: grid; grid-template-columns: 46px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--border); }
.cr-post:first-child { border-top: none; }
.cr-vote { display: flex; flex-direction: column; align-items: center; gap: 1px; padding-top: 2px; color: var(--ink-faint); }
.cr-vote .n { font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.cr-vote .l { font-size: 10px; }
.cr-body .cr-tags { display: flex; gap: 8px; align-items: center; margin-bottom: 5px; flex-wrap: wrap; }
.cr-t { font-size: 10.5px; letter-spacing: 0.05em; text-transform: uppercase; border-radius: 999px; padding: 2px 9px; }
.cr-t.q { color: var(--sea-light); border: 1px solid var(--mid-sea); background: rgba(41,82,108,0.25); }
.cr-t.show { color: var(--venetian); border: 1px solid var(--venetian-deep); }
.cr-t.req { color: var(--ink-dim); border: 1px solid var(--border); }
.cr-answered { display: inline-flex; align-items: center; gap: 4px; color: #6fc28b; font-size: 11.5px; }
.cr-answered svg { width: 12px; height: 12px; }
.cr-body h4 { margin: 0 0 3px; font-family: var(--display); font-weight: 400; font-size: 16.5px; line-height: 1.25; }
.cr-body h4 a { color: var(--ink); }
.cr-body h4 a:hover { color: var(--sea-light); }
.cr-body .cr-meta { font-size: 12.5px; color: var(--ink-faint); }

/* ===============================================================
   Reference guide pages (video/guides/*) — .content article body
   on the shared brand shell (no sidebar). Brand tokens throughout.
   =============================================================== */
.content { max-width: 860px; margin: 0 auto; padding: 36px 28px 96px; }
.content .breadcrumb { display: none; }
.content h1 { font-family: var(--display); font-weight: 400; font-size: clamp(34px, 5vw, 54px); line-height: 1.04; letter-spacing: -0.015em; margin: 8px 0 16px; }
.content h2 { font-family: var(--display); font-weight: 400; font-size: 28px; letter-spacing: -0.01em; margin: 46px 0 14px; }
.content h3 { font-family: var(--display); font-weight: 400; font-size: 21px; margin: 30px 0 10px; }
.content h4 { font-size: 12.5px; margin: 24px 0 8px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--stucco); font-weight: 400; }
.content p { margin: 0 0 14px; color: var(--ink-dim); }
.content ul, .content ol { margin: 0 0 16px; padding-left: 22px; color: var(--ink-dim); }
.content li { margin: 5px 0; }
.content li::marker { color: var(--venetian); }
.content strong { color: var(--ink); font-weight: 400; }
.content a { color: var(--venetian); }
.content a:hover { color: var(--sea-light); }
.content hr { border: none; border-top: 1px solid var(--border); margin: 36px 0; }
.content p.lead { font-size: 19px; line-height: 1.6; color: var(--ink-dim); margin: 0 0 26px; max-width: 70ch; }
.content .eyebrow { color: var(--venetian); font-size: 12px; font-weight: 400; text-transform: uppercase; letter-spacing: 0.16em; margin-bottom: 12px; }
.content code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.86em; background: var(--surface-2); padding: 2px 6px; border-radius: 5px; border: 1px solid var(--border); color: var(--ink); }
.content pre { background: var(--sea-dark); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; overflow-x: auto; margin: 0 0 18px; }
.content pre code { background: none; border: none; padding: 0; font-size: 13.5px; line-height: 1.6; color: var(--ink); white-space: pre; }

/* prompt block */
.prompt { background: var(--sea-dark); border: 1px solid var(--border-strong); border-left: 3px solid var(--stucco); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 18px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13.5px; line-height: 1.6; color: var(--ink-dim); white-space: pre-wrap; }
.prompt-label { display: block; font-family: var(--sans); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--stucco); margin-bottom: 8px; }

/* spec grid */
.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0 0 24px; }
.spec { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.spec .k { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--stucco); margin-bottom: 4px; }
.spec .v { font-size: 15px; color: var(--ink); }

/* pills */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 3px 11px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--ink-dim); background: var(--surface); margin: 0 6px 6px 0; }
.pill.green { color: var(--sea-light); border-color: var(--mid-sea); }
.pill.red, .pill.yellow { color: var(--stucco); border-color: var(--stucco-dim); }
.pill.blue { color: var(--venetian); border-color: rgba(60,143,221,0.4); }

/* use-case row */
.uc { display: grid; grid-template-columns: 130px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.uc:last-child { border-bottom: none; }
.uc .mode { font-weight: 400; color: var(--venetian); font-size: 14px; }
.uc .mode small { display: block; color: var(--ink-faint); font-size: 12px; }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--border); border-radius: var(--radius); }
.content table { border-collapse: collapse; width: 100%; font-size: 14px; }
.content th, .content td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.content th { background: var(--surface); font-weight: 400; color: var(--stucco); white-space: nowrap; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; }
.content tr:last-child td { border-bottom: none; }
.content td .yes { color: var(--sea-light); } .content td .no { color: var(--ink-faint); } .content td .partial { color: var(--stucco); }

/* video embeds */
.video { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-single { margin: 0 0 10px; }
.vcaption { font-size: 13.5px; color: var(--ink-dim); margin: 0 0 22px; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin: 6px 0 28px; }
.vcard { margin: 0; }
.vcard figcaption { font-size: 14.5px; color: var(--ink); margin-top: 10px; line-height: 1.35; }
.vcard .vmeta { font-size: 12.5px; color: var(--ink-faint); margin-top: 3px; }

/* decision / model cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin: 8px 0 28px; }
.card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; color: var(--ink); transition: border-color .18s, transform .18s, background .18s; }
.card:hover { border-color: var(--venetian); transform: translateY(-2px); background: var(--surface-2); color: var(--ink); }
.card .ct { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.card .ce { display: none; }
.card h3 { font-family: var(--display); font-weight: 400; margin: 0; font-size: 20px; }
.card p { font-size: 14px; color: var(--ink-dim); margin: 0 0 12px; }
.card .best { font-size: 12.5px; color: var(--ink-faint); border-top: 1px solid var(--border); padding-top: 12px; }
.card .best b { color: var(--sea-light); font-weight: 400; }

/* docs handoff + site foot note */
.docs-handoff { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; border: 1px solid var(--border-strong); border-left: 3px solid var(--venetian); border-radius: var(--radius); padding: 16px 18px; margin: 30px 0 8px; background: linear-gradient(180deg, rgba(60,143,221,0.08), rgba(60,143,221,0)), var(--surface); }
.docs-handoff .dh-ic { width: 34px; height: 34px; border-radius: 9px; flex: none; display: grid; place-items: center; color: var(--venetian); border: 1px solid rgba(60,143,221,0.35); }
.docs-handoff .dh-tx { flex: 1; min-width: 220px; }
.docs-handoff .dh-tx b { display: block; font-size: 15px; color: var(--ink); font-weight: 400; }
.docs-handoff .dh-tx span { font-size: 13.5px; color: var(--ink-dim); }
.docs-handoff .dh-act { font-size: 14px; color: var(--venetian); white-space: nowrap; }
.site-foot { color: var(--ink-faint); font-size: 13px; margin-top: 40px; }

/* ---------------- Responsive ---------------- */
@media (max-width: 820px) {
  .seg-hero { padding: 34px 0 14px; }
  .commons-rel .cr-ask { margin-left: 0; }
  .content { padding: 24px 20px 80px; }
}
