/* The standards board and modal (standards-view.js), shared by standards.html and showcase.html, in the rating
   page's Construction design (rate/index.html, ref/web-brain/DESIGN.md): hairline construction lines, square cards,
   no shadows. */
:root {
  --bg: #EEEAE7; --ink: #221F20; --ink2: #4B4748; --ink3: #625C5A;
  --line: #93B8B1; --rule: #D6CFC9; --az: #0D89C0; --az-text: #0A71A0; --sheet: #FFFFFF;
  --font: 'Jost', system-ui, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #221F20; --ink: #EEEAE7; --ink2: #ABA4A2; --ink3: #8C8583;
  --line: #285C5E; --rule: #3A3536; --az-text: #0D89C0; --sheet: #F4F1EE;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.5 var(--font); }
body.locked { overflow: hidden; }
button { font-family: var(--font); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--az-text); outline-offset: 5px; }
a { color: var(--az-text); }
.gut { padding: 0 3rem; }

.hd { height: 3rem; border-bottom: 1px solid var(--rule); display: flex; align-items: center; gap: 1rem; }
.hd .name { font-weight: 600; }
.hd .sp { flex: 1; }
.hb { height: 2.25rem; padding: 0 .625rem; display: inline-flex; align-items: center; gap: .5rem; text-decoration: none;
  border: 1px solid var(--rule); border-radius: 2px; background: none; color: var(--ink); font: 500 .9375rem var(--font); cursor: pointer; }
.hb:hover { border-color: var(--ink3); }
.hb:focus-visible { outline-offset: 2px; }
.hb svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.6; }

.message { padding-top: 4rem; color: var(--ink2); }
h1 { font: 500 2.625rem/1.1 var(--font); letter-spacing: -.01em; margin: 1.75rem 0 .75rem; }
.doms { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin-bottom: 2rem; }
.doms button { background: none; border: 0; padding: .25rem 0; color: var(--ink2); font: 500 .9375rem var(--font); cursor: pointer;
  border-bottom: 2px solid transparent; }
.doms button:hover { color: var(--ink); }
.doms button[aria-current="true"] { color: var(--ink); border-bottom-color: var(--az); }

.board { overflow-x: auto; padding-bottom: 3rem; }
.cols { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 19rem; gap: 4.5rem; width: max-content; padding: 0 3rem 0 3rem; }
.col h2 { font: 500 1.3125rem var(--font); margin: 0 0 1.25rem; padding-bottom: .5rem; position: relative; }
.col h2::after { content: ""; position: absolute; left: -10px; right: -10px; bottom: 0; height: 1px; background: var(--line); }
.cards { display: flex; flex-direction: column; gap: 1.25rem; }
/* opaque, so the lines drawn under them never cross their text */
.card { position: relative; z-index: 1; display: block; width: 100%; text-align: left; cursor: pointer;
  background: var(--bg); color: var(--ink); border: 1px solid var(--rule); border-radius: 2px; padding: 1.125rem 1.25rem; }
.card:hover { border-color: var(--ink3); }
/* other domains: a dashed border and softer text; faded by colour, not opacity, since a see-through card would
   show the lines behind it */
.card.dim { border-style: dashed; }
.card.dim, .card.dim .code, .card.dim .txt { color: var(--ink3); }
/* builds-towards lines: under the cards, hairline construction teal; a hovered card's own lines darken */
.edges { position: absolute; top: 0; left: 0; z-index: 0; pointer-events: none; overflow: visible; }
.edges > path { fill: none; stroke: var(--line); stroke-width: 1.25; transition: opacity .15s; marker-end: url(#arrow); }
.edges marker path { fill: none; stroke: var(--line); stroke-width: 1.25; }
.edges marker#arrow-on path { stroke: var(--ink3); }
.edges.focus > path { opacity: .25; }
.edges.focus > path.on { opacity: 1; stroke: var(--ink3); stroke-width: 1.5; marker-end: url(#arrow-on); }
.card .code { display: block; font: 600 .9375rem var(--font); font-variant-numeric: tabular-nums; color: var(--ink2); }
.card .txt { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
  margin-top: .375rem; font: 400 1rem/1.45 var(--font); }


/* the modal: an outlined panel on the page colour, the page dimmed behind it by its own colour at 88% */
.scrim { position: fixed; inset: 0; z-index: 10; overflow-y: auto; padding: 3.5rem 1rem; display: flex; justify-content: center;
  background: color-mix(in srgb, var(--bg) 88%, transparent); }
.dlg { position: relative; width: 100%; max-width: 52rem; height: max-content; background: var(--bg);
  border: 1px solid var(--ink3); border-radius: 2px; padding: 2.5rem 3rem 3rem; }
.dlg:focus { outline: none; }
.dlg .x { position: absolute; top: 1rem; right: 1rem; }
.trail { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; margin: 0 6rem 1.5rem 0; color: var(--ink3); font: 500 .9375rem var(--font); }
.trail button { background: none; border: 0; padding: .125rem 0; color: var(--ink2); font: 500 .9375rem var(--font); cursor: pointer; font-variant-numeric: tabular-nums; }
.trail button:hover { color: var(--az-text); }
.trail button.cur { color: var(--ink); font-weight: 600; }
.trail button.later { color: var(--ink3); text-decoration: underline dotted; text-underline-offset: .25em; }
.dlg .code { font: 600 .9375rem var(--font); color: var(--ink2); font-variant-numeric: tabular-nums; }
.dlg .meta { color: var(--ink2); font: 500 .9375rem var(--font); }
.stmt { position: relative; margin: 1.5rem 0 0; padding-left: 1.25rem; font-size: 1.3125rem; line-height: 1.5; }
.stmt::before { content: ""; position: absolute; left: 0; top: -.5rem; bottom: -.5rem; width: 1px; background: var(--line); }
.subs { margin: 1rem 0 0; padding-left: 1.25rem; list-style: none; }
.subs li { margin-top: .375rem; }
.dlg h3 { position: relative; margin: 2.5rem 0 .75rem; padding-bottom: .5rem; font: 600 1.1875rem var(--font); }
.dlg h3::after { content: ""; position: absolute; left: -10px; right: -10px; bottom: 0; height: 1px; background: var(--line); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.lnk { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--rule); padding: .625rem 0; cursor: pointer; color: var(--ink); }
.lnk b { display: block; font: 600 .9375rem var(--font); color: var(--az-text); font-variant-numeric: tabular-nums; }
.lnk span { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink2); font: 400 .9375rem var(--font); }
.lnk:hover span { color: var(--ink); }
.none { color: var(--ink2); margin: .5rem 0 0; }

@media (max-width: 60rem) {
  .gut, .cols { padding-left: 1rem; padding-right: 1rem; }
  h1 { font-size: 2rem; }
  .dlg { padding: 2rem 1.25rem 2rem; }
  .two { grid-template-columns: 1fr; gap: 0; }
}
