:root { color-scheme: light dark; --line: #8884; --accent: #2b59c3; }
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 system-ui, sans-serif; }
.bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; text-decoration: none; color: inherit; }
main { max-width: 760px; margin: 0 auto; padding: 16px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.stack { display: grid; gap: 8px; }
fieldset { display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin: 8px 0; }
legend { font-weight: 600; padding: 0 4px; }
input:not([type=radio]):not([type=checkbox]), select, textarea { width: 100%; padding: 8px; font: inherit; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: inherit; }
button, .button { display: inline-block; padding: 8px 14px; font: inherit; border: 0; border-radius: 6px; background: var(--accent); color: #fff; cursor: pointer; text-decoration: none; justify-self: start; }
button.link { background: none; color: inherit; text-decoration: underline; padding: 0; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); overflow-wrap: break-word; }
.hint { opacity: .75; }
.choice { display: flex; gap: 8px; align-items: center; }
.error { color: #c0392b; }
.notice { padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.stop { margin: 8px 0 16px; }
.stop summary { cursor: pointer; color: var(--muted, inherit); }
nav { display: flex; gap: 16px; margin-right: auto; margin-left: 24px; }
.filters > * { flex: 1; }
.flag { color: #c0392b; font-size: .85em; border: 1px solid; border-radius: 4px; padding: 0 4px; }
.body { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 16px 0; }
.stat { border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.stat .score { font-size: 1.8em; font-weight: 700; }
.stat.soon { opacity: .45; }
.verdict.go { color: #1e8449; } .verdict.pivot { color: #b9770e; } .verdict.no_go { color: #c0392b; }
.fit.yes { color: #1e8449; } .fit.partly { color: #b9770e; } .fit.no { color: #c0392b; }
.pictures { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 16px 0; }
.pictures figure { margin: 0; }
.shot { max-width: min(100%, 480px); height: auto; border: 1px solid var(--line); border-radius: 6px; margin-top: 0.5rem; }
.pictures img { max-width: 100%; height: auto; border-radius: 8px; display: block; }
.as { display: flex; gap: 8px; align-items: center; font-size: .9em; }
.as input { width: 14em !important; padding: 4px 8px !important; }
.invite { border-color: var(--accent); margin-bottom: 16px; }
.invite h2 { margin: 0; font-size: 1.1em; }
.answer { display: grid; gap: 16px; margin: 24px 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
button.quiet { background: none; color: inherit; border: 1px solid var(--line); }
.pair > label { flex: 1; }
.notice + .notice, .notice + details { margin-top: 12px; }
.notes { margin-top: 16px; }
.notes details { margin-bottom: 8px; }
.fit th, .fit td:nth-child(-n+2) { white-space: nowrap; overflow-wrap: normal; }
.read { padding-left: 20px; margin: 0; }
.read li { margin-bottom: 6px; overflow-wrap: break-word; }
.radar { --ink: var(--accent); display: block; width: 100%; max-width: 460px; margin: 8px auto 16px; }
.radar.go { --ink: #1e8449; } .radar.pivot { --ink: #b9770e; } .radar.no_go { --ink: #c0392b; }
.radar.small { width: 64px; margin: 0; }
.radar .ring { fill: none; stroke: var(--line); }
.radar .shape { fill: var(--ink); fill-opacity: .3; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.radar.small .shape { stroke-width: 5; }
.radar .dot { fill: var(--ink); }
.radar text { fill: currentColor; font-size: 14px; }
.radar .n { font-weight: 700; }
.research { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.wide { overflow-x: auto; }
.meter { display: inline-block; height: .7em; min-width: 1px; background: var(--accent); border-radius: 2px; vertical-align: baseline; }
.periods { display: flex; gap: 12px; margin: 8px 0 16px; }
.periods .here { font-weight: 700; text-decoration: none; color: inherit; }
main.broad { max-width: 1100px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; overflow-wrap: normal; }
.pnl .total td { font-weight: 600; }
.wide td input { width: 100%; min-width: 6em; }
.switches { list-style: none; padding: 0; }
.switches form { display: inline; }
input[type=range] { width: 100%; }
.danger { background: #b42318; border-color: #b42318; color: #fff; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 12px 0; }
.tabs a[aria-current="page"] { font-weight: 600; text-decoration: none; }
.mockups { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.mockups img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.stat.chosen { outline: 2px solid currentColor; }
.steps { margin: 0; padding-left: 22px; }
:target { scroll-margin-top: 12px; }

/* Phones: the header and rows of links wrap, buttons are big enough to press, a page's main
   button is as wide as the screen, and list tables become cards. */
@media (max-width: 640px) {
  .bar { flex-wrap: wrap; gap: 6px 16px; padding: 10px 16px; }
  html { -webkit-text-size-adjust: 100%; }
  .bar nav { order: 3; width: 100%; margin: 0; gap: 0 16px; flex-wrap: wrap; }
  .bar nav a { white-space: nowrap; padding: 6px 0; }
  .tabs a { padding: 6px 0; }
  button, .button { min-height: 44px; padding: 10px 16px; }
  button.link { min-height: 0; padding: 6px 0; }
  .primary { display: block; width: 100%; text-align: center; }
  form.choice { flex-wrap: wrap; }
  form.choice button { flex: 1 1 auto; }
  .as { flex-wrap: wrap; }
  .as input { width: 100% !important; }
  main { padding: 12px 16px; }
  h1 { font-size: 1.6em; line-height: 1.2; }
  .row { flex-wrap: wrap; }
  .row > span.row { gap: 4px 18px; justify-content: flex-start; }
  .row > span.row a { padding: 6px 0; }
  .filters { flex-wrap: wrap; }
  .filters > * { flex: 1 1 40%; }
  table.cards, table.cards tbody, table.cards tr, table.cards td { display: block; width: 100%; }
  table.cards thead { display: none; }
  table.cards tr { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
  table.cards td { border: 0; padding: 2px 0; }
  table.cards td.lead { display: inline; padding-right: 6px; font-weight: 600; }
  table.cards td.lead + td:not(.lead) { margin-top: 4px; }
  table.cards td[data-label]::before { content: attr(data-label) ": "; opacity: .7; }
  table.cards td:empty { display: none; }
  table.cards td:not(.lead):not([data-label]) { display: inline-block; width: auto; margin: 8px 16px 0 0; vertical-align: middle; }
  table.cards .research { margin: 6px 0; }
  .stats { grid-template-columns: 1fr; }
  .radar { max-width: 340px; }
}
