/* LEARN -> USE CASES (js/learn-usecases.js). Simon, 16 Oct 2026. The
   page's own tokens (--card, --border, --accent, --text, --text-faint), the
   same radii and type as Principles. */
#learn-page.ln-uc .ln-drophint, #learn-page.ln-uc .ln-tools .ln-hbtn:not(.ln-sharebtn) { display: none; }
/* IT SCROLLS. Simon, 20 Oct 2026: "Make it so the use cases section of the
   learn section you can scroll in." The body is a flex row sized to the page
   (37b), and Principles and Manual scroll inside their own reading column --
   Use cases has no column of its own, so the body itself scrolls here; the
   filter bar stays put at its top (sticky). */
#learn-page.ln-uc .lp-body { display: block; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
.uc { display: flex; flex-direction: column; gap: 18px; padding-bottom: 28px; }

/* the recipe */
.uc-recipe { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; padding: 20px 22px; border: 1px solid var(--border);
  border-radius: 8px; background: linear-gradient(135deg, rgba(229, 10, 78, .10), rgba(229, 10, 78, 0) 55%), var(--card); }
@media (max-width: 1099.98px) { .uc-recipe { grid-template-columns: 1fr; } }
.uc-kicker { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
#learn-page .uc-recipe h2 { font-size: 24px; font-weight: 800; color: #fff; margin: 0 0 8px; text-transform: none; letter-spacing: -.01em; line-height: 1.2; }
.uc-recipe p { margin: 0 0 14px; font-size: 13.5px; line-height: 1.6; color: var(--text); max-width: 62ch; }
.uc-rsteps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: ucr; }
.uc-rsteps li { counter-increment: ucr; display: grid; grid-template-columns: 26px 1fr; column-gap: 10px; align-items: baseline; font-size: 13px; line-height: 1.5; }
.uc-rsteps li::before { content: counter(ucr); grid-row: span 2; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff;
  font-size: 11.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; align-self: start; }
.uc-rsteps b { color: #fff; font-weight: 700; }
.uc-rsteps span { color: var(--text-faint); }

/* prompt boxes */
.uc-pbox { border: 1px solid var(--border); border-radius: 6px; background: var(--surface-sunk, #0e0e10); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.uc-phead { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 8px 7px 12px; border-bottom: 1px solid var(--border);
  font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }
.uc-pbox pre { margin: 0; padding: 12px; white-space: pre-wrap; word-break: break-word; font: 12.5px/1.6 'JetBrains Mono', ui-monospace, Consolas, monospace;
  color: var(--text); max-height: 300px; overflow-y: auto; }
.uc-rprompt pre { max-height: none; }
.uc-pnote { padding: 0 12px 10px; font-size: 11.5px; color: var(--text-faint); }
.uc-copy { display: inline-flex; align-items: center; gap: 5px; font: inherit; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: none;
  padding: 4px 9px; border-radius: 4px; border: 1px solid var(--border); background: var(--card-hover, #19191c); color: var(--text); cursor: pointer; }
.uc-copy svg { width: 13px; height: 13px; }
.uc-copy:hover { border-color: var(--accent); color: #fff; }
.uc-copy.ok { background: var(--accent); border-color: var(--accent); color: #fff; }

/* filters */
.uc-bar { position: sticky; top: 0; z-index: 2; padding: 4px 0; background: var(--bg, #0b0b0d); }
.uc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.uc-chip { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 12px; font-weight: 600; padding: 6px 11px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; white-space: nowrap; }
.uc-chip b { font-size: 10.5px; font-weight: 700; color: var(--text-faint); }
.uc-chip:hover { border-color: var(--text-faint); }
.uc-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.uc-chip.on b { color: rgba(255, 255, 255, .8); }

/* the cards */
.uc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.uc-card { display: flex; flex-direction: column; text-align: left; font: inherit; color: var(--text); padding: 0 0 12px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--card); cursor: pointer; overflow: hidden; transition: border-color .15s, transform .15s; }
.uc-card:hover { border-color: rgba(229, 10, 78, .6); transform: translateY(-1px); }
.uc-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.uc-thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.uc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .92; transition: opacity .15s; }
.uc-card:hover .uc-thumb img { opacity: 1; }
.uc-play { position: absolute; left: 50%; top: 50%; width: 42px; height: 42px; margin: -21px 0 0 -21px; border-radius: 50%; background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; color: #fff; transition: background .15s; }
.uc-play svg { width: 16px; height: 16px; margin-left: 2px; }
.uc-card:hover .uc-play { background: var(--accent); }
.uc-cat { position: absolute; left: 8px; top: 8px; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 7px;
  border-radius: 4px; background: rgba(0, 0, 0, .65); color: #fff; }
.uc-novid { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 12px; font-size: 12px; color: var(--text-faint);
  background: repeating-linear-gradient(45deg, #111114 0 10px, #141418 10px 20px); }
.uc-novid.big { position: static; flex-direction: column; gap: 10px; aspect-ratio: 16 / 9; border-radius: 6px; font-size: 13px; }
.uc-ct { display: block; padding: 11px 13px 4px; font-size: 14.5px; font-weight: 700; color: #fff; line-height: 1.3; }
.uc-cg { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; padding: 0 13px; font-size: 12.5px; line-height: 1.5; color: var(--text-faint); }
.uc-cm { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: auto; padding: 10px 13px 0; }
.uc-tags { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.uc-tags i { font-style: normal; font-size: 10.5px; font-weight: 600; padding: 2px 6px; border-radius: 4px; background: var(--card-hover, #19191c); border: 1px solid var(--border); color: var(--text); white-space: nowrap; }
.uc-tags i.uc-hasp { border-color: rgba(229, 10, 78, .55); color: #fff; }
.uc-by { flex: none; font-size: 11px; color: var(--text-faint); }
.uc-none { padding: 30px; text-align: center; color: var(--text-faint); }
.uc-foot { font-size: 11.5px; color: var(--text-faint); }

.uc-link { display: inline-flex; align-items: center; gap: 4px; font: inherit; padding: 0; border: 0; background: none; color: var(--text); text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, .25); text-underline-offset: 2px; cursor: pointer; }
.uc-link svg { width: 12px; height: 12px; }
.uc-link:hover { color: #fff; text-decoration-color: var(--accent); }

/* the detail */
.uc-ov { position: fixed; inset: 0; z-index: 20000; background: rgba(0, 0, 0, .72); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 24px; }
.uc-ov[hidden] { display: none; }
.uc-dlg { width: min(1240px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 10px;
  background: var(--card); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); overflow: hidden; }
.uc-dtop { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--border); }
.uc-dcase { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }
.uc-dnav { display: flex; gap: 4px; }
.uc-ib { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 5px; border: 1px solid var(--border); background: var(--card-hover, #19191c); color: var(--text); cursor: pointer; padding: 0; }
.uc-ib svg { width: 15px; height: 15px; }
.uc-ib:hover:not(:disabled) { border-color: var(--text-faint); color: #fff; }
.uc-ib:disabled { opacity: .35; cursor: default; }
.uc-dbody { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr); gap: 20px; padding: 18px; overflow-y: auto; min-height: 0; }
@media (max-width: 899.98px) { .uc-dbody { grid-template-columns: 1fr; } }
.uc-dmedia { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.uc-video { width: 100%; max-height: 66vh; border-radius: 6px; background: #000; display: block; }
.uc-vfail { padding: 14px; border: 1px dashed var(--border); border-radius: 6px; font-size: 13px; color: var(--text-faint); }
.uc-imgs { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.uc-imgs .uc-lab { width: 100%; margin: 0; }
.uc-img { padding: 0; border: 1px solid var(--border); border-radius: 6px; background: #000; cursor: zoom-in; overflow: hidden; }
.uc-img img { display: block; height: 150px; width: auto; max-width: 100%; }
.uc-img:hover { border-color: var(--accent); }
.uc-dtext { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
#learn-page .uc-dtext h2 { font-size: 22px; font-weight: 800; color: #fff; margin: 0; text-transform: none; letter-spacing: -.01em; line-height: 1.2; }
.uc-dby { font-size: 12px; color: var(--text-faint); }
.uc-dgist { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text); }
.uc-lab { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); margin-top: 4px; }
.uc-ins { display: flex; flex-wrap: wrap; gap: 6px; }
.uc-ins span { font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 5px; background: var(--card-hover, #19191c); border: 1px solid var(--border); color: var(--text); }
.uc-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 13px; line-height: 1.55; color: var(--text); }
.uc-steps li::marker { color: var(--accent); font-weight: 700; }
.uc-incovert, .uc-tip { display: grid; grid-template-columns: 18px 1fr; gap: 10px; padding: 10px 12px; border-radius: 6px; font-size: 13px; line-height: 1.55; color: var(--text); }
.uc-incovert { background: rgba(229, 10, 78, .08); border: 1px solid rgba(229, 10, 78, .35); }
.uc-tip { background: rgba(255, 211, 90, .07); border: 1px solid rgba(255, 211, 90, .35); }
.uc-incovert svg, .uc-tip svg { width: 18px; height: 18px; margin-top: 1px; }
.uc-incovert svg { color: var(--accent); }
.uc-tip svg { color: #ffd35a; }
.uc-incovert b, .uc-tip b { display: block; color: #fff; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 2px; }
.uc-big { position: fixed; inset: 0; z-index: 20001; background: rgba(0, 0, 0, .88); display: flex; align-items: center; justify-content: center; padding: 30px; cursor: zoom-out; }
.uc-big img { max-width: 100%; max-height: 100%; border-radius: 6px; }
