/* Mariano's tweaks on top of Codex (loaded after themes/codex.css):
   - kill the spinning ornamental asterisk on tiles
   - add a Gallery-style hover line that travels across the top of tiles
   - float the video cards (thumbnail + text, no surrounding box)
   - never show an empty/blank tile */

/* remove the rotating asterisk seal */
.tile::before{ content:none !important; }
.tile:hover::before{ transform:none !important; }

/* hover line across the top of tiles + person cards */
.tile, .pcard{ position:relative; overflow:hidden; }
.tile::after, .pcard::after{
  content:""; position:absolute; left:0; top:0; height:2px; width:0;
  background:var(--gilt, #c08a3a); transition:width .3s ease;
}
.tile:hover::after, .pcard:hover::after{ width:100%; }
.tile:empty{ display:none; }

/* floating video cards — no box, just the framed thumbnail + text in space (like Gallery) */
.vcard{ background:none !important; border:none !important; box-shadow:none !important; padding:0 !important; }
.vcard:hover{ background:none !important; }
.thumb{ border:1px solid var(--rule, #262626) !important; border-radius:3px; }
.vcard:hover .thumb{ border-color:var(--gilt, #c08a3a) !important; }
.vcard .vt, .vcard .vm{ padding:0 1px; background:none !important; border:none !important; }
.badge.dead{ color:#cf9b8b !important; border-color:rgba(207,155,139,.35) !important; }
.badge.ship{ color:#9ec8a6 !important; border-color:rgba(124,196,160,.4) !important; }
/* transcript button + reading modal */
.txbtn{ margin-top:8px; align-self:flex-start; background:none; border:1px solid rgba(176,160,130,.42); color:#cdc9c0;
  font-size:11px; padding:3px 10px; border-radius:3px; cursor:pointer; letter-spacing:.04em; transition:color .14s, border-color .14s, background .14s; }
.txbtn:hover{ border-color:#d6b15e; color:#f4efe4; background:rgba(192,138,58,.14); }
.txmodal{ display:none; position:fixed; inset:0; background:rgba(0,0,0,.74); z-index:60; align-items:center; justify-content:center; padding:24px; }
.txbox{ position:relative; background:#0e0e0e; border:1px solid var(--rule,#2a2a2a); border-radius:6px; max-width:760px; width:100%; max-height:84vh; overflow:auto; padding:28px 32px; }
.txclose{ position:absolute; top:8px; right:14px; background:none; border:none; color:var(--ink-2,#9b988f); font-size:26px; line-height:1; cursor:pointer; }
.txclose:hover{ color:var(--ink,#d8d4cb); }
.txhead{ font-size:11.5px; color:var(--ink-3,#6e6b65); margin-bottom:16px; letter-spacing:.05em; text-transform:uppercase; padding-right:24px; }
.txhead a{ color:var(--gilt,#c08a3a); text-decoration:none; margin-left:8px; }
.txbody{ white-space:pre-wrap; line-height:1.7; color:var(--ink,#d8d4cb); font-size:14.5px; }
/* dark scrollbars everywhere — never white (page window, sidebar, modal, any overflow) */
html{ color-scheme:dark; }
*{ scrollbar-width:thin; scrollbar-color:#2e2c28 #0e0e0e; }
::-webkit-scrollbar{ width:12px; height:12px; }
::-webkit-scrollbar-track{ background:#0e0e0e; }
::-webkit-scrollbar-thumb{ background:#2e2c28; border-radius:6px; border:2px solid #0e0e0e; }
::-webkit-scrollbar-thumb:hover{ background:#4a463f; }
::-webkit-scrollbar-corner{ background:#0e0e0e; }
/* timestamped transcript segments + favorite badge */
.txbody.ts{ white-space:normal; }
.txseg{ display:flex; gap:12px; margin:0 0 11px; align-items:baseline; }
.txjump{ flex:none; min-width:40px; text-align:right; background:none; border:none; padding:0; cursor:pointer; color:var(--gilt,#c08a3a); font:12px/1.5 ui-monospace,Menlo,Consolas,monospace; }
.txjump:hover{ text-decoration:underline; }
.txseg span{ color:var(--ink,#d8d4cb); }
.badge.fav{ color:#e6c06a !important; border-color:rgba(230,192,106,.45) !important; }
/* drag-to-recategorize (editor mode only) */
.vcard[draggable="true"]{ cursor:grab; }
.vcard[draggable="true"]:active{ cursor:grabbing; }
.subbtn.drop{ outline:1px dashed var(--gilt,#c08a3a); background:rgba(192,138,58,.16) !important; color:var(--gilt,#c08a3a) !important; }
.ednote{ font-size:12px; color:var(--gilt,#c08a3a); border:1px solid rgba(192,138,58,.3); border-radius:4px; padding:7px 11px; margin:0 0 12px; }
/* kill the stray decorative open-quote glyph on the search box */
.search::before{ content:none !important; }
.search input{ padding-left:13px !important; }
/* floating trash target — appears only while dragging a video (editor mode), like holding an app icon */
.trashbar{ display:none; position:fixed; left:50%; bottom:26px; transform:translateX(-50%); z-index:70; align-items:center; gap:8px;
  background:#1a1010; border:1px dashed #cf6b6b; color:#e0a99b; border-radius:8px; padding:12px 24px; font-size:13px; box-shadow:0 8px 28px rgba(0,0,0,.55); }
.trashbar.show{ display:flex; }
.trashbar.drop{ background:rgba(207,107,107,.28); border-style:solid; color:#f2ccc1; }
/* transcript search matches — thumbnail + title + jump-to-timestamp button */
.txmatches{ display:flex; flex-direction:column; gap:18px; }
.txmatch{ display:flex; gap:14px; align-items:flex-start; }
.txmatch .txthumb{ flex:none; position:relative; width:150px; height:84px; border:1px solid var(--rule,#262626); border-radius:4px; overflow:hidden; background:#0e0e0e; display:block; }
.txmatch .txthumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.txmatch.logo .txthumb img{ object-fit:contain; padding:14%; }
.txmatch .txplay{ position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); color:#fff; opacity:.92; font-size:22px; text-shadow:0 1px 5px rgba(0,0,0,.7); }
.txmatch .txbody{ flex:1; min-width:0; }
.txmatch-h a{ color:var(--ink,#d8d4cb); text-decoration:none; font-weight:600; font-size:14.5px; }
.txmatch-h a:hover{ color:var(--gilt,#c08a3a); }
.txmatch-seg{ margin:8px 0; font-size:13.5px; }
.txmatch-seg .txq{ display:block; color:#e9e5db; line-height:1.6; margin-bottom:4px; }
.txmatch-seg mark{ background:rgba(192,138,58,.32); color:var(--ink,#d8d4cb); padding:0 2px; border-radius:2px; }
.txjumpbtn{ display:inline-block; white-space:nowrap; color:var(--gilt,#c08a3a); border:1px solid rgba(192,138,58,.45); border-radius:4px; padding:2px 10px; font-size:12px; text-decoration:none; }
.txjumpbtn:hover{ background:rgba(192,138,58,.16); }
/* thumbnails on cards (book covers, site logos, faces, the legal map) */
.card.haspic{ display:flex; gap:13px; align-items:flex-start; }
.card.haspic .cimg{ flex:none; width:54px; height:54px; border-radius:4px; object-fit:cover; background:#0e0e0e; border:1px solid var(--rule,#262626); }
.card.haspic.book .cimg{ width:46px; height:66px; object-fit:contain; }
.card.haspic .cbody{ flex:1; min-width:0; }
.pcard .pface{ width:46px; height:46px; border-radius:50%; object-fit:cover; background:#0e0e0e; border:1px solid var(--rule,#262626); margin-bottom:8px; }
/* logo/avatar thumbnails: show the whole mark, centered on dark (not cropped) */
.vcard.logo .thumb{ background:#0e0e0e !important; }
.vcard.logo .thumb img{ object-fit:contain !important; padding:16% !important; }
/* drop-open sub-filters in the sidebar */
.subnav{ margin:1px 0 10px 12px; padding-left:11px; border-left:1px solid var(--rule,#262626); }
.subbtn{ display:flex; justify-content:space-between; gap:8px; width:100%; text-align:left;
  background:none; border:none; color:var(--ink-2,#9b988f); padding:5px 8px; font-size:12px; line-height:1.3; cursor:pointer; }
.subbtn:hover{ color:var(--ink,#d8d4cb); }
.subbtn.on{ color:var(--gilt,#c08a3a); }
.subbtn .n{ color:var(--ink-3,#6e6b65); }
/* editor: rename pencil per category + add-category button */
.subbtn .subr{ display:inline-flex; align-items:center; gap:7px; }
.subbtn .catren{ flex:none; opacity:0; color:var(--ink-3,#6e6b65); font-size:11px; cursor:pointer; transition:opacity .12s, color .12s; }
.subbtn:hover .catren{ opacity:.75; }
.subbtn .catren:hover{ opacity:1; color:var(--gilt,#c08a3a); }
.subbtn.addcat{ color:var(--gilt,#c08a3a); opacity:.8; }
.subbtn.addcat:hover{ opacity:1; }
/* sidebar collection icons — a little glyph slides in on hover (person, book, salvia leaf, mic...) */
.side .collbtn{ align-items:center; }
.side .collbtn .clabel{ flex:1; }
.side .collbtn .cicon{ display:inline-flex; align-items:center; justify-content:center; width:0; opacity:0; overflow:hidden;
  transform:translateX(-5px); color:var(--gilt,#c08a3a); transition:width .2s ease, opacity .2s ease, transform .2s ease; }
.side .collbtn .cicon svg{ width:15px; height:15px; display:block; }
.side .collbtn:hover .cicon, .side .collbtn.on .cicon{ width:22px; opacity:1; transform:translateX(0); }
/* category glyph on collection / field tiles - gilt, top-right, brightens on hover */
.tile .ticon{ position:absolute; top:15px; right:15px; display:inline-flex; align-items:center; justify-content:center;
  color:var(--gilt,#c08a3a); opacity:.42; pointer-events:none; transition:opacity .18s ease, transform .18s ease; }
.tile .ticon svg{ width:22px; height:22px; display:block; }
.tile.has-icon{ padding-right:46px; }
.tile:hover .ticon{ opacity:.95; transform:translateY(-1px); }
/* person detail header: avatar + big name (name larger than the section subheads, no redundant crumb name) */
.whohdr{ display:flex; align-items:center; gap:16px; margin:8px 0 24px; }
.whoface{ width:66px; height:66px; border-radius:50%; object-fit:cover; flex:none; border:1px solid var(--rule,#262626); background:#0e0e0e; }
.who{ font-size:34px !important; font-style:normal !important; font-weight:600 !important; color:var(--ink,#e9e5db) !important;
  line-height:1.1 !important; margin:0 !important; padding:0 !important; border:none !important; }

/* round 3: let the dark page show through containers (no gray panels behind cards) */
.layout, .main, .cards, .vgrid, .pgrid, .tiles{ background:transparent !important; }
.vcard, .vcard .vt, .vcard .vm{ background:transparent !important; }
/* videos: more room to breathe */
.vgrid{ gap:26px !important; grid-template-columns:repeat(auto-fill,minmax(238px,1fr)) !important; }
.vcard .vt{ margin-top:12px !important; }
/* person tiles: name on its own line, the count UNDERNEATH it */
.pcard{ display:flex !important; flex-direction:column !important; align-items:flex-start !important; gap:6px !important; }
.pcard .pn, .pcard .pm{ display:block !important; width:100%; }
.pgrid{ gap:14px !important; }
/* sidebar must scroll so long sub-lists don't run off-screen */
.side{ max-height:calc(100vh - 84px) !important; overflow-y:auto !important; }
/* editor mode: a little × on every card/video to delete (with confirm), + drag any card to a sidebar folder or the trash */
.card, .vcard{ position:relative; }
.delx{ position:absolute; top:6px; right:6px; z-index:6; width:21px; height:21px; line-height:19px; text-align:center; padding:0;
  background:rgba(18,11,11,.72); border:1px solid rgba(207,107,107,.7); color:#e0a99b; border-radius:50%;
  font-size:14px; cursor:pointer; opacity:.38; transition:opacity .14s, background .14s; }
.card:hover .delx, .vcard:hover .delx{ opacity:1; }
.delx:hover{ background:#cf6b6b; color:#160d0d; border-color:#cf6b6b; }
.card.haspic .delx{ top:6px; right:6px; }
.card[draggable="true"]{ cursor:grab; }
.card[draggable="true"]:active{ cursor:grabbing; }
.side [data-c].drop{ outline:1px dashed var(--gilt,#c08a3a); background:rgba(192,138,58,.16) !important; color:var(--gilt,#c08a3a) !important; }
/* collapse a wall of podcasts on a person page */
.morepods{ display:inline-block; margin:4px 0 10px; background:none; border:1px solid var(--rule,#262626); color:var(--ink-2,#9b988f);
  font-size:12px; padding:5px 14px; border-radius:4px; cursor:pointer; letter-spacing:.03em; }
.morepods:hover{ border-color:var(--gilt,#c08a3a); color:var(--gilt,#c08a3a); }
/* Art & Artists sidebar link */
/* Art entry in the community sidebar is an <a>; codex.css styles .side button only, so
   mirror those rules here so it renders identically to its sibling rows (2026-07-03). */
.side a.collbtn{ text-decoration:none; display:flex; align-items:center; width:100%; text-align:left;
  font-family:var(--body); font-size:16.5px; color:var(--muted); background:transparent; border:0; border-radius:0;
  padding:7px 12px 7px 18px; margin:1px 0; cursor:pointer; position:relative; transition:color .2s ease, background .2s ease; }
.side a.collbtn::before{ content:""; position:absolute; left:0; top:50%; transform:translateY(-50%);
  width:0; height:1px; background:var(--gilt); transition:width .25s ease; }
.side a.collbtn:hover{ color:var(--bone); }
.side a.collbtn:hover::before{ width:9px; }
/* kill the giant illuminated drop-cap initial */
.lead::first-letter, .main p::first-letter, .crumb::first-letter, p::first-letter{
  font-size:inherit !important; float:none !important; line-height:inherit !important;
  margin:0 !important; padding:0 !important; color:inherit !important; font-family:inherit !important; font-weight:inherit !important; }

/* ---- 2026-07-03 restructure: About link on home, email signup, Art tile ---- */
.aboutrow{ margin-top:6px; }
.aboutgo{ cursor:pointer; color:var(--gilt); }
.aboutgo:hover{ color:var(--gilt-hi); }
.signup{ margin:34px auto 8px; max-width:520px; border:1px solid var(--rule); background:var(--ink-1); padding:22px 24px; }
.signup h3{ font-family:var(--rubric); text-transform:uppercase; letter-spacing:.18em; font-size:12px; color:var(--dim); margin:0 0 12px; font-weight:500; }
.signup form{ display:flex; gap:8px; }
.signup input{ flex:1; min-width:0; background:var(--ink-0); border:1px solid var(--rule); color:var(--bone); padding:9px 12px; font-family:var(--body); font-size:15px; }
.signup input:focus{ outline:none; border-color:var(--gilt-dk); }
.signup button{ background:var(--gilt-dk); border:1px solid var(--gilt-dk); color:var(--ink-0); padding:9px 16px; font-family:var(--rubric); text-transform:uppercase; letter-spacing:.12em; font-size:11px; cursor:pointer; }
.signup button:hover{ background:var(--gilt); border-color:var(--gilt); }
.signup-note{ font-family:var(--body); font-style:italic; color:var(--muted); font-size:14px; margin:10px 0 0; min-height:1em; }
.art-tile{ text-decoration:none; }

/* ---- scoped sidebar search (2026-07-03): searches only what you are in ---- */
.sidesearch{ margin:0 0 16px; }
.sidesearch input{ width:100%; background:var(--ink-0); border:1px solid var(--rule); color:var(--bone); padding:8px 11px; font-family:var(--body); font-size:14.5px; }
.sidesearch input::placeholder{ color:var(--dim); font-style:italic; }
.sidesearch input:focus{ outline:none; border-color:var(--gilt-dk); }

/* ---- embedded Art gallery + collapsible Salvia Basics (2026-07-03) ---- */
.artframe{ width:100%; height:calc(100vh - 150px); border:1px solid var(--rule); background:#060606; display:block; }
.side h3.lsec{ cursor:pointer; user-select:none; display:flex; align-items:center; gap:7px; }
.side h3.lsec .chev{ color:var(--dim); font-size:10px; flex:none; }
.side h3.lsec .n{ margin-left:auto; float:none; }
.side h3.lsec:hover .chev{ color:var(--gilt); }

/* ---- Learn landing tiles (2026-07-03) ---- */
.learn-land{ margin-top:clamp(28px,6vh,60px); }
.learn-tile{ cursor:pointer; }
.learn-tile:hover{ background:var(--ink-2); border-color:var(--rule-l); }
.learn-tile[data-lgo="basics"] h2{ color:var(--sage); }
.learn-tile[data-lgo="practice"] h2{ color:var(--gilt-hi); }

/* ---- practice page teaser (2026-07-03): the 7 parts, titles editable ---- */
.teaser-list{ list-style:none; margin:26px 0 0; padding:0; max-width:660px; }
.teaser-part{ display:flex; align-items:baseline; gap:16px; padding:15px 4px; border-bottom:1px solid var(--rule); }
.teaser-part:first-child{ border-top:1px solid var(--rule); }
.tp-num{ font-family:var(--rubric); font-size:12px; letter-spacing:.14em; color:var(--gilt-dk); flex:none; width:26px; }
.tp-title{ font-family:var(--display); font-weight:500; font-size:clamp(18px,2.4vw,23px); line-height:1.2; color:var(--bone); }
body.ss-edit .tp-title{ min-width:120px; }
.teaser-foot{ font-family:var(--rubric); text-transform:uppercase; letter-spacing:.18em; font-size:11px; color:var(--dim); margin:24px 0 0; }

/* ---- launch-preview scaffolding (2026-07-04): visible only with the editor key ---- */
.pv-ribbon{ font-family:var(--rubric); text-transform:uppercase; letter-spacing:.16em; font-size:11px;
  color:var(--gilt-hi); border:1px dashed var(--gilt-dk); padding:8px 12px; margin:0 0 18px; }
.pv-note{ font-family:var(--body); font-style:italic; font-size:13px; color:var(--dim); margin-top:10px; }
.pv-tag{ font-family:var(--rubric); text-transform:uppercase; letter-spacing:.12em; font-size:10px; color:var(--gilt-dk); margin-left:8px; }
.pv-slot{ border:1px dashed var(--rule); padding:14px 16px; font-family:var(--body); font-style:italic; color:var(--muted); margin:6px 0 10px; }
.pv-video{ aspect-ratio:16/9; max-width:720px; border:2px dashed var(--gilt-dk); display:grid; place-items:center; margin:0 0 26px; background:rgba(255,255,255,.015); }
.pv-video-in{ text-align:center; display:grid; gap:8px; padding:20px; }
.pv-video-in b{ font-family:var(--rubric); letter-spacing:.18em; font-size:13px; color:var(--gilt-hi); }
.pv-video-in span{ font-family:var(--body); font-style:italic; font-size:14px; color:var(--muted); }
.mr-hero h1{ font-family:var(--display); font-weight:500; font-size:clamp(30px,4vw,44px); color:var(--bone); margin:6px 0 8px; }
.epi{ padding:12px 0; border-bottom:1px solid var(--rule); max-width:660px; }
.epi-h{ display:flex; align-items:baseline; justify-content:space-between; gap:14px; margin-bottom:8px; }
.epi-t{ font-family:var(--display); font-size:19px; color:var(--bone); }
.epi-m{ font-family:var(--rubric); font-size:11px; letter-spacing:.12em; color:var(--dim); white-space:nowrap; }
.epi audio{ width:100%; height:34px; }
.tiergrid{ display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin:10px 0 18px; max-width:960px; }
@media(max-width:860px){ .tiergrid{ grid-template-columns:1fr; } }
.tiercard{ border:1px solid var(--rule); background:var(--ink-1); padding:16px 18px; }
.tiercard.founding{ border-color:var(--gilt-dk); }
.tc-k{ font-family:var(--display); font-size:20px; color:var(--bone); }
.tc-p{ font-family:var(--rubric); font-size:12px; letter-spacing:.14em; color:var(--gilt-hi); margin:4px 0 10px; }
.tiercard ul{ margin:0 0 10px; padding-left:18px; font-family:var(--body); color:var(--muted); font-size:14.5px; line-height:1.55; }
.mr-rails{ display:flex; gap:12px; flex-wrap:wrap; margin:6px 0 18px; }
.ghostbtn{ border:1px dashed var(--rule); background:none; color:var(--dim); font-family:var(--rubric);
  text-transform:uppercase; letter-spacing:.12em; font-size:11px; padding:10px 16px; cursor:not-allowed; }
.dontlist{ border-left:2px solid var(--gilt-dk); padding:10px 16px; font-family:var(--body); font-style:italic; color:var(--muted); max-width:60ch; margin:6px 0 14px; }

/* ---- standalone About page + home intro-video option slot (2026-07-04) ---- */
.about-doc{ max-width:860px; margin:0 auto; padding:clamp(24px,4vw,48px) clamp(20px,5vw,40px) clamp(40px,8vh,90px); }
.pv-video-sm{ max-width:560px; margin:20px auto 4px; }

/* About-page intro video (2026-07-04) */
.about-video{margin:0 0 26px;}
.about-video video{width:100%;max-height:62vh;border-radius:14px;background:#000;display:block;box-shadow:0 8px 30px rgba(0,0,0,.35);}

/* The Sage Lab brand lockup, finalized 2026-07-04 (medallion + SC, no plaque) */
.topbar .brand-med{width:40px;height:40px;border-radius:50%;display:block;margin-right:-16px;}
.topbar .brand{font-family:var(--rubric);font-weight:700;font-size:19px;letter-spacing:.16em;white-space:nowrap;}
.topbar .brand .b-sage{color:var(--sage);}
.topbar .brand .b-lab{color:var(--bone);}
.hero .aboutgo{ font-size:.72em; white-space:nowrap; margin-left:6px; }
