:root {
  color-scheme: light dark;
  --paper: #faf9f5;
  --panel: #ffffff;
  --ink: #202e2a;
  --muted: #505e58;
  --accent: #245e4c;
  --border: #6a7970;
  --focus: #8e3800;
  --button-ink: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #151c19;
    --panel: #202a25;
    --ink: #eef1e9;
    --muted: #b8c7bd;
    --accent: #a2dbb9;
    --border: #81988a;
    --focus: #ffc178;
    --button-ink: #151c19;
  }
}
* { box-sizing: border-box; }
html { scrollbar-gutter: stable; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.65 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.shell { max-width: 800px; margin: 0 auto; padding: 0 16px; }
header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 24px; padding: 24px 0; border-bottom: 1px solid var(--border); }
.brand { font-weight: 700; color: var(--ink); }
nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
a { color: var(--accent); text-underline-offset: 3px; }
a, p, li, code, th, td { overflow-wrap: anywhere; }
main { padding: 32px 0 24px; }
h1, h2, h3 { line-height: 1.25; color: var(--ink); }
h1 { margin: 0 0 24px; font-size: clamp(1.8rem, 5vw, 2.7rem); letter-spacing: -0.025em; }
h2 { margin: 32px 0 16px; font-size: 1.4rem; }
h3 { margin: 24px 0 12px; font-size: 1.1rem; }
p { margin: 0 0 18px; }
ul { padding-left: 24px; }
li { margin: 8px 0; }
section { margin: 32px 0; }
.build-counts { color: var(--muted); }
.pricing-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-bottom: 24px; }
.plan-card { display: flex; flex-direction: column; min-width: 0; padding: 16px; background: var(--panel); border: 1px solid var(--border); border-radius: 4px; }
.plan-card h3 { margin-top: 0; }
.price { font-size: 1.15rem; font-weight: 700; }
.plan-card ul { margin-top: 0; }
.buy { display: inline-flex; text-decoration: none; align-items: center; justify-content: center; min-height: 44px; max-width: 100%; padding: 10px 18px; border: 1px solid var(--accent); border-radius: 4px; background: var(--accent); color: var(--button-ink); font-weight: 650; text-align: center; }
.plan-card .buy { margin-top: auto; }
.key-panel, .problem-panel { min-width: 0; padding: 20px; border: 1px solid var(--border); border-radius: 4px; background: var(--panel); overflow-wrap: anywhere; }
.key-panel h2, .problem-panel h2 { margin-top: 0; }
#key-value { display: block; padding: 16px; border: 1px solid var(--border); border-radius: 4px; overflow-wrap: anywhere; white-space: pre-wrap; user-select: text; }
.key-details dt { font-weight: 650; }
.key-details dd { margin: 0 0 16px; }
#key-title:focus, #problem-title:focus { outline: 3px solid var(--focus); outline-offset: 4px; }
[hidden] { display: none !important; }
@media (min-width: 720px) {
  .pricing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.lookup { padding-top: 4px; border-top: 1px solid var(--border); }
.fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, .6fr); gap: 16px; }
.fields > div { min-width: 0; }
label { display: block; margin-bottom: 6px; font-weight: 600; }
input, button { font: inherit; border: 1px solid var(--border); border-radius: 4px; min-height: 44px; }
input { width: 100%; min-width: 0; padding: 9px 12px; color: var(--ink); background: var(--panel); }
input::placeholder { color: var(--muted); opacity: 1; }
button { margin-top: 18px; padding: 10px 18px; background: var(--accent); border-color: var(--accent); color: var(--button-ink); font-weight: 650; cursor: pointer; }
button:disabled { cursor: wait; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.skip { position: absolute; top: -100px; left: 16px; padding: 10px 16px; background: var(--panel); z-index: 1; }
.skip:focus { top: 8px; }
#lookup-status { height: 5em; overflow: auto; margin: 16px 0 8px; color: var(--muted); }
.result { min-height: 16rem; scrollbar-gutter: stable; padding: 20px; background: var(--panel); border: 1px solid var(--border); border-radius: 4px; overflow-wrap: anywhere; }
.result h2 { margin-top: 0; }
.result section { margin: 24px 0; }
.result p:last-child { margin-bottom: 0; }
pre { max-width: 100%; margin: 16px 0 24px; padding: 16px; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--panel); border: 1px solid var(--border); border-radius: 4px; }
code { font: .9em/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; }
table { width: 100%; table-layout: fixed; border-collapse: collapse; margin: 20px 0; font-variant-numeric: tabular-nums; }
caption { text-align: left; margin-bottom: 12px; font-weight: 600; }
th, td { text-align: left; border-bottom: 1px solid var(--border); padding: 10px 8px; }
footer { border-top: 1px solid var(--border); padding: 24px 0 32px; color: var(--muted); }
footer p { margin: 12px 0 0; }
@media (max-width: 520px) {
  .fields { grid-template-columns: minmax(0, 1fr); }
  button { width: 100%; }
  th, td { padding: 10px 3px; font-size: .875rem; }
  .result { padding: 16px; }
}
