/* One stylesheet, no build step. The value of this project is that it still
   runs in five years, and a toolchain is the part that rots first. That rules
   out a webfont too: the stack below draws on fonts the machine already has,
   so the page looks the same on a plane as it does online.

   ── The hub's look, not the tracker's ──

   This was the Mindbuilding Tracker's: Inter on near-black, 12px radii, an
   indigo accent, and a gradient behind the logo. It reads well and it reads
   like somewhere else — the hub next door is monospace, wide-tracked caps,
   desaturated sage, not one rounded corner, and a drawn forest behind it all.
   Two looks one click apart is two applications, and this is one: the archive
   is where the hub's record is kept, reached from the hub's own front page.

   So the palette, the type and the shapes are `shell/css/shell.css`'s, and the
   background picture is the same drawing. Copied rather than shared, because
   the archive is published as its own repository and has to stand alone with
   no build step to fetch anything for it — the same reason it has no webfont.
   `test/run.js` holds the two files to the same tokens so the copy cannot drift
   into a third look.

   ── What did not change ──

   The structure. A sidebar you navigate from, a row of headline figures, and
   the rest in panels: that was right, and restyling is not redesigning. And
   colour is still reserved for the sources — each has one hue, the hub's, on
   its dot in the sidebar, the bar down its card and its chart. That is the one
   place this page is allowed to be colourful, and against sage it reads more
   clearly than it did against indigo. */

:root {
  /* ---- palette: sage through to near-black, from the hub ---- */
  --bg: #080d0b;

  /* The panels are translucent, which is the whole of the hub's look: the
     picture behind them is what makes a page of dark rectangles a place. They
     have to stay readable over a photograph somebody swapped in, so the
     sidebar is the most opaque thing here and the inputs the least. */
  --bg-sidebar: rgba(10, 16, 13, .84);
  --bg-card: rgba(15, 23, 19, .62);
  --bg-hover: rgba(26, 40, 33, .76);
  --bg-input: rgba(8, 13, 11, .55);

  --text-primary: #e6f4ec;
  --text-secondary: #c9e0d3;
  --text-muted: #7e9a8a;

  /* Sage lines rather than white ones. White borders on a picture read as
     scratches; the accent at low alpha reads as the frame it is. */
  --border: rgba(143, 189, 164, .16);
  --border-strong: rgba(143, 189, 164, .32);

  /* One accent, and it is quiet. Sage measures about 7.5:1 against the panel,
     so unlike indigo it can carry small text as well as borders and fills. */
  --accent: #8fbda4;
  --accent-hover: #b7d8c5;
  --accent-rgb: 143, 189, 164;
  --accent-2: #b7d8c5;

  --ok: #a9d2bb;
  --bad: #8c4a4a;
  /* The one warm thing on the page, and it stays warm — "the file on disk is
     behind this page" has to be findable at a glance. Taken down from amber to
     something that sits in the same picture as the sage. */
  --warn: #c9a86a;

  /* Nothing here is rounded. Both tokens stay so the rules that used them keep
     reading as shape decisions rather than as omissions. */
  --radius: 0;
  --radius-sm: 0;
  --shadow: 0 1px 2px rgba(0,0,0,.5), 0 20px 48px -26px rgba(0,0,0,.95);

  --sidebar-w: 240px;

  /* One family, and it is the hub's. The stack is every monospace worth having,
     in the order a machine is likely to have them, ending at the generic that
     always exists. */
  --font-display: ui-monospace, "JetBrains Mono", "IBM Plex Mono", "SF Mono",
                  SFMono-Regular, Menlo, Consolas, "DejaVu Sans Mono", monospace;
  --font-body: var(--font-display);
  --font-mono: var(--font-display);

  --bg-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 1000' preserveAspectRatio='xMidYMid slice'><defs><linearGradient id='s' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%231a2621'/><stop offset='.55' stop-color='%23172320'/><stop offset='1' stop-color='%230b100e'/></linearGradient><linearGradient id='f' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23c3d8cc' stop-opacity='0'/><stop offset='.45' stop-color='%23c3d8cc' stop-opacity='.55'/><stop offset='1' stop-color='%23c3d8cc' stop-opacity='0'/></linearGradient><linearGradient id='g' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23050807' stop-opacity='0'/><stop offset='1' stop-color='%23050807' stop-opacity='.95'/></linearGradient></defs><rect width='1600' height='1000' fill='url(%23s)'/><rect y='380' width='1600' height='300' fill='url(%23f)' opacity='.2'/><path d='M-162 595L-158 595L-131 585L-155 581L-130 571L-150 567L-128 557L-154 553L-129 543L-142 540L-126 530L-143 526L-126 516L-137 512L-125 502L-130 498L-123 488L-126 484L-122 474L-120 470L-118 474L-114 484L-117 488L-110 498L-115 502L-103 512L-114 516L-97 526L-114 530L-98 540L-111 543L-86 553L-112 557L-90 567L-110 571L-85 581L-109 585L-82 595ZM-100 608L-100 608L-78 598L-100 595L-78 586L-89 582L-75 573L-90 570L-75 560L-89 557L-75 548L-85 544L-74 535L-77 531L-72 522L-75 519L-71 510L-69 506L-68 510L-63 519L-67 522L-61 531L-65 535L-54 544L-64 548L-50 557L-64 560L-49 570L-64 573L-50 582L-61 586L-39 595L-61 598L-39 608ZM-73 608L-79 608L-50 596L-72 592L-48 580L-60 576L-45 564L-61 560L-45 548L-55 544L-44 532L-53 528L-43 516L-46 512L-41 500L-39 496L-37 500L-32 512L-35 516L-26 528L-35 532L-23 544L-33 548L-17 560L-33 564L-18 576L-30 580L-6 592L-28 596L0 608ZM-34 611L-40 611L-7 598L-35 593L-6 580L-25 575L-3 563L-22 558L-2 545L-17 540L-1 527L-8 522L2 509L-1 504L3 491L5 486L7 491L12 504L9 509L18 522L12 527L28 540L13 545L33 558L14 563L35 575L17 580L45 593L18 598L51 611ZM24 588L18 588L48 579L23 576L49 567L27 564L50 555L38 552L53 543L41 539L54 531L43 527L54 519L48 515L56 506L52 503L57 494L59 491L61 494L66 503L62 506L70 515L64 519L75 527L64 531L77 539L65 543L80 552L68 555L91 564L69 567L95 576L70 579L100 588ZM49 607L45 607L81 594L58 589L85 577L54 572L83 559L69 554L88 541L71 537L88 524L73 519L89 506L80 502L91 489L87 484L93 471L95 466L97 471L103 484L99 489L111 502L101 506L117 519L102 524L119 537L102 541L121 554L107 559L136 572L106 577L132 589L109 594L145 607ZM105 599L109 599L135 588L107 583L135 571L113 567L137 555L115 550L137 539L126 534L140 522L130 518L141 506L134 502L143 490L138 485L144 474L146 469L148 474L153 485L149 490L157 502L150 506L162 518L151 522L165 534L154 539L177 550L155 555L178 567L157 571L185 583L156 588L183 599ZM172 580L169 580L198 572L181 568L201 560L175 557L200 548L180 545L201 537L185 533L202 525L191 522L204 513L192 510L204 502L197 499L206 490L204 487L207 479L209 475L210 479L214 487L212 490L221 499L214 502L226 510L214 513L227 522L216 525L233 533L217 537L238 545L218 548L242 557L217 560L237 568L220 572L249 580ZM233 590L236 590L253 581L240 577L254 568L236 564L253 555L245 551L255 542L247 538L256 529L250 525L257 516L255 512L258 503L259 499L261 503L264 512L262 516L269 525L263 529L272 538L263 542L274 551L266 555L283 564L265 568L279 577L266 581L283 590ZM248 594L254 594L281 581L248 575L279 562L258 557L282 544L266 539L284 525L268 520L285 507L270 502L285 489L279 484L288 470L284 465L289 452L291 447L293 452L299 465L295 470L304 484L297 489L312 502L298 507L315 520L298 525L316 539L301 544L324 557L304 562L335 575L302 581L328 594ZM308 575L302 575L339 561L320 556L344 543L316 537L343 524L328 519L346 505L328 500L346 486L339 481L349 467L345 462L351 449L353 443L355 449L361 462L357 467L367 481L360 486L378 500L360 505L378 519L363 524L390 537L362 543L386 556L367 561L404 575ZM359 584L364 584L393 572L357 568L391 556L366 551L393 540L369 535L394 523L381 519L397 507L387 502L399 490L388 486L399 474L397 469L402 458L404 453L405 458L410 469L408 474L419 486L408 490L420 502L410 507L426 519L413 523L439 535L414 540L442 551L417 556L450 568L415 572L443 584ZM424 584L425 584L455 570L428 565L456 552L429 546L456 533L437 528L459 514L446 509L461 495L447 490L462 477L452 471L463 458L458 453L465 439L467 434L469 439L476 453L471 458L482 471L473 477L487 490L473 495L488 509L475 514L497 528L478 533L505 546L478 552L506 565L479 570L509 584ZM473 565L466 565L507 556L484 552L512 542L479 538L510 529L485 525L512 515L491 511L514 502L496 498L515 488L502 484L517 475L503 471L517 461L511 457L519 448L515 444L520 434L523 430L525 434L531 444L526 448L534 457L528 461L542 471L528 475L543 484L530 488L549 498L531 502L554 511L533 515L560 525L535 529L566 538L533 542L561 552L538 556L579 565ZM553 572L552 572L581 563L558 559L583 550L556 546L582 537L564 533L585 524L570 520L586 510L571 507L587 497L580 494L589 484L582 481L590 471L587 467L591 458L593 454L595 458L599 467L596 471L604 481L597 484L606 494L599 497L614 507L599 510L616 520L601 524L622 533L603 537L630 546L603 550L628 559L604 563L633 572ZM591 584L596 584L627 572L603 567L628 556L598 551L627 539L607 535L630 523L613 518L631 507L613 502L631 490L619 486L633 474L626 469L635 458L631 453L636 441L638 437L640 441L646 453L642 458L651 469L644 474L657 486L645 490L663 502L645 507L663 518L647 523L670 535L649 539L678 551L648 556L674 567L650 572L680 584ZM652 567L648 567L678 554L662 549L682 537L660 532L682 519L670 514L685 502L668 497L684 484L679 479L687 466L683 461L688 449L690 444L692 449L697 461L693 466L702 479L696 484L712 497L696 502L710 514L698 519L720 532L698 537L718 549L702 554L732 567ZM689 578L693 578L724 564L692 558L724 543L706 537L728 523L706 517L728 502L712 497L730 482L722 476L732 461L726 456L734 441L737 435L740 441L747 456L741 461L752 476L744 482L761 497L745 502L767 517L745 523L767 537L749 543L781 558L749 564L780 578ZM756 561L750 561L792 549L755 544L793 532L770 528L798 516L775 511L799 499L771 494L798 483L778 478L800 466L784 461L801 449L794 445L804 433L799 428L806 416L808 411L811 416L817 428L812 433L822 445L815 449L832 461L817 466L838 478L819 483L845 494L817 499L841 511L819 516L846 528L823 532L861 544L824 549L866 561ZM857 553L854 553L878 545L863 541L881 533L867 529L881 521L864 517L881 509L868 506L882 497L870 494L882 485L876 482L884 473L878 470L885 461L883 458L886 449L887 446L888 449L891 458L890 461L897 470L890 473L899 482L892 485L905 494L893 497L907 506L894 509L911 517L893 521L908 529L894 533L911 541L896 545L920 553ZM873 552L873 552L909 538L872 533L908 520L885 515L912 502L889 497L913 483L895 478L915 465L899 460L916 447L909 442L919 428L915 423L920 410L922 405L924 410L930 423L926 428L935 442L929 447L946 460L930 465L950 478L932 483L955 497L933 502L960 515L937 520L973 533L936 538L972 552ZM953 553L950 553L981 542L956 537L983 526L965 522L986 511L967 507L986 496L965 492L986 481L975 476L988 465L979 461L990 450L982 446L990 435L988 431L992 420L994 416L995 420L1000 431L997 435L1005 446L998 450L1008 461L999 465L1012 476L1002 481L1023 492L1001 496L1021 507L1002 511L1022 522L1004 526L1031 537L1006 542L1038 553ZM1009 559L1006 559L1033 549L1011 545L1034 534L1017 530L1036 520L1022 516L1037 505L1025 501L1038 490L1029 486L1039 476L1037 472L1041 461L1043 457L1044 461L1048 472L1047 476L1056 486L1048 490L1061 501L1049 505L1064 516L1050 520L1069 530L1052 534L1074 545L1053 549L1080 559ZM1041 557L1036 557L1074 546L1045 542L1077 531L1043 527L1076 516L1048 512L1078 502L1063 498L1082 487L1067 483L1083 472L1065 468L1082 457L1071 453L1084 443L1077 438L1086 428L1082 424L1087 413L1089 409L1091 413L1096 424L1093 428L1102 438L1094 443L1107 453L1096 457L1113 468L1095 472L1111 483L1097 487L1116 498L1101 502L1130 512L1102 516L1136 527L1102 531L1134 542L1104 546L1143 557ZM1129 553L1133 553L1153 543L1130 539L1152 528L1137 524L1154 514L1144 510L1156 500L1146 495L1156 485L1148 481L1157 471L1155 467L1159 456L1160 452L1162 456L1166 467L1164 471L1173 481L1165 485L1175 495L1165 500L1177 510L1167 514L1184 524L1169 528L1191 539L1168 543L1188 553ZM1167 554L1166 554L1188 546L1170 543L1189 536L1173 533L1190 526L1172 523L1190 515L1179 512L1191 505L1177 502L1191 495L1182 492L1192 484L1184 481L1193 474L1190 471L1195 464L1191 461L1195 453L1196 451L1198 453L1201 461L1198 464L1203 471L1200 474L1209 481L1200 484L1210 492L1202 495L1216 502L1201 505L1214 512L1203 515L1221 523L1203 526L1220 533L1204 536L1222 543L1205 546L1227 554ZM1192 553L1189 553L1214 546L1195 543L1216 536L1195 533L1216 526L1204 523L1219 516L1203 513L1218 506L1210 503L1220 496L1212 493L1221 486L1211 483L1221 476L1215 473L1222 466L1219 463L1223 456L1224 453L1226 456L1230 463L1227 466L1234 473L1228 476L1238 483L1228 486L1237 493L1229 496L1239 503L1230 506L1246 513L1230 516L1245 523L1233 526L1254 533L1233 536L1254 543L1234 546L1260 553ZM1227 532L1234 532L1258 519L1228 515L1256 502L1235 497L1258 485L1236 480L1258 468L1243 463L1260 451L1252 446L1263 434L1255 429L1263 417L1261 412L1265 399L1267 395L1268 399L1273 412L1270 417L1279 429L1271 434L1282 446L1274 451L1291 463L1276 468L1298 480L1276 485L1299 497L1278 502L1305 515L1276 519L1299 532ZM1286 540L1290 540L1315 529L1291 524L1315 512L1294 508L1316 496L1303 492L1318 480L1305 475L1319 464L1311 459L1321 447L1317 443L1322 431L1325 426L1327 431L1332 443L1328 447L1338 459L1330 464L1344 475L1331 480L1346 492L1333 496L1355 508L1334 512L1358 524L1334 529L1359 540ZM1321 553L1325 553L1354 541L1326 536L1354 523L1328 519L1355 506L1335 501L1357 489L1344 484L1359 472L1349 467L1361 455L1356 450L1363 438L1366 433L1368 438L1375 450L1370 455L1382 467L1372 472L1387 484L1374 489L1396 501L1376 506L1403 519L1377 523L1405 536L1377 541L1406 553ZM1397 525L1395 525L1418 517L1396 514L1418 506L1399 502L1419 494L1410 491L1422 483L1409 480L1421 472L1414 468L1423 460L1417 457L1424 449L1421 446L1425 438L1426 434L1428 438L1432 446L1429 449L1436 457L1430 460L1439 468L1431 472L1444 480L1431 483L1443 491L1434 494L1454 502L1435 506L1457 514L1435 517L1458 525ZM1439 540L1440 540L1461 531L1444 527L1462 518L1449 514L1463 505L1450 501L1464 492L1454 488L1465 479L1456 475L1466 466L1460 462L1467 453L1465 449L1468 440L1469 436L1471 440L1474 449L1472 453L1478 462L1473 466L1483 475L1474 479L1485 488L1475 492L1489 501L1475 505L1490 514L1476 518L1495 527L1478 531L1499 540ZM1475 525L1475 525L1499 516L1478 512L1499 502L1484 499L1501 489L1483 485L1501 475L1489 472L1502 462L1494 458L1504 448L1498 445L1505 435L1503 431L1506 421L1508 418L1509 421L1513 431L1510 435L1517 445L1511 448L1521 458L1513 462L1527 472L1515 475L1532 485L1514 489L1532 499L1516 502L1537 512L1517 516L1540 525ZM1522 537L1527 537L1547 529L1529 526L1547 518L1533 514L1548 506L1529 503L1547 495L1538 492L1550 483L1543 480L1551 472L1544 469L1551 460L1549 457L1553 449L1554 446L1556 449L1559 457L1557 460L1565 469L1558 472L1566 480L1559 483L1571 492L1561 495L1579 503L1560 506L1576 514L1561 518L1579 526L1562 529L1582 537ZM1558 529L1557 529L1582 522L1559 519L1583 511L1561 508L1583 500L1569 497L1586 489L1572 486L1586 479L1572 476L1586 468L1578 465L1588 457L1582 454L1589 447L1586 444L1590 436L1592 433L1593 436L1597 444L1595 447L1602 454L1596 457L1605 465L1597 468L1611 476L1598 479L1612 486L1598 489L1614 497L1601 500L1623 508L1601 511L1625 519L1602 522L1627 529ZM1601 519L1598 519L1628 507L1606 502L1630 490L1610 486L1632 474L1618 469L1634 457L1619 452L1634 440L1626 436L1636 424L1634 419L1638 407L1640 403L1642 407L1646 419L1644 424L1654 436L1646 440L1661 452L1646 457L1662 469L1648 474L1670 486L1649 490L1674 502L1651 507L1681 519ZM1644 522L1649 522L1673 510L1648 505L1673 492L1658 487L1675 475L1656 470L1675 457L1661 453L1676 440L1667 435L1678 423L1674 418L1680 405L1682 400L1684 405L1690 418L1686 423L1697 435L1688 440L1703 453L1689 457L1708 470L1689 475L1706 487L1692 492L1716 505L1691 510L1715 522Z' fill='%2327352f' opacity='.5'/><rect y='540' width='1600' height='280' fill='url(%23f)' opacity='.26'/><path d='M-193 762L-195 762L-141 744L-175 737L-135 719L-181 712L-137 694L-165 687L-133 669L-159 662L-131 644L-162 637L-132 620L-153 613L-129 595L-142 588L-126 570L-136 563L-125 545L-131 538L-123 520L-120 513L-117 520L-109 538L-115 545L-104 563L-114 570L-98 588L-111 595L-87 613L-108 620L-78 637L-109 644L-81 662L-107 669L-75 687L-103 694L-59 712L-105 719L-65 737L-99 744L-45 762ZM-109 763L-117 763L-64 748L-98 742L-59 728L-91 722L-57 707L-96 701L-58 687L-93 681L-57 666L-74 660L-52 646L-71 640L-51 625L-64 619L-49 605L-62 599L-49 584L-53 578L-46 564L-44 558L-41 564L-35 578L-38 584L-25 599L-38 605L-24 619L-36 625L-16 640L-35 646L-13 660L-30 666L5 681L-29 687L9 701L-30 707L4 722L-29 728L10 742L-23 748L30 763ZM-38 750L-29 750L19 725L-18 715L22 689L-23 680L20 654L-7 644L25 619L1 609L27 584L13 574L30 548L22 538L33 513L37 503L42 513L53 538L44 548L62 574L48 584L74 609L50 619L82 644L54 654L98 680L53 689L92 715L56 725L104 750ZM33 766L41 766L95 748L51 741L98 724L38 717L94 700L65 693L102 675L55 669L99 651L69 644L103 627L72 620L104 603L87 596L108 578L95 571L110 554L105 547L113 530L116 523L119 530L127 547L122 554L138 571L125 578L146 596L129 603L160 620L130 627L163 644L133 651L177 669L131 675L168 693L138 700L194 717L135 724L182 741L137 748L192 766ZM176 765L174 765L217 750L180 744L218 730L184 724L219 709L197 704L223 689L207 683L226 668L207 663L226 648L217 642L229 628L224 622L231 607L233 602L236 607L242 622L238 628L250 642L241 648L260 663L241 668L260 683L243 689L269 704L247 709L282 724L248 730L286 744L250 750L293 765ZM223 768L214 768L273 751L239 744L280 727L237 720L280 703L239 696L280 679L242 672L281 655L253 648L284 631L261 624L286 607L271 600L289 583L279 577L291 559L288 553L294 535L296 529L299 535L305 553L301 559L314 577L303 583L321 600L306 607L331 624L308 631L339 648L311 655L350 672L312 679L353 696L313 703L355 720L312 727L354 744L319 751L378 768ZM336 758L328 758L375 741L334 734L376 717L340 711L378 693L355 687L382 670L362 663L384 646L373 639L387 622L374 615L388 598L382 591L390 574L393 568L396 574L404 591L398 598L412 615L399 622L413 639L402 646L424 663L404 670L431 687L408 693L445 711L410 717L452 734L411 741L458 758ZM409 770L411 770L448 751L420 744L451 726L423 719L452 700L421 693L451 675L438 668L456 649L443 642L457 624L448 617L459 598L455 591L461 573L463 566L465 573L471 591L467 598L477 617L468 624L483 642L470 649L488 668L475 675L505 693L474 700L503 719L475 726L506 744L478 751L515 770ZM484 770L479 770L515 754L491 748L518 732L492 725L518 709L503 703L522 687L508 681L523 665L512 658L524 642L521 636L526 620L529 614L531 620L537 636L534 642L546 658L535 665L550 681L536 687L554 703L539 709L566 725L540 732L567 748L543 754L579 770ZM508 776L512 776L569 757L510 750L568 732L521 724L571 706L522 699L572 680L540 673L576 654L542 647L577 629L548 621L579 603L560 596L582 577L567 570L584 551L579 544L588 526L591 518L594 526L602 544L597 551L614 570L599 577L621 596L603 603L634 621L604 629L639 647L605 654L642 673L610 680L659 699L610 706L661 724L614 732L672 750L613 757L670 776ZM666 778L658 778L695 765L673 759L699 746L669 740L697 727L673 722L699 708L682 703L701 689L690 684L703 670L693 665L704 651L697 646L705 632L703 627L707 614L709 608L710 614L714 627L712 632L720 646L713 651L724 665L714 670L727 684L716 689L735 703L719 708L744 722L720 727L748 740L719 746L744 759L723 765L759 778ZM682 791L681 791L734 766L693 756L738 731L697 722L739 697L701 687L740 662L723 652L746 628L729 618L748 593L739 583L751 558L755 549L759 558L771 583L762 593L781 618L764 628L786 652L770 662L808 687L771 697L813 722L772 731L817 756L776 766L829 791ZM757 791L755 791L814 770L759 761L816 739L781 731L822 709L777 701L820 679L792 670L825 649L799 640L827 618L813 610L831 588L825 580L834 558L837 549L841 558L850 580L844 588L862 610L848 618L876 640L850 649L883 670L855 679L898 701L853 709L894 731L859 739L916 761L861 770L920 791ZM869 782L881 782L930 761L875 752L928 730L896 722L934 700L899 692L935 670L903 662L936 640L919 631L940 610L921 601L941 580L937 571L945 549L949 541L952 549L961 571L956 580L976 601L957 610L979 631L962 640L995 662L963 670L998 692L963 700L1001 722L969 730L1022 752L968 761L1016 782ZM989 799L990 799L1041 777L993 768L1042 746L1010 738L1047 715L1022 707L1050 685L1024 676L1051 654L1027 645L1052 623L1040 614L1055 592L1047 583L1057 561L1061 553L1065 561L1076 583L1067 592L1083 614L1071 623L1095 645L1072 654L1099 676L1073 685L1101 707L1076 715L1112 738L1081 746L1130 768L1081 777L1133 799ZM1089 782L1083 782L1142 764L1106 757L1148 740L1105 733L1148 715L1116 708L1151 690L1116 684L1151 666L1129 659L1155 641L1139 634L1157 617L1141 610L1158 592L1151 585L1161 567L1165 560L1168 567L1178 585L1171 592L1188 610L1172 617L1191 634L1175 641L1200 659L1178 666L1213 684L1178 690L1213 708L1181 715L1224 733L1181 740L1223 757L1188 764L1247 782ZM1175 795L1174 795L1215 783L1184 778L1218 766L1181 761L1217 749L1193 744L1220 732L1189 728L1219 716L1202 711L1223 699L1203 694L1223 682L1211 677L1225 665L1215 660L1227 648L1224 643L1229 631L1231 627L1233 631L1238 643L1235 648L1247 660L1237 665L1251 677L1239 682L1259 694L1239 699L1260 711L1243 716L1273 728L1242 732L1269 744L1245 749L1281 761L1244 766L1278 778L1247 783L1288 795ZM1239 802L1233 802L1274 788L1247 783L1278 769L1256 764L1280 751L1259 745L1281 732L1266 726L1283 713L1266 708L1283 694L1277 689L1286 675L1282 670L1288 656L1290 651L1292 656L1298 670L1294 675L1303 689L1297 694L1314 708L1297 713L1314 726L1299 732L1321 745L1300 751L1324 764L1302 769L1333 783L1306 788L1347 802ZM1305 796L1309 796L1342 777L1306 769L1341 750L1312 742L1342 723L1323 715L1346 696L1329 688L1347 669L1339 661L1350 642L1345 634L1352 615L1354 608L1357 615L1364 634L1359 642L1370 661L1361 669L1379 688L1363 696L1386 715L1366 723L1397 742L1368 750L1402 769L1367 777L1400 796ZM1371 809L1367 809L1400 795L1369 790L1401 777L1377 772L1403 759L1378 754L1403 741L1391 736L1407 723L1395 718L1408 705L1394 700L1407 687L1402 682L1410 669L1406 664L1411 651L1413 645L1415 651L1420 664L1416 669L1424 682L1418 687L1432 700L1418 705L1430 718L1419 723L1435 736L1422 741L1447 754L1423 759L1448 772L1425 777L1456 790L1425 795L1458 809ZM1383 810L1379 810L1435 794L1394 788L1440 772L1404 766L1442 750L1402 744L1442 728L1405 722L1442 706L1409 700L1444 684L1424 678L1448 663L1427 656L1449 641L1436 635L1451 619L1448 613L1455 597L1457 591L1460 597L1466 613L1463 619L1478 635L1465 641L1487 656L1466 663L1490 678L1471 684L1505 700L1472 706L1509 722L1472 728L1512 744L1472 750L1510 766L1475 772L1520 788L1479 794L1535 810ZM1465 809L1468 809L1509 785L1477 776L1512 753L1472 744L1510 720L1483 711L1514 688L1492 679L1516 656L1504 647L1519 623L1514 614L1522 591L1525 582L1528 591L1536 614L1531 623L1547 647L1535 656L1558 679L1537 688L1567 711L1540 720L1578 744L1539 753L1574 776L1541 785L1583 809ZM1532 808L1528 808L1575 790L1546 783L1580 765L1546 758L1580 740L1548 733L1581 715L1559 708L1584 689L1559 682L1584 664L1568 657L1586 639L1574 632L1588 614L1583 607L1590 589L1593 582L1596 589L1603 607L1598 614L1612 632L1600 639L1618 657L1602 664L1627 682L1602 689L1627 708L1605 715L1637 733L1606 740L1640 758L1606 765L1640 783L1611 790L1658 808ZM1636 814L1630 814L1662 803L1634 799L1664 788L1641 784L1666 773L1644 768L1666 757L1653 753L1669 742L1651 738L1668 727L1655 723L1669 711L1663 707L1672 696L1663 692L1672 681L1670 677L1674 666L1675 661L1677 666L1681 677L1678 681L1687 692L1679 696L1687 707L1681 711L1696 723L1682 727L1699 738L1681 742L1697 753L1684 757L1706 768L1685 773L1709 784L1687 788L1716 799L1688 803L1720 814Z' fill='%23172220' opacity='.85'/><rect y='690' width='1600' height='280' fill='url(%23f)' opacity='.2'/><path d='M-232 1158L-244 1158L-155 1114L-213 1097L-146 1053L-218 1036L-147 993L-192 976L-140 932L-172 915L-135 871L-157 854L-130 810L-142 793L-126 749L-120 732L-114 749L-98 793L-110 810L-83 854L-105 871L-68 915L-100 932L-48 976L-93 993L-22 1036L-94 1053L-27 1097L-85 1114L4 1158ZM-100 1153L-84 1153L-20 1121L-105 1108L-26 1076L-64 1064L-15 1031L-60 1019L-14 987L-51 974L-11 942L-47 929L-10 897L-33 885L-6 852L-12 840L0 808L4 795L9 808L20 840L15 852L42 885L18 897L55 929L20 942L59 974L22 987L69 1019L23 1031L72 1064L35 1076L114 1108L29 1121L92 1153ZM29 1144L18 1144L105 1096L28 1077L108 1029L65 1010L118 962L79 943L122 895L90 876L125 828L107 809L130 761L122 742L134 694L139 675L144 694L157 742L148 761L171 809L153 828L188 876L156 895L199 943L160 962L213 1010L170 1029L250 1077L173 1096L260 1144ZM155 1125L157 1125L210 1100L166 1091L212 1066L172 1057L214 1032L183 1023L217 998L190 989L219 964L197 955L221 931L196 921L221 897L207 887L224 863L220 853L227 829L230 819L233 829L241 853L237 863L254 887L240 897L265 921L239 931L263 955L241 964L270 989L244 998L278 1023L247 1032L289 1057L248 1066L295 1091L251 1100L303 1125ZM241 1139L254 1139L299 1105L258 1092L300 1059L260 1046L301 1012L270 999L303 965L286 952L308 918L294 905L310 871L303 858L313 825L317 812L320 825L330 858L323 871L339 905L325 918L347 952L330 965L363 999L332 1012L373 1046L333 1059L375 1092L334 1105L379 1139ZM299 1123L281 1123L379 1086L313 1071L388 1034L321 1020L390 983L334 968L394 931L352 917L399 880L360 865L401 828L374 814L405 777L390 762L409 725L396 711L411 674L417 659L423 674L438 711L425 725L444 762L429 777L460 814L433 828L474 865L435 880L482 917L441 931L501 968L444 983L513 1020L446 1034L522 1071L455 1086L553 1123ZM418 1106L423 1106L509 1069L416 1054L507 1017L429 1003L510 966L458 952L519 915L469 900L522 863L472 849L522 812L495 798L529 761L508 746L533 709L523 695L537 658L542 644L547 658L561 695L552 709L576 746L555 761L589 798L562 812L612 849L562 863L615 900L565 915L626 952L574 966L655 1003L577 1017L668 1054L576 1069L662 1106ZM574 1111L587 1111L654 1081L568 1069L649 1039L593 1027L656 997L599 985L657 955L614 943L662 913L635 902L668 871L642 860L670 830L650 818L672 788L666 776L676 746L680 734L684 746L695 776L689 788L711 818L691 830L718 860L693 871L725 902L699 913L746 943L703 955L762 985L705 997L768 1027L712 1039L793 1069L706 1081L774 1111ZM704 1102L705 1102L757 1071L702 1059L756 1028L730 1015L763 984L727 972L763 941L747 928L768 897L752 885L770 854L762 841L773 810L776 798L780 810L790 841L783 854L801 885L785 897L806 928L790 941L826 972L789 984L823 1015L797 1028L851 1059L796 1071L848 1102ZM721 1111L710 1111L804 1078L740 1065L813 1032L735 1019L811 985L761 972L818 939L778 926L823 892L773 879L822 846L800 833L829 800L811 787L832 753L823 740L836 707L841 694L846 707L858 740L849 753L870 787L852 800L881 833L860 846L908 879L858 892L903 926L863 939L920 972L870 985L946 1019L869 1032L941 1065L877 1078L972 1111ZM893 1103L882 1103L951 1066L915 1052L960 1015L915 1001L961 964L919 949L962 913L934 898L966 861L948 847L970 810L962 796L974 759L978 745L983 759L994 796L987 810L1008 847L991 861L1023 898L995 913L1038 949L996 964L1041 1001L996 1015L1042 1052L1005 1066L1074 1103ZM1002 1080L989 1080L1054 1050L998 1038L1057 1008L1026 996L1064 966L1020 955L1063 925L1043 913L1069 883L1051 872L1071 842L1056 830L1073 800L1068 788L1076 758L1080 747L1083 758L1091 788L1086 800L1103 830L1088 842L1109 872L1090 883L1116 913L1096 925L1139 955L1095 966L1133 996L1102 1008L1161 1038L1105 1050L1170 1080ZM1045 1089L1024 1089L1129 1053L1047 1039L1136 1003L1064 989L1140 952L1072 938L1143 902L1086 888L1147 852L1101 838L1151 801L1130 787L1159 751L1132 737L1159 701L1151 687L1165 650L1170 636L1176 650L1190 687L1181 701L1208 737L1181 751L1210 787L1189 801L1239 838L1194 852L1254 888L1198 902L1269 938L1200 952L1276 989L1205 1003L1293 1039L1211 1053L1316 1089ZM1212 1078L1221 1078L1302 1037L1233 1022L1306 981L1248 965L1310 925L1245 909L1309 868L1255 852L1312 812L1277 796L1318 755L1300 740L1325 699L1315 683L1329 642L1334 627L1339 642L1353 683L1343 699L1368 740L1350 755L1391 796L1356 812L1413 852L1359 868L1423 909L1358 925L1420 965L1362 981L1435 1022L1366 1037L1447 1078ZM1346 1059L1351 1059L1416 1027L1345 1015L1414 983L1373 971L1422 939L1372 926L1422 894L1373 882L1422 850L1389 837L1426 805L1401 793L1430 761L1417 749L1434 717L1426 704L1437 672L1441 660L1445 672L1456 704L1448 717L1465 749L1453 761L1482 793L1456 805L1494 837L1460 850L1509 882L1461 894L1511 926L1460 939L1509 971L1468 983L1538 1015L1466 1027L1531 1059ZM1430 1051L1446 1051L1523 1005L1436 988L1520 942L1447 925L1523 879L1488 861L1535 816L1500 798L1538 753L1518 735L1543 690L1532 672L1547 627L1553 609L1559 627L1574 672L1563 690L1588 735L1568 753L1606 798L1571 816L1618 861L1583 879L1660 925L1586 942L1670 988L1583 1005L1660 1051ZM1566 1044L1581 1044L1661 1012L1563 999L1655 966L1596 954L1665 921L1615 909L1670 876L1614 864L1670 831L1621 819L1671 786L1631 773L1674 741L1654 728L1681 696L1662 683L1683 651L1671 638L1686 606L1691 593L1697 606L1712 638L1700 651L1721 683L1702 696L1729 728L1708 741L1752 773L1711 786L1762 819L1713 831L1768 864L1713 876L1768 909L1718 921L1787 954L1727 966L1820 999L1722 1012L1801 1044Z' fill='%23080d0c' opacity='1'/><rect y='780' width='1600' height='220' fill='url(%23g)'/></svg>");

  /* Native controls — selects, the date picker — follow this. Without it the
     browser hands you a white dropdown in the middle of a dark page. */
  color-scheme: dark;
}

* { box-sizing: border-box; }

/* The picture rides on <html> and the darkening rides on <body>, so a
   background can be swapped by setting one custom property without taking the
   overlay with it. A photograph the page has never seen can be bright, busy or
   pale, and the overlay is what keeps sage text on it readable regardless. */
html {
  scroll-behavior: smooth;
  background: var(--bg) var(--bg-image) center / cover no-repeat fixed;
}

body {
  margin: 0;
  min-block-size: 100vh;
  /* Dark enough that sage text holds on any photograph, light enough that the
     picture is still a picture — the hub's own three stops, not a second guess
     at them. At .86 at the top the forest was technically present and visually
     gone, which is the worst of both. */
  background:
    linear-gradient(180deg,
      rgba(8, 13, 11, .58) 0%,
      rgba(8, 13, 11, .42) 40%,
      rgba(8, 13, 11, .82) 100%);
  color: var(--text-primary);
  font: 14px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* The frame. It is the one purely decorative thing in the file, and it earns
   its place by giving the page an edge: without it a full-bleed picture runs to
   the window border and the whole thing reads as a desktop wallpaper with text
   on it rather than as an application. Fixed, so it holds while the record
   scrolls past it. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  border: 2px solid rgba(var(--accent-rgb), .55);
  pointer-events: none;
  z-index: 50;
}

.sprite { display: none; }

/* Every button and badge here sets its own `display`, and any `display` beats
   the browser's own rule for `hidden` — so without this, Undo with nothing to
   undo and an unsaved count of zero would both be on screen. */
[hidden] { display: none !important; }

.icon {
  inline-size: 16px;
  block-size: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

h3 { font-size: .95rem; font-weight: 600; margin: 0 0 .35rem; color: var(--text-primary); }
p { margin: .35rem 0; }

code {
  font: .85em var(--font-mono);
  color: var(--accent-hover);
  background: rgba(var(--accent-rgb), .10);
  padding: .1em .4em;
  border-radius: var(--radius);
}

.dim { color: var(--text-secondary); }

/* Every number on this page is meant to be compared with the one above it. */
b, table, .stat-value, .cat-hours { font-variant-numeric: tabular-nums; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ------------------------------------------------------------------ *
 * The frame: a sidebar and the content beside it                      *
 * ------------------------------------------------------------------ */

.app-layout { min-block-size: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  inline-size: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  background: var(--bg-sidebar);
  /* Blurred rather than merely dark: the sidebar is the one panel that holds
     small text over whatever part of the picture happens to be behind it, and
     a photograph with a bright branch in it would otherwise show through the
     nav labels. Degrades to the flat colour above where it is unsupported. */
  backdrop-filter: blur(10px);
  border-inline-end: 1px solid var(--border);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 18px;
  border-block-end: 1px solid var(--border);
}

.logo-icon {
  display: grid;
  place-items: center;
  inline-size: 32px;
  block-size: 32px;
  /* Flat, square and outlined. The gradient-and-bloom badge this replaces was
     the one thing on the page that announced itself, and the hub's hierarchy
     comes from tracking rather than from decoration. */
  color: var(--accent);
  border: 1px solid var(--border-strong);
  background: rgba(var(--accent-rgb), .10);
}

.logo-icon .icon { inline-size: 18px; block-size: 18px; }

.sidebar-logo h1 {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.nav-label {
  padding: 14px 10px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nav-label:first-child { padding-top: 4px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  inline-size: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--text-secondary);
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  text-align: start;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color .12s, background .12s;
}

.nav-item:hover { color: var(--text-primary); background: var(--bg-hover); }

/* Set by the scroll spy in app.js, so the sidebar says where you are rather
   than only where you can go. */
.nav-item.active {
  color: var(--text-primary);
  background: rgba(var(--accent-rgb), .12);
  box-shadow: inset 2px 0 0 var(--accent);
}

.nav-item.active .icon { color: var(--accent); }

/* Round, and the one round thing on the page. The hub's own source dot is
   round for the same reason: six colours telling six trainers apart is data,
   not decoration, and a bullet is what it reads as. */
.nav-dot {
  inline-size: 8px;
  block-size: 8px;
  margin-inline: 4px;
  flex: none;
  border-radius: 50%;
  background: var(--c, var(--text-muted));
  box-shadow: 0 0 8px -1px var(--c, transparent);
}

.nav-item .nav-meta {
  margin-inline-start: auto;
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.nav-sources .nav-item { overflow: hidden; }
.nav-sources .nav-name { overflow: hidden; text-overflow: ellipsis; }

.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-block-start: 1px solid var(--border);
}

.sidebar-save { inline-size: 100%; justify-content: center; margin-top: 4px; }

.main-content {
  margin-inline-start: var(--sidebar-w);
  padding: 32px 40px 80px;
  max-inline-size: calc(var(--sidebar-w) + 1240px);
}

.page-header { margin-bottom: 24px; }

/* Tracked out and up, not down. The hub's rule is that a heading is a heading
   because of its letter-spacing, so the tightening this used to carry — right
   for a 700-weight sans — is exactly backwards in monospace caps. */
.page-header h2 {
  margin: 0 0 6px;
  font-size: clamp(1.3rem, 3.2vw, 1.75rem);
  font-weight: 400;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.page-header p { margin: 0; max-inline-size: 46rem; color: var(--text-secondary); }
.page-header b { color: var(--text-primary); font-weight: 600; }

/* ------------------------------------------------------------------ *
 * Headline figures                                                    *
 * ------------------------------------------------------------------ */

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.stat-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stat-label .icon { inline-size: 12px; block-size: 12px; }

.stat-value {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: .02em;
  color: var(--text-primary);
}

.stat-value small { font-size: 13px; font-weight: 400; color: var(--text-muted); letter-spacing: 0; }
.stat-value.none { color: var(--text-muted); }
.stat-sub { margin-top: 4px; font-size: 12.5px; color: var(--text-muted); }

/* ------------------------------------------------------------------ *
 * Panels                                                              *
 * ------------------------------------------------------------------ */

.panel {
  margin-bottom: 20px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  /* Anchors land with a little air above them rather than flush on the edge,
     and below the top bar on a phone. */
  scroll-margin-top: 20px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.panel > p.dim { font-size: 13px; max-inline-size: 52rem; }

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.grid-2 > .panel { margin-bottom: 20px; }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; }

/* ---- buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-hover);
  color: var(--text-primary);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .12s, background .12s, color .12s;
}

.btn:hover { border-color: rgba(var(--accent-rgb), .5); background: var(--bg-hover); }

/* Sage on near-black rather than white on the accent: this accent is a light
   tone, so white on it fails the contrast the rest of the page holds to. */
.btn-primary {
  background: rgba(var(--accent-rgb), .18);
  border-color: var(--accent);
  color: var(--text-primary);
}

.btn-primary:hover { background: rgba(var(--accent-rgb), .30); border-color: var(--accent-hover); }

.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-sm .icon { inline-size: 14px; block-size: 14px; }

.btn:disabled {
  opacity: .45;
  cursor: default;
  background: var(--bg-hover);
  border-color: var(--border);
  color: var(--text-muted);
}

/* Secondary to the button beside it: available, not advertised. */
.btn.quiet {
  border-color: transparent;
  background: none;
  color: var(--text-secondary);
}

.btn.quiet:hover { color: var(--text-primary); background: var(--bg-hover); }

/* The count of imports not yet in any file. Silent when there are none —
   a badge reading zero is a badge nobody stops reading. */
.pill {
  display: inline-block;
  margin-inline-start: 4px;
  min-inline-size: 1.25rem;
  padding: 0 .4rem;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, .28);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

td .pill { background: rgba(var(--accent-rgb), .16); color: var(--accent-hover); }

/* ---- inputs ---- */

select, input[type="date"], input[type="text"], input[type="number"],
input[type="search"], textarea {
  padding: 7px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-primary);
  font: inherit;
  font-size: 13px;
  transition: border-color .12s;
}

select:hover, input:hover, textarea:hover { border-color: rgba(var(--accent-rgb), .5); }

select:focus, input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), .22);
}

label { color: var(--text-secondary); font-size: 13px; }
.filters label { display: inline-flex; align-items: center; gap: 8px; }

/* ------------------------------------------------------------------ *
 * The drop zone                                                       *
 * ------------------------------------------------------------------ */

.drop {
  padding: 28px 24px;
  border: 1.5px dashed var(--border-strong);
  text-align: center;
  transition: border-color .15s, background .15s;
}

.drop:hover { border-color: rgba(var(--accent-rgb), .5); }

.drop.over {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), .08);
}

.drop__icon {
  display: inline-grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  margin-bottom: 8px;
  border: 1px solid var(--border-strong);
  color: var(--accent);
  background: rgba(var(--accent-rgb), .10);
}

.drop__icon .icon { inline-size: 20px; block-size: 20px; }
.drop > p.dim { font-size: 13px; }
.drop .row { justify-content: center; }

/*
 * The line under the drop zone that says whether the file on disk is behind
 * this page. Amber, not red: nothing is broken, something is merely waiting.
 */
.savestate {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  min-block-size: 1.2em;
}

.savestate.warn { color: var(--warn); }
.savestate.warn b { color: #dcc08a; }

/* ------------------------------------------------------------------ *
 * Sources, as the tracker's category cards                            *
 * ------------------------------------------------------------------ */

.cat-list { display: flex; flex-direction: column; gap: 8px; }

.category-card {
  position: relative;
  padding: 12px 14px 12px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
  scroll-margin-top: 20px;
  transition: border-color .14s, background .14s;
}

/* The source's colour, as a bar down the left edge. */
.category-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  inline-size: 3px;
  background: var(--c, var(--text-muted));
}

.category-card:hover { border-color: var(--border-strong); background: #0d0d13; }

.cat-header { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.cat-abbr { font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--c, var(--text-primary)); }
.cat-full { font-size: 12px; color: var(--text-muted); }

.cat-hours {
  margin-top: 2px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--text-primary);
}

.cat-hours span { font-size: 13px; font-weight: 400; color: var(--text-secondary); }
.cat-meta { font-size: 12.5px; color: var(--text-secondary); }
.cat-meta b { color: var(--text-primary); font-weight: 600; }
.category-card p { margin: 2px 0 0; font-size: 12.5px; }

/* ---- generic cards: overlap pairs, measures ---- */

.cards {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  margin-top: 12px;
}

.modes > *, .cards > * { min-width: 0; }

.card {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: border-color .14s;
}

.card:hover { border-color: var(--border-strong); }

/* The headline figures. A card is scanned, not read, so the counts outrank
   the words around them instead of sharing their weight. */
.card p:first-of-type { color: var(--text-secondary); }
.card p:first-of-type b { font-size: 1.25rem; font-weight: 600; color: var(--text-primary); }
.card p { margin: .3rem 0; font-size: 13px; }

.card.ok { box-shadow: inset 3px 0 0 var(--ok); }
.card.waiting { box-shadow: inset 3px 0 0 var(--border-strong); }

/* ------------------------------------------------------------------ *
 * Tables                                                              *
 * ------------------------------------------------------------------ */

table { inline-size: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 10px; text-align: right; border-block-end: 1px solid var(--border); }
th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
th:first-child, td:first-child { text-align: left; }
td:last-child { color: var(--ok); font-size: 12px; }
tr:last-child td { border-block-end: 0; }

.table-wrap {
  margin-top: 14px;
  max-block-size: 70vh;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* The header of an 1800px table is worth keeping on screen. It is a `tr` of
   `th` inside the tbody, not a `thead`, so the stickiness goes on the cells. */
#daysTable th {
  position: sticky;
  inset-block-start: 0;
  background: var(--bg-card);
  border-block-end-color: var(--border-strong);
  z-index: 1;
}

#daysTable tr:hover td { background: rgba(var(--accent-rgb), .07); }

/* ---- the import log ---- */

.log { list-style: none; padding: 0; margin: 0; font-size: 13px; color: var(--text-secondary); }
.log li { padding: 8px 0; border-block-end: 1px solid var(--border); overflow-wrap: anywhere; }
.log li:last-child { border-block-end: 0; }
.log li.bad { color: var(--bad); }
#log:empty::before { content: "Nothing imported in this session yet."; color: var(--text-muted); }

/* ------------------------------------------------------------------ *
 * The year                                                            *
 * ------------------------------------------------------------------ */

/*
 * Columns of seven, filled top to bottom, so each column is one week — the
 * layout every calendar heatmap uses, and the reason `renderHeatmap` pads the
 * first partial week rather than starting on whatever weekday the year began.
 */
.heatmap {
  display: grid;
  grid-template-rows: repeat(7, 12px);
  grid-auto-flow: column;
  grid-auto-columns: 12px;
  gap: 3px;
  max-inline-size: 100%;
  margin-top: 14px;
  padding-bottom: 8px;
  overflow-x: auto;
}

.cell {
  display: inline-block;
  inline-size: 12px;
  block-size: 12px;
  border-radius: var(--radius);
  background: rgba(var(--accent-rgb), .06);
  outline: 1px solid transparent;
  transition: outline-color .1s;
}

.heatmap .cell:hover { outline-color: var(--text-primary); }
.heatmap .pad { visibility: hidden; }

/* A rest day: known, and empty. */
.cell.s-rested { background: rgba(var(--accent-rgb), .11); }

/*
 * A day nobody has evidence about. Hatched rather than shaded, because any
 * shade reads as an amount — and the whole point is that there is no amount,
 * only an absence of record. Kept faint: on a year that starts in August the
 * unevidenced days are most of the grid, and at full strength the texture
 * outshouts the training it is supposed to frame.
 */
.cell.s-unknown {
  background: repeating-linear-gradient(
    45deg, rgba(var(--accent-rgb), .12) 0 1px, transparent 1px 4px);
}

/* The amount, in four steps of the one accent. */
.cell.L1 { background: rgba(var(--accent-rgb), .25); }
.cell.L2 { background: rgba(var(--accent-rgb), .45); }
.cell.L3 { background: rgba(var(--accent-rgb), .70); }
.cell.L4 { background: var(--accent); }

.legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
}

.legend span { display: inline-flex; align-items: center; gap: 3px; }
.legend span .cell:last-of-type { margin-inline-end: 4px; }

/* ------------------------------------------------------------------ *
 * Ability                                                             *
 * ------------------------------------------------------------------ */

.ability { margin: 0 0 12px; }

.ability__now {
  display: flex;
  gap: 12px;
  align-items: baseline;
  flex-wrap: wrap;
}

/* The one glyph on the page that is allowed to be large. It is the answer to
   the question the section asks, and everything under it is the working. */
.ability__tier {
  font-size: 3.2rem;
  line-height: 1;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ability__level { color: var(--text-secondary); }
.ability p.dim { font-size: 13px; }

/*
 * Six rungs, filled to where the estimate stands.
 *
 * The part-filled rung is the whole reason this is a bar and not a letter: a
 * climb from the bottom of a tier to the top of it is months of work, and a
 * badge that reads the same at both ends of it makes those months invisible.
 * `--fill` is set per rung by the renderer.
 */
.ability__scale {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  margin: 12px 0;
  max-inline-size: 34rem;
}

.ability__scale .rung {
  position: relative;
  display: block;
  block-size: 34px;
  border-radius: var(--radius);
  background:
    linear-gradient(to right,
      rgba(var(--accent-rgb), .55) 0 calc(var(--fill) * 100%),
      rgba(var(--accent-rgb), .07) calc(var(--fill) * 100%) 100%);
}

.ability__scale .rung b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 600;
  color: var(--text-primary);
}

/* A row whose two readings of the same trainer disagree: the app's own estimate
   against the difficulty it is actually serving. Warm, because it is the one
   thing on this screen that wants acting on rather than reading. */
.modes tr.warn td { color: var(--warn); }
.modes tr.warn td.dim b { color: var(--warn); font-weight: 650; }

/* The working, in half the width: it scrolls on its own rather than squeezing
   a reading like "34.61 rnb-load" onto three lines. */
#abilityParts { display: block; overflow-x: auto; }
#abilityParts td:nth-child(2), #abilityParts td:nth-child(4) { white-space: nowrap; }
#abilityParts td:nth-child(3) { min-inline-size: 12rem; text-align: left; }

#abilityBadge { font-size: 13px; margin-top: 4px; }
#abilityUnused { margin-top: 8px; font-size: 12.5px; }

/* The working behind the letter, folded until asked for. */
.about { margin: 0 0 12px; font-size: 13px; color: var(--text-secondary); }
.about summary {
  cursor: pointer;
  inline-size: fit-content;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
}
.about summary:hover { color: var(--text-primary); }
.about p { margin: 8px 0 0; }

/* ------------------------------------------------------------------ *
 * Over time                                                           *
 * ------------------------------------------------------------------ */

.charts {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 26rem), 1fr));
  margin-top: 14px;
}

.chart {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  scroll-margin-top: 20px;
}

.chart h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; font-size: 14px; }
.chart h3 .nav-dot { margin: 0; }
.chart h3 small { flex-basis: 100%; font-weight: 400; font-size: 12px; color: var(--text-muted); }
.chart svg { width: 100%; height: 120px; display: block; overflow: visible; }
.chart .bars rect { fill: var(--c, var(--accent)); opacity: .3; transition: opacity .1s; }
.chart .bars rect:hover { opacity: .7; }
.chart .acc {
  fill: none;
  stroke: var(--c, var(--accent));
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
/* A second unit: same colour, so it reads as the same trainer, but quieter and
   dashed, so it never reads as a continuation of the first. */
.chart .acc--alt { stroke-width: 1.6; opacity: .75; }

/*
 * Not `.cards`. That grid is `minmax(15rem, 1fr)`, and a four-column table of
 * labels like "Comparison Chronological" has a min-content width well past
 * 15rem — a grid item will not shrink below that, so the track grew, the grid
 * grew, and the whole page went wider than the body it sits in.
 *
 * Wider tracks, `min-width: 0` so a stubborn child yields, and each table given
 * its own scroll rather than being allowed to push its container.
 */
.modes {
  display: grid;
  gap: 16px 24px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
}

.modes > div { overflow-x: auto; }
.modes table { width: 100%; }
.modes h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 14px; }
.modes h3 .nav-dot { margin: 0; }
.modes tr:hover td { background: rgba(var(--accent-rgb), .07); }

/* Long labels wrap instead of setting the table's width. */
.modes td:first-child { overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ *
 * Notes                                                               *
 * ------------------------------------------------------------------ */

.noteform { margin-top: 14px; }
.noteform label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 500; }
.noteform label.grow, .panel label.grow { flex: 1 1 14rem; display: flex; flex-direction: column; gap: 5px; }
.noteform .row { margin-top: 10px; align-items: flex-end; }
.noteform textarea { width: 100%; margin-top: 10px; resize: vertical; line-height: 1.5; }

/* The number is optional and reads as optional: set back, not boxed in as a
   field you have to get past to write a sentence. */
.measure {
  margin: 12px 0 0;
  padding: 4px 14px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.measure legend { padding: 0 6px; font-size: 12px; color: var(--text-muted); }
.measure input[type="number"] { max-inline-size: 7rem; }
.measure input[type="text"] { max-inline-size: 10rem; }

.notes { list-style: none; margin: 14px 0 0; padding: 0; }
.notes > li.dim { font-size: 13px; }
.note {
  padding: 12px 14px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}
.note__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.note__head .pill { background: rgba(var(--accent-rgb), .14); color: var(--accent-hover); padding: 1px 8px; }
.note__acts { margin-inline-start: auto; display: flex; gap: 2px; }
.note__acts .btn { padding: 3px 8px; font-size: 12px; }
/* Wrapping and newlines both preserved: a note is written prose, and one long
   line of it must not drag the page wider than the screen. */
.note__text { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }

.tagrow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; align-items: center; font-size: 12px; }
.tag {
  display: inline-block;
  padding: 2px 9px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 12px;
}
button.tag { cursor: pointer; }
button.tag:hover { color: var(--text-primary); border-color: var(--accent); }

.points { display: flex; flex-wrap: wrap; gap: 6px; }
.point {
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ *
 * Narrower windows                                                    *
 * ------------------------------------------------------------------ */

@media (max-width: 1180px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

@media (max-width: 1000px) {
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/*
 * On a phone — or in the hub's frame on one — the sidebar becomes a bar across
 * the top. It scrolls sideways rather than wrapping: a bar that grows to two
 * rows moves every anchor underneath it and then hides the section you just
 * jumped to. The per-source rows and the section labels go; the download
 * stays, because it is the one thing that must be reachable from everywhere.
 */
@media (max-width: 820px) {
  .sidebar {
    inset: 0 0 auto 0;
    inline-size: auto;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-inline-end: 0;
    border-block-end: 1px solid var(--border);
    background: rgba(14, 14, 20, .92);
    backdrop-filter: blur(10px);
  }

  .sidebar-logo { padding: 0; border: 0; }
  .sidebar-logo h1 { display: none; }
  .logo-icon { inline-size: 28px; block-size: 28px; }

  .sidebar-nav {
    flex-direction: row;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }
  .sidebar-nav::-webkit-scrollbar { display: none; }
  .nav-label, .nav-sources { display: none; }
  .sidebar-nav .nav-item { inline-size: auto; padding: 6px 10px; font-size: 13px; }
  .sidebar-nav .nav-item .icon { display: none; }
  .nav-item.active { box-shadow: inset 0 -2px 0 var(--accent); }

  .sidebar-footer { flex-direction: row; padding: 0; border: 0; }
  .sidebar-footer label.nav-item { display: none; }
  .sidebar-save { margin: 0; padding: 6px 10px; inline-size: auto; }

  .main-content { margin: 0; padding: 72px 16px 56px; }
  .page-header h2 { font-size: 22px; }
  .panel { padding: 16px; scroll-margin-top: 64px; }
  .category-card, .chart { scroll-margin-top: 64px; }
}

@media (max-width: 480px) {
  .stats-row { gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-value { font-size: 22px; }
  .drop { padding: 20px 14px; }
  th, td { padding: 6px 7px; }
  .sidebar-save .icon { display: none; }
}

/* Nothing here needs motion to be understood. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ------------------------------------------------------------------ *
 * The weekly log                                                      *
 * ------------------------------------------------------------------ */

/* Trainer time and study as one bar, with the goal a tick across it. Sage for
   the trainers, the warm tone for study, so the two halves of the plan read
   apart without a legend. The bar is scaled to the goal, or to the week when
   the week went past it, so the tick always sits inside. */
.wbar {
  position: relative;
  display: flex;
  inline-size: 100%;
  min-inline-size: 90px;
  block-size: 8px;
  margin: 6px 0;
  background: rgba(var(--accent-rgb), .10);
}
.wbar i { display: block; block-size: 100%; }
.wbar i.t { background: var(--accent); }
.wbar i.s { background: var(--warn); }
.wbar b {
  position: absolute;
  inset-block: -3px;
  inline-size: 2px;
  margin-inline-start: -1px;
  background: var(--text-primary);
}
.barcell { inline-size: 30%; }
#lanternWeeks td:last-child { color: var(--text-secondary); }
#lanternWeeks tr.now td { background: rgba(var(--accent-rgb), .07); }
.card h3 .dim { font-weight: 400; }
.card table td:last-child { white-space: nowrap; }
#weekly details.about { margin-top: 14px; }
#lanternWeeks td:first-child { white-space: nowrap; }
/* On a phone the bar column is what does not fit, and the card above already
   draws this week's; the numbers beside it say the rest. */
@media (max-width: 480px) {
  #lanternWeeks .barcell, #lanternWeeks th:nth-child(5), #lanternWeeks .nowtag { display: none; }
  #lanternWeeks th, #lanternWeeks td { padding-inline: 5px; }
}
