/* System page. Port of proto/system.html (hero and atlas; the type descriptions come later). */

.hsx { position: relative; overflow: clip; padding: 22px 0 0; }
.sh2 { position: relative; display: grid; gap: 14px; }
.sh2 > div:first-child { container-type: inline-size; min-width: 0; }
.h1s { margin-top: 8px; font-size: min(17vw, 88px, calc(100cqw / (var(--len, 8) * .6))); white-space: nowrap; font-weight: 600; letter-spacing: -.05em; line-height: .95; }
.ds2 { max-width: 30em; font-size: 17px; line-height: 1.42; color: var(--tx-body); }
.ds2 p { margin: 0 0 .6em; }
.mt2 { display: flex; flex-wrap: wrap; align-items: center; column-gap: 16px; row-gap: 10px; margin-top: 16px; font-size: 15px; color: var(--tx2); }
.mine2 { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 44px; padding: 0 14px; border-radius: var(--r-ctl); font-size: 15px; color: var(--tx); background: color-mix(in srgb, var(--sys) 14%, var(--card)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sys) 40%, transparent); }
.mine2 b { font-weight: 600; color: var(--sys); }

/* atlas */
.atl { position: relative; display: grid; grid-template-columns: var(--lead, 0) repeat(var(--cols), minmax(0, 1fr)); gap: 5px; margin-top: 26px; }
.atl.t16 { --lead: 22px; }
.atl.e9 { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); }
.ax { display: flex; flex-direction: column; justify-content: flex-end; padding: 0 2px 6px; font-size: 12px; color: var(--tx3); }
.ax b { font-size: 15px; font-weight: 600; letter-spacing: .02em; color: var(--tx2); }
.ax span { display: none; }
.ay { display: flex; align-items: center; justify-content: center; writing-mode: vertical-rl; transform: rotate(180deg); font-size: 13px; font-weight: 600; letter-spacing: .06em; color: var(--tx2); }
.ac { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 92px; padding: 10px 4px; border-radius: var(--r-ctl); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); text-align: center; }
.ac .sig { width: 16px; height: 29px; }
.ac .edot { width: 26px; height: 26px; }
.ac .cd { min-width: 0; max-width: 100%; font-size: 15px; font-weight: 600; letter-spacing: -.01em; overflow-wrap: break-word; hyphens: auto; }
.ac.me { background: color-mix(in srgb, var(--sys) 14%, var(--card)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sys) 40%, transparent); }
.ac.me em { position: absolute; top: 4px; left: 4px; right: 4px; padding: 1px 0; border-radius: var(--r-badge); font-style: normal; font-size: 12px; font-weight: 600; text-align: center; color: var(--on-sys); background: var(--sys); }
.sig { flex: none; }
.sg-g circle { fill: rgba(255,255,255,.18); } .sg-l { stroke: var(--sys); stroke-width: 1.8; } .sg-n { fill: var(--tx); }
.edot { flex: none; }
.edr { fill: none; stroke: rgba(255,255,255,.25); stroke-width: 1.5; } .edn { fill: var(--sys); }

/* launch atlas of the 12 systems: glyph and name, the cell is not a link */
.atl.lx .ac { min-height: 96px; padding: 12px 8px; }
.atl.lx .ac.me { padding-top: 26px; }
.atl.lx .cd { line-height: 1.15; }
/* long names in narrow phone cells: 13px and smaller padding */
.atl.lx.tight .ac { padding-inline: 4px; } .atl.lx.tight .cd { font-size: 13px; }
.atl.ls .cd { flex: 1; min-width: 0; }
.atl.lx .s2 { font-size: 12px; line-height: 1.25; color: var(--tx2); }
.ag { flex: none; width: 26px; height: 26px; }
.ag .agf { fill: var(--sys); } .ag .age { fill: rgba(255,255,255,.14); } .ag .agd { fill: rgba(255,255,255,.4); }
.ag .agr { fill: none; stroke: rgba(255,255,255,.22); stroke-width: 1.5; } .ag .agn { stroke: var(--sys); stroke-width: 2; stroke-linecap: round; }
.agl { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-badge); font-size: 15px; font-weight: 600; color: var(--sys); background: color-mix(in srgb, var(--sys) 14%, transparent); }
/* came by a friend's link: #t-<key> */
.ac:target { box-shadow: inset 0 0 0 1.5px var(--tx); padding-bottom: 28px; scroll-margin-top: 96px; }
.ac:target::after { content: attr(data-fr); position: absolute; left: 4px; right: 4px; bottom: 4px; padding: 1px 0; border-radius: var(--r-badge); font-size: 12px; font-weight: 600; text-align: center; color: var(--bg); background: var(--tx); }
.ath { margin-top: 32px; font-size: 15px; font-weight: 600; color: var(--tx2); }
.ath:first-child { margin-top: 26px; }
.ath + .atl { margin-top: 10px; }
/* 2x2 with axes: a taller cell so the vertical row label fits */
.atl.lq { --lead: 22px; }
/* Holland hexagon (career): 2x3 on a phone, cells at the vertices around the figure on a desktop */
.atl.hx { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.atl.hx .hxc { display: none; }
.hxf { display: block; width: 100%; height: 100%; max-height: 150px; overflow: visible; }
.hxf .e { fill: none; stroke: rgba(255,255,255,.22); stroke-width: 1.5; }
.hxf .d { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 1.5; stroke-dasharray: 2 5; }
.hxf circle { fill: var(--s2); stroke: rgba(255,255,255,.22); stroke-width: 1.5; }
.hxf .me circle { fill: var(--sys); stroke: none; }
.hxf text { fill: var(--tx-body); font-size: 15px; font-weight: 600; text-anchor: middle; }
.hxf .me text { fill: var(--on-sys); }
.note2 { margin-top: 12px; font-size: 13px; color: var(--tx2); }
.atl.lq .ac { min-height: 124px; }
.atl.lq .ay, .atl.mx > .mh { font-size: 12px; letter-spacing: .02em; }
/* general grid and a single group: two columns on phones */
.atl.lg { grid-template-columns: repeat(var(--pc, 2), minmax(0, 1fr)); }
/* groups: on phones as rows (group heading across) or as columns */
.atl.gp { grid-template-columns: repeat(var(--pc), minmax(0, 1fr)); }
.atl.gp.pr > .ax { grid-column: 1 / -1; padding-top: 10px; }
.atl.gp.pc { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); }
.atl.gp.pc > * { grid-column: var(--gc); }
.atl.gp.pc > .ax { grid-row: 1; } .atl.gp.pc > .ac { grid-row: var(--gr); }
/* table: turned on phones, columns made of rows */
.atl.mx { grid-template-columns: 22px repeat(var(--rows), minmax(0, 1fr)); }
.atl.mx > .cnr { grid-column: 1; grid-row: 1; }
.atl.mx > .mh { grid-column: 1; grid-row: var(--c); writing-mode: vertical-rl; transform: rotate(180deg); flex-direction: row; align-items: center; justify-content: center; padding: 0; }
.atl.mx > .mr { grid-row: 1; grid-column: var(--r); writing-mode: horizontal-tb; transform: none; justify-content: flex-start; align-items: flex-end; padding: 0 2px 6px; font-size: 15px; letter-spacing: 0; }
.atl.mx > .ac { grid-column: var(--r); grid-row: var(--c); }
/* scale: on phones as rows top to bottom */
.atl.ls { grid-template-columns: 1fr; }
.atl.ls .ac { flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 56px; padding: 8px 14px; text-align: left; }
.atl.ls .ac.me { padding-top: 8px; padding-right: 96px; }
.atl.ls .ac.me em { left: auto; right: 10px; top: 50%; padding: 3px 8px; transform: translateY(-50%); }
.atl.ls .ac:target { padding-bottom: 8px; padding-right: 110px; }
.atl.ls .ac:target::after { left: auto; right: 10px; bottom: auto; top: 50%; padding: 3px 8px; transform: translateY(-50%); }
.sce { margin: 0; font-size: 13px; font-weight: 600; color: var(--tx2); }
.sce.s0::after { content: " ↓"; } .sce.s1::before { content: "↓ "; }

@media (min-width: 900px) {
  .hsx { padding-top: 48px; }
  .sh2 { grid-template-columns: minmax(0, 1fr) 420px; gap: 40px; align-items: end; }
  .atl { gap: 10px; margin-top: 40px; }
  .atl.t16 { --lead: 34px; }
  .ax { padding: 0 6px 10px; } .ax span { display: block; margin-top: 2px; font-size: 13px; line-height: 1.25; }
  .ac { align-items: flex-start; justify-content: flex-start; min-height: 168px; padding: 18px; text-align: left; }
  .ac .sig { width: 22px; height: 40px; margin-bottom: 4px; }
  .ac .edot { width: 34px; height: 34px; margin-bottom: 4px; }
  .ac .cd { font-size: 28px; letter-spacing: -.03em; line-height: 1; }
  .ac.me em { top: 14px; left: auto; right: 14px; padding: 3px 8px; }
  .atl.lx .ac, .atl.lx.tight .ac { min-height: 136px; padding: 18px; }
  .atl.lx .ac.me { padding-top: 18px; }
  .atl.lx .cd, .atl.lx.tight .cd { margin-top: auto; font-size: 20px; letter-spacing: -.02em; line-height: 1.15; }
  .atl.lx.wide .cd { font-size: 17px; letter-spacing: -.01em; }
  .atl.lx .cd.big { font-size: 28px; letter-spacing: -.03em; }
  .atl.lx .s2 { font-size: 13px; }
  .ag { width: 32px; height: 32px; } .agl { width: 32px; height: 32px; }
  .ac:target { padding-bottom: 18px; }
  .ac:target::after { left: auto; right: 14px; bottom: auto; top: 14px; padding: 3px 8px; }
  .ac.me:target::after { top: auto; bottom: 14px; }
  .atl.lq { --lead: 34px; max-width: 760px; }
  .atl.hx { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(3, auto); max-width: 980px; }
  .atl.hx > .ac { grid-column: var(--hc); grid-row: var(--hr); }
  .atl.hx .hxc { display: flex; align-items: center; justify-content: center; grid-column: 2 / 4; grid-row: 2; padding: 6px 24px; }
  .atl.lg { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); }
  .atl.gp.pr { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); }
  .atl.gp.pr > * { grid-column: var(--gc); }
  .atl.gp.pr > .ax { grid-column: var(--gc); grid-row: 1; padding-top: 0; } .atl.gp.pr > .ac { grid-row: var(--gr); }
  .atl.mx { grid-template-columns: 34px repeat(var(--cols), minmax(0, 1fr)); }
  .atl.mx > .mh { grid-column: var(--c); grid-row: 1; writing-mode: horizontal-tb; transform: none; flex-direction: column; justify-content: flex-end; align-items: flex-start; padding: 0 6px 10px; }
  .atl.mx > .mr { grid-column: 1; grid-row: var(--r); writing-mode: vertical-rl; transform: rotate(180deg); justify-content: center; align-items: center; padding: 0; font-size: 13px; letter-spacing: .06em; }
  .atl.mx > .ac { grid-column: var(--c); grid-row: var(--r); }
  .atl.ls { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); }
  .atl.ls .ac { flex-direction: column; align-items: flex-start; min-height: 136px; padding: 18px; }
  .atl.ls .ac.me { padding-right: 18px; } .atl.ls .ac.me em { top: 14px; right: 14px; transform: none; }
  .atl.ls .ac:target { padding-right: 18px; } .atl.ls .ac:target::after { top: auto; bottom: 14px; right: 14px; transform: none; }
  .sce { grid-row: 2; align-self: start; padding-top: 4px; }
  .sce.s0 { grid-column: 1 / 3; } .sce.s1 { grid-column: -3 / -1; text-align: right; }
  .sce.s0::after { content: ""; } .sce.s1::before { content: ""; }
  .sce.s0::before { content: "← "; } .sce.s1::after { content: " →"; }
}
