:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #20302b;
  background: #f4f6f3;
  line-height: 1.6;
  --accent: #235c45;
  --muted: #54645c;
  --border: #cbd5ce;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.frames-card { margin-top: 24px; }
.sampling-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.sampling-columns > section { min-width: 0; }
.additional-frame { border: 2px solid var(--accent); border-radius: 10px; padding: 4px; background: #edf4ee; }
.comparison-details { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 16px; }
.comparison-details summary { cursor: pointer; font-weight: 650; }
.frame-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr)); gap: 16px; }
.frame-gallery figure { margin: 0; min-width: 0; }
.frame-gallery img { display: block; width: 100%; height: 180px; object-fit: contain; background: #f4f6f3; border-radius: 8px; }
.frame-gallery figcaption { text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
/* Lange deutsche Beschriftungen dürfen bei vergrößertem Text umbrechen. */
body { margin: 0; overflow-wrap: anywhere; }
input, select, button { font: inherit; }
.page-width { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.site-header { background: #fff; border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-block: 22px; font-weight: 700; }
/* Die reguläre Nutzeransicht ist über einen als Schaltfläche gestalteten Link erreichbar. */
.user-page-button { margin-left: auto; padding: 10px 16px; border-radius: 8px; background: #235c45; color: #fff; text-decoration: none; }
.user-page-button:hover { background: #194632; }
.brand span { border: 1px solid var(--border); border-radius: 6px; padding: 2px 9px; font-size: .75rem; color: var(--muted); font-weight: 500; }
.intro { max-width: 760px; padding-block: 52px 32px; }
.eyebrow { color: var(--accent); font-weight: 700; font-size: .85rem; letter-spacing: .04em; }
h1 { margin: 8px 0 18px; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.15; letter-spacing: -.035em; }
.intro > p:last-child { max-width: 640px; color: var(--muted); font-size: 1.1rem; }
h2 { margin: 0 0 26px; font-size: 1.25rem; }
h3 { margin: 12px 0 8px; font-size: 1.15rem; }
.workspace { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: stretch; }
.card { min-width: 0; padding: 30px; background: #fff; border: 1px solid var(--border); border-radius: 16px; }
.field > label, legend { font-weight: 650; }
/* Native Optionsfelder erhalten Pfeiltastenbedienung auch in schmalen Ansichten. */
.detail-field { margin-bottom: 24px; }
.detail-field .option label { flex: 1; cursor: pointer; }
#input-source .option label { flex: 1; cursor: pointer; }
input[type="url"] { width: 100%; min-width: 0; padding: 12px; border: 1px solid #8c9f93; border-radius: 8px; background: #f8faf7; }
.hint { margin: 6px 0 14px; color: var(--muted); font-size: .9rem; }
input[type="file"] { width: 100%; max-width: 100%; padding: 12px; border: 1px dashed #8c9f93; border-radius: 8px; background: #f8faf7; }
input::file-selector-button { font: inherit; color: var(--accent); background: #e6eee8; border: 0; border-radius: 5px; padding: 8px 12px; margin-right: 12px; cursor: pointer; }
fieldset { min-width: 0; border: 0; padding: 0; margin: 28px 0; }
legend { margin-bottom: 12px; padding: 0; }
.option { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; cursor: pointer; }
.option:has(input:checked) { border-color: var(--accent); background: #edf4ee; }
.option input { flex-shrink: 0; width: 18px; height: 18px; margin: 4px 0 0; accent-color: var(--accent); }
.option small { display: block; color: var(--muted); font-size: .85rem; }
button { width: 100%; min-height: 48px; padding: 12px 18px; border: 0; border-radius: 8px; font-weight: 650; }
button:disabled, button[aria-disabled="true"] { background: #e1e7e2; color: #526057; cursor: not-allowed; }
button:not(:disabled):not([aria-disabled="true"]) { background: var(--accent); color: #fff; cursor: pointer; }
button:not(:disabled):not([aria-disabled="true"]):hover { background: #194632; }
#availability-note { margin-top: 12px; margin-bottom: 0; }
.result-card { display: flex; flex-direction: column; }
/* Modus und tatsächliche Quellen bleiben auch bei schmaler Ansicht getrennt lesbar. */
.source-information { margin-bottom: 16px; padding: 14px; border: 1px solid var(--border); border-radius: 8px; background: #f8faf7; }
.source-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.source-details > div { min-width: 0; }
.source-details dt { font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
.source-details dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.source-information .hint { margin: 10px 0 0; }
.summary-text { white-space: pre-wrap; overflow-wrap: anywhere; }
/* Der vollständige Sicherungsordner bleibt auch bei Textvergrößerung lesbar. */
#evaluation-export { overflow-wrap: anywhere; }
/* Die technische Laufzeittabelle darf auch auf schmalen Ansichten umbrechen. */
.timing-table { width: 100%; margin-top: 18px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.timing-table caption { text-align: left; font-weight: 650; margin-bottom: 8px; overflow-wrap: anywhere; }
.timing-table th, .timing-table td { text-align: left; vertical-align: top; padding: 8px 4px; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.timing-table th:first-child { width: 45%; }
.timing-table th:last-child, .timing-table td:last-child { width: 5.5rem; white-space: nowrap; }
.empty-state { display: flex; flex: 1; flex-direction: column; justify-content: center; align-items: center; text-align: center; min-height: 260px; padding: 24px; border: 1px dashed var(--border); border-radius: 10px; background: #fafbf9; }
.empty-state p { max-width: 280px; margin: 0; color: var(--muted); }
.empty-symbol { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; background: #e6eee8; color: var(--accent); font-size: 2rem; }
.site-footer { padding-block: 28px; color: var(--muted); font-size: .85rem; }
:focus-visible { outline: 3px solid #285bd4; outline-offset: 4px; }
.skip-link { position: absolute; top: 8px; left: 12px; transform: translateY(-160%); padding: 10px 16px; background: #fff; color: var(--accent); z-index: 1; }
.skip-link:focus { transform: translateY(0); }
@media (max-width: 760px) {
  .sampling-columns { grid-template-columns: 1fr; }
  .workspace { grid-template-columns: 1fr; }
  .intro { padding-top: 32px; }
  .card { padding: 22px; }
}
@media (max-width: 380px) {
  .timing-table { table-layout: fixed; }
  .timing-table th:first-child { width: 35%; }
  .timing-table th:last-child, .timing-table td:last-child { width: 30%; white-space: normal; }
  .timing-table th, .timing-table td { padding-inline: 2px; }
  .source-details { grid-template-columns: 1fr; }
  .page-width { width: calc(100% - 24px); }
  .card { padding: 16px; }
  input::file-selector-button { display: block; margin-bottom: 8px; }
}
