/* A department page, on the night background (operator, 2026-11-04): the page is ONE glass panel (the bright box colour at a few percent, blurred, aqua edge) so the
   background shows through it. Inside it, top to bottom: the department switcher (the front page's department blocks, the current one lit), the cover card
   in the department's own colour, the section tabs, then the feed and the rail as glass boxes with light text. The department's colour is --dc.
   Reuses the shared .idc / .idb channel box and the .tm-dept block (tcn_mockup_dept_card). Phase 1 (the unlock view) is the same glass, further down. */
.dp {
  --dp-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, Menlo, monospace;
  --g: var(--n-glass, #151b2d);                          /* the main block: solid navy */
  --g-2: var(--n-glass-2, rgba(248, 243, 255, .90));      /* a card inside a block: light purple, ink text */
  --g-3: rgba(254, 253, 255, .07);                        /* a quiet card on the navy glass: white at 7%, light text */
  --g-line: rgba(254, 253, 255, .14);
  --on: #fff; --on-soft: rgba(255, 255, 255, .76); --on-mute: rgba(255, 255, 255, .56);
  --aqua: var(--n-aqua, #8fdadd);
  position: relative; width: min(100% - 32px, 1240px); margin: calc(var(--header-h, 64px) + 28px) auto 28px; color: var(--on);   /* no outer box: the page is its blocks, straight on the background */
}
.dp > * + * { margin-top: 18px; }

/* the switcher: one block per department, the current one lit; they fit in one row and scroll sideways on a phone */
.dp-switch .tm-depts { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(132px, 1fr); gap: 10px; overflow-x: auto; padding: 4px 4px 8px; scrollbar-width: thin; }
.dp-switch .tm-dept { min-height: 92px; padding: 14px; gap: 6px; }
.dp-switch .tm-dept p, .dp-switch .tm-dept .tm-pill, .dp-switch .tm-dept-mark { display: none; }
.dp-switch .tm-dept .tm-badge { width: 30px; height: 30px; margin-bottom: 4px; }
.dp-switch .tm-dept h3 { font-size: 15px; }
.dp-switch .tm-dept.is-on { box-shadow: 0 0 0 3px rgba(12, 16, 27, .9), 0 0 0 6px var(--aqua); transform: none; }

/* the cover card */
.dp-cover { position: relative; overflow: hidden; border-radius: 20px; background: linear-gradient(135deg, var(--dc), color-mix(in srgb, var(--dc) 45%, #0b1030)); color: #fff; }
.dp-cover-in { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 44px; padding: 20px 24px 28px; }
.dp-back { align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 999px; background: rgba(255, 255, 255, .95); color: #0b0b0d; font: 800 14px/1 var(--dp-sans); text-decoration: none; white-space: nowrap; }
.dp-cover-row { display: flex; flex-direction: column; gap: 22px; }
.dp-kicker { margin: 0 0 6px; display: flex; align-items: center; gap: 8px; font: 800 11px/1 var(--dp-sans); letter-spacing: .14em; text-transform: uppercase; }
.dp-kicker i { width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.dp-cover h1 { margin: 0; color: #fff; font: 800 clamp(40px, 8vw, 60px)/1 var(--dp-sans); letter-spacing: -.03em; text-transform: none; }
.dp-blurb { max-width: 560px; margin: 12px 0 0; font: 500 16px/1.5 var(--dp-sans); opacity: .92; }
.dp-cta { display: flex; flex-wrap: wrap; gap: 10px; }
@media (min-width: 768px) { .dp-cover-row { flex-direction: row; align-items: flex-end; justify-content: space-between; } }

/* the buttons (one family): white pill, aqua primary, outline on glass; all one line, 46px, padded */
.dp-btn { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-height: 46px; padding: 0 22px; border-radius: 999px; background: #fff; color: #0b0b0d; border: 2px solid #fff; font: 800 14px/1 var(--dp-sans); text-decoration: none; white-space: nowrap; }
.dp-btn--dark { background: var(--aqua); border-color: var(--aqua); color: #0a0f1a; }
.dp-btn--line { background: transparent; color: var(--on); border-color: var(--on); }
.dp-btn--line:hover { border-color: #fff; }
.dp-btn--block { width: 100%; }
.dp-btn:focus-visible { outline: 3px solid var(--aqua); outline-offset: 3px; }

/* the department's phone artwork on the cover (wide screens): it sits at the right edge and the title stays on the left */
.dp-art { display: none; }
@media (min-width: 900px) {
  .dp-cover--art .dp-cover-in { min-height: 320px; }
  .dp-cover--art .dp-cover-row { max-width: 58%; flex-direction: column; align-items: flex-start; }
  .dp-art { display: block; position: absolute; z-index: 0; right: 24px; bottom: 0; top: 24px; width: min(40%, 520px); pointer-events: none; }
  .dp-art img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
}

/* the section tabs: a glass strip that stays under the header while the page scrolls */
.dp-tabs { position: sticky; top: calc(var(--header-h, 64px) + 6px); z-index: 20; border-radius: 14px; background: var(--g); border: 0; }
.dp-tabs-in { display: flex; gap: 28px; padding: 0 18px; overflow-x: auto; scrollbar-width: none; }
.dp-tabs-in::-webkit-scrollbar { display: none; }
.dp-tabs a { position: relative; display: inline-flex; align-items: center; flex: 0 0 auto; min-height: 52px; color: var(--on-soft); font: 700 15px/1 var(--dp-sans); text-decoration: none; white-space: nowrap; }
.dp-tabs a.is-on { color: var(--on); }
.dp-tabs a.is-on::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 3px; background: var(--aqua); }

.dp-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
@media (min-width: 980px) { .dp-body { grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; } .dp-body--solo { grid-template-columns: minmax(0, 1fr); } }
#dp-start, .dp-box[id], .dp-feed { scroll-margin-top: 120px; }

/* the feed: every post a glass card */
.dp-feed { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dp-post { --on: var(--n-ink, #0a0f1a); --on-soft: var(--n-steel, #566074); --on-mute: #7a8497; background: var(--n-glass-bright, #f3f0fa); border: 0; border-radius: 18px; padding: 18px; color: var(--on); }
.dp-post-head { display: flex; align-items: center; gap: 12px; }
.dp-av { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--grad, linear-gradient(135deg, #7b93e2, #313de0 55%, #5b2fd1)) center / cover; color: #fff; font: 800 18px/1 var(--dp-sans); text-decoration: none; }
.dp-who { display: block; color: var(--on); font: 800 14px/1.2 var(--dp-sans); text-decoration: none; }
a.dp-who:hover { color: var(--aqua); }
.dp-when { display: block; margin-top: 2px; color: var(--on-mute); font: 500 12px/1.3 var(--dp-sans); }
.dp-title { margin: 12px 0 12px; color: var(--on); font: 700 17px/1.3 var(--dp-sans); text-transform: none; letter-spacing: 0; }
.dp-media { position: relative; display: block; width: 100%; height: 0; padding-bottom: 52%; overflow: hidden; border: 0; border-radius: 14px; background: #1a1d29; cursor: pointer; }
.dp-media-bg { position: absolute; inset: 0; background: center / cover no-repeat; }
.dp-media--audio, .dp-media--instrumental { background-color: #eceef4; }
.dp-media--audio .dp-media-bg, .dp-media--instrumental .dp-media-bg { background-size: contain; }
.dp-media em { position: absolute; left: 12px; top: 12px; padding: 5px 11px; border-radius: 999px; background: #fff; color: #0b0b0d; font: 800 11px/1 var(--dp-sans); font-style: normal; }
.dp-media--product { background-color: #f1f2f6; }
.dp-media--product .dp-media-bg { background-size: contain; }
.dp-post-foot { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.dp-state { display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: 999px; background: rgba(18, 189, 100, .2); color: #7be3a8; font: 800 12px/1 var(--dp-sans); }
.dp-state--members { background: rgba(245, 163, 26, .2); color: #ffcf7a; }
.dp-state--locked { background: rgba(238, 37, 44, .22); color: #ff9a9d; }
.dp-post .dp-state { background: #e7f6ec; color: #17803d; } .dp-post .dp-state--members { background: #fff3d6; color: #a06a00; } .dp-post .dp-state--locked { background: #ffe4e4; color: #c02626; }
.dp-price { color: var(--on); font: 800 15px/1 var(--dp-sans); }
.dp-open { margin-left: auto; min-height: 44px; padding: 0 24px; border: 2px solid var(--on); border-radius: 999px; background: transparent; color: var(--on); font: 800 14px/1 var(--dp-sans); cursor: pointer; }
.dp-open:hover { border-color: var(--aqua); }
.dp-open--buy { border-color: var(--aqua); background: var(--aqua); color: #0a0f1a; }
/* a locked or members-only item the visitor has no access to: the picture is blurred and a lock sits over it; the click opens the unlock gate */
.dp-media--locked .dp-media-bg { filter: blur(14px) brightness(.8); transform: scale(1.12); }
.dp-lock { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 999px; background: rgba(11, 11, 13, .82); color: #fff; font: 800 13px/1 var(--dp-sans); font-style: normal; white-space: nowrap; }

/* the rail: glass boxes */
.dp-rail { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dp-box { background: linear-gradient(var(--dc), var(--dc)) top / 100% 4px no-repeat, var(--g); border: 0; border-radius: 18px; padding: 22px 18px 18px; }
.dp-label { margin: 0 0 12px; color: var(--on-mute); font: 800 11px/1 var(--dp-sans); letter-spacing: .12em; text-transform: uppercase; }
.dp-chans { display: flex; flex-direction: column; gap: 12px; }
.dp-chans--wide { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.dp .idb { background: var(--g-2); border-color: var(--n-line, #d8d3ee); box-shadow: none; }
.dp .idb-name { color: var(--n-ink, #0a0f1a); }
.dp a.idb:hover { border-color: rgba(92, 225, 230, .6); box-shadow: none; }
.dp-topics { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.dp-topics li b { display: block; color: var(--on); font: 700 15px/1.3 var(--dp-sans); }
.dp-topics li span { color: var(--on-mute); font: 500 12px/1.3 var(--dp-sans); }
.dp-about-copy { margin: 0 0 12px; color: var(--on-soft); font: 500 14px/1.55 var(--dp-sans); }
.dp-facts { display: flex; gap: 24px; margin: 0; }
.dp-facts span { color: var(--on-mute); font: 600 12px/1.3 var(--dp-sans); }
.dp-facts b { display: block; color: var(--on); font: 800 20px/1.2 var(--dp-sans); }
.dp-box--code { padding: 0; background: transparent; border: 0; }

/* ══ Phase 1: the unlock view (anyone without access): the code box, the plans, a locked community. Same glass; hairlines and mono readouts. ═══════════ */
.dp-start { position: relative; background: var(--g); border: 0; border-radius: 18px; overflow: hidden; }
.dp-start::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--dc); }
.dp-start-in { padding: 22px 22px 26px; }
.dp-readout { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; min-height: 40px; padding: 0 0 14px; margin-bottom: 22px; border-bottom: 1px solid var(--g-line);
  font: 600 11px/1.2 var(--dp-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--on-mute); }
.dp-readout-l { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; }
.dp-readout-l i { width: 8px; height: 8px; background: var(--dc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--dc) 30%, transparent); }
.dp-readout-l b { padding-left: 12px; border-left: 1px solid var(--g-line); color: var(--on); font-weight: 700; }
.dp-readout-r { color: var(--on); font-weight: 700; overflow-wrap: break-word; }
.dp-start-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
@media (min-width: 980px) { .dp-start-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 36px; align-items: start; } }
.dp-idx { margin: 0 0 14px; display: flex; align-items: baseline; gap: 12px; font: 700 11px/1.2 var(--dp-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--on); }
.dp-idx b { padding-bottom: 3px; box-shadow: inset 0 -3px 0 var(--aqua); font-weight: 700; }
.dp-plans { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 640px) { .dp-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dp-plan { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 24px 22px 22px; background: var(--g-3); border: 1px solid var(--g-line); border-radius: 14px; color: var(--on); }
.dp-plan::before { content: ""; position: absolute; left: 22px; top: -1px; width: 36px; height: 3px; background: var(--dc); }
.dp-plan--feat { background: rgba(92, 225, 230, .1); border-color: rgba(92, 225, 230, .6); }
.dp-plan-eyebrow { margin: 0 0 10px; font: 700 11px/1.2 var(--dp-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--on-mute); }
.dp-plan-name { margin: 0; color: inherit; font: 800 24px/1.1 var(--dp-sans); letter-spacing: -.02em; text-transform: none; }
.dp-plan-price { margin: 16px 0 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 4px; color: inherit; font: 800 46px/1 var(--dp-sans); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.dp-plan-price span { font-size: 22px; font-weight: 700; opacity: .7; }
.dp-plan-price em { margin-left: 8px; font: 600 11px/1 var(--dp-mono); font-style: normal; letter-spacing: .12em; text-transform: uppercase; opacity: .66; }
.dp-plan-perks { flex: 1; margin: 18px 0 22px; padding: 0; list-style: none; border-top: 1px solid var(--g-line); }
.dp-plan-perks li { position: relative; padding: 11px 0 11px 22px; border-bottom: 1px solid var(--g-line); font: 500 14px/1.4 var(--dp-sans); overflow-wrap: break-word; }
.dp-plan-perks li::before { content: ""; position: absolute; left: 0; top: 17px; width: 8px; height: 8px; background: var(--aqua); }
.dp-plan .dp-btn--dark { background: var(--aqua); border-color: var(--aqua); color: #0a0f1a; }

/* the locked community: placeholder rows only (no real topic, author or count is ever in the page), blurred, with the lock over them */
.dp-label .dp-tag { display: inline-flex; align-items: center; height: 26px; margin-left: 10px; padding: 0 12px; border: 1px solid var(--g-line); border-radius: 6px; vertical-align: middle;
  color: var(--on); font: 700 10px/1 var(--dp-mono); letter-spacing: .14em; text-transform: uppercase; }
.dp-lockbox { display: grid; grid-template-rows: auto 1fr; overflow: hidden; }
.dp-lockbox > .dp-ph-list, .dp-lockbox > .dp-lockcap { grid-area: 2 / 1; }
.dp-ph-list { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; min-height: 230px; filter: blur(5px); opacity: .8; user-select: none; pointer-events: none; }
.dp-ph { display: flex; flex-direction: column; gap: 8px; }
.dp-ph-t { height: 14px; width: 84%; border-radius: 3px; background: rgba(255, 255, 255, .22); }
.dp-ph:nth-child(2) .dp-ph-t { width: 68%; } .dp-ph:nth-child(3) .dp-ph-t { width: 92%; } .dp-ph:nth-child(4) .dp-ph-t { width: 58%; }
.dp-ph-s { height: 10px; width: 38%; border-radius: 3px; background: rgba(255, 255, 255, .13); }
.dp-lockcap { z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px 8px; text-align: center;
  background: linear-gradient(to bottom, rgba(12, 16, 27, .1), rgba(12, 16, 27, .78) 62%); }
.dp-lockico { box-sizing: border-box; width: 40px; height: 40px; padding: 9px; border: 1px solid var(--g-line); background: rgba(254, 253, 255, .1); color: var(--on); }
.dp-lockcap p { margin: 0; max-width: 270px; color: var(--on); font: 700 15px/1.35 var(--dp-sans); }
.dp-lockcap-btns { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 270px; }

@media (max-width: 640px) { .dp { width: calc(100% - 20px); } .dp-cover-in { padding: 16px 16px 22px; } }

/* ══ The code box on a department page (operator, 2026-11-09: it was dark on dark and not our purple): one lavender panel, purple heading, purple Unlock button, the same look as the shop popup's code box. Applies to every .rw on a department page (the unlock band and the rail). ═══════════ */
html body .dp .rw-panel { background: linear-gradient(160deg, #f1eeff 0%, #e4dffb 100%); border: 1.5px solid rgba(91, 47, 209, .35); border-left: 6px solid #5b2fd1; border-radius: 16px; box-shadow: none; color: #0a0f1a; }
html body .dp .rw .rw-kicker { color: #5b2fd1; }
html body .dp .rw .rw-title { color: #3a1fa8; }
html body .dp .rw .rw-sub, html body .dp .rw .rw-chips-hint, html body .dp .rw .rw-user-name { color: #4a4666; }
html body .dp .rw .rw-label, html body .dp .rw .rw-or { color: #4a3aa8; }
html body .dp .rw .rw-input { background: #fff; border: 1.5px solid rgba(91, 47, 209, .3); border-radius: 12px; color: #0a0f1a; }
html body .dp .rw .rw-input::placeholder { color: #7a7596; }
html body .dp .rw .rw-input:focus { border-color: #5b2fd1; box-shadow: 0 0 0 3px rgba(91, 47, 209, .18); }
html body .dp .rw .rw-submit { background: linear-gradient(135deg, #7b93e2 0%, #313de0 55%, #5b2fd1 100%); border-color: transparent; border-radius: 12px; color: #fff; }
html body .dp .rw .rw-submit .rw-btn-text, html body .dp .rw .rw-submit .rw-spin { color: #fff; }
html body .dp .rw .rw-qr { background: #fff; color: #3a1fa8; border: 1.5px solid #5b2fd1; border-radius: 12px; }
html body .dp .rw .rw-qr:hover { background: #f1eeff; }
html body .dp .rw .rw-or span { background: #ece8fc; color: #4a3aa8; }
html body .dp .rw .rw-or::before { background: rgba(91, 47, 209, .25); }
html body .dp .rw .rw-chip { background: #fff; border-color: rgba(91, 47, 209, .35); color: #3a1fa8; }
html body .dp .rw .rw-done-h h3 { color: #3a1fa8; }
html body .dp .rw .rw-item { background: #fff; border-color: rgba(91, 47, 209, .25); color: #0a0f1a; }
