:root {
  color-scheme: light dark;
  --bg: #f7f9f8;
  --surface: #fff;
  --surface-soft: #eef4f1;
  --text: #172d27;
  --muted: #4a6259;
  --border: #c2d2ca;
  --accent: #12654b;
  --accent-hover: #0a4935;
  --on-accent: #fff;
  --focus: #185dc2;
  --error: #a32131;
  --shadow: 0 12px 40px rgb(23 45 39 / 6%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  scroll-padding-top: 1rem;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button, .button { min-height: 44px; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.025em; }
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); margin: .5rem 0 1rem; font-weight: 750; }
h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); margin: 2.25rem 0 .8rem; }
h3 { font-size: 1.15rem; margin: 1.5rem 0 .5rem; }
p { margin: 0 0 1rem; }
img { max-width: 100%; }
.container { width: min(100% - 2rem, 1080px); margin-inline: auto; }
.skip-link { position: fixed; top: .5rem; left: .5rem; z-index: 10; padding: .75rem 1rem; background: var(--surface); transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.site-header { border-bottom: 1px solid var(--border); background: var(--surface); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1rem; padding-block: .75rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; min-height: 44px; max-width: 100%; color: var(--text); text-decoration: none; font-weight: 750; }
.brand span { overflow-wrap: anywhere; }
.brand img { flex: 0 0 32px; }
nav ul { display: flex; flex-wrap: wrap; gap: .25rem; list-style: none; margin: 0; padding: 0; }
nav a { display: inline-flex; align-items: center; min-height: 44px; padding: .55rem .8rem; color: var(--muted); text-decoration: none; border-radius: .5rem; }
nav a:hover, nav a[aria-current="page"] { color: var(--accent); background: var(--surface-soft); }
.hero { padding: 2.5rem 0 1.5rem; max-width: 760px; }
.eyebrow { font-size: .75rem; font-weight: 750; letter-spacing: .14em; color: var(--accent); margin: 0; text-transform: uppercase; }
.lede { font-size: 1.12rem; max-width: 650px; color: var(--muted); margin-bottom: .6rem; }
.privacy-note { font-size: .9rem; color: var(--muted); }
.tool { background: var(--surface); border: 1px solid var(--border); border-radius: 1rem; padding: clamp(1rem, 3vw, 2rem); box-shadow: var(--shadow); }
.tool-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: 1rem; }
.tool-heading h2 { font-size: 1.2rem; margin: 0; }
.workflow { display: flex; flex-wrap: wrap; gap: .4rem 1rem; list-style: none; padding: 0; margin: 0; font-size: .8rem; color: var(--muted); }
.workflow li { display: inline-flex; align-items: center; gap: .35rem; }
.workflow span { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border: 1px solid var(--border); border-radius: 50%; font-size: .7rem; }
.workflow .is-current { color: var(--accent); font-weight: 750; }
.workflow .is-current span { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.workflow .is-complete span { background: var(--surface-soft); border-color: var(--accent); color: var(--accent); }
.dropzone { display: grid; justify-items: center; text-align: center; border: 2px dashed var(--border); border-radius: .75rem; background: var(--surface-soft); padding: 1.5rem 1rem; }
.dropzone.is-dragover { border-color: var(--accent); outline: 3px solid var(--accent); outline-offset: -5px; }
.dropzone.is-busy { border-style: solid; }
.drop-icon { width: 32px; height: 32px; margin-bottom: .5rem; }
.drop-title { font-weight: 650; margin-bottom: .65rem; }
.limits { color: var(--muted); font-size: .8rem; margin: .7rem 0 0; }
.button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: .55rem; padding: .7rem 1.15rem; font-weight: 650; text-decoration: none; background: var(--accent); color: var(--on-accent); }
.button:hover:enabled, a.button:hover { background: var(--accent-hover); }
.button.secondary { border-color: var(--border); background: var(--surface); color: var(--text); }
.button.secondary:hover:enabled { background: var(--surface-soft); }
.button:disabled, .row-button:disabled { color: var(--muted); background: var(--surface-soft); border-color: var(--border); }
.selection-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding-top: 1rem; }
.selection-heading h3 { margin: 0; font-size: 1rem; }
.selection-heading p { margin: 0; color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.reorder-tip { color: var(--muted); font-size: .8rem; margin: .25rem 0 .75rem; }
.file-list { list-style: none; padding: 0; margin: 0; }
.file-row { display: grid; grid-template-columns: 2rem minmax(0, 1fr); align-items: center; gap: .4rem .5rem; border-top: 1px solid var(--border); padding: .75rem 0; min-height: 86px; }
.file-order { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.file-name { display: block; font-size: .9rem; font-weight: 650; overflow-wrap: anywhere; }
.file-details { display: block; color: var(--muted); font-size: .8rem; }
.row-controls { grid-column: 2; display: flex; gap: .4rem; }
.row-button { min-width: 44px; min-height: 44px; padding: .45rem .7rem; border: 1px solid var(--border); border-radius: .45rem; background: var(--surface); color: var(--text); font-size: .85rem; }
.row-button:hover:enabled { background: var(--surface-soft); }
.is-dragging { opacity: .6; }
.drop-target { outline: 3px solid var(--accent); outline-offset: -3px; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.actions .clear-button { margin-left: auto; }
.merge-feedback { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; min-height: 224px; margin-top: 1rem; padding: 1rem; border: 1px solid var(--border); border-radius: .75rem; background: var(--bg); }
.feedback-copy { flex: 1 1 220px; min-width: 0; }
.feedback-title { margin: 0 0 .25rem; color: var(--text); font-weight: 750; font-size: 1.05rem; }
.progress-region { padding-top: .65rem; }
.tool[data-state="done"] .merge-feedback { border: 2px solid var(--accent); padding: calc(1rem - 1px); background: var(--surface-soft); }
.tool[data-state="done"] .feedback-title { color: var(--accent); font-size: 1.2rem; }
.tool[data-state="done"] .feedback-title::before { content: "✓"; margin-right: .5rem; }
.tool[data-state="merging"] .merge-feedback, .tool[data-state="checking"] .merge-feedback { border-color: var(--accent); }
.download-button { flex: 0 0 auto; min-width: 150px; }
.progress-region label { display: block; font-size: .8rem; color: var(--muted); margin-bottom: .25rem; }
progress { display: block; width: 100%; height: 8px; accent-color: var(--accent); border: 0; border-radius: 4px; overflow: hidden; background: var(--surface-soft); }
progress::-webkit-progress-bar { background: var(--surface-soft); }
progress::-webkit-progress-value { background: var(--accent); }
progress::-moz-progress-bar { background: var(--accent); }
.tool-status { min-height: 3.2em; margin: 0; color: var(--muted); font-size: .9rem; }
.file-errors { color: var(--error); padding-left: 1.25rem; margin: .5rem 0 0; overflow-wrap: anywhere; }
.file-errors:empty { display: none; }
.file-errors li + li { margin-top: .5rem; }
.fine-print { font-size: .8rem; color: var(--muted); margin: 1rem 0 0; }
.content { max-width: 700px; padding: .5rem 0 2.5rem; }
.guide { margin-top: 2.5rem; }
.quick-guide { margin-bottom: 1rem; }
.guide-note { color: var(--muted); font-size: .9rem; margin-bottom: 1.5rem; }
.disclosure { border-top: 1px solid var(--border); }
.disclosure:last-of-type { border-bottom: 1px solid var(--border); }
.disclosure summary { min-height: 52px; padding: .85rem .25rem; cursor: pointer; color: var(--text); font-weight: 650; }
.disclosure summary::marker { color: var(--accent); }
.disclosure-body { padding: .15rem .25rem .5rem; color: var(--muted); }
.disclosure-body p { margin-bottom: .8rem; }
.content h2 { margin-top: 1.75rem; }
.content .callout { font-size: .9rem; }
.content li { margin-bottom: .6rem; }
.content .intro { font-size: 1.1rem; color: var(--muted); }
.content ol, .content ul { padding-left: 1.4rem; }
.content .callout { padding: 1rem 1.2rem; border-left: 3px solid var(--accent); background: var(--surface-soft); border-radius: 0 .5rem .5rem 0; }
.page-main { min-height: 65vh; padding: 2.5rem 0; }
.page-main .content { padding-bottom: 0; }
.breadcrumbs { font-size: .85rem; color: var(--muted); margin-bottom: 1.5rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: .5rem; }
.ad-container { display: none; min-height: 280px; margin: 3rem 0; padding: 1rem; border-radius: .75rem; visibility: hidden; }
.ad-container.ads-enabled { display: block; visibility: visible; border: 1px solid var(--border); background: var(--surface); }
.ad-label { margin: 0 0 .5rem; color: var(--muted); font-size: .75rem; text-align: center; }
.ad-body { min-height: 240px; overflow: hidden; }
.adsbygoogle { display: block; min-height: 240px; }
.site-footer { border-top: 1px solid var(--border); padding: 1.5rem 0; font-size: .85rem; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.footer-inner p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: .25rem .5rem; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; padding: .4rem .55rem; }
.privacy-choice-space { min-height: 44px; }
.privacy-choice-space:has(> button[hidden]) { display: none; }
.footer-choice { min-height: 44px; border: 0; padding: .4rem .55rem; color: var(--accent); background: transparent; text-decoration: underline; text-underline-offset: .2em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (min-width: 640px) {
  .merge-feedback { min-height: 154px; }
  .hero { padding-top: 3.25rem; }
  .file-row { grid-template-columns: 2rem minmax(0, 1fr) auto; }
  .row-controls { grid-column: 3; }
}
@media (max-width: 420px) {
  .actions .button { flex: 1 1 100%; }
  .actions .clear-button { margin-left: 0; }
  .download-button { width: 100%; }
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101c18;
    --surface: #172720;
    --surface-soft: #20382d;
    --text: #e9f2ed;
    --muted: #b1c6ba;
    --border: #526b5c;
    --accent: #8ad9b4;
    --accent-hover: #a9e7c9;
    --on-accent: #10281e;
    --focus: #9bc6ff;
    --error: #ffb4bc;
    --shadow: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
@media (forced-colors: active) {
  .button, .row-button, .tool, .dropzone, .merge-feedback, .workflow span { border: 1px solid ButtonText; }
  progress { forced-color-adjust: auto; }
}
