/* Startup DocBot home page ("Control Center"), from Clark's mockup of Oct 27, 2026.
   Desktop: the hero art on the left, the control panel on the right, both sized from --h (the art's height) so the
   pair keeps the mockup's proportions at any window size. Below 860px wide they stack. */
:root {
  --bg: #182c32;       /* page */
  --frame: #0e1b20;    /* art frame, panel edge */
  --ink: #14262c;      /* text, rules on cards */
  --panel: #f1dfbe;    /* the panel's paper */
  --card: #f7e9c9;
  --card-under: #e6d2ab;
  --tile: #1c363d;     /* number tiles */
  --cream: #f3e3c3;    /* text on dark */
  --red: #bb4a2f;      /* arrows, START HERE */
  --tan: #9c8a6c;      /* panel band, screws, rules */
  --green: #6aa77a;    /* status lights */
  --done: #2f6b45;     /* DONE label */
  --foot: #a9bcbe;     /* copyright on the dark page */
  --serif: 'Abhaya Libre', Georgia, 'Times New Roman', serif;
  --figs: 'Playfair Display', Georgia, serif; /* the tile numbers: lining figures, which Abhaya Libre doesn't have */
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  /* The art's height: fits the window's height and leaves room for the panel beside it, never taller than 940px. */
  --h: min(calc(100vh - 84px), calc((100vw - 72px) * 0.465 / 0.787), 940px);
  --u: calc(var(--h) / 100); /* 1% of the art's height: the panel's sizes are set in these units */
  --art-w: calc(var(--h) * 1040 / 1322); /* the art's width, stated outright: Safari sized an `auto` grid column from the image's own width, not the aspect ratio */
}
* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 24px 16px; background: var(--bg); color: var(--ink); font-family: var(--mono); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.home { display: grid; grid-template-columns: var(--art-w) minmax(0, 1fr); gap: 24px; width: calc(var(--h) * 0.787 * 2.09 + 24px); max-width: 100%; }

/* ---------- the art */
.art { height: var(--h); width: var(--art-w); margin: 0; border: max(4px, calc(var(--u) * .6)) solid var(--frame); border-radius: max(6px, calc(var(--u) * .8)); overflow: hidden; background: var(--frame); align-self: start; }
.art img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- the panel */
.panel { position: relative; display: flex; flex-direction: column; min-height: var(--h);
  padding: calc(var(--u) * 5) calc(var(--u) * 5.6) calc(var(--u) * 6);
  border: max(1.5px, calc(var(--u) * .33)) solid var(--frame); border-radius: calc(var(--u) * 1.7);
  background-color: var(--panel);
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .42  0 0 0 0 .33  0 0 0 0 .2  0 0 0 .11 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
    radial-gradient(ellipse at 50% 40%, rgba(255,250,235,.35), rgba(0,0,0,0) 70%);
  box-shadow: inset 0 0 0 max(2px, calc(var(--u) * .42)) var(--tan), 0 2px 0 var(--frame); }
.panel::before { content: ''; position: absolute; inset: calc(var(--u) * 1.17); border: max(2px, calc(var(--u) * .25)) solid var(--ink); border-radius: var(--u); pointer-events: none; }
.screw { position: absolute; --s: max(10px, calc(var(--u) * 1.75)); --at: calc(var(--u) * 1.17 + max(2px, calc(var(--u) * .25)) - var(--s) * .3); width: var(--s); height: var(--s); border-radius: 50%; background: var(--tan); border: 1.5px solid var(--ink); }
.screw::after { content: ''; position: absolute; left: 1px; right: 1px; top: 50%; height: 1.5px; margin-top: -.75px; background: var(--ink); transform: rotate(-28deg); }
.screw.tl { top: var(--at); left: var(--at); } .screw.tr { top: var(--at); right: var(--at); } .screw.bl { bottom: var(--at); left: var(--at); } .screw.br { bottom: var(--at); right: var(--at); }
.screw.tr::after, .screw.bl::after { transform: rotate(32deg); }

.label { font-family: var(--mono); font-size: max(12px, calc(var(--u) * 1.85)); letter-spacing: .06em; text-transform: uppercase; line-height: 1.2; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: calc(var(--u) * 2.2); border-bottom: 1.5px solid var(--tan); }
.light { display: inline-flex; align-items: center; gap: .7em; }
.light i { flex: none; width: max(14px, calc(var(--u) * 2.1)); height: max(14px, calc(var(--u) * 2.1)); border-radius: 50%; border: 2px solid var(--ink);
  background: radial-gradient(circle at 35% 32%, #d9f2dc 0 14%, var(--green) 30%, #4d8a5c 100%); }

h2 { margin: calc(var(--u) * 3.2) 0 calc(var(--u) * 3.6); font-family: var(--serif); font-weight: 800; font-size: max(34px, calc(var(--u) * 6.4)); line-height: 1; letter-spacing: .005em; }

/* ---------- the five cards (sized so all 5 fit where 3 did; Oct 28) */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: calc(var(--u) * 1.6); }
.card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: calc(var(--u) * 2.8);
  padding: calc(var(--u) * 1.05); padding-right: calc(var(--u) * 3.4);
  color: var(--ink); text-decoration: none; background: var(--card); border: 2px solid var(--ink); border-radius: 7px;
  box-shadow: 4px 5px 0 0 var(--card-under), 4px 5px 0 2px var(--ink);
  transition: transform .08s ease, box-shadow .08s ease; }
.num { display: grid; place-items: center; width: calc(var(--u) * 7.8); aspect-ratio: 146 / 160; border-radius: 4px; background: var(--tile); color: var(--cream);
  font-family: var(--figs); font-weight: 700; font-variant-numeric: lining-nums; font-size: max(22px, calc(var(--u) * 3.9)); line-height: 1; }
.txt { position: relative; }
.name { display: block; font-family: var(--serif); font-weight: 800; font-size: max(20px, calc(var(--u) * 3.9)); line-height: 1.05; letter-spacing: .02em; }
/* START HERE hangs below the name, so all 3 names sit at the same height (as in the mockup) */
.status { position: absolute; left: 0; top: 100%; margin-top: calc(var(--u) * .7); color: #a63f27; font-weight: 500; white-space: nowrap; }
.status:empty { display: none; }
.card.done .status { color: var(--done); }
.card.soon .status, .xp-soon { color: #5f5745; }
.card.soon .go, .card.soon:hover .go { background: var(--card-under); } .card.soon .go svg { stroke: var(--ink); } /* not built yet: a muted arrow */
.xp-list .nw { white-space: nowrap; }
.xp-list .soon { margin-left: .35em; font-size: max(11px, calc(var(--u) * 1.5)); color: #5f5745; font-weight: 500; white-space: nowrap; vertical-align: .12em; }
.xp-soon { font-size: max(13px, calc(var(--u) * 2)); font-weight: 500; padding: calc(var(--u) * 1.6) 0; }
.go { flex: none; display: grid; place-items: center; width: calc(var(--u) * 5.2); min-width: 38px; aspect-ratio: 1; border-radius: 50%; background: var(--red); border: 2px solid var(--ink); }
.go svg { width: 52%; height: 52%; }
@media (hover: hover) {
  .card:hover { transform: translate(-1px, -1px); box-shadow: 5px 6px 0 0 var(--card-under), 5px 6px 0 2px var(--ink); }
  .card:hover .go { background: #a63f27; }
}
.card:active { transform: translate(3px, 4px); box-shadow: 1px 1px 0 0 var(--card-under), 1px 1px 0 2px var(--ink); }
.card:focus-visible, .help:focus-visible, .close:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }

/* ---------- a tool card opened (Clark, Oct 27): it covers the other category and lists what the tool makes.
   The cards share one grid column; an open card spans rows 2-5, over cards 02 to 05, and the rows grow if it needs more. */
.cards > li { display: contents; }
.cards { grid-template-columns: minmax(0, 1fr); }
.cards .card { grid-column: 1; } /* the open card sits over the others, not beside them */
.cards.is-open .card:not(#card-profile) { visibility: hidden; } /* covered cards leave the tab order */
@media (min-width: 861px) and (min-height: 521px) and (min-aspect-ratio: 3/4) { .panel:has(.xp:not([hidden])) .cards { margin-bottom: calc(var(--u) * 1.4); } } /* side by side: the panel keeps its height when a card opens */
#card-profile { grid-row: 1; } #card-formation { grid-row: 2; } #card-forecast { grid-row: 3; } #card-funding { grid-row: 4; } #card-legal { grid-row: 5; } /* Clark, Oct 28 */
button.card { appearance: none; width: 100%; font: inherit; text-align: left; cursor: pointer; }
.xp { position: relative; grid-row: 2 / 6; grid-column: 1; z-index: 3; display: flex; flex-direction: column; gap: calc(var(--u) * 1);
  padding: calc(var(--u) * 1.05) calc(var(--u) * 3.4) calc(var(--u) * 1.4) calc(var(--u) * 1.05);
  background: var(--card); border: 2px solid var(--ink); border-radius: 7px; box-shadow: 4px 5px 0 0 var(--card-under), 4px 5px 0 2px var(--ink); }
.xp[hidden] { display: none; }
.xp { scroll-margin: 16px 0 12px; } /* opened on a short screen: the × stays in view */
.xp-head .kind { text-wrap: balance; }
.xp-head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: calc(var(--u) * 2.8); padding-right: calc(var(--u) * 3); }
.xp-head h3.name { margin: 0; outline: none; }
.xp-head .kind { display: block; margin-top: calc(var(--u) * 1); color: var(--ink); font-size: max(13px, calc(var(--u) * 1.95)); }
/* Close: a small round badge in the card's top-right corner, clear of where the closed card's arrow was */
.xp-close { position: absolute; top: calc(8px - var(--u) * 1.6); right: -12px; width: max(36px, calc(var(--u) * 4.6)); height: max(36px, calc(var(--u) * 4.6)); display: grid; place-items: center; appearance: none; border: 2px solid var(--ink); border-radius: 50%; background: var(--card); color: var(--ink); cursor: pointer; font-size: max(22px, calc(var(--u) * 3)); line-height: 1; padding: 0 0 2px; }
.xp-close:hover { background: var(--ink); color: var(--cream); }
/* What the tool makes: a ruled index (Clark, Oct 30), 1 document a row between tan rules like the panel's own, the rows
   sharing the card's height evenly (never taller than 7 units, so a 1-document card doesn't stretch its row) */
.xp-list { list-style: none; flex: 1 1 auto; display: flex; flex-direction: column; margin: calc(var(--u) * 1.6) 0 0; padding: 0; border-top: 1.5px solid var(--tan); }
.xp-list li { flex: 1 1 0; display: flex; flex-wrap: wrap; align-items: center; column-gap: .35em; min-height: max(1.5em, calc(var(--u) * 3.9)); max-height: calc(var(--u) * 7);
  padding: calc(var(--u) * .4) 0 calc(var(--u) * .4) calc(var(--u) * 1.2); border-bottom: 1.5px solid var(--tan);
  font-family: var(--serif); font-weight: 800; font-size: max(17px, calc(var(--u) * 2.6)); line-height: 1.15; }
/* a long list (Company Formation's 10 documents, Nov 1): tighter rows, so the open card keeps the panel the art's height (Clark, Nov 2) */
.xp-list:has(> li:nth-child(9)) > li { min-height: max(1.3em, calc(var(--u) * 3)); padding-block: 0; font-size: max(15px, calc(var(--u) * 2.3)); line-height: 1.1; }
/* Company Formation's index (Clark, Nov 6): the card lists its 4 groups of documents at the top, each a row with its count
   and a chevron; a group opens in place as a card within the card, one at a time, and the other rows tighten so the panel
   keeps the art's height. The card keeps its one Start at the bottom. The 9-row rule above never applies to this list. */
.xp-list.groups > li.group { display: block; flex: 0 0 auto; min-height: 0; max-height: none; padding: 0; }
.xp-list.groups > li.group.open { border-bottom: 0; }
.grp-row { appearance: none; width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: calc(var(--u) * 1.6); background: none; border: 0; padding: calc(var(--u) * .9) 0 calc(var(--u) * .9) calc(var(--u) * 1.2); cursor: pointer; color: var(--ink); text-align: left; font: inherit; }
.xp-list.groups:has(.open) .grp-row { padding-top: calc(var(--u) * .45); padding-bottom: calc(var(--u) * .45); }
.grp-row .gname { font-family: var(--serif); font-weight: 800; font-size: max(17px, calc(var(--u) * 2.6)); line-height: 1.15; }
.grp-row .gcount { color: #6f6148; font-size: max(10px, calc(var(--u) * 1.5)); }
.grp-row .gchev { font-size: max(20px, calc(var(--u) * 3)); line-height: 1; color: var(--ink); transition: transform .18s; }
.grp-row[aria-expanded="true"] .gchev { transform: rotate(90deg); }
.grp-row:hover .gname { color: #a63f27; }
.grp-row:focus-visible { outline: 3px solid var(--red); outline-offset: -3px; }
.subcard { margin: 0 0 calc(var(--u) * 1) calc(var(--u) * 1.2); padding: calc(var(--u) * .3) calc(var(--u) * 1.6) calc(var(--u) * .8); background: var(--card); border: 2px solid var(--ink); border-radius: 7px; box-shadow: 3px 4px 0 0 var(--card-under), 3px 4px 0 2px var(--ink); }
.subcard .xp-list { margin: 0; border-top: 0; }
.subcard .xp-list li { flex: 0 0 auto; min-height: max(1.3em, calc(var(--u) * 2.9)); font-size: max(15px, calc(var(--u) * 2.3)); padding-block: calc(var(--u) * .2); }
.subcard .xp-list li:last-child { border-bottom: 0; }
@media (max-width: 860px), (max-height: 520px), (max-aspect-ratio: 3/4) { .grp-row { padding: 9px 0 9px 8px; } .subcard { margin-left: 8px; padding: 2px 10px 6px; } .subcard .xp-list li { min-height: 34px; } }
/* side by side in a smaller window, where the type's 17px floor would outgrow the card: the rows tighten to fit */
@media (min-width: 861px) and (max-width: 1171px) and (min-height: 521px) and (min-aspect-ratio: 3/4), (min-width: 861px) and (max-height: 733px) and (min-height: 521px) and (min-aspect-ratio: 3/4) {
  .xp-list li { font-size: max(15px, calc(var(--u) * 2.6)); min-height: max(1.4em, calc(var(--u) * 3.9)); padding-block: 0; }
  .xp-list:has(> li:nth-child(9)) > li { font-size: 14px; min-height: 1.25em; }
  .xp:has(.xp-list > li:nth-child(9)) { gap: calc(var(--u) * .6); }
  .xp:has(.xp-list > li:nth-child(9)) .xp-list { margin-top: calc(var(--u) * .8); }
  .xp:has(.xp-list > li:nth-child(9)) .xp-foot { margin-top: calc(var(--u) * .8); }
  .xp-list.groups:has(.open) .grp-row { padding-top: calc(var(--u) * .25); padding-bottom: calc(var(--u) * .25); }
  .xp-list.groups:has(.open) .grp-row .gname { font-size: max(15px, calc(var(--u) * 2.4)); }
  .xp:has(.groups .open) { gap: calc(var(--u) * .6); } .xp:has(.groups .open) .xp-list { margin-top: calc(var(--u) * .8); } .xp:has(.groups .open) .xp-foot { margin-top: calc(var(--u) * .6); }
  .subcard { margin-bottom: calc(var(--u) * .5); padding-top: 0; padding-bottom: calc(var(--u) * .4); } .subcard .xp-list li { min-height: max(1.25em, calc(var(--u) * 2.6)); font-size: 14px; padding-block: 0; }
}
/* A document's name opens it (Clark, Nov 8, 2026): the whole row is the link (the link's ::before covers it), with a small
   arrow at its right end; the name and the arrow turn red on hover, as a group's title does. Phones: rows at least 44px tall. */
.xp-list li:has(> a.doc) { position: relative; flex-wrap: nowrap; }
.xp-list a.doc { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: .6em; color: inherit; text-decoration: none; outline: none; }
.xp-list a.doc::before { content: ''; position: absolute; inset: 0; border-radius: 3px; }
.xp-list a.doc::after { content: ''; flex: none; width: .9em; height: .9em; margin-right: calc(var(--u) * .5); background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'><path d='M4 12h15M13 5.5 19.5 12 13 18.5'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'><path d='M4 12h15M13 5.5 19.5 12 13 18.5'/></svg>") center / contain no-repeat; }
@media (hover: hover) { .xp-list a.doc:hover { color: #a63f27; } } /* no red left behind after a tap on a phone */
.xp-list a.doc:focus-visible::before { outline: 3px solid var(--red); outline-offset: -3px; }
@media (max-width: 860px), (max-height: 520px), (max-aspect-ratio: 3/4), (pointer: coarse) { /* phones and touch screens: rows a finger can hit, as tall as the name needs */
  .xp-list li:has(> a.doc) { flex: 0 0 auto; min-height: 44px; max-height: none; padding-block: 6px; }
  .grp-row { min-height: 44px; } }
/* Financial Planning's 2 lines are its only links (no Start): they share the card's height, each with Start's round red arrow */
#xp-forecast .xp-list > li { flex: 1 1 0; max-height: none; }
#xp-forecast a.doc::after { width: calc(var(--u) * 5.2); min-width: 38px; height: auto; aspect-ratio: 1; margin-right: 0; border: 2px solid var(--ink); border-radius: 50%; -webkit-mask: none; mask: none;
  background: var(--red) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f3e3c3' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M4 12h15M13 5.5 19.5 12 13 18.5'/></svg>") center / 52% no-repeat; }
@media (hover: hover) { #xp-forecast a.doc:hover::after { background-color: #a63f27; } }
.xp-foot { margin-top: calc(var(--u) * 1.6); display: flex; align-items: center; justify-content: flex-end; gap: 8px 16px; }
.xp-go { display: inline-flex; align-items: center; gap: calc(var(--u) * 1.6); margin-left: auto; color: var(--ink); text-decoration: none; }
.xp-go .label { font-size: max(13px, calc(var(--u) * 2)); font-weight: 500; }
.xp-go:hover .go { background: #a63f27; }
.xp-go:hover .label { color: #a63f27; }
.xp-go:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; border-radius: 4px; }
.xp-close:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

/* ---------- foot of the panel */
.foot { margin-top: auto; padding-top: calc(var(--u) * 2.4); border-top: 1.5px solid var(--tan); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel .cards { margin-bottom: calc(var(--u) * 2.4); }
.help { appearance: none; border: 0; background: none; padding: 12px 0 12px 16px; margin: -12px 0; color: var(--ink); cursor: pointer; }
.help span { margin-left: 1.1em; }
.help:hover { color: var(--red); }
.help.about { padding: 12px 16px 12px 0; } /* About DocBot (Nov 2): Help's mirror on the left */

.copy { margin: 10px 0 0; width: calc(var(--h) * 0.787 * 2.09 + 24px); max-width: 100%; text-align: right; color: var(--foot); font-family: var(--mono); font-size: max(13px, calc(var(--u) * 1.4)); letter-spacing: .03em; }

/* ---------- Help */
/* the frame and the Help/Close bar stay put; only the text below them scrolls */
dialog.helpbox { width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: hidden; padding: 0; border: 2px solid var(--frame); border-radius: 18px; color: var(--ink);
  background: var(--panel); box-shadow: inset 0 0 0 5px var(--tan), 0 18px 60px rgba(0,0,0,.45); }
dialog.helpbox[open] { display: flex; }
dialog.helpbox::backdrop { background: rgba(8, 18, 22, .72); }
.helpin { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; margin: 12px; padding: 20px 26px 22px; border: 2px solid var(--ink); border-radius: 10px; }
.helpbody { min-height: 0; overflow: auto; overscroll-behavior: contain; margin-right: -12px; padding-right: 12px;
  /* a soft shadow at the top or bottom while more text is hidden (Mac and iOS hide scrollbars until you scroll) */
  background: linear-gradient(var(--panel) 30%, rgba(241,223,190,0)) center top / 100% 36px no-repeat local,
    linear-gradient(rgba(241,223,190,0), var(--panel) 70%) center bottom / 100% 36px no-repeat local,
    radial-gradient(farthest-side at 50% 0, rgba(20,38,44,.32), rgba(20,38,44,0)) center top / 100% 14px no-repeat scroll,
    radial-gradient(farthest-side at 50% 100%, rgba(20,38,44,.32), rgba(20,38,44,0)) center bottom / 100% 14px no-repeat scroll; }
.helpin .bar { flex: none; padding-bottom: 12px; }
.close { appearance: none; border: 0; background: none; padding: 12px 0 12px 16px; margin: -12px 0; color: var(--ink); cursor: pointer; font: inherit; letter-spacing: inherit; text-transform: inherit; }
.close:hover { color: var(--red); }
.helpin h3 { margin: 18px 0 8px; font-family: var(--serif); font-weight: 800; font-size: 30px; line-height: 1.05; }
.helpin p { margin: 0 0 10px; font-family: var(--serif); font-size: 18px; line-height: 1.38; }
.helpin dl { margin: 12px 0 0; }
.helpin dt { display: flex; align-items: baseline; gap: 10px; margin-top: 12px; font-family: var(--serif); font-weight: 800; font-size: 21px; }
.helpin dt b { display: inline-grid; place-items: center; min-width: 40px; height: 34px; border-radius: 4px; background: var(--tile); color: var(--cream); font-family: var(--figs); font-weight: 700; font-variant-numeric: lining-nums; font-size: 18px; }
.helpin dd { margin: 2px 0 0 50px; font-family: var(--serif); font-size: 18px; line-height: 1.38; }
.helpin .saved { margin-top: 16px; padding-top: 12px; border-top: 1.5px solid var(--tan); }
.helpin .saved .label { display: flex; margin-bottom: 6px; }
.helpin .saved p { margin: 0; }
/* About: the credits, 1 a line, no bullets */
.helpin ul.credits { list-style: none; margin: 4px 0 2px; padding: 0; }
.helpin ul.credits li { margin: 0 0 5px; font-family: var(--serif); font-size: 18px; line-height: 1.3; }
.helpin a { color: #a63f27; text-underline-offset: 2px; }
.helpin a:hover { color: var(--ink); }
.helpin a:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 2px; }

/* ---------- narrow windows: the art on top, the panel below */
@media (max-width: 860px), (max-height: 520px), (max-aspect-ratio: 3/4) {
  :root { --u: 6.2px; }
  body { display: block; padding: 16px 16px 20px; }
  .home { grid-template-columns: minmax(0, 1fr); width: 100%; max-width: 560px; margin: 0 auto; gap: 16px; }
  .art { height: auto; width: 100%; }
  .panel { min-height: 0; padding: 34px 30px 34px; }
  .status { position: static; display: block; margin-top: 6px; }
  .copy { width: 100%; max-width: 560px; margin: 12px auto 0; text-align: center; }
}
@media (max-width: 860px), (max-height: 520px), (max-aspect-ratio: 3/4) { .xp { gap: 10px; } .xp-head .kind { margin-top: 6px; } .xp-list { margin-top: 6px; } .xp-list li { min-height: 40px; max-height: 56px; padding-left: 8px; } .xp-foot { margin-top: 10px; } }
@media (hover: none) { .home { cursor: pointer; } } /* so a tap outside reaches the document listener on iOS */
@media (max-width: 480px) {
  .xp-head { gap: 12px; padding-right: 10px; } .xp-head .txt { display: contents; } .xp-head .kind { grid-column: 1 / -1; margin-top: 0; } /* the type line gets the card's full width */ .xp-foot { flex-wrap: wrap; } .xp { padding-right: 12px; }
  :root { --u: 5.2px; }
  .panel { padding: 30px 24px 30px; }
  .card { gap: 12px; padding-right: 12px; }
  .num { width: 48px; font-size: 22px; }
  .name { font-size: 21px; }
  .helpin { padding: 18px 18px 22px; }
  .helpin dd { margin-left: 0; }
}
/* side by side but short or narrow: the status line sits under the name instead of hanging below it, clear of the border */
@media (min-width: 861px) and (max-height: 700px), (min-width: 861px) and (max-width: 1150px) { .status { position: static; display: block; margin-top: 3px; } }
@media (max-width: 400px) { body { padding-inline: 10px; } .panel { padding-inline: 18px; } .xp-close { right: -6px; } } /* phones: the tool names fit on 1 line; the × clear of the frame */
@media (prefers-reduced-motion: reduce) { .card { transition: none; } }
