:root {
  color-scheme: light;
  --ink: #142945;
  --subtle: #526680;
  --line: #d5e0ed;
  --white: #fff;
  --paper: #f6f8fb;
  --backdrop: #edf4ff;
  --blue: #2356b5;
  --blue-dark: #153d85;
  --blue-soft: #eaf1fd;
  --green: #206b53;
  --green-soft: #eaf7ef;
  --red: #9b322e;
  --red-soft: #fceeed;
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 1.1rem; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.55; }
button, textarea, input { font: inherit; }
button:not(:disabled), label:has(input) { cursor: pointer; }
a { color: inherit; }
:focus-visible, label:has(input:focus-visible) { outline: 3px solid #5587d8; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { letter-spacing: -.035em; line-height: 1.13; }
h2 { font-size: clamp(1.5rem, 3vw, 1.8rem); }
h3 { font-size: 1.13rem; }
.wrap { width: min(73rem, calc(100% - 3rem)); margin-inline: auto; }
.skip { position: absolute; top: -8rem; left: 1rem; z-index: 2; padding: .62rem; background: var(--white); }
.skip:focus { top: .6rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.header { background: var(--white); border-bottom: 1px solid var(--line); }
.navbar { min-height: 4.25rem; display: flex; justify-content: space-between; align-items: center; gap: .8rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 820; letter-spacing: -.025em; text-decoration: none; white-space: nowrap; }
.brand-mark { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: .32rem; width: 1.75rem; height: 1.75rem; background: #214c96; border-radius: .38rem; }
.brand-mark i { display: block; border-radius: 2px; background: #e4edfe; }
.brand-mark i + i { background: #9bbef3; }
nav { display: flex; gap: clamp(.78rem, 4vw, 1.85rem); }
nav a { color: var(--subtle); text-decoration: none; font-size: .9rem; }
nav a:hover { text-decoration: underline; }
.hero { background: var(--backdrop); border-bottom: 1px solid #dbe7fb; }
.hero-inner { display: grid; grid-template-columns: 1fr auto; gap: 1.25rem; align-items: end; padding: 2.6rem 0 2.7rem; }
h1 { font-size: clamp(2.55rem, 6vw, 4.65rem); font-weight: 780; max-width: 58rem; letter-spacing: -.062em; }
.hero-inner p { margin-top: .72rem; color: var(--subtle); font-size: 1.05rem; }
.hero-inner .privacy { display: flex; align-items: center; gap: .48rem; margin-top: 0; white-space: nowrap; font-size: .91rem; color: #304d76; }
.privacy span { display: grid; place-items: center; width: 1.42rem; height: 1.42rem; border-radius: 50%; background: #d4e4ff; color: #204b95; font-weight: 800; }
.workspace { padding: 1.15rem 0 2.5rem; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: .75rem; padding: clamp(.82rem, 2.5vw, 1.22rem); min-width: 0; }
.input-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.input-head, .result-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .45rem; }
.input-head > label:first-child { font-size: 1.02rem; font-weight: 800; }
textarea { display: block; font: .93rem/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; background: #fbfcff; color: var(--ink); border: 1px solid #afc0d6; border-radius: .42rem; padding: .63rem; margin-top: .48rem; width: 100%; min-height: 7rem; resize: vertical; }
textarea[aria-invalid="true"] { border-color: #bc645e; }
.meta { color: var(--subtle); font-size: .85rem; margin-top: .34rem; overflow-wrap: anywhere; }
.input-toolbar { display: flex; gap: .62rem; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-top: .88rem; border-top: 1px solid var(--line); padding-top: .82rem; }
.options, .result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .47rem .62rem; }
.options > label, .result-actions > label { display: inline-flex; align-items: center; gap: .38rem; font-size: .89rem; font-weight: 680; }
input[type="checkbox"] { accent-color: var(--blue); width: 1rem; height: 1rem; margin: 0; }
.button { min-height: 2.3rem; position: relative; display: inline-flex; align-items: center; justify-content: center; padding: .45rem .67rem; border: 1px solid transparent; border-radius: .42rem; font-weight: 740; font-size: .875rem; line-height: 1.3; white-space: nowrap; }
.primary { background: var(--blue); border-color: var(--blue); color: var(--white); }
.primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.ghost { background: var(--white); border-color: #aebed5; color: var(--ink); }
.ghost:hover:not(:disabled) { background: var(--blue-soft); }
.button:disabled { opacity: .48; }
.file-button input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.feedback:not(:empty) { border-left: 3px solid #87aadc; padding: .48rem .66rem; background: var(--blue-soft); margin-top: .68rem; font-weight: 640; font-size: .91rem; }
.feedback.error:not(:empty) { background: var(--red-soft); border-left-color: #c46c63; color: var(--red); }
.result { margin-top: .95rem; }
.result-actions { align-self: start; }
.badges { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .45rem; }
.badge { display: inline-flex; align-items: center; padding: .11rem .39rem; border: 1px solid var(--line); font-size: .85rem; font-weight: 680; border-radius: .33rem; color: var(--subtle); }
#added { color: var(--green); background: var(--green-soft); border-color: #cae6d4; }
#removed { color: var(--red); background: var(--red-soft); border-color: #efceca; }
#replaced { color: var(--blue-dark); background: var(--blue-soft); border-color: #cdddf7; }
.notice { color: var(--subtle); font-size: .91rem; margin-top: .67rem; }
table { width: 100%; table-layout: fixed; border-collapse: collapse; margin-top: .63rem; }
th { text-align: left; padding: .48rem .64rem; background: #eaf0f8; font-size: .9rem; }
td { width: 50%; vertical-align: top; padding: 0; border-bottom: 1px solid #e0e7f1; }
:is(th, td) + :is(th, td) { border-left: 1px solid #d8e2ef; }
td.missing { background: #f1f4f9; }
td.remove { background: var(--red-soft); }
td.add { background: var(--green-soft); }
.line-row { display: grid; grid-template-columns: 2.65rem .85rem minmax(0, 1fr); min-height: 1.8rem; gap: .21rem; align-items: baseline; font: .865rem/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; padding: .32rem .44rem .32rem 0; }
.line-no { text-align: right; color: var(--subtle); }
.mark { font-weight: 820; text-align: center; color: var(--subtle); }
.add .mark { color: var(--green); }
.remove .mark { color: var(--red); }
pre { margin: 0; font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 4; text-align: start; }
.eol { color: var(--subtle); font: italic .8rem/1.3 system-ui; margin: .16rem 0 0; }
.fold { text-align: center; padding: .43rem .6rem; background: #eef3f9; color: #546d89; font-size: .88rem; }
.paging { display: flex; justify-content: center; align-items: center; gap: .66rem; margin-top: .85rem; color: var(--subtle); font-size: .9rem; }
.guide { margin-top: 2.45rem; }
.guide-grid { margin-top: .85rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
.guide-grid > div { border-top: 1px solid #c7d5e8; padding-top: .75rem; }
.guide-grid p { color: var(--subtle); margin: .41rem 0 .45rem; font-size: .94rem; }
.guide-grid a { color: var(--blue-dark); font-weight: 730; font-size: .89rem; text-underline-offset: .17em; }
.footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; gap: .35rem .75rem; flex-wrap: wrap; justify-content: space-between; padding: 1.05rem 0; color: var(--subtle); font-size: .88rem; }
.footer a { color: var(--ink); font-weight: 840; }
@media (max-width: 53rem) {
  .hero-inner { grid-template-columns: 1fr; padding: 2.05rem 0 2.15rem; }
}
@media (max-width: 40rem) {
  .wrap { width: calc(100% - 1.5rem); }
  .navbar { min-height: 3.55rem; }
  .input-grid, .guide-grid { grid-template-columns: 1fr; }
  .hero-inner .privacy { white-space: normal; }
  .line-row { grid-template-columns: 1.8rem .57rem minmax(0, 1fr); font-size: .78rem; gap: .1rem; padding-right: .18rem; }
}
