:root {
  color-scheme: light;
  --page: #edf5f8;
  --panel: #fff;
  --ink: #2b2520;
  --muted: #5e5144;
  --line: #b9ab96;
  --accent: #1b5666;
  --on-accent: #fff;
  --result: #e3f0f2;
  --error: #963727;
  --mono: ui-monospace, Consolas, monospace;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #172227;
  --panel: #223137;
  --ink: #edfafe;
  --muted: #c2dfe5;
  --line: #887361;
  --accent: #a7e2f2;
  --on-accent: #3a2414;
  --result: #24414a;
  --error: #ffc1b0;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--page); font: 1rem/1.5 system-ui, sans-serif; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
body > header { background: var(--panel); }
body > header > div, body > footer > div, body > main { width: min(100% - 2rem, 75rem); margin-inline: auto; }
body > header > div, body > footer > div:not(.app-meta) { display: flex; justify-content: space-between; align-items: center; gap: .7rem; padding-block: .8rem; }
body > header nav, body > footer nav { display: flex; flex-wrap: wrap; gap: .7rem; }
.brand { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--ink); font-weight: 700; }
.brand img { width: 1.8rem; height: 1.8rem; }
body > footer { border-top: 1px solid var(--line); }
body > main:not(.quotes-main) { max-width: 48rem; min-height: 55vh; }
.quotes-title { padding-block: 1.4rem 1.15rem; }
.quotes-title h1 { margin: 0; font-size: 2rem; line-height: 1.18; }
.quotes-title p { color: var(--muted); margin: .4rem 0 0; }
.quotes-work { margin: 0 0 1.5rem; border-top: 1px solid var(--line); padding-top: .8rem; }
.quotes-header { display: flex; justify-content: space-between; align-items: end; gap: .6rem; flex-wrap: wrap; }
.quotes-header > div { min-width: 0; max-width: 100%; }
.quotes-comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: .8rem; }
.quotes-comparison section { min-width: 0; }
.quotes-work label { display: block; font-weight: 650; }
.quotes-work textarea { display: block; width: 100%; min-width: 0; margin: .25rem 0 .75rem; padding: .7rem; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: var(--panel); resize: vertical; font: 1rem/1.45 var(--mono); tab-size: 2; }
.quotes-work textarea[readonly] { background: var(--result); }
.quotes-work input[type=file] { display: block; width: 100%; max-width: 17rem; font: inherit; }
.quotes-work button { min-height: 2.75rem; padding: .35rem .7rem; border: 1px solid var(--line); border-radius: 5px; background: var(--panel); color: var(--ink); font: 650 .93rem system-ui, sans-serif; cursor: pointer; }
.quotes-work button.quotes-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.quotes-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
.quotes-controls p, .quotes-controls ul { flex-basis: 100%; margin: .1rem 0; color: var(--muted); overflow-wrap: anywhere; }
.quotes-controls [role=alert], .quotes-controls ul { color: var(--error); }
.quotes-controls p:empty, .quotes-controls ul:empty { display: none; }
.quotes-results { margin-top: .8rem; }
@media (max-width: 760px), (max-width: 960px) and (max-height: 500px) and (pointer: coarse) {
  .quotes-title { padding-block: .85rem; }
  .quotes-title h1 { font-size: 1.58rem; }
  .quotes-comparison { display: block; }
  .quotes-work textarea { min-height: 12rem; }
}
.quotes-work select { min-height: 2.75rem; max-width: 100%; border: 1px solid var(--line); border-radius: 5px; background: var(--panel); color: var(--ink); padding: .35rem .55rem; font: inherit; }
.quotes-controls input[type=number] { width: 8rem; max-width: 100%; min-height: 2.75rem; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 5px; padding: .3rem .6rem; font: inherit; }
.quotes-escape { flex-basis: 100%; }
