:root {
  color-scheme: light;
  --background: #ffffff;
  --ink: #152322;
  --muted: #60716c;
  --accent: #164f43;
  --accent-hover: #103d33;
  --border: #dce5de;
  --input-border: #a7bab2;
  --surface: #f4f8f5;
  --error: #982a27;
  --error-surface: #fff4f2;
  --radius: 6px;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  background: var(--background);
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button, a, input, summary { -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
[hidden] { display: none !important; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible { outline: 3px solid #77a898; outline-offset: 3px; }
input:focus-visible { outline-offset: 1px; }
.site-header, main { width: min(100% - 64px, 1472px); margin-inline: auto; }
.site-header { display: flex; align-items: center; justify-content: space-between; min-height: 62px; border-bottom: 1px solid #bccfc4; }
.wordmark { color: var(--ink); font-family: Arial, sans-serif; font-size: 31px; line-height: 1; font-weight: 800; letter-spacing: -.7px; }
.home-link { font-size: 18px; font-weight: 600; padding-block: 14px; }
.page-heading { padding: 30px 0 38px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(32px, 3.25vw, 52px); line-height: 1.35; font-weight: 750; letter-spacing: -.9px; }
.page-heading p { font-size: 21px; color: var(--muted); line-height: 1.8; margin-top: 10px; }
h2 { font-size: 27px; font-weight: 700; line-height: 1.6; }
h3 { font-size: 21px; font-weight: 700; }
.workbench { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); gap: 32px; align-items: stretch; }
.input-panel { min-width: 0; padding-bottom: 0; }
.input-panel > h2 { margin-bottom: 18px; }
.output-panel { min-width: 0; padding-inline-start: 28px; border-inline-start: 1px solid #c9d9cf; display: flex; align-items: stretch; flex-direction: column; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 30px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; font-size: 17px; font-weight: 600; }
input { width: 100%; min-width: 0; border: 1px solid var(--input-border); border-radius: var(--radius); background: #fff; color: var(--ink); padding: 8px 14px; font-size: 18px; font-weight: 400; min-height: 48px; line-height: 1.5; }
input::placeholder { color: #75817c; opacity: 1; font-size: 16px; }
input[aria-invalid="true"] { border-color: var(--error); }
input:disabled { background: #f4f6f4; color: #6b7770; }
.disclosure { border: 1px solid #cddbd2; border-radius: var(--radius); background: var(--background); }
.disclosure summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; padding: 8px 16px; font-size: 18px; font-weight: 600; cursor: pointer; }
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary svg { width: 20px; height: 20px; flex-shrink: 0; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.disclosure[open] > summary svg { transform: rotate(180deg); }
.disclosure[open] > summary { border-bottom: 1px solid var(--border); }
.disclosure-content { padding: 18px 16px; }
.advanced { margin-top: 28px; }
.help { margin-top: 14px; color: var(--muted); font-size: 15px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 24px 0 15px; }
.button { border: 1px solid transparent; border-radius: var(--radius); min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 18px; font-size: 19px; font-weight: 650; line-height: 1.5; transition: background-color .15s, border-color .15s; }
.button svg { width: 21px; height: 21px; flex-shrink: 0; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.button-primary { background: var(--accent); color: white; border-color: var(--accent); }
.button-primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.button-primary:disabled { background: #4c756a; border-color: #4c756a; }
.button-outline { border-color: var(--accent); color: var(--accent); background: white; }
.button-outline:hover:not(:disabled) { background: var(--surface); }
.button-outline:disabled { color: #7b8b84; border-color: #c8d4cc; }
.button-small { min-height: 39px; font-size: 16px; padding: 5px 13px; }
.updates-table { border: 1px solid #cddbd2; border-radius: var(--radius); overflow: hidden; }
.update-header, .update-row { display: grid; grid-template-columns: minmax(68px, .6fr) minmax(120px, 1.3fr) minmax(120px, 1.3fr) 44px; }
.update-header { background: #eaf0ec; font-size: 16px; font-weight: 650; text-align: center; }
.update-header > span { padding: 7px 8px; border-inline-start: 1px solid var(--border); }
.update-header > span:first-child { border-inline-start: 0; }
.update-row { min-height: 57px; }
.update-row + .update-row { border-top: 1px solid var(--border); }
.row-cell { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 7px 10px; border-inline-start: 1px solid var(--border); }
.row-cell:first-child { border-inline-start: 0; }
.row-cell > span { display: none; }
.row-cell input { min-height: 35px; padding: 4px 8px; font-size: 16px; }
.update-id { text-align: center; }
.update-row .id-cell input { border-color: transparent; }
.update-row .id-cell input:hover, .update-row .id-cell input:focus { border-color: var(--input-border); }
.remove-update { border: 0; border-inline-start: 1px solid var(--border); background: transparent; color: var(--ink); padding: 0; display: flex; align-items: center; justify-content: center; }
.remove-update:hover:not(:disabled) { background: #fff4f2; color: var(--error); }
.remove-update:disabled { color: #abb8b0; }
.remove-update svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; }
.actions { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; margin-top: 28px; }
.example-note { color: var(--muted); font-size: 15px; margin-top: 6px; }
.form-message { margin-top: 10px; font-size: 15px; color: var(--accent); }
.form-error { background: var(--error-surface); border: 1px solid #e4b8af; border-radius: var(--radius); color: var(--error); padding: 12px 14px; margin-top: 14px; font-size: 16px; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding-top: 104px; }
.selection-icon { width: 134px; height: 135px; margin-bottom: 24px; stroke: #6b8c7f; stroke-width: 2.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.empty-state h3 { font-size: 25px; line-height: 1.65; }
.empty-state p { color: var(--muted); font-size: 18px; margin-top: 12px; max-width: 100%; }
.button-download { width: min(100%, 300px); align-self: center; margin-top: 46px; background: var(--accent); color: white; }
.button-download:hover:not(:disabled) { background: var(--accent-hover); }
.button-download:disabled { background: #e4e5e4; color: #7a817e; border-color: #e4e5e4; }
.result-content { margin-top: 23px; }
.result-status { font-size: 18px; line-height: 1.7; font-weight: 650; padding: 14px 16px; border-inline-start: 3px solid var(--accent); background: var(--surface); }
.result-status.warning { border-color: #af7d35; background: #fcf7ee; }
.result-description { color: var(--muted); margin-top: 10px; font-size: 15px; }
.result-section { margin-top: 24px; }
.result-section h3 { font-size: 18px; margin-bottom: 12px; }
.candidate-list { margin: 0; }
.candidate-item { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 18px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.candidate-item dt { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 15px; overflow-wrap: anywhere; }
.candidate-item dd { margin: 0; font-variant-numeric: tabular-nums; font-size: 19px; color: var(--accent); font-weight: 650; overflow-wrap: anywhere; }
.score-row { margin-bottom: 15px; }
.score-label { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.score-label bdi { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.score-label strong { font-variant-numeric: tabular-nums; font-weight: 650; color: var(--accent); }
meter { width: 100%; height: 8px; display: block; margin-top: 7px; border: 0; border-radius: 10px; overflow: hidden; background: #e9efeb; accent-color: var(--accent); }
meter::-webkit-meter-bar { border: 0; border-radius: 10px; background: #e9efeb; box-shadow: none; }
meter::-webkit-meter-optimum-value { background: var(--accent); border-radius: 10px; }
meter::-moz-meter-bar { background: var(--accent); border-radius: 10px; }
.energy-note { font-size: 13px; color: var(--muted); margin-top: 4px; }
.rejected-list { margin: 0; padding-inline-start: 18px; font-size: 15px; }
.rejected-list li + li { margin-top: 8px; }
.receipt-details { margin-top: 18px; }
.receipt-details summary { font-size: 16px; }
.metadata { font-size: 13px; }
.metadata dl { margin: 0; }
.metadata dt { font-weight: 650; margin-bottom: 4px; }
.metadata dd { margin: 0 0 14px; font-size: 12px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; line-height: 1.7; text-align: left; direction: ltr; }
.metadata p { color: var(--muted); }
.explanation { margin-top: 24px; }
.explanation-content { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 44px; }
.explanation-content h3 { font-size: 20px; margin-bottom: 10px; }
.explanation-content p + p { margin-top: 12px; }
.explanation-content p { font-size: 16px; color: #41554b; }
.explanation-content .formula { padding: 8px 10px; background: var(--surface); color: var(--ink); font-size: 13px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; text-align: left; }
.engine-info { border-top: 1px solid var(--border); padding-top: 12px; }
.page-footer { padding: 9px 0 24px; font-size: 15px; color: var(--muted); }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link:focus { display: block; padding: 10px 20px; background: var(--accent); color: white; }
@media (min-width: 1440px) { .page-heading { padding-top: 24px; } .workbench { gap: 32px; } }
@media (max-width: 1120px) {
  .site-header, main { width: min(100% - 48px, 1472px); }
  .workbench { gap: 24px; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
  .output-panel { padding-inline-start: 22px; }
  .field-grid { gap: 15px 18px; }
  h2 { font-size: 23px; }
  .section-heading { gap: 10px; }
  .button-small { font-size: 14px; padding-inline: 9px; }
  .update-header, .update-row { grid-template-columns: minmax(58px, .55fr) minmax(90px, 1.2fr) minmax(90px, 1.2fr) 35px; }
  .row-cell { padding-inline: 6px; }
  .empty-state h3 { font-size: 22px; }
  .empty-state p { font-size: 16px; }
  .button { font-size: 17px; padding-inline: 13px; }
}
@media (max-width: 800px) {
  .site-header, main { width: calc(100% - 36px); }
  .page-heading { padding: 24px 0 28px; }
  h1 { font-size: 35px; letter-spacing: -.6px; }
  .page-heading p { font-size: 18px; margin-top: 10px; }
  .workbench { grid-template-columns: 1fr; gap: 28px; }
  .output-panel { border-inline-start: 0; border-top: 1px solid #c9d9cf; padding: 22px 0 10px; }
  .empty-state { padding-top: 26px; }
  .selection-icon { width: 105px; height: 105px; margin-bottom: 15px; }
  .button-download { margin-top: 24px; }
  .explanation { margin-top: 18px; }
  .explanation-content { grid-template-columns: 1fr; gap: 24px; }
  .result-content { margin-top: 18px; }
}
@media (max-width: 480px) {
  .site-header, main { width: calc(100% - 32px); }
  .site-header { min-height: 60px; }
  .wordmark { font-size: 27px; }
  .home-link { font-size: 16px; }
  h1 { font-size: 32px; line-height: 1.5; }
  .page-heading { padding: 22px 0 26px; }
  .page-heading p { font-size: 17px; line-height: 1.8; }
  h2 { font-size: 23px; }
  .field-grid { gap: 15px 12px; }
  .field { font-size: 15px; gap: 5px; }
  input { min-height: 46px; padding: 8px 10px; font-size: 16px; }
  .field:first-child, .field:nth-child(2) { grid-column: 1 / -1; }
  .advanced { margin-top: 23px; }
  .disclosure summary { font-size: 16px; padding: 9px 12px; }
  .disclosure-content { padding: 15px 12px; }
  .section-heading { margin: 23px 0 12px; align-items: center; }
  .section-heading h2 { font-size: 21px; }
  .button-small { font-size: 14px; padding-inline: 8px; gap: 4px; white-space: nowrap; min-height: 38px; }
  .button-small svg { width: 17px; height: 17px; }
  .update-header { display: none; }
  .update-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px; padding: 11px 10px; gap: 8px; }
  .row-cell { border: 0; padding: 0; }
  .row-cell > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
  .row-cell input { min-height: 40px; padding-inline: 7px; }
  .row-cell.id-cell { grid-column: 1 / 3; }
  .row-cell.id-cell input { text-align: left; border-color: var(--input-border); max-width: 140px; }
  .row-cell.delta-cell { grid-column: 1; grid-row: 2; }
  .row-cell.reading-cell { grid-column: 2 / 4; grid-row: 2; }
  .remove-update { grid-column: 3; grid-row: 1; border: 1px solid var(--border); border-radius: var(--radius); align-self: end; min-height: 40px; }
  .actions { grid-template-columns: 1fr; gap: 10px; margin-top: 22px; }
  .button { min-height: 48px; font-size: 17px; }
  .example-note { font-size: 13px; margin-top: 9px; }
  .page-footer { font-size: 13px; line-height: 1.8; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
