/* source-glossary-columns.css - the column view of the Sources workspace (web/modules/source-glossary-columns.js).
   Theme tokens only. The chips reuse .sg-state of source-glossary.css (colour, border style and word). The two reading
   states that are not statements (not known, does not apply) are drawn here: grey, with a dotted or no border, and
   always their words. The diagram's lines differ by style (solid, double, dashed, dotted) as well as colour. */

.sgc-layout { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(320px, 3fr); gap: var(--space-4); align-items: start; }
@media (max-width: 900px) { .sgc-layout { grid-template-columns: 1fr; } }
/* The catalog has its own full schema and Back to all columns control. */
[data-sg-card-panel="columns"]:has([data-sg-all-columns]:not([hidden])) .sgc-layout { grid-template-columns: minmax(0, 1fr); }
[data-sg-card-panel="columns"]:has([data-sg-all-columns]:not([hidden])) .sgc-list-pane { display: none; }

/* The column list: a filter, a count line and a window of rows. */
.sgc-list-tools { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.sgc-field { display: grid; gap: 2px; font-size: var(--fs-micro); color: var(--text-faint); font-weight: 600; flex: 1 1 140px; }
.sgc-field input, .sgc-field select { font: inherit; font-size: var(--fs-small); font-weight: 400; padding: 6px 8px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); }
.sgc-count { font-size: var(--fs-small); color: var(--text-dim); margin: var(--space-2) 0 var(--space-1); }
.sgc-col-scroll { height: 420px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.sgc-col-scroll:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.sgc-col-list { list-style: none; margin: 0; padding: 0; }
.sgc-pad { padding: 0; margin: 0; }
.sgc-col-row { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: var(--space-2); row-gap: 1px; align-content: center; width: 100%; height: 46px; padding: 0 var(--space-2); text-align: left; background: var(--surface); border: 0; border-bottom: 1px solid var(--border-subtle); font: inherit; color: var(--text); cursor: pointer; overflow: hidden; }
.sgc-col-row:hover { background: var(--surface-subtle); }
.sgc-col-row.is-selected { background: var(--brand-tint); box-shadow: inset 3px 0 0 var(--brand); }
.sgc-col-row:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.sgc-col-name { font-family: var(--mono); font-size: var(--fs-small); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sgc-col-type { grid-column: 1; grid-row: 2; font-size: var(--fs-micro); color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sgc-col-concept { grid-column: 2; grid-row: 1; justify-self: end; font-size: var(--fs-micro); color: var(--text-dim); white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
/* A concept is named by its label; its id in the concept list sits under or beside it, small and in mono. */
.sgc-col-concept-id { grid-column: 2; grid-row: 2; justify-self: end; max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sgc-concept-id { font-family: var(--mono); font-size: var(--fs-micro); color: var(--text-faint); }
.sgc-slot-code { margin-top: 1px; }
.sgc-mark { display: inline-block; padding: 0 4px; border: 1px dashed var(--warn-border); border-radius: var(--radius-pill); color: var(--warn-text); font-weight: 600; }
.sgc-gone-line { margin: var(--space-2) 0 0; }
.sgc-gone { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); font-size: var(--fs-small); }
.sgc-gone li { display: grid; gap: 2px; padding: var(--space-2); border: 1px dotted var(--border-strong); border-radius: var(--radius-sm); }
.sgc-gone-name { text-decoration: line-through; color: var(--text-dim); }

/* The record. */
.sgc-view { display: grid; gap: var(--space-3); min-width: 0; }
.sgc-head { display: grid; gap: var(--space-1); }
.sgc-crumb { margin: 0; font-size: var(--fs-micro); color: var(--text-faint); font-family: var(--mono); }
.sgc-title { margin: 0; font-size: var(--fs-h3); color: var(--text); }
.sgc-summary { margin: 0; font-size: var(--fs-small); color: var(--text-body); display: flex; flex-wrap: wrap; gap: var(--space-1); align-items: center; }
.sgc-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.sgc-digest { font-family: var(--mono); }
.sgc-section { border-top: 1px solid var(--border); padding-top: var(--space-3); min-width: 0; }
.sgc-h { margin: 0 0 var(--space-1); font-size: var(--fs-h3); color: var(--text); }
.sgc-intro { margin: 0 0 var(--space-2); font-size: var(--fs-small); color: var(--text-dim); }
.sgc-sub { margin: var(--space-3) 0 var(--space-1); font-size: var(--fs-micro); font-weight: 600; color: var(--text-faint); }
.sgc-dl { margin: 0; display: grid; gap: var(--space-2); }
.sgc-row { display: grid; grid-template-columns: minmax(130px, 200px) 1fr; gap: var(--space-2); align-items: baseline; }
@media (max-width: 640px) { .sgc-row { grid-template-columns: 1fr; } }
.sgc-row dt { font-size: var(--fs-micro); font-weight: 600; color: var(--text-faint); }
.sgc-row dd { margin: 0; font-size: var(--fs-small); color: var(--text-body); min-width: 0; overflow-wrap: anywhere; }
.sgc-value { color: var(--text); }
.sgc-code { font-family: var(--mono); font-size: var(--fs-small); }
.sgc-faint { color: var(--text-faint); font-size: var(--fs-micro); }
.sgc-note { margin: var(--space-1) 0; font-size: var(--fs-small); color: var(--text-dim); }
.sgc-why { display: block; font-size: var(--fs-micro); color: var(--text-dim); }
.sgc-chip { margin-left: 4px; vertical-align: baseline; }
.sgc-chip[data-sgc-state="not-known"] { color: var(--text-dim); background: var(--surface); border: 1px dotted var(--border-strong); }
.sgc-chip[data-sgc-state="not-applicable"], .sgc-chip[data-sgc-state="unstated"] { color: var(--text-faint); background: var(--surface-subtle); border: 1px solid var(--border-subtle); }
.sgc-stmt.is-suggested .sgc-value { font-style: italic; }
.sgc-sugg-word { color: var(--warn-text); font-weight: 600; font-style: normal; }
.sgc-review { margin-left: 4px; min-height: 24px; padding: 2px 8px; font-size: var(--fs-micro); }
.sgc-list, .sgc-keys, .sgc-acts, .sgc-gaps { margin: 0; padding-left: var(--space-4); display: grid; gap: var(--space-1); font-size: var(--fs-small); color: var(--text-body); }
.sgc-acts { list-style: none; padding-left: 0; margin-top: var(--space-1); }
.sgc-linkish { background: none; border: 0; padding: 0; font: inherit; font-family: var(--mono); font-size: var(--fs-small); color: var(--brand); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.sgc-context { margin-top: var(--space-3); padding: var(--space-2) var(--space-3); background: var(--surface-subtle); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); }
.sgc-context-title { margin: 0 0 var(--space-2); font-size: var(--fs-micro); font-weight: 600; color: var(--text-faint); }
.sgc-untrusted { padding: var(--space-2) var(--space-3); border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); }
.sgc-table { border-collapse: collapse; width: 100%; font-size: var(--fs-small); margin: var(--space-1) 0; }
.sgc-table th, .sgc-table td { text-align: left; padding: 4px 8px; border-bottom: 1px solid var(--border-subtle); vertical-align: top; }
.sgc-table th { font-size: var(--fs-micro); color: var(--text-faint); font-weight: 600; }
.sgc-codes { max-width: 560px; }
.sgc-diff { max-width: 640px; }
.sgc-changes { margin: var(--space-2) 0 0; padding-left: var(--space-4); display: grid; gap: var(--space-3); font-size: var(--fs-small); }
.sgc-change-kind { font-weight: 600; color: var(--text); margin-right: var(--space-1); }
.sgc-identities { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-1); }
.sgc-identity { padding: var(--space-1) var(--space-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.sgc-identity.is-unknown { border-style: dotted; }
.sgc-identity.is-na { border-color: var(--border-subtle); }
.sgc-identity-kind { display: inline-block; min-width: 76px; font-weight: 600; color: var(--text); }
.sgc-restricted-note { margin: 0; padding: var(--space-2) var(--space-3); border-left: 3px solid var(--warn-border); background: var(--surface-subtle); font-size: var(--fs-small); color: var(--text-body); }
.sgc-refusal { padding: var(--space-2) var(--space-3); border: 1px solid var(--down-border); border-radius: var(--radius-sm); }
.sgc-refused { margin: 0; color: var(--down-text); font-size: var(--fs-small); }
.sgc-text { max-height: 320px; }
/* The card as text under the column list: the pane is narrow, so long lines wrap and each line keeps its indent. */
.sgc-card-text { margin: var(--space-1) 0 0; overflow-wrap: anywhere; }
/* Two notes about a restricted table one under the other (the table became restricted while it was open). */
.sgc-restricted-note + .sgc-restricted-note, .sgc-restricted-note + .sgc-note { margin-top: var(--space-2); }
.sgc-legend { font-size: var(--fs-small); color: var(--text-body); }
.sgc-legend summary { cursor: pointer; font-size: var(--fs-micro); font-weight: 600; color: var(--text-faint); }
.sgc-legend ul { list-style: none; margin: var(--space-1) 0 0; padding: 0; display: grid; gap: var(--space-1); }

/* The link diagram. */
.sgc-figure { margin: 0; overflow-x: auto; }
.sgc-links-svg { display: block; max-width: none; font-family: var(--font); }
.sgc-links-svg text { stroke: none; }
[data-sgc-section="links"] { container-type: inline-size; }
[data-sgc-section="links"] .sgc-list { list-style: none; padding: 0; }
[data-sgc-link] { padding: var(--space-2) 0; border-bottom: 1px solid var(--border-subtle); }
.sgc-peer-field { display: flex; align-items: baseline; gap: var(--space-2); margin-bottom: var(--space-1); }
.sgc-peer-field > span { color: var(--text-secondary); }
.sgc-linkish { text-align: start; overflow-wrap: anywhere; }
.sgc-link-evidence { font-size: var(--fs-micro); color: var(--text-secondary); margin-top: var(--space-1); }
.sgc-link-evidence > summary { width: fit-content; cursor: pointer; }
@container (max-width: 560px) {
  [data-sgc-section="links"] .sgc-links-diagram { display: none; }
}
.sgc-side-head { font-size: var(--fs-micro); font-weight: 600; fill: var(--text-faint); }
.sgc-more { font-size: var(--fs-micro); fill: var(--text-dim); }
.sgc-center rect { fill: var(--brand-tint); stroke: var(--brand); stroke-width: 2; }
.sgc-center-title { font-family: var(--mono); font-size: var(--fs-small); font-weight: 600; fill: var(--text); }
.sgc-node rect { fill: var(--surface); stroke: var(--border-strong); stroke-width: 1.5; }
.sgc-node.is-open { cursor: pointer; }
.sgc-node.is-open:hover rect, .sgc-node.is-open:focus rect { stroke: var(--brand); }
.sgc-node:focus { outline: none; }
.sgc-node:focus-visible rect { stroke: var(--focus-ring); stroke-width: 3; }
.sgc-node-title { font-family: var(--mono); font-size: var(--fs-micro); fill: var(--text); }
.sgc-node-sub { font-size: var(--fs-micro); fill: var(--text-dim); }
.sgc-node-col { font-family: var(--mono); font-size: var(--fs-micro); fill: var(--text-body); }
.sgc-node[data-sgc-line="dashed"] rect { stroke-dasharray: 5 3; stroke: var(--warn-border); }
.sgc-node[data-sgc-line="dotted"] rect { stroke-dasharray: 1.5 3; stroke: var(--down-border); }
.sgc-node[data-sgc-line="double"] rect { stroke: var(--ok-border); stroke-width: 3; }
.sgc-edge path, .sgc-legend-line path { fill: none; stroke: var(--text-faint); stroke-width: 1.6; }
.sgc-edge .sgc-arrow { fill: none; }
.sgc-edge[data-sgc-edge-state="declared"] path, .sgc-legend-line[data-sgc-edge-state="declared"] path { stroke: var(--brand); }
.sgc-edge[data-sgc-edge-state="module-reviewed"] path, .sgc-legend-line[data-sgc-edge-state="module-reviewed"] path { stroke: var(--info-text); }
.sgc-edge[data-sgc-edge-state="verified"] path, .sgc-legend-line[data-sgc-edge-state="verified"] path { stroke: var(--ok-text); stroke-width: 1.2; }
.sgc-edge[data-sgc-line="dashed"] path, .sgc-legend-line[data-sgc-line="dashed"] path { stroke: var(--warn-text); stroke-dasharray: 6 4; }
.sgc-edge[data-sgc-line="dotted"] path, .sgc-legend-line[data-sgc-line="dotted"] path { stroke: var(--down-text); stroke-dasharray: 1.5 3.5; }
.sgc-line-legend { list-style: none; margin: var(--space-1) 0 var(--space-2); padding: 0; display: grid; gap: 2px; font-size: var(--fs-micro); color: var(--text-dim); }
.sgc-line-legend li { display: flex; align-items: center; gap: var(--space-2); }

/* The stored-item lookup of a generic answer store, and its answer. */
.sgc-lookup { margin: var(--space-2) 0; padding: var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-subtle); }
.sgc-lookup .sgc-list-tools { align-items: end; }
.sgc-resolution { margin-top: var(--space-2); font-size: var(--fs-small); color: var(--text-body); }
.sgc-steps { margin: 0; padding-left: var(--space-4); font-size: var(--fs-small); color: var(--text-body); display: grid; gap: 2px; }

/* The system's value readings: each bar part is also said in words beside it; suggested is striped, not only coloured. */
.sgc-summary-box { margin-top: var(--space-2); }
.sgc-summary-table th[scope="row"] { font-size: var(--fs-micro); font-weight: 600; color: var(--text-faint); text-align: left; white-space: nowrap; }
.sgc-summary-table td { font-size: var(--fs-micro); color: var(--text-dim); }
.sgc-bar { display: flex; width: 120px; height: 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.sgc-bar-fact { background: var(--ok-text); }
.sgc-bar-sugg { background: repeating-linear-gradient(135deg, var(--warn-text) 0 3px, var(--warn-tint) 3px 6px); }
.sgc-bar-unknown { background: transparent; }
@media (max-width: 720px) { .sgc-summary-table td:nth-child(2) { display: none; } }

/* The blinding row of a value reading: what is stated and what is acted on, one line each. */
.sgc-blind-line { display: block; }

/* What this record answers: the owner's seven questions, one line each, above the sections. Not known is a dotted
   chip (above) and its words; each line ends with a way to its section. */
.sgc-answers { display: grid; gap: var(--space-1); padding: var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-subtle); min-width: 0; }
.sgc-answers .sgc-h { font-size: var(--fs-small); }
.sgc-answers-list { gap: var(--space-2); }
.sgc-answers-list .sgc-row { padding-bottom: var(--space-2); border-bottom: 1px solid var(--border-subtle); }
.sgc-answers-list .sgc-row:last-child { padding-bottom: 0; border-bottom: 0; }
.sgc-answers-list .sgc-chip:first-child { margin-left: 0; }
.sgc-answer-standing { font-size: var(--fs-micro); font-weight: 600; color: var(--text-dim); }
.sgc-answer-parts { color: var(--text-body); }
.sgc-answer-none, .sgc-answer-gap { margin: var(--space-1) 0 0; }
.sgc-answer-gaps { list-style: none; margin: var(--space-1) 0 0; padding: 0 0 0 var(--space-2); display: grid; gap: 2px; border-left: 2px dotted var(--border-strong); }
.sgc-jump { margin-top: var(--space-1); min-height: 24px; padding: 2px 8px; font-size: var(--fs-micro); }
.sgc-h:focus { outline: none; }
.sgc-h:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* The mappings of one column: six columns, so it scrolls sideways on a narrow screen rather than the page. */
.sgc-map-table { display: block; overflow-x: auto; }

/* The system's USDM names: a table that scrolls sideways on a narrow screen rather than the page. */
.sgc-usdm-table { display: block; overflow-x: auto; }
.sgc-usdm-table td { min-width: 120px; }
.sgc-usdm-without { padding-left: var(--space-4); }

/* Round 5: a column deprecated or proposed for deprecation is a mark, a word and a line style; colour comes last.
   A proposal is dashed and italic (a suggestion, never a fact); deprecated is solid. */
.sgc-life { display: inline-flex; gap: 3px; align-items: baseline; padding: 0 5px; font-size: var(--fs-micro); font-weight: 600; color: var(--text-body); border: 1px solid var(--down-border); border-radius: var(--radius-sm); background: var(--down-tint); }
.sgc-life[data-sgc-life="proposed"] { border-style: dashed; border-color: var(--warn-border); background: transparent; font-style: italic; }
.sgc-life-mark { font-weight: 700; }
.sgc-life-line { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin: 0; font-size: var(--fs-small); }
