/* =====================================================================
   DEIMIX HUB - what the real pages add to mock 2's stylesheet (hub.css,
   carried verbatim). Only what a server-rendered page needs that a
   script-drawn mock did not: fonts as files, links where the mock had
   buttons, real form controls dressed as mock 2's chips and choices, the
   detail head of R-135, and the pages mock 2 did not draw (People, Audit,
   Settings). No inline style anywhere: the page CSP forbids it.
   ===================================================================== */

/* ---- fonts: the hub's own copies, never from the network ---- */
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 300 700; font-display: swap; src: url(../fonts/SpaceGrotesk-3.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 100 700; font-display: swap; src: url(../fonts/IBMPlexSans-9.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/IBMPlexMono-4.woff2) format('woff2'); }
/* Tamil is never drawn before its font has loaded (R-063): block, not swap. */
@font-face { font-family: 'Anek Tamil'; font-style: normal; font-weight: 400; font-display: block; src: url(../fonts/AnekTamil-400.woff2) format('woff2'); }
@font-face { font-family: 'Anek Tamil'; font-style: normal; font-weight: 700; font-display: block; src: url(../fonts/AnekTamil-700.woff2) format('woff2'); }

/* ---- page hues: the band tile and the sidebar marker only ---- */
:root { --hue-people: #6FB8E8; --hue-audit: #8598A6; --hue-settings: #C9A6F2; --hue-approvals: #7CD992; --hue-posters: #F2A6C9; }
.nav-item.hue-home { --page-hue: var(--hue-home); }
.nav-item.hue-library { --page-hue: var(--hue-library); }
.nav-item.hue-posters { --page-hue: var(--hue-posters); }
.nav-item.hue-brand { --page-hue: var(--hue-brand); }
.nav-item.hue-approvals { --page-hue: var(--hue-approvals); }
.nav-item.hue-audit { --page-hue: var(--hue-audit); }
.nav-item.hue-people { --page-hue: var(--hue-people); }
.nav-item.hue-settings { --page-hue: var(--hue-settings); }
.page-people { --page-hue: var(--hue-people); }
.page-audit { --page-hue: var(--hue-audit); }
.page-hub-settings { --page-hue: var(--hue-settings); }
.page-approvals { --page-hue: var(--hue-approvals); }
.page-posters { --page-hue: var(--hue-posters); }
.page-plain { --page-hue: var(--hue-kit); }
.page-library, .page-people, .page-audit, .page-settings, .page-home, .page-brand, .page-plain { display: flex; flex-direction: column; flex: 1; min-height: 0; }

/* ---- links where the mock had buttons ---- */
a.nav-item, a.person-link, a.list-row, a.segment, a.page-button, .picker-option a, .breadcrumb a, a.avatar-button { text-decoration: none; color: inherit; }
.breadcrumb a { color: var(--muted); font-size: 12.5px; }
.breadcrumb a:hover { color: var(--text); text-decoration: underline; }
a.page-button { display: grid; }
.page-button.is-off { opacity: .35; cursor: default; }
.picker-option { padding: 0; }
.picker-option a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 7px; }
.inline-form { display: contents; }
.topbar-mobile .avatar-button { margin-left: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- the sidebar toggle shows the icon for what it will do ---- */
.sidebar-toggle .when-open, .sidebar-toggle .when-shut { display: inline-flex; }
.sidebar-is-shut .sidebar-toggle .when-open { display: none; }
.app:not(.sidebar-is-shut) .sidebar-toggle .when-shut { display: none; }

/* ---- the password eye ---- */
[data-show-password] .when-shown { display: none; }
[data-show-password].is-showing .when-shown { display: inline-flex; }
[data-show-password].is-showing .when-hidden { display: none; }

/* ---- sequence additions ---- */
.signin-story { justify-content: space-between; }
.sequence-problem { margin: -4px 0 16px; }
.code-wrong { margin-top: 12px; }
.welcome-lead { margin-bottom: 0 !important; }
.signin-side { flex-direction: column; gap: 18px; }
.method-choice { position: relative; }
.method-choice:has(input:checked) { border-color: var(--choice-line); background: var(--choice-soft); }
.method-choice:has(input:checked) > .svg-icon, .method-choice:has(input:checked) b { color: var(--choice); }
.method-choice:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.tick-line:has(input:checked) .check-box { background: var(--choice); border-color: var(--choice); color: #1B0F06; }
.tick-line:has(input:focus-visible) .check-box { outline: 2px solid var(--focus); outline-offset: 2px; }
.recovery-grid li { text-transform: none; }

/* ---- real checkboxes dressed as mock 2's choices (orange when picked, R-016) ---- */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; width: 100%; }
.choice-check { display: flex; gap: 11px; align-items: flex-start; padding: 11px 12px; border-radius: 11px; border: 1px solid var(--line-strong); background: var(--ink-deep); cursor: pointer; min-width: 0; }
.choice-check:hover { border-color: var(--muted); }
.choice-check .check-box { margin-top: 1px; }
.choice-check:has(input:checked) { border-color: var(--choice-line); background: var(--choice-soft); }
.choice-check:has(input:checked) .check-box { background: var(--choice); border-color: var(--choice); color: #1B0F06; }
.choice-check:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.choice-check.is-greyed { cursor: not-allowed; opacity: .62; }
.choice-check.is-greyed:hover { border-color: var(--line-strong); }
.choice-words { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; color: var(--muted); }
.choice-words b { color: var(--text); font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.choice-words b.mono-text { font-size: 13px; font-weight: 500; }
.choice-why { display: inline-flex; gap: 6px; align-items: flex-start; color: var(--soft-text); font-size: 12px; margin-top: 3px; }
.choice-why .svg-icon { width: 13px; height: 13px; margin-top: 2px; color: var(--faint); }
.choice-later { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin-top: 2px; }
.segment:has(input:checked) { color: var(--choice); background: var(--choice-soft); border-color: var(--choice-line); }
.segment:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---- list and detail, for pages other than the library ---- */
@media (min-width: 761px) {
  .main.is-list .page-people, .main.is-list .page-audit { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .main.is-list .page-people .library-split, .main.is-list .page-audit .library-split { flex: 1; min-height: 0; }
}
.list-avatar { width: 32px; height: 32px; font-size: 12px; background: var(--panel-3); color: var(--soft-text); }
.state-chip.is-disabled { color: var(--danger); background: var(--danger-soft); }
.pagination .button { margin-left: auto; }
/* R-135: the open item's title spans the panel; its actions sit on their own row. */
.detail-head { padding-bottom: 12px; }
.detail-title { font-size: 21px; line-height: 1.25; margin-top: 6px; overflow-wrap: anywhere; }
.detail-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.detail-actions .grow { flex: 1; }
.detail-problem { margin-bottom: 16px; }
.detail-section { margin-top: 24px; max-width: 900px; }
.detail-section h3 { font-size: 15px; margin-bottom: 4px; }
.section-hint { color: var(--muted); font-size: 13.5px; margin-bottom: 12px; max-width: 70ch; }
.name-input { max-width: 380px; }
.member-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.member-list a { color: var(--text); text-underline-offset: 3px; }
.json-block { margin: 0; padding: 14px; background: var(--ink-deep); border: 1px solid var(--line); border-radius: 10px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.55; color: var(--soft-text); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 420px; overflow: auto; }
.detail-empty .log-rule { margin-top: 18px; max-width: 360px; text-align: left; }
.filter-row .more-count { margin-left: -2px; }

/* ---- settings-template additions ---- */
.settings-body.is-single { grid-template-columns: minmax(0, 1fr); }
.settings-body.is-single .settings-groups { max-width: 900px; }
.settings-row.is-wide { grid-template-columns: minmax(0, 1fr); }
.settings-row.is-wide .settings-control { width: 100%; }
.settings-name .svg-icon { vertical-align: -3px; margin-right: 6px; color: var(--muted); }
.reveal-panel { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 420px; padding: 14px; border-radius: 11px; border: 1px solid var(--line-strong); background: var(--ink-deep); }
.reveal-panel[hidden] { display: none; }
.reveal-panel .field + .field { margin-top: 4px; }
.panel-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.secret-box { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border-radius: 9px; border: 1px dashed var(--line-strong); background: var(--panel); width: 100%; max-width: 560px; }
.secret-box .mono-text { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 14px; letter-spacing: .06em; color: var(--text); }
.notice-box { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 9px; background: var(--panel-2); color: var(--soft-text); font-size: 13.5px; }
.notice-box .svg-icon { margin-top: 2px; color: var(--muted); }
.account-codes { width: 100%; max-width: 420px; }
.app-code-setup .code-boxes input { height: 48px; }
.session-row .settings-name { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.session-actions { flex-direction: row; flex-wrap: wrap; }
.key-row.is-revoked .settings-name { color: var(--muted); }
.key-row .settings-hint + .settings-hint { margin-top: 0; }
.new-key .field-hint { max-width: 70ch; }

/* ---- desk additions ---- */
.waiting-card { max-width: 760px; }
.waiting-body { flex: 1; display: grid; place-items: center; padding: 40px var(--gutter); }

/* ---- the brand kit: the canvases became real files ---- */
.asset-art img { display: block; width: 100%; height: auto; }
.asset-art.is-round img { border-radius: 50%; max-width: 132px; box-shadow: 0 0 0 1px var(--line-strong); }
.colour-ink { background: #0B1117; } .colour-panel { background: #131C25; } .colour-panel-2 { background: #1A2530; }
.colour-line { background: #25333F; } .colour-text { background: #E7ECF0; } .colour-muted { background: #8598A6; }
.colour-muted-light { background: #5C6D7A; } .colour-amber { background: #E9A23B; } .colour-whatsapp { background: #25D366; }
.pillar-pain { background: #E98C6B; } .pillar-teach { background: #6FB8E8; } .pillar-proof { background: #7CD992; }
.pillar-feature { background: #C9A6F2; } .pillar-founder { background: #F2A6C9; } .pillar-local { background: #E9A23B; }
.font-sample-display { font-family: 'Space Grotesk', 'IBM Plex Sans', sans-serif; font-weight: 700; font-size: 26px; }
.font-sample-body { font-family: 'IBM Plex Sans', sans-serif; font-weight: 400; font-size: 17px; }
.font-sample-mono { font-family: 'IBM Plex Mono', monospace; font-weight: 500; font-size: 15px; }
.font-sample-tamil { font-family: 'Anek Tamil', 'IBM Plex Sans', sans-serif; font-weight: 700; font-size: 24px; }

/* ---- pages outside the shell ---- */
.plain-body { min-height: 100vh; }
.plain-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 32px 16px; }
.plain-wordmark { font-size: 30px; }
.plain-card { width: min(470px, 100%); background: var(--panel); border: 1px solid var(--line-strong); border-radius: 18px; box-shadow: var(--shadow-lift); }

@media (max-width: 760px) {
  .drawer-scrim { display: block; }
  .wide-only { display: none; }
  .filter-row .segmented { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .detail-actions .button-forward { margin-left: auto; }
  .choice-grid { grid-template-columns: minmax(0, 1fr); }
  .secret-box { flex-wrap: wrap; }
  .signin-side { gap: 12px; }
  .main.is-list .page-people .library-split.detail-is-open .list-pane,
  .main.is-list .page-audit .library-split.detail-is-open .list-pane { display: none; }
  .library-split.detail-is-open .detail-pane { position: static; display: block; }
  .detail-back { display: inline-flex; margin-bottom: 8px; }
}

/* =====================================================================
   THE CONTENT PAGES (coder-hub-web-02): Home, Content library, Poster
   maker. Only what mock 2's stylesheet did not already carry for them.
   ===================================================================== */

/* ---- links where the mock had buttons ---- */
a.chip, a.post-card, a.desk-row, a.stat-tile, a.feed-item, a.suggestion, a.table-link { text-decoration: none; color: inherit; }
a.stat-tile:hover { border-color: var(--muted); }
.feed > li { list-style: none; }
.feed-item > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.table-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- pillar colours as classes (the page CSP admits no inline style).
   In the hub's own screens LOCAL is sand, never amber (R-070). ---- */
.pillar-tag.is-pain { --pillar-color: var(--pillar-PAIN); }       .dot.is-pain { background: var(--pillar-PAIN); }
.pillar-tag.is-teach { --pillar-color: var(--pillar-TEACH); }     .dot.is-teach { background: var(--pillar-TEACH); }
.pillar-tag.is-proof { --pillar-color: var(--pillar-PROOF); }     .dot.is-proof { background: var(--pillar-PROOF); }
.pillar-tag.is-feature { --pillar-color: var(--pillar-FEATURE); } .dot.is-feature { background: var(--pillar-FEATURE); }
.pillar-tag.is-founder { --pillar-color: var(--pillar-FOUNDER); } .dot.is-founder { background: var(--pillar-FOUNDER); }
.pillar-tag.is-local { --pillar-color: var(--pillar-LOCAL); }     .dot.is-local { background: var(--pillar-LOCAL); }

/* ---- the library's filter row ---- */
form.search-wrap { margin: 0; }
.filter-more .segmented .segment, .filter-more .chip { white-space: nowrap; }

/* ---- the open item ---- */
.type-tile.is-tiny { width: 24px; height: 24px; border-radius: 7px; }
.type-tile.is-tiny .svg-icon { width: 14px; height: 14px; }
.detail-hint { display: flex; gap: 6px; align-items: flex-start; margin-top: 8px; color: var(--muted); font-size: 12.5px; max-width: 80ch; }
.detail-hint .svg-icon { margin-top: 2px; color: var(--faint); }
.detail-tabs-row { margin-top: 10px; }
.tool-note { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.reading-rule { margin: 0 0 18px; }
.caption-tools { max-width: 760px; }
.md-image { color: var(--muted); font-style: italic; }
.article-read .md-link { cursor: help; }

/* ---- "Where did it go out?": real checkboxes dressed as mock 2's places ---- */
.place-choice { position: relative; }
.place-words { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.place-choice:has(input:checked) { border-color: var(--choice-line); background: var(--choice-soft); }
.place-choice:has(input:checked) .place-icon { color: var(--choice); background: rgba(242,118,46,.16); }
.place-choice:has(input:checked) .place-tick { background: var(--choice); border-color: var(--choice); color: #1B0F06; }
.place-choice:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.place-choice.is-already { opacity: .62; cursor: not-allowed; }
.place-choice.is-already .place-note { color: var(--state-goneout); }
.place-choice.is-already .place-tick { border-style: dashed; }
.dialog-hint { margin-top: 14px; }

/* ---- posters: the canvas keeps the poster's shape before it is drawn ---- */
.poster-frame { position: relative; }
.poster-frame canvas { aspect-ratio: 1 / 1; }
.poster-frame.is-story canvas { aspect-ratio: 9 / 16; }
.poster-stage.is-linkedin { grid-template-columns: minmax(0, 640px) minmax(260px, 1fr); }
.poster-stage.is-linkedin .poster-frame canvas { aspect-ratio: 1200 / 627; }
.poster-waiting { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 13px; background: #05080B; }
.poster-side .button { align-self: flex-start; }
.poster-stage + .caption-tools { margin-top: 24px; }
.poster-stage ~ .caption-paper { margin-bottom: 8px; }

/* ---- Home ---- */
.card-head > div { min-width: 0; }
.card-count { font-family: var(--font-mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.post-card .post-card-art { aspect-ratio: 1 / 1; width: 100%; height: auto; }
.post-card .post-card-art.is-words { display: grid; place-items: center; background: var(--panel-2); }
.post-card .post-card-art.is-not-drawn { background: var(--panel-2); }
.post-card-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.suggestion { text-align: left; }
.suggestion-art { width: 150px; height: 150px; }
.today-hero .suggestion, .today-hero .today-list { min-width: 0; }
.today-list { display: flex; flex-direction: column; gap: 10px; }
.post-cards.is-today { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.check-item .inline-form .check-box { margin-top: 1px; }
.check-meta .link-button { color: var(--muted); }
.check-meta .link-button:hover { color: var(--text); }
.check-item.is-done .check-box { background: var(--choice); border-color: var(--choice); color: #1B0F06; }

@media (max-width: 760px) {
  .main.is-list .page-library .library-split.detail-is-open .list-pane { display: none; }
  /* An open item gets the phone's screen: the filters wait behind Back. */
  .page-library:has(.library-split.detail-is-open) .filter-bar { display: none; }
  .poster-stage.is-linkedin { grid-template-columns: minmax(0, 1fr); }
  .suggestion-art { width: 96px; height: 96px; }
  .post-cards.is-today { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
