:root {
  color-scheme: light;
  --gq-color-ink: #111410;
  --gq-color-paper: #f3f0e8;
  --gq-color-paper-subtle: #e7e4dc;
  --gq-color-surface: #fff;
  --gq-color-acid: #c8f56a;
  --gq-color-text: #111410;
  --gq-color-text-muted: #55594f;
  --gq-color-separator: #b8bbb2;
  --gq-color-control-border: #60645c;
  --gq-color-danger-text: #8f2119;
  --gq-color-danger-surface: #ffe6e1;
  --gq-color-warning-text: #713f00;
  --gq-color-warning-surface: #fff0d5;
  --gq-font-ui: "Geist", "Segoe UI", system-ui, sans-serif;
  --gq-font-data: "Geist Mono", "Cascadia Mono", ui-monospace, monospace;
  --gq-radius-control: .375rem;
  --gq-radius-panel: .625rem;
  --gq-duration-fast: 120ms;
  font-family: var(--gq-font-ui);
  color: var(--gq-color-text);
  background: var(--gq-color-paper);
  line-height: 1.6;
  font-size: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: inherit; text-underline-offset: .2em; }
button, select, input { font: inherit; color: inherit; max-width: 100%; }
button, select, input[type="file"] { border: 1px solid var(--gq-color-control-border); border-radius: var(--gq-radius-control); background: var(--gq-color-surface); min-height: 44px; }
button { padding: .5rem 1rem; cursor: pointer; transition: background-color var(--gq-duration-fast), transform var(--gq-duration-fast); }
button:hover:not(:disabled), summary:hover { background: var(--gq-color-paper-subtle); }
button:active:not(:disabled) { transform: translateY(1px); background: var(--gq-color-paper-subtle); }
button:disabled, fieldset:disabled { cursor: default; opacity: .65; }
button.primary { background: var(--gq-color-acid); border-color: var(--gq-color-ink); font-weight: 650; }
button.primary:hover:not(:disabled) { background: var(--gq-color-paper-subtle); }
:focus-visible, [tabindex="-1"]:focus { outline: 2px solid var(--gq-color-ink); outline-offset: 2px; box-shadow: 0 0 0 4px var(--gq-color-acid); }
.skip-link { position: absolute; z-index: 5; top: -10rem; left: 1rem; padding: .75rem 1rem; background: var(--gq-color-acid); }
.skip-link:focus { top: .5rem; }
.topbar { min-height: 3.5rem; border-bottom: 1px solid var(--gq-color-separator); display: flex; align-items: center; gap: 1.5rem; padding: .5rem 2rem; }
.topbar a, footer a { min-height: 44px; display: inline-flex; align-items: center; }
.topbar > :last-child { margin-left: auto; }
.family-link { font-weight: 700; text-decoration: none; }
.product-name { color: var(--gq-color-text-muted); }
main, footer { max-width: 90rem; margin-inline: auto; padding-inline: 2rem; }
.introduction { padding-block: 2rem; max-width: 72ch; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.25; letter-spacing: -.025em; margin-bottom: 1rem; }
h2 { font-size: 1.25rem; line-height: 1.35; margin-bottom: 1rem; }
h3 { font-size: 1.125rem; line-height: 1.4; }
p { margin-bottom: .75rem; }
.introduction > p { margin-bottom: .5rem; }
.privacy-notice { color: var(--gq-color-text); font-weight: 600; }
.preview-label, .help, .sample, .row-origin, .output-note { font-size: .875rem; color: var(--gq-color-text-muted); }
.preview-label { margin-top: 1rem; }
.workspace { display: grid; grid-template-columns: 20rem minmax(0, 1fr); border: 1px solid var(--gq-color-separator); border-radius: var(--gq-radius-panel); background: var(--gq-color-surface); }
.source-panel, .preview-panel { min-width: 0; padding: 1.5rem; }
.source-panel { border-right: 1px solid var(--gq-color-separator); }
.section-heading { display: flex; flex-wrap: wrap; column-gap: 1rem; }
#status { font-size: .875rem; color: var(--gq-color-text-muted); margin-bottom: 1rem; }
.file-control label { display: block; font-weight: 650; margin-bottom: .5rem; }
input[type="file"] { width: 100%; padding: .25rem; margin-bottom: .75rem; font-size: .875rem; }
input[type="file"]::file-selector-button { min-height: 44px; padding: .5rem .75rem; font: inherit; background: var(--gq-color-acid); color: var(--gq-color-ink); border: 1px solid var(--gq-color-control-border); border-radius: var(--gq-radius-control); cursor: pointer; margin-right: .5rem; }
.file-name { font-family: var(--gq-font-data); font-size: .875rem; overflow-wrap: anywhere; }
fieldset { border: 0; padding: 0; margin: 1.5rem 0; min-width: 0; }
legend { font-weight: 650; padding: 0; margin-bottom: .5rem; }
.mapping-field { margin-top: 1rem; }
.mapping-field label { display: block; margin-bottom: .25rem; font-weight: 600; }
.mapping-field label span { display: block; font-size: .75rem; font-weight: 400; color: var(--gq-color-text-muted); }
select { width: 100%; min-width: 0; padding: .5rem; }
select[aria-invalid="true"] { border: 2px solid var(--gq-color-danger-text); }
.sample { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 8rem; overflow: auto; margin-block: .5rem 0; }
.sample:empty { display: none; }
.preview-action { width: 100%; margin-bottom: .75rem; }
.error-panel { border-left: .25rem solid var(--gq-color-danger-text); padding: 1rem; margin-top: 1rem; background: var(--gq-color-danger-surface); color: var(--gq-color-danger-text); overflow-wrap: anywhere; }
.error-panel h3 { font-size: 1rem; }
.error-panel ul { padding-left: 1.5rem; }
.error-panel li { margin-bottom: .75rem; }
.preview-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.preview-toolbar h2 { margin: 0; }
.preview-summary { font-weight: 600; }
.empty-state { padding: 3rem 1rem; min-height: 20rem; max-width: 55ch; margin-inline: auto; }
.empty-mark { font-size: 2rem; border-left: .25rem solid var(--gq-color-acid); padding-left: 1rem; margin-bottom: 1rem; }
.empty-state p { color: var(--gq-color-text-muted); }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-row { border-top: 1px solid var(--gq-color-separator); padding-block: 1.5rem; overflow-wrap: anywhere; }
.row-origin { margin-bottom: .25rem; }
.contact-row h3 { font-size: 1.25rem; margin-bottom: .75rem; }
dl { display: grid; grid-template-columns: minmax(6rem, 25%) minmax(0, 1fr); gap: .25rem 1rem; margin-block: 0 1rem; }
dt { font-size: .875rem; color: var(--gq-color-text-muted); }
dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.duplicate-notice, .duplicate-groups:not(:empty) { color: var(--gq-color-warning-text); background: var(--gq-color-warning-surface); padding: .75rem; font-size: .875rem; }
.duplicate-groups p:last-child { margin-bottom: 0; }
.note-text { white-space: pre-wrap; overflow-wrap: anywhere; padding-block: .5rem; }
summary { cursor: pointer; min-height: 44px; padding-block: .5rem; border-radius: var(--gq-radius-control); }
.output-note { border-top: 1px solid var(--gq-color-separator); padding-top: 1rem; margin-block: 1.5rem 0; }
.clear-row { display: flex; align-items: flex-start; gap: 1rem; padding-block: 1.5rem; }
.clear-row button { flex-shrink: 0; }
.clear-row p { max-width: 60ch; }
.help-section { max-width: 72ch; margin-block: 2rem 3rem; }
.help-section details { border-top: 1px solid var(--gq-color-separator); padding-block: .5rem; }
.help-section summary { font-weight: 600; }
.help-section details p { padding-top: .5rem; }
footer { border-top: 1px solid var(--gq-color-separator); padding-block: 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; color: var(--gq-color-text-muted); font-size: .875rem; }
footer a { margin-left: auto; }
.pane-switch { display: none; }
@media (min-width: 48rem) and (max-width: 74.999rem) {
  main, footer { padding-inline: 1.5rem; }
  .topbar { padding-inline: 1.5rem; }
  .workspace { grid-template-columns: minmax(14rem, 30%) minmax(0, 1fr); }
  .source-panel, .preview-panel { padding: 1rem; }
}
@media (max-width: 47.999rem) {
  main, footer { padding-inline: 1rem; }
  .topbar { padding-inline: 1rem; gap: .75rem; flex-wrap: wrap; }
  .product-name { display: none; }
  .introduction { padding-block: 1.5rem; }
  .pane-switch { display: flex; gap: .5rem; margin-bottom: .75rem; }
  .pane-switch button { flex: 1; padding-inline: .5rem; }
  .pane-switch [aria-pressed="true"] { background: var(--gq-color-ink); color: var(--gq-color-paper); }
  .workspace { display: block; }
  .workspace[data-pane="source"] .preview-panel, .workspace[data-pane="preview"] .source-panel { display: none; }
  .source-panel, .preview-panel { padding: 1rem; border-right: 0; }
  .preview-toolbar { align-items: stretch; }
  .preview-toolbar button { width: 100%; }
  .empty-state { padding: 2rem 0; }
  dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
  dd { margin-bottom: .75rem; }
  .clear-row { display: block; }
  .clear-row p { margin-top: .75rem; }
  h1 { font-size: 1.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
