[hidden] { display: none !important; }
h1, h2, h3, p, footer, .pill, header.top span, #route-status, #data-status, .print-title, .print-sub, .print-verdict, .print-net, .print-fixes li { overflow-wrap: anywhere; max-width: 100%; min-width: 0; }
.flush { margin-top: 0; }
.sub-h { margin: 20px 0 8px; font-size: 17px; }
.card { margin-bottom: 20px; min-width: 0; max-width: 100%; }
.top-gap { margin-top: 12px; }
.preset-row { margin-top: 8px; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; margin-bottom: 8px; }
.field { min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 4px; overflow-wrap: anywhere; }
input, select, textarea { max-width: 100%; }
button, .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; max-width: 100%; white-space: normal; text-align: center; overflow-wrap: anywhere; }
select, textarea, input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]) { min-height: 44px; min-width: 44px; max-width: 100%; }
code { font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }
.num { font-family: var(--mono); }

.stage-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 12px; margin-bottom: 12px; }

.verdict-box { background: var(--chip); border: 2px solid var(--accent); border-radius: 10px; padding: 12px 14px; min-width: 0; }
.verdict-box.is-warn { border-color: var(--field-line); }
.verdict-box.is-over { border-color: var(--warn); }
.verdict-text { display: block; font-family: var(--mono); font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; color: var(--ink); }
.verdict-box.is-pass .verdict-text { color: var(--accent); }
.verdict-box.is-over .verdict-text { color: var(--warn); }

.stage-mount { width: 100%; max-width: 100%; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #0f1b29; }
.waterfall-svg { width: 100%; max-width: 100%; height: auto; display: block; }

.net-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.net-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--surface); min-width: 0; }
.net-card.is-primary { border-color: var(--accent); background: var(--chip); }
.net-card.is-over { border-color: var(--warn); }
.net-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 8px; margin-bottom: 6px; }
.net-card-name { font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.net-card-lcp { font-family: var(--mono); font-weight: 700; font-size: 15px; color: var(--accent); overflow-wrap: anywhere; }
.net-card.is-over .net-card-lcp { color: var(--warn); }
.net-card-spec { font-size: 12px; color: var(--muted); font-family: var(--mono); margin: 0 0 6px; overflow-wrap: anywhere; }
.net-card-phases { font-size: 12px; color: var(--ink); font-family: var(--mono); margin: 0; line-height: 1.5; overflow-wrap: anywhere; }

.fixes-list { list-style: none; padding: 0; margin: 8px 0 0; }
.fixes-list li { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; background: var(--surface); display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; min-width: 0; }
.fix-badge { font-family: var(--mono); font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--chip); color: var(--accent); flex: 0 0 auto; max-width: 100%; overflow-wrap: anywhere; }
.fix-badge.is-impact { color: var(--warn); }
.fix-body { font-size: 14px; color: var(--ink); flex: 1 1 180px; min-width: 0; overflow-wrap: anywhere; }

.err-msg { color: var(--warn); font-weight: 600; margin: 10px 0 0; overflow-wrap: anywhere; }
.warn-box { background: var(--chip); border: 1px solid var(--warn); color: var(--warn); padding: 10px 12px; border-radius: 8px; overflow-wrap: anywhere; }

.list { list-style: none; padding: 0; margin: 12px 0 0; }
.list li { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 8px; display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; min-width: 0; }
.list .title { font-weight: 600; overflow-wrap: anywhere; flex: 1 1 160px; min-width: 0; }
.list .meta { flex: 1 1 100%; font-size: 13px; color: var(--muted); font-family: var(--mono); overflow-wrap: anywhere; }

.print-only { display: none; }

@media print {
  .no-print, header.top, footer { display: none !important; }
  body { background: #fff; color: #000; }
  .wrap { max-width: 100%; padding: 0; }
  .print-only { display: block !important; }
  .print-header { border-bottom: 2px solid #000; padding-bottom: 10px; margin-bottom: 14px; }
  .print-title { font-size: 22px; font-weight: 700; margin: 0 0 4px; }
  .print-sub { font-size: 13px; color: #333; margin: 0; font-family: var(--mono); }
  .print-verdict { border: 1px solid #000; border-radius: 6px; padding: 8px 10px; font-family: var(--mono); font-size: 13px; font-weight: 700; margin-bottom: 12px; }
  .print-svg-wrap { border: 1px solid #999; border-radius: 8px; overflow: hidden; margin-bottom: 14px; break-inside: avoid; }
  .print-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
  .print-net { border: 1px solid #bbb; border-radius: 6px; padding: 8px 10px; font-size: 12px; font-family: var(--mono); break-inside: avoid; }
  .print-fixes-h { font-size: 15px; font-weight: 700; margin: 12px 0 6px; }
  .print-fixes { margin: 0; padding-left: 18px; font-size: 13px; }
  .print-fixes li { margin-bottom: 4px; }
}
