:root {
  --paper: #f3f4f6; --sheet: #ffffff; --ink: #121417; --muted: #5c6570; --line: #e3e6eb;
  --blue: #1a56d6; --blue-soft: #e7eefb; --blue-deep: #123a8c; --yellow: #e6b325; --yellow-soft: #fff7de; --grey: #8a93a0;
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); line-height: 1.5; font-size: 15px; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue); }
.wrap { max-width: 1280px; margin: 0 auto; padding: 20px 16px 40px; }
header.top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
h1 { font-size: 30px; font-weight: 650; letter-spacing: -0.02em; }
.mark { display: inline-block; width: 9px; height: 9px; border-radius: 2px; background: var(--yellow); margin-left: 6px; transform: translateY(-6px); }
.sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.tabs { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--sheet); }
.tabs button { border: 0; background: var(--sheet); padding: 8px 16px; font-weight: 550; }
.tabs button.on { background: var(--ink); color: #fff; }
.banner { background: var(--yellow-soft); border: 1px solid #f0dd9c; border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; font-size: 14px; }
.layout { display: grid; grid-template-columns: 340px 1fr; gap: 14px; align-items: start; }
.main { display: grid; gap: 14px; min-width: 0; }
.card { background: var(--sheet); border: 1px solid var(--line); border-radius: 14px; padding: 16px; min-width: 0; }
.card h2 { font-size: 16px; font-weight: 650; margin-bottom: 10px; }
.controls h2:not(:first-child) { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.cardhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.status { font-size: 13px; color: var(--muted); }
label { display: block; margin-bottom: 10px; font-size: 13px; font-weight: 550; }
label .u { font-weight: 400; color: var(--muted); }
label > input, label > select, label > .pair { display: block; margin-top: 4px; }
label > .pair { display: grid; }
input[type=number], select { width: 100%; border: 1px solid #cdd2da; background: #fff; border-radius: 10px; padding: 8px 10px; font-size: 16px; min-height: 40px; }
input[type=range] { width: 100%; accent-color: var(--blue); min-height: 32px; }
.pair { display: grid; grid-template-columns: 1fr 84px; gap: 10px; align-items: center; }
label.chk { display: flex !important; gap: 8px; align-items: center; font-weight: 450; }
label.chk input { width: 18px; height: 18px; accent-color: var(--blue); }
.btn { border: 1px solid #cdd2da; background: var(--sheet); border-radius: 10px; padding: 9px 14px; font-weight: 600; min-height: 40px; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.aimbtns { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
svg.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--sans); }
.chart .ground { fill: #c9ced6; } .chart .groundline { stroke: var(--ink); stroke-width: 2; fill: none; }
.chart .beamfill { fill: var(--blue); fill-opacity: .16; }
.chart .centre { stroke: var(--blue); stroke-width: 2.4; fill: none; }
.chart .edge { stroke: var(--blue-deep); stroke-width: 1.4; stroke-dasharray: 5 4; fill: none; }
.chart .cell { fill: var(--yellow); fill-opacity: .55; stroke: #9a7410; stroke-width: 1.5; }
.chart .ac { fill: var(--ink); }
.chart .lab { fill: var(--ink); font-size: 12px; font-weight: 600; font-family: var(--sans); }
.chart .ringlab { fill: var(--blue-deep); font-size: 9px; font-family: var(--sans); font-weight: 600; }
.chart .ringdot { fill: var(--blue-deep); }
.chart .outerband { fill: var(--yellow); fill-opacity: .12; }
.chart .outerlab { fill: var(--muted); font-size: 10px; font-family: var(--sans); }
.chart .aimline { stroke: var(--grey); stroke-width: 1; stroke-dasharray: 2 3; }
.legendrow { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.key::before { content: ""; display: inline-block; width: 16px; height: 3px; margin-right: 6px; vertical-align: middle; background: var(--blue); }
.key.edge::before { background: repeating-linear-gradient(90deg, var(--blue-deep) 0 4px, transparent 4px 7px); }
.key.cell::before { height: 10px; background: var(--yellow); }
.key.ground::before { height: 10px; background: #c9ced6; }
.figures { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.figure { background: var(--sheet); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.figure .label { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.figure .value { font-size: 21px; font-weight: 650; margin-top: 2px; font-variant-numeric: tabular-nums; }
.figure .note { font-size: 12px; color: var(--muted); }
.verdict-head { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 16px; margin-bottom: 4px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 650; background: var(--blue-soft); color: var(--blue-deep); }
.pill.warn { background: var(--yellow-soft); color: #7a5a06; border: 1px solid #f0dd9c; }
.pill.dark { background: var(--ink); color: #fff; }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; font-variant-numeric: tabular-nums; }
th, td { text-align: right; padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
tr.cur td { background: var(--blue-soft); font-weight: 600; }
.question { font-size: 16px; font-weight: 600; margin-bottom: 14px; }
.result { margin: 10px 0; font-size: 14px; }
.result .big { font-size: 20px; font-weight: 650; }
.result.good { border-left: 4px solid var(--blue); padding-left: 10px; }
.result.miss { border-left: 4px solid var(--yellow); padding-left: 10px; }
.prose h3 { font-size: 14px; margin: 16px 0 4px; } .prose p { margin-bottom: 6px; max-width: 78ch; }
.formula { background: var(--paper); border-radius: 10px; padding: 10px 14px; font-weight: 600; }
.foot { margin-top: 24px; color: var(--muted); font-size: 12.5px; text-align: center; }
[hidden] { display: none !important; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } .figures { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { h1 { font-size: 26px; } .tabs { width: 100%; } .tabs button { flex: 1; padding: 10px 6px; } .wrap { padding: 14px 12px 32px; } }
