/* Metaphasor mockup v4: the docs. Loaded after style.css. Here, and only here, pages explain. */

.nav a[aria-current] { color:var(--ink); background:var(--hover); }

.docs { display:grid; grid-template-columns:224px minmax(0,1fr); gap:64px; padding-top:40px; padding-bottom:80px; flex:1; align-content:start; }

/* the menu */
.docnav summary { display:none; }
.docnav h2 { font:650 12px/1.2 var(--sans); letter-spacing:.05em; text-transform:uppercase; color:var(--muted); margin:24px 0 8px; }
.docnav h2:first-child { margin-top:4px; }
.docnav a { display:block; padding:5px 10px; margin:0 -10px; border-radius:6px; color:var(--soft); }
.docnav a:hover { background:var(--hover); color:var(--ink); }
.docnav a[aria-current] { color:var(--ink); font-weight:600; background:var(--hover); box-shadow:inset 2px 0 0 var(--accent); }

/* the page */
.doc { max-width:720px; font:17px/1.65 var(--sans); color:var(--soft); }
.doc h1 { font:650 46px/1.08 var(--display); letter-spacing:-.03em; color:var(--ink); }
.doc .lead { margin-top:18px; font-size:21px; line-height:1.5; color:var(--ink); }
.doc h2 { margin-top:52px; font:650 26px/1.2 var(--display); letter-spacing:-.015em; color:var(--ink); }
.doc h3 { font:650 18px/1.3 var(--display); color:var(--ink); }
.doc p { margin-top:14px; }
.doc figure { margin:22px 0 0; }
.doc figcaption { margin-top:10px; font-size:14px; color:var(--muted); }

/* the five records, joined by one line */
.five { border:1px solid var(--line); border-radius:12px; background:var(--bg-raise); padding:8px 22px; }
.five li { display:grid; grid-template-columns:150px minmax(0,1fr); }
.five .k { padding:16px 20px 16px 0; }
.five .k b { display:block; font:650 17px/1.3 var(--display); color:var(--ink); }
.five .k span { display:block; margin-top:2px; font-size:13px; line-height:1.4; color:var(--muted); }
.five .v { position:relative; min-width:0; padding:16px 0 16px 26px; border-left:2px solid var(--line); }
.five .v::before { content:""; position:absolute; left:-7px; top:22px; width:12px; height:12px; border-radius:50%; background:var(--accent); box-shadow:0 0 0 4px var(--bg-raise); }
.five li:first-child .v { border-image:linear-gradient(to bottom, transparent 26px, var(--line) 26px) 1; }
.five li:last-child .v { border-image:linear-gradient(to bottom, var(--line) 26px, transparent 26px) 1; }
.five .q { margin:0; font-size:17px; line-height:1.5; color:var(--ink); }
.five .q.pass::before { content:""; display:inline-block; width:10px; height:10px; margin-right:8px; border-radius:50%; background:var(--ok-dot); }
.five .q.pass { font:14px/1.6 var(--mono); }
.five pre { margin:0; font:14px/1.6 var(--mono); color:var(--ink); white-space:pre-wrap; overflow-wrap:anywhere; }
.five .src { display:block; margin-top:6px; font:12px/1.4 var(--mono); color:var(--muted); }
.five a.src:hover, figcaption a:hover { color:var(--ink); text-decoration:underline; text-underline-offset:3px; }
figcaption a { color:var(--accent); font-weight:600; white-space:nowrap; }

.nums { width:100%; margin-top:22px; border-collapse:collapse; border:1px solid var(--line); border-radius:10px; background:var(--bg-raise); font-size:16px; }
.nums caption { caption-side:top; text-align:left; padding:0 0 8px; font-size:14px; font-weight:650; color:var(--ink); }
.nums th, .nums td { padding:9px 16px; text-align:left; border-top:1px solid var(--line-soft); }
.nums thead th { border-top:0; font-size:13px; font-weight:650; color:var(--muted); }
.nums tbody th { font-weight:400; color:var(--soft); }
.nums td { font-variant-numeric:tabular-nums; color:var(--soft); width:24%; }
.nums td:last-child { color:var(--ink); font-weight:650; }
.nums thead th:last-child { color:var(--accent); }

.life { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:10px; margin-top:22px; counter-reset:life; }
.life li { position:relative; padding:12px 14px 13px 36px; border:1px solid var(--line); border-radius:10px; background:var(--bg-raise); }
.life li::before { content:""; position:absolute; left:14px; top:17px; width:12px; height:12px; border-radius:50%; box-sizing:border-box; border:2px solid var(--faint); }
.life b { display:block; font:650 16px/1.3 var(--display); color:var(--ink); }
.life span { display:block; margin-top:2px; font-size:14px; line-height:1.45; color:var(--muted); }
.life .s-waiting::before { border-color:var(--open-dot); }
.life .s-building::before { border-color:var(--prop-dot); background:linear-gradient(90deg, transparent 50%, var(--prop-dot) 50%); }
.life .s-checking::before { border-color:var(--warn-dot); border-style:dashed; }
.life .s-working::before { border-color:var(--ok-dot); background:var(--ok-dot); }
.life .s-not::before { border-color:var(--bad-dot); background:var(--bad-dot); }

.gives { display:grid; grid-template-columns:1fr 1fr; gap:30px 40px; margin-top:24px; }
.gives p { margin-top:6px; font-size:16px; line-height:1.6; }

.next { display:flex; flex-wrap:wrap; gap:10px; margin-top:40px; padding-top:28px; border-top:1px solid var(--line-soft); }
.next .btn { height:40px; padding:0 16px; }

@media (max-width: 900px) {
  .docs { grid-template-columns:minmax(0,1fr); gap:20px; padding-top:20px; padding-bottom:56px; }
  .docnav summary { display:inline-flex; align-items:center; height:40px; padding:0 14px; border:1px solid var(--line); border-radius:6px; background:var(--bg-raise); color:var(--ink); font-weight:600; cursor:pointer; list-style:none; }
  .docnav summary::-webkit-details-marker { display:none; }
  .docnav nav { margin-top:12px; padding:14px 16px; border:1px solid var(--line); border-radius:10px; background:var(--bg-raise); }
  .docnav a { padding:9px 10px; }
  .doc { font-size:16px; }
  .doc h1 { font-size:34px; }
  .doc .lead { font-size:18px; }
  .doc h2 { margin-top:40px; font-size:22px; }
  .five { padding:4px 16px; }
  .five li { grid-template-columns:minmax(0,1fr); padding:12px 0; }
  .five li + li { border-top:1px solid var(--line-soft); }
  .five .k { padding:0 0 6px; }
  .five .v { padding:0; border-left:0; border-image:none !important; }
  .five .v::before { display:none; }
  .gives { grid-template-columns:minmax(0,1fr); gap:22px; }
  .life { grid-template-columns:minmax(0,1fr); }
  .next .btn { flex:1 1 100%; }
}

/* what was measured, a tab for each agent that did the building; without the script every table shows */
.mtablist { display:flex; gap:2px; margin-top:20px; border-bottom:1px solid var(--line); }
.mtablist [role="tab"] { margin-bottom:-1px; padding:9px 16px; border:0; border-bottom:2px solid transparent; background:none; font:600 15px/1.3 var(--sans); color:var(--muted); cursor:pointer; }
.mtablist [role="tab"]:hover { color:var(--ink); }
.mtablist [role="tab"][aria-selected="true"] { color:var(--ink); border-bottom-color:var(--accent); }
.mtabs [role="tabpanel"][hidden] { display:none; }
.mtabs [role="tabpanel"]:focus-visible { outline:2px solid var(--accent); outline-offset:4px; border-radius:6px; }
@media (max-width: 720px) { .mtablist [role="tab"] { padding:11px 14px; } }

/* the pages beyond the first: links in the words, lists, commands and what they print, a file's text, tables */
.doc p a, .doc li a, .doc td a, .doc dd a { color:var(--accent); font-weight:600; }
.doc p a:hover, .doc li a:hover, .doc td a:hover, .doc dd a:hover { text-decoration:underline; text-underline-offset:3px; }
.doc code { font:.86em/1.4 var(--mono); padding:1px 5px; border:1px solid var(--line-soft); border-radius:5px; background:var(--bg-raise); color:var(--ink); overflow-wrap:anywhere; }
.doc .pts { margin-top:14px; }
.doc .pts li { position:relative; margin-top:9px; padding-left:22px; }
.doc .pts li::before { content:""; position:absolute; left:4px; top:.72em; width:6px; height:6px; border-radius:50%; background:var(--faint); }
.doc .steps { margin-top:8px; counter-reset:step; }
.doc .steps > li { position:relative; margin-top:36px; padding-left:46px; counter-increment:step; }
.doc .steps > li::before { content:counter(step); position:absolute; left:0; top:-2px; width:30px; height:30px; border:1px solid var(--line); border-radius:50%; background:var(--bg-raise); font:650 15px/30px var(--display); text-align:center; color:var(--ink); }
.doc .steps h3 { font-size:20px; }
.term, .file pre { margin-top:14px; padding:14px 16px; border:1px solid var(--line); border-radius:10px; background:var(--bg-raise); font:14px/1.6 var(--mono); color:var(--soft); white-space:pre-wrap; overflow-wrap:anywhere; tab-size:2; }
.term .c { color:var(--ink); font-weight:600; }
.term .c::before { content:"$ "; font-weight:400; color:var(--muted); user-select:none; }
.term .cut { color:var(--muted); }
.doc .file { margin-top:14px; }
.file figcaption { margin:0; padding:7px 16px; border:1px solid var(--line); border-bottom:0; border-radius:10px 10px 0 0; background:var(--hover); font:12px/1.4 var(--mono); color:var(--muted); }
.file pre { margin-top:0; border-radius:0 0 10px 10px; color:var(--ink); }
.ref { width:100%; margin-top:18px; border-collapse:collapse; font-size:16px; }
.ref caption { caption-side:top; text-align:left; padding:0 0 6px; font:650 18px/1.3 var(--display); color:var(--ink); }
.ref th, .ref td { padding:9px 14px 9px 0; text-align:left; vertical-align:top; border-top:1px solid var(--line-soft); }
.ref thead th { border-top:0; font-size:13px; font-weight:650; color:var(--muted); }
.ref tbody th { font-weight:400; white-space:nowrap; }
.ref td:last-child { padding-right:0; }
.doc .see { margin-top:26px; padding:14px 18px; border:1px solid var(--line); border-radius:10px; background:var(--bg-raise); font-size:16px; }
.doc .see b { color:var(--ink); }
.pn { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:52px; padding-top:28px; border-top:1px solid var(--line-soft); }
.pn a { display:block; padding:12px 16px; border:1px solid var(--line); border-radius:10px; }
.pn a:hover { border-color:var(--muted); background:var(--hover); }
.pn span { display:block; font-size:13px; color:var(--muted); }
.pn b { display:block; margin-top:2px; font:650 17px/1.3 var(--display); color:var(--ink); }
.pn .nxt { grid-column:2; text-align:right; }
@media (max-width: 900px) {
  .doc .steps > li { padding-left:0; padding-top:40px; }
  .term, .file pre { font-size:13px; padding:12px; }
  .ref { font-size:15px; }
  .ref tbody th { white-space:normal; }
  .pn { grid-template-columns:minmax(0,1fr); }
  .pn .nxt { grid-column:1; text-align:left; }
}

/* what a person can do about a thing the host can do */
.doc p.more { margin-top:6px; color:var(--muted); }
.doc p.more b { font-weight:600; color:var(--soft); }
.doc p.more + h3 { margin-top:28px; }
.doc h2 + h3 { margin-top:16px; }
/* the vocabulary: the word, what it is, and the nearest thing a newcomer knows; on a narrow screen each word is a block of its own */
.ref.words tbody th { width:24%; font-weight:650; color:var(--ink); white-space:normal; }
.ref.words td:last-child { width:34%; color:var(--muted); }
@media (max-width: 720px) {
  .ref.words, .ref.words tbody, .ref.words tr, .ref.words tbody th, .ref.words td, .ref.words td:last-child { display:block; width:auto; }
  .ref.words thead { display:none; }
  .ref.words tr { padding:12px 0; border-top:1px solid var(--line-soft); }
  .ref.words tbody th, .ref.words td { padding:0; border:0; }
  .ref.words td { margin-top:4px; }
  .ref.words.not td:nth-child(2)::before { content:"We say: "; color:var(--muted); }
}
.doc p + h3, .doc table + h3, .doc ul + h3, .doc ol + h3, .doc figure + h3, .doc pre + h3 { margin-top:28px; }
