/* ============================================================
   JEM surfaces — per-surface rules, built station by station.
   Loads after jem-core.css (tokens + components). Anything here
   is specific to one surface; shared vocabulary lives in jem-core.
   ============================================================ */

/* ============================================================
   Repo core (Station 3 baseline — migrated from the 2.0 wave)
   ============================================================ */
/* file browser — premium quiet rows */
[data-theme=jem] #repo-files-table.ui.table{border-color:var(--jem-hairline)}
[data-theme=jem] #repo-files-table tr.commit-list>td{background:rgba(255,255,255,.022)}
[data-theme=jem] #repo-files-table tr.ready.entry td{padding-top:.5rem;padding-bottom:.5rem;transition:background var(--jem-dur) var(--jem-ease)}
[data-theme=jem] #repo-files-table tr.ready.entry:hover td{background:rgba(255,255,255,.032)}
[data-theme=jem] #repo-files-table td.name a{letter-spacing:-.006em}

/* repository summary (commits/branches/tags + language bar) as one clean card */
[data-theme=jem] .repository-summary.ui.segments{border-radius:var(--jem-r-md);overflow:hidden;border-color:var(--jem-hairline)}

/* clone widget — mono + tight */
[data-theme=jem] .clone-panel.ui.input>input{font-family:var(--jem-mono);font-size:var(--jem-text-sm)}
[data-theme=jem] .repo-buttons.button-row{gap:var(--jem-s-1)}

/* code / blob view rhythm (scoped, never global) */
[data-theme=jem] .file-view.code-view .lines-code{line-height:var(--jem-leading-relaxed)}
[data-theme=jem] .file-view .lines-num{opacity:.45}

/* ============================================================
   Station 1 — Entry (landing / auth / status)
   ============================================================ */
/* --- landing --- */
[data-theme=jem] .jem-landing-hero{display:flex;flex-direction:column;align-items:center;text-align:center;padding:9vh 1rem 6vh;position:relative}
[data-theme=jem] .jem-landing-mark{position:relative;display:grid;place-items:center}
[data-theme=jem] .jem-landing-mark::before{content:"";position:absolute;width:min(340px,80vw);aspect-ratio:1;border-radius:50%;background:radial-gradient(circle,var(--jem-iris-soft),transparent 62%);filter:blur(22px);z-index:0}
[data-theme=jem] .jem-landing-mark img{position:relative;z-index:1;opacity:.96}
[data-theme=jem] .jem-landing-word{font-size:clamp(2.6rem,7vw,3.4rem);font-weight:var(--jem-w-regular);letter-spacing:-.03em;margin:var(--jem-s-6) 0 0;color:var(--jem-text)}
[data-theme=jem] .jem-landing-tag{font-size:var(--jem-text-lg);color:var(--jem-text-muted);margin:var(--jem-s-2) 0 0}
[data-theme=jem] .jem-landing-lede{max-width:44ch;color:var(--jem-text-faint);margin:var(--jem-s-5) 0 var(--jem-s-8);line-height:var(--jem-leading-relaxed)}
[data-theme=jem] .jem-landing-actions{display:flex;gap:var(--jem-s-3);flex-wrap:wrap;justify-content:center}

/* --- auth (login / signup): mark + one narrow centred card --- */
[data-theme=jem] .jem-auth-wrap{max-width:400px;margin:0 auto;padding:7vh 1rem 5vh;display:flex;flex-direction:column;align-items:center;gap:var(--jem-s-6)}
[data-theme=jem] .jem-auth-mark img{opacity:.95}
[data-theme=jem] .jem-auth-card{width:100%}
[data-theme=jem] .jem-auth .ui.container.fluid{width:100%;padding:0}
[data-theme=jem] .jem-auth h4.ui.top.attached.header{background:transparent;border:none;color:var(--jem-text);font-weight:var(--jem-w-medium);font-size:var(--jem-text-lg);letter-spacing:var(--jem-track-snug);padding:0 0 var(--jem-s-1);text-align:center}
[data-theme=jem] .jem-auth .ui.attached.segment{border-radius:var(--jem-r-lg) !important;border:1px solid var(--jem-hairline);background:var(--jem-surface);padding:var(--jem-s-6)}
[data-theme=jem] .jem-auth .ui.form .field>label{color:var(--jem-text-muted);font-weight:var(--jem-w-medium)}
[data-theme=jem] .jem-auth .ui.attached.segment.header.top{margin-top:var(--jem-s-3);background:transparent;border:none;text-align:center;color:var(--jem-text-faint);border-radius:var(--jem-r-md) !important}
[data-theme=jem] .jem-auth .ui.attached.segment.header.top a{color:var(--jem-iris)}

/* --- status (404 / errors): calm, branded --- */
[data-theme=jem] .jem-status-wrap{max-width:520px;margin:0 auto;text-align:center;padding:14vh 1rem 10vh;display:flex;flex-direction:column;align-items:center;gap:var(--jem-s-4)}
[data-theme=jem] .jem-status-code{font-size:clamp(4rem,16vw,7rem);font-weight:200;letter-spacing:-.04em;line-height:1;color:var(--jem-text);opacity:.92}
[data-theme=jem] .jem-status-msg{color:var(--jem-text-muted);font-size:var(--jem-text-lg);margin:0}
[data-theme=jem] .jem-status-actions{display:flex;gap:var(--jem-s-3);flex-wrap:wrap;justify-content:center;margin-top:var(--jem-s-3)}
[data-theme=jem] .jem-status-ver{color:var(--jem-text-faint);font-size:var(--jem-text-xs);margin-top:var(--jem-s-6)}

/* ============================================================
   Station 2 — Dashboard
   ============================================================ */
/* context switcher bar (org/user + team + activity links) */
[data-theme=jem] .secondary-nav{border-bottom:1px solid var(--jem-hairline) !important;background:transparent}
[data-theme=jem] .secondary-nav .ui.secondary.menu{margin:0}
[data-theme=jem] .secondary-nav .truncated-item-name{font-weight:var(--jem-w-medium);color:var(--jem-text)}
[data-theme=jem] .secondary-nav .ui.floating.dropdown{border-radius:var(--jem-r-sm);transition:background var(--jem-dur) var(--jem-ease)}
[data-theme=jem] .secondary-nav .ui.floating.dropdown:hover{background:rgba(255,255,255,.04)}
[data-theme=jem] .secondary-nav .right.menu .active.item{color:var(--jem-iris)}
[data-theme=jem] .secondary-nav .org-visibility .ui.label{background:var(--jem-raised);border:1px solid var(--jem-hairline);color:var(--jem-text-faint)}

/* activity feed — quieter action glyphs, mono shas, iris subjects */
[data-theme=jem] #activity-feed .flex-item-trailing .svg{opacity:.24}
[data-theme=jem] #activity-feed .flex-item-main .ui.sha.label{font-family:var(--jem-mono);font-size:var(--jem-text-xs);background:var(--jem-raised);border:1px solid var(--jem-hairline)}
[data-theme=jem] #activity-feed .flex-item-main>div>a{color:var(--jem-iris)}
[data-theme=jem] #activity-feed .issue.title{color:var(--jem-text-muted)}
[data-theme=jem] #activity-feed .flex-text-block .text.truncate{color:var(--jem-text-muted)}

/* ============================================================
   Station 4 — Diff & PR review
   ============================================================ */
/* diff container + sticky file header */
[data-theme=jem] .diff-file-box{border-radius:var(--jem-r-md);border-color:var(--jem-hairline)}
[data-theme=jem] .diff-file-header{background:var(--jem-surface);border-color:var(--jem-hairline) !important}
[data-theme=jem] .diff-file-header .file{color:var(--jem-text);font-family:var(--jem-mono);font-size:var(--jem-text-sm)}
/* hunk-header rows (@@) read as quiet section dividers */
[data-theme=jem] .code-diff td.tag-code,[data-theme=jem] .code-diff .tag-code td,[data-theme=jem] .code-diff tr.tag-code>td{background:var(--jem-raised)}
[data-theme=jem] .code-diff .tag-code .lines-code,[data-theme=jem] .code-diff .tag-code .lines-num{color:var(--jem-text-faint)}
/* line-number gutter: quieter */
[data-theme=jem] .code-diff .lines-num{color:var(--jem-text-faint)}
/* expand-hunk / escape controls */
[data-theme=jem] .code-diff .code-expander-button:hover{background:var(--jem-iris-soft);color:var(--jem-iris)}
/* diff toolbar buttons */
[data-theme=jem] .diff-detail-box .ui.button{border-radius:var(--jem-r-sm)}
/* review comment threads inside the diff */
[data-theme=jem] .comment-code-cloud,[data-theme=jem] .code-comment{border-radius:var(--jem-r-md);border-color:var(--jem-hairline)}
[data-theme=jem] .review-box-panel,[data-theme=jem] .review-box{border-radius:var(--jem-r-md);border-color:var(--jem-hairline);box-shadow:var(--jem-shadow-2)}
/* PR merge box (open PRs) */
[data-theme=jem] .merge-section,[data-theme=jem] .pull-merge-box{border-radius:var(--jem-r-md);border-color:var(--jem-hairline)}
[data-theme=jem] .merge-section .divider{border-color:var(--jem-hairline)}
/* PR/issue status pill (Merged/Open/Closed) — iris/live/danger already via theme; refine radius */
[data-theme=jem] .issue-state-label,[data-theme=jem] .issue.list .label{border-radius:var(--jem-r-pill)}

/* ============================================================
   Station 5 — Issue/PR conversation & lists
   ============================================================ */
/* comment cards — cohesive header + body */
[data-theme=jem] .timeline-item.comment .comment-header{background:var(--jem-surface);border-color:var(--jem-hairline) !important;border-top-left-radius:var(--jem-r-md);border-top-right-radius:var(--jem-r-md)}
[data-theme=jem] .timeline-item.comment .comment-content .ui.attached.segment,
[data-theme=jem] .timeline-item.comment .render-content{border-color:var(--jem-hairline)}
[data-theme=jem] .comment-header-right .item,[data-theme=jem] .comment-header .item{color:var(--jem-text-faint);transition:color var(--jem-dur) var(--jem-ease)}
[data-theme=jem] .comment-header-right .item:hover{color:var(--jem-text)}
/* the little arrow connecting avatar → comment box */
[data-theme=jem] .timeline-item.comment .comment-header::before{border-right-color:var(--jem-hairline)}
[data-theme=jem] .timeline-item.comment .comment-header::after{border-right-color:var(--jem-surface)}

/* timeline event badges (nodes on the line) */
[data-theme=jem] .timeline-item.event .badge{border-radius:var(--jem-r-pill);background:var(--jem-raised);color:var(--jem-text-muted);border:1px solid var(--jem-hairline)}

/* sidebar (assignees / labels / milestone / participants) */
[data-theme=jem] .issue-content-right.ui.segment{border-radius:var(--jem-r-lg);border-color:var(--jem-hairline)}
[data-theme=jem] .issue-content-right .ui.divider{border-color:var(--jem-hairline)}
[data-theme=jem] .issue-content-right .header,[data-theme=jem] .issue-content-right .ui.header{color:var(--jem-text-muted);font-weight:var(--jem-w-medium)}

/* labels as pills */
[data-theme=jem] .labels-list a,[data-theme=jem] .label.color-label,[data-theme=jem] .issue-title-meta .label{border-radius:var(--jem-r-pill)}

/* checks / status panel */
[data-theme=jem] .commit-status-panel,[data-theme=jem] .commit-status-list{border-radius:var(--jem-r-md);border-color:var(--jem-hairline)}

/* --- issue/PR list: filter bar + rows --- */
[data-theme=jem] .issue-list-toolbar,[data-theme=jem] .list-header{margin-bottom:var(--jem-s-3)}
[data-theme=jem] .issue-list-toolbar .small-menu-items,[data-theme=jem] .issue-list-toolbar .ui.dropdown{color:var(--jem-text-muted)}
[data-theme=jem] .issue.list-items .flex-item .issue-item-icon .svg{opacity:.7}
[data-theme=jem] .issue.list-items .flex-item .desc .branch{background:var(--jem-raised);border:1px solid var(--jem-hairline);border-radius:var(--jem-r-xs);font-family:var(--jem-mono);font-size:var(--jem-text-xs)}

/* ============================================================
   Station 6 — Explore / profile / org
   ============================================================ */
/* profile header + info cards */
[data-theme=jem] .user.profile .ui.card{border-radius:var(--jem-r-lg);border-color:var(--jem-hairline);box-shadow:none}
[data-theme=jem] .user.profile .ui.card .username{letter-spacing:var(--jem-track-snug);font-weight:var(--jem-w-medium)}
[data-theme=jem] .user.profile .ui.card .extra,[data-theme=jem] .user.profile .follow{color:var(--jem-text-muted)}
[data-theme=jem] .user.profile .ui.card .extra a{color:var(--jem-text-muted)}
[data-theme=jem] .user.profile .ui.card .extra a:hover{color:var(--jem-iris)}
/* contribution heatmap chrome (cells already iris via --color-primary) */
[data-theme=jem] #user-heatmap{color:var(--jem-text-faint)}
[data-theme=jem] #user-heatmap .total-contributions{color:var(--jem-text-muted);font-weight:var(--jem-w-medium)}
[data-theme=jem] #user-heatmap .vch__legend,[data-theme=jem] #user-heatmap .vch__months__labels__wrapper text,[data-theme=jem] #user-heatmap .vch__days__labels__wrapper text{fill:var(--jem-text-faint)}
/* explore: search + tabs + filters */
[data-theme=jem] .explore .ui.dropdown{border-radius:var(--jem-r-md)}
[data-theme=jem] .explore .ui.secondary.pointing.menu .active.item{border-color:var(--jem-iris);color:var(--jem-text)}
/* org members / teams cards */
[data-theme=jem] .org-members .ui.card,[data-theme=jem] .team-list .ui.card{border-radius:var(--jem-r-md);border-color:var(--jem-hairline)}

/* ============================================================
   Station 7 — Settings & forms
   ============================================================ */
/* settings side-nav */
[data-theme=jem] .ui.fluid.vertical.menu{border-radius:var(--jem-r-lg);border-color:var(--jem-hairline);background:var(--jem-surface)}
[data-theme=jem] .ui.fluid.vertical.menu .item{transition:background var(--jem-dur) var(--jem-ease)}
[data-theme=jem] .ui.fluid.vertical.menu .item:hover{background:rgba(255,255,255,.04)}
[data-theme=jem] .ui.fluid.vertical.menu .active.item{background:var(--jem-iris-soft);color:var(--jem-text);font-weight:var(--jem-w-medium)}
/* form fields + help + required marker */
[data-theme=jem] .ui.form .field>label{color:var(--jem-text);font-weight:var(--jem-w-medium)}
[data-theme=jem] .ui.form .field .help,[data-theme=jem] .ui.form .help,[data-theme=jem] .help{color:var(--jem-text-faint);font-size:var(--jem-text-sm)}
[data-theme=jem] .ui.form .required.field>label::after{color:var(--jem-danger)}
/* danger zone — clear but calm */
[data-theme=jem] .ui.error.header,[data-theme=jem] .ui.attached.error.header{background:var(--jem-danger-soft) !important;border-color:var(--jem-danger) !important;color:var(--jem-danger) !important}
[data-theme=jem] .ui.error.segment,[data-theme=jem] .ui.error.danger.segment,[data-theme=jem] .ui.attached.error.segment{border-color:var(--jem-danger) !important}
/* key / token / webhook rows */
[data-theme=jem] .key.list .item,[data-theme=jem] .ssh-key-content,[data-theme=jem] .webhook-list .item{border-color:var(--jem-hairline)}
[data-theme=jem] .ui.list>.item .ui.label.gt-mono,[data-theme=jem] .print.tw-font-mono{font-family:var(--jem-mono)}

/* ============================================================
   Station 8 — Long tail (commits, releases, branches, labels, notifications)
   ============================================================ */
/* commit list + detail */
[data-theme=jem] #commits-table .ui.sha.label,[data-theme=jem] .commit-list .ui.sha.label,[data-theme=jem] .sha.label{font-family:var(--jem-mono);background:var(--jem-raised);border:1px solid var(--jem-hairline)}
[data-theme=jem] #commits-table td.message a,[data-theme=jem] .commit-list .commit-summary{color:var(--jem-text)}
[data-theme=jem] .commit-body{color:var(--jem-text-muted)}
/* labels management */
[data-theme=jem] .label-list .item .label,[data-theme=jem] .labels-list .label{border-radius:var(--jem-r-pill)}
/* releases */
[data-theme=jem] #release-list>li,[data-theme=jem] .release-list .release-entry{border-color:var(--jem-hairline)}
[data-theme=jem] .release-list .detail .tag-name,[data-theme=jem] .release .label.green{color:var(--jem-live)}
/* branch chips */
[data-theme=jem] .branch-name,[data-theme=jem] .gt-mono.branch{font-family:var(--jem-mono);background:var(--jem-raised);border:1px solid var(--jem-hairline);border-radius:var(--jem-r-xs)}
/* notifications inbox */
[data-theme=jem] .notifications-item{border-color:var(--jem-hairline);transition:background var(--jem-dur) var(--jem-ease)}
[data-theme=jem] .notifications-item:hover{background:rgba(255,255,255,.03)}
[data-theme=jem] .notifications-item.tw-border-l,[data-theme=jem] .notification.unread{border-left:2px solid var(--jem-iris)}
/* global search results */
[data-theme=jem] .search-result .header a,[data-theme=jem] .repository.search .header a{color:var(--jem-iris)}
/* admin panel */
[data-theme=jem] .admin .ui.segment,[data-theme=jem] .admin-setting-content{border-radius:var(--jem-r-md);border-color:var(--jem-hairline)}
/* wiki */
[data-theme=jem] .wiki .choose.page .menu,[data-theme=jem] .wiki-content-parts .ui.segment{border-radius:var(--jem-r-md);border-color:var(--jem-hairline)}

/* ============================================================
   LNK signature — the seal IS LNK. Never the letters, always the glyph
   (a chop, not text). Reversible skin CSS — no DB, no token.
   ============================================================ */
/* the avatar everywhere → the signature seal (LNK's stable identicon hash) */
[data-theme=jem] img.avatar[src*="30989f64f06053415a078541f3b847a6"]{content:url(/assets/img/lnk/lnk-avatar.png?v=2)}
/* every "LNK" name-text → the inline signature (swapped by glyph.js). Scales with
   the surrounding type, so it reads as a name-glyph in a heading or a sentence alike. */
[data-theme=jem] .lnk-glyph-inline{
  height:1.05em;width:auto;vertical-align:-0.19em;display:inline-block;
  margin:0 .06em;user-select:none;
}
/* on the profile header the name is large — let the glyph stand as a wordmark */
[data-theme=jem] .user.profile .username .lnk-glyph-inline{height:.86em;vertical-align:-0.1em}
