:root {
  color-scheme: light;
  font-family: "Avenir Next", "Segoe UI", Arial, sans-serif;
  color: #242d48;
  background: #f7f7f3;
  font-synthesis: none;
  --ink: #242d48;
  --muted: #56617b;
  --line: #d8dde2;
  --navy: #222b48;
  --yellow: #f2d78f;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; line-height: 1.55; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
input, button, select { font: inherit; }
button:not(:disabled), input[type="checkbox"], label.button, select { cursor: pointer; }
:focus-visible { outline: 3px solid #496596; outline-offset: 3px; }
.screen-reader { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; inset: 1rem auto auto 1rem; transform: translateY(-240%); z-index: 2; background: #fff; padding: .5rem 1rem; }
.skip:focus { transform: none; }
.shell { width: min(100% - 3rem, 73rem); margin-inline: auto; }
.topbar { border-bottom: 1px solid var(--line); }
.topbar-inner, .footer-inner { display: flex; min-height: 4rem; gap: .7rem 1.4rem; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-size: 1.07rem; font-weight: 790; letter-spacing: -.032em; text-decoration: none; }
.brand-mark { display: inline-block; position: relative; width: 1.38rem; height: 1.38rem; border-radius: .38rem; background: var(--navy); }
.brand-mark::before, .brand-mark::after { content: ""; height: 2px; position: absolute; background: var(--yellow); border-radius: 1rem; }
.brand-mark::before { width: .65rem; top: .45rem; left: .36rem; }
.brand-mark::after { width: .48rem; top: .76rem; left: .36rem; }
nav { display: flex; gap: clamp(.8rem, 3vw, 1.65rem); font-size: .89rem; font-weight: 650; }
nav a { text-decoration: none; color: var(--muted); }
nav a:hover, .brand:hover { text-decoration: underline; text-underline-offset: .2em; }
.intro { display: grid; gap: 1.1rem 2.5rem; grid-template-columns: minmax(0, 1.26fr) minmax(0, .9fr); align-items: end; padding-block: clamp(2rem, 5vw, 4.35rem) clamp(1.6rem, 4vw, 3.2rem); }
.intro h1 { font-size: clamp(2.9rem, 6.5vw, 6.4rem); line-height: .96; letter-spacing: -.075em; font-weight: 820; }
.intro h1 em { color: #4e6090; font-style: normal; }
.intro > div > p:first-of-type { font-size: clamp(1rem, 1.9vw, 1.22rem); color: var(--muted); max-width: 26rem; }
.privacy-line { display: inline-block; border-radius: .35rem; background: #eee8d8; color: #5d4e2a; padding: .35rem .65rem; font-size: .87rem; font-weight: 690; margin-top: .7rem; }
.workspace { display: grid; grid-template-columns: minmax(15rem, .63fr) minmax(0, 1.37fr); gap: 1rem; align-items: start; }
.file-intake { grid-column: 1 / -1; }
.rules-panel, .preview-panel { min-width: 0; border-radius: 1rem; border: 1px solid var(--line); background: white; padding: clamp(.95rem, 2.15vw, 1.55rem); }
.rules-panel { background: #f0f2f7; }
.rules-panel h2, .preview-header h2 { font-size: 1.35rem; line-height: 1.18; letter-spacing: -.025em; }
fieldset { padding: 0; margin: 0; border: 0; min-inline-size: 0; }
.rule-fields { margin-top: .94rem; }
.rule-fields legend, .rule-fields h3 { padding: 0; margin-bottom: .45rem; font-size: .97rem; font-weight: 780; }
.rule-fields label { display: grid; gap: .25rem; font-size: .82rem; color: #3f4a65; font-weight: 700; }
.rule-fields label.check { display: flex; align-items: center; gap: .4rem; margin-top: .55rem; width: fit-content; }
.check input { margin: 0; accent-color: #526998; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem .6rem; }
.rule-divider { margin-top: .9rem; border-top: 1px solid #d7deea; padding-top: .75rem; }
.rule-fields input:not([type="checkbox"]), .rule-fields select { width: 100%; min-width: 0; min-height: 2.35rem; color: var(--ink); background: #fff; border: 1px solid #c7cfdf; border-radius: .46rem; padding: .36rem .48rem; font-size: .91rem; font-weight: 620; }
.rule-fields select { appearance: none; padding-right: 1.5rem; background-image: url("./chevron.svg"); background-repeat: no-repeat; background-position: right .55rem center; }
.number-options { margin-top: .55rem; }
.rule-fields input::placeholder { color: #6b758d; font-weight: 500; }
.rule-fields button[type="reset"] { padding-left: 0; margin-top: .5rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.55rem; border: 1px solid transparent; border-radius: .5rem; padding: .55rem .72rem; font-size: .9rem; font-weight: 750; text-align: center; }
.button:disabled { opacity: .52; }
.button-main { background: var(--navy); color: white; }
.button-main:hover { background: #374364; }
.button-main:focus-within { outline: 3px solid #496596; outline-offset: 3px; }
.button-main:has(input:disabled) { opacity: .52; cursor: default; }
.button-soft { border-color: #c8cfdf; color: #414e72; background: white; }
.button-soft:hover:not(:disabled) { background: #eef1fa; }
.button-link { background: transparent; color: #4a5d92; }
.button-link:hover:not(:disabled) { text-decoration: underline; text-underline-offset: .2em; }
.button-download { color: var(--ink); background: var(--yellow); border-color: #ddbf70; }
.button-download:hover:not(:disabled) { background: #ebc975; }
.drop-zone { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem .8rem; justify-content: space-between; padding: .8rem clamp(.75rem, 2.15vw, 1.5rem); border: 1px dashed #aeb8ca; border-radius: .7rem; background: #f7f8fb; }
.drop-zone.dragging { border-color: #536998; background: #e8eefc; }
.drop-info { display: flex; gap: .65rem; align-items: center; }
.drop-info h2 { color: var(--ink); font-size: 1.03rem; line-height: 1.1; font-weight: 780; }
.drop-info p { font-size: .82rem; color: var(--muted); margin-top: .2rem; }
.file-symbol { position: relative; flex: 0 0 2.1rem; width: 2.1rem; height: 2.1rem; border-radius: .5rem; background: #e1e7f4; }
.file-symbol i { position: absolute; inset: .4rem .7rem .59rem .58rem; border: 1.5px solid #6278a8; border-radius: .12rem; background: #e1e7f4; }
.file-symbol i + i { inset: .57rem .57rem .42rem .74rem; }
.file-actions { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.preview-header { display: flex; gap: .5rem 1rem; align-items: center; justify-content: space-between; margin-bottom: .65rem; }
.preview-header p { font-size: .85rem; color: var(--muted); margin-top: .12rem; }
.table-scroll { max-height: 25rem; overflow: auto; border: 1px solid var(--line); border-radius: .65rem; }
table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
th { position: sticky; top: 0; z-index: 1; text-align: left; font-size: .82rem; color: #485574; background: #f0f2f7; font-weight: 770; }
th:last-child { width: 2.5rem; }
th, td { border-bottom: 1px solid #e3e7eb; padding: .53rem .6rem; }
td { color: #515b70; font-size: .9rem; overflow-wrap: anywhere; }
td:last-child { padding-inline: .17rem; }
tr:last-child td { border-bottom: 0; }
.new-name { color: var(--ink); display: block; }
.new-name.changed { font-weight: 740; color: #2e4375; }
.remove { width: 2rem; height: 2rem; border-radius: .34rem; border: 1px solid transparent; color: #56617b; background: transparent; font-size: 1.17rem; line-height: 1; }
.remove:hover:not(:disabled) { color: #8b382a; background: #f6e9e6; }
.remove:disabled { opacity: .5; }
.row-issue, .rule-message, .notice { color: #943829; font-size: .84rem; font-weight: 680; }
.row-issue { display: block; margin-top: .15rem; }
.rule-message:not(:empty), .notice:not(:empty) { margin-top: .48rem; }
.empty { color: var(--muted); padding: 1rem; border: 1px solid #e3e7ed; border-radius: .6rem; }
.download-area { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem .75rem; margin-top: .85rem; }
.download-area p { font-size: .89rem; font-weight: 630; color: var(--muted); }
progress { display: block; width: 100%; height: .68rem; margin-top: .66rem; accent-color: #4e6090; }
.guide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 1.5rem; margin-block: 2rem 2.4rem; padding-top: 1.3rem; border-top: 1px solid var(--line); }
.guide h2, .guide h3 { color: var(--ink); font-size: 1.05rem; font-weight: 780; }
.guide p { color: var(--muted); margin-top: .28rem; font-size: .94rem; }
.site-footer { color: var(--muted); border-top: 1px solid var(--line); font-size: .84rem; }
.site-footer .brand { color: var(--ink); }
@media (max-width: 45rem) {
  .shell { width: calc(100% - 2rem); }
  .intro, .workspace, .guide { grid-template-columns: minmax(0, 1fr); }
  .intro h1 br { display: none; }
}
@media (max-width: 25rem) {
  .shell { width: calc(100% - 1.2rem); }
  .topbar-inner { flex-wrap: wrap; gap: .1rem .75rem; }
  th, td { padding-inline: .35rem; }
  th:last-child { width: 2.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
