:root {
    color-scheme: light;
    --ink: #07111f;
    --muted: #617081;
    --line: #dce4ea;
    --soft: #f3f7f8;
    --paper: #ffffff;
    --aqua: #b7f4eb;
    --teal: #087f8c;
    --teal-dark: #055c68;
    --blue: #2274a5;
    --coral: #ef6a5b;
    --yellow: #ffd166;
    --shadow: 0 22px 65px rgba(7, 17, 31, .12);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; background: #eaf0f2; color: var(--ink); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }

.app-shell { min-height: 100vh; }
.topbar {
    height: 76px;
    padding: 0 clamp(20px, 5vw, 80px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--ink);
    color: white;
}
.brand { display: inline-flex; align-items: center; gap: 13px; text-decoration: none; }
.brand > span:last-child { display: grid; gap: 1px; }
.brand strong { font-size: 17px; letter-spacing: -.02em; }
.brand small { color: #aebdca; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.brand-mark { width: 37px; height: 37px; border: 1px solid #314154; border-radius: 10px; display: flex; align-items: flex-end; justify-content: center; gap: 3px; padding: 8px; transform: rotate(-2deg); }
.brand-mark span { width: 5px; border-radius: 3px 3px 1px 1px; background: var(--aqua); }
.brand-mark span:nth-child(1) { height: 10px; }
.brand-mark span:nth-child(2) { height: 17px; }
.brand-mark span:nth-child(3) { height: 13px; }
.topbar-actions { display: flex; align-items: center; gap: 24px; }
.privacy-pill { font-size: 12px; color: #c8d4de; display: flex; align-items: center; gap: 8px; }
.privacy-pill i, .status-dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, .12); }
.github-link { text-decoration: none; font-size: 13px; padding-bottom: 2px; border-bottom: 1px solid #526173; }

main { max-width: 1560px; margin: 0 auto; }
.hero {
    min-height: 345px;
    padding: 66px clamp(22px, 6vw, 96px) 54px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 50px;
    background-color: var(--ink);
    color: white;
    position: relative;
    overflow: hidden;
}
.hero::before { content: ""; position: absolute; width: 520px; height: 520px; right: 12%; bottom: -380px; border: 1px solid #324256; border-radius: 50%; box-shadow: 0 0 0 58px transparent, 0 0 0 59px #1d2b3c, 0 0 0 118px transparent, 0 0 0 119px #132235; opacity: .7; }
.hero > * { position: relative; }
.eyebrow, .step { margin: 0 0 15px; color: var(--teal); text-transform: uppercase; letter-spacing: .13em; font-size: 11px; font-weight: 800; }
.hero .eyebrow { color: var(--aqua); }
.hero h1 { margin: 0; font-size: clamp(46px, 6.5vw, 86px); line-height: .93; letter-spacing: -.065em; max-width: 820px; }
.hero h1 em { color: var(--aqua); font-style: normal; }
.hero-copy { max-width: 650px; margin: 27px 0 0; color: #b7c3cf; font-size: clamp(15px, 1.3vw, 18px); line-height: 1.65; }
.hero-stats { min-width: 235px; display: grid; gap: 16px; padding: 20px 0; }
.hero-stats div { display: grid; grid-template-columns: 78px 1fr; align-items: baseline; padding-bottom: 14px; border-bottom: 1px solid #344255; }
.hero-stats strong { font-size: 25px; color: var(--aqua); }
.hero-stats span { color: #aebbc8; font-size: 12px; }

.workspace { display: grid; grid-template-columns: 340px minmax(0, 1fr); min-height: 700px; background: var(--paper); box-shadow: var(--shadow); }
.control-panel { padding: 31px 28px; border-right: 1px solid var(--line); background: #fbfdfd; }
.panel-heading, .inspector-heading, .section-title { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.panel-heading h2, .inspector-heading h2 { margin: 0; font-size: 24px; letter-spacing: -.035em; }
.panel-heading .step, .inspector-heading .step { margin-bottom: 7px; }
.drop-zone { margin-top: 24px; min-height: 145px; border: 1.5px dashed #a8bbc3; border-radius: 15px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; text-align: center; cursor: pointer; background: var(--soft); transition: border-color .2s, background .2s, transform .2s; padding: 18px; overflow: hidden; }
.drop-zone:hover { border-color: var(--teal); background: #edf9f8; transform: translateY(-1px); }
.drop-zone.disabled { pointer-events: none; opacity: .65; }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-zone strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.drop-zone small { color: var(--muted); font-size: 11px; }
.sample-link { width: 100%; margin-top: 10px; padding: 7px; border: 0; background: transparent; color: var(--teal-dark); cursor: pointer; font-size: 10px; font-weight: 800; }
.sample-link:hover:not(:disabled) { text-decoration: underline; }
.sample-link:disabled { opacity: .55; cursor: not-allowed; }
.upload-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--ink); color: var(--aqua); font-size: 22px; }
.password-box, .layers-box { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
details summary { list-style: none; cursor: pointer; font-size: 12px; font-weight: 700; display: flex; justify-content: space-between; gap: 10px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--teal); font-size: 16px; line-height: .8; }
details[open] summary::after { content: "−"; }
details summary span { color: var(--muted); font-weight: 500; }
.password-fields { display: grid; gap: 11px; margin-top: 14px; }
.password-fields label, .control-grid label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 700; }
input, select { min-width: 0; border: 1px solid #cdd8df; border-radius: 8px; background: white; color: var(--ink); padding: 9px 10px; outline: none; }
input:focus, select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8, 127, 140, .1); }
.button { border: 0; border-radius: 9px; padding: 11px 16px; cursor: pointer; font-weight: 800; font-size: 12px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 9px; transition: transform .15s, background .15s; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: not-allowed; }
.button.primary { background: var(--ink); color: white; }
.button.primary:hover:not(:disabled) { background: var(--teal-dark); }
.button.secondary { background: #e5ecef; color: var(--ink); }
.button.full { width: 100%; }
.notice { margin-top: 16px; border-radius: 10px; padding: 12px 13px; display: grid; gap: 3px; font-size: 11px; line-height: 1.45; }
.notice.error { background: #fff0ee; color: #962f28; border: 1px solid #f5c6c1; }
.notice.warning { background: #fff7df; color: #765818; border: 1px solid #f2d981; }
.document-card { margin-top: 20px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.document-title { display: flex; align-items: center; gap: 11px; min-width: 0; }
.document-title > div { min-width: 0; display: grid; gap: 3px; }
.document-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.document-title small { color: var(--muted); font-size: 10px; }
.mini-file { width: 37px; height: 43px; display: grid; place-items: center; flex: 0 0 auto; background: #fff0ee; color: #ae392f; border-radius: 7px; font-size: 9px; font-weight: 900; }
.document-card dl { margin: 15px 0 0; padding-top: 10px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.document-card dl div { display: flex; justify-content: space-between; gap: 16px; font-size: 10px; }
.document-card dt { color: var(--muted); }
.document-card dd { margin: 0; text-align: right; max-width: 155px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.download-action { border: 1px solid #a9d8d5; border-radius: 8px; padding: 8px 11px; background: #effaf8; color: var(--teal-dark); cursor: pointer; font-size: 10px; font-weight: 800; white-space: nowrap; transition: border-color .15s, background .15s, transform .15s; }
.download-action:hover:not(:disabled) { border-color: var(--teal); background: #ddf5f1; transform: translateY(-1px); }
.download-action:disabled { opacity: .5; cursor: not-allowed; }
.download-action.compact { padding: 6px 9px; font-size: 9px; }
.download-action.full-width { width: 100%; margin-top: 13px; }
.render-controls { margin-top: 25px; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; background: #e7edef; border-radius: 9px; }
.segmented button { border: 0; border-radius: 7px; background: transparent; padding: 8px; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 800; }
.segmented button.active { background: white; color: var(--ink); box-shadow: 0 2px 8px rgba(7, 17, 31, .1); }
.control-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 14px 0; }
.control-grid select { padding: 8px; font-size: 11px; }
.switch-row { display: flex; align-items: center; gap: 9px; margin: 10px 0; color: #354454; font-size: 11px; cursor: pointer; }
.switch-row input { position: absolute; opacity: 0; }
.switch-row > span { width: 29px; height: 17px; padding: 2px; border-radius: 10px; background: #bcc8cf; transition: background .2s; }
.switch-row > span::after { content: ""; display: block; width: 13px; height: 13px; background: white; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch-row input:checked + span { background: var(--teal); }
.switch-row input:checked + span::after { transform: translateX(12px); }
.render-note { min-height: 37px; margin: 10px 0; display: flex; align-items: center; color: #354454; font-size: 10px; line-height: 1.45; }
.layers-box { margin-bottom: 15px; }
.layers-box summary { margin-bottom: 10px; }
.layer-row { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-size: 11px; }
.layer-row input { accent-color: var(--teal); }
.layer-row span { flex: 1; }
.layer-row small { color: var(--muted); }

.viewer-panel { min-width: 0; display: flex; flex-direction: column; background: #dfe7e9; position: relative; }
.viewer-toolbar { height: 65px; flex: 0 0 auto; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: white; border-bottom: 1px solid var(--line); }
.page-navigation { display: flex; align-items: center; gap: 10px; }
.page-navigation button { width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 8px; background: white; cursor: pointer; }
.page-navigation button:disabled { color: #b4bec5; }
.page-navigation label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.page-navigation input { width: 55px; padding: 6px; text-align: center; }
.page-facts { display: flex; align-items: center; gap: 7px; }
.viewer-actions { display: flex; align-items: center; gap: 11px; min-width: 0; }
.page-facts span, .api-chip { padding: 5px 8px; border-radius: 6px; background: var(--soft); color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.canvas-area { flex: 1; min-height: 635px; padding: clamp(25px, 4vw, 58px); display: grid; place-items: center; overflow: auto; position: relative; background-color: #dfe7e9; background-image: radial-gradient(#bac8cc 1px, transparent 1px); background-size: 18px 18px; }
.page-preview { margin: 0; background: white; box-shadow: 0 17px 55px rgba(7, 17, 31, .22), 0 1px 2px rgba(7,17,31,.3); line-height: 0; max-width: min(100%, 1040px); }
.page-preview img { max-width: 100%; max-height: 1120px; object-fit: contain; }
.page-preview.html-preview { max-width: none; overflow: hidden; }
.page-preview iframe { display: block; border: 0; background: white; }
.checkerboard { background-color: white; background-image: linear-gradient(45deg, #e6ebed 25%, transparent 25%), linear-gradient(-45deg, #e6ebed 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e6ebed 75%), linear-gradient(-45deg, transparent 75%, #e6ebed 75%); background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; }
.render-overlay { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 13px; background: rgba(223, 231, 233, .78); backdrop-filter: blur(3px); color: #3d4d5c; font-size: 12px; }
.spinner { display: inline-block; width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.35); border-top-color: currentColor; border-radius: 50%; animation: spin .7s linear infinite; }
.spinner.large { width: 31px; height: 31px; border-width: 3px; color: var(--teal); }
@keyframes spin { to { transform: rotate(360deg); } }
.preview-placeholder { color: var(--muted); font-size: 12px; }
.empty-state { margin: auto; padding: 50px 30px; text-align: center; max-width: 440px; }
.empty-state h2 { margin: 8px 0 10px; font-size: 27px; letter-spacing: -.04em; }
.empty-state p:last-child { color: var(--muted); line-height: 1.6; font-size: 13px; }
.empty-art { width: 175px; height: 170px; margin: 0 auto 24px; position: relative; }
.sheet { position: absolute; width: 96px; height: 125px; left: 34px; top: 16px; background: white; border-radius: 6px; box-shadow: 0 10px 32px rgba(7,17,31,.12); }
.sheet.back { transform: rotate(-9deg) translate(-12px, 2px); background: #b7f4eb; }
.sheet.front { display: grid; align-content: center; gap: 10px; padding: 20px; }
.sheet.front i { display: block; height: 5px; border-radius: 3px; background: #bdcbd0; }
.sheet.front i:nth-child(2) { width: 75%; }
.lens { position: absolute; width: 59px; height: 59px; border: 10px solid var(--teal); border-radius: 50%; right: 12px; bottom: 17px; box-shadow: inset 0 0 0 3px white, 0 6px 16px rgba(7,17,31,.15); }
.lens::after { content: ""; position: absolute; width: 37px; height: 11px; border-radius: 6px; background: var(--teal); transform: rotate(43deg); right: -31px; bottom: -17px; }

.inspector { padding: 52px clamp(22px, 5vw, 76px) 65px; background: white; }
.inspector-heading { margin-bottom: 28px; }
.api-chip { background: #eaf8f6; color: var(--teal-dark); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; text-transform: none; }
.tabs { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 1px; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.tabs button { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 11px 15px; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 700; }
.tabs button.active { color: var(--ink); border-bottom-color: var(--teal); }
.tabs small { min-width: 19px; padding: 2px 5px; border-radius: 9px; background: #edf1f3; font-size: 9px; }
.tab-content { min-height: 280px; padding-top: 28px; }
.overview-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
.metric-card { min-height: 132px; padding: 20px; border: 1px solid var(--line); border-radius: 13px; display: grid; align-content: space-between; }
.metric-card > span { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 9px; font-weight: 800; }
.metric-card strong { font-size: 38px; letter-spacing: -.05em; }
.metric-card small { color: var(--muted); font-size: 10px; }
.capability-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 31px; }
.capability-grid > div { display: grid; grid-template-columns: 42px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; }
.cap-icon { grid-row: 1 / 3; width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--ink); color: var(--aqua); font-weight: 900; }
.capability-grid strong { font-size: 12px; }
.capability-grid small { color: var(--muted); font-size: 10px; margin-top: 2px; }
.export-panel { margin-top: 31px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 13px; display: flex; align-items: center; justify-content: space-between; gap: 22px; background: var(--soft); }
.export-copy { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.export-copy > div { display: grid; gap: 3px; }
.export-copy strong { font-size: 12px; }
.export-copy small { color: var(--muted); font-size: 9px; }
.export-actions, .inline-actions, .section-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.text-tools { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.search-box { display: flex; width: min(100%, 460px); }
.search-box input { flex: 1; border-radius: 8px 0 0 8px; }
.search-box button { border: 0; border-radius: 0 8px 8px 0; background: var(--teal); color: white; padding: 0 17px; cursor: pointer; font-size: 11px; font-weight: 800; }
.search-result, .result-note { color: var(--muted); font-size: 11px; }
.text-output { margin: 0; max-height: 500px; overflow: auto; padding: 22px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); white-space: pre-wrap; word-break: break-word; font: 12px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th { padding: 12px 14px; text-align: left; color: var(--muted); background: var(--soft); text-transform: uppercase; letter-spacing: .07em; font-size: 8px; }
td { padding: 14px; border-top: 1px solid var(--line); vertical-align: top; }
td code { font-size: 9px; word-break: break-all; }
.line-note { display: block; color: var(--muted); margin-top: 3px; font-size: 9px; }
.wide-cell { min-width: 190px; max-width: 360px; }
.status-badge { display: inline-flex; align-items: center; padding: 4px 7px; border-radius: 8px; font-size: 9px; font-weight: 800; }
.status-badge.yes { background: #dff7ed; color: #167451; }
.status-badge.no { background: #edf1f3; color: #6b7782; }
.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.image-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.image-thumb { height: 165px; display: grid; place-items: center; overflow: hidden; color: var(--muted); font-size: 10px; }
.image-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.image-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; background: white; }
.image-card-footer > span { min-width: 0; display: grid; gap: 3px; }
.image-card strong { font-size: 11px; }
.image-card small { color: var(--muted); font-size: 9px; }
.structure-grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 16px; }
.structure-grid > article { min-width: 0; padding: 19px; border: 1px solid var(--line); border-radius: 12px; }
.section-title { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.section-title h3 { margin: 0; font-size: 14px; }
.section-title span { padding: 3px 7px; border-radius: 10px; background: var(--soft); font-size: 9px; }
.muted { color: var(--muted); font-size: 11px; }
.outline-tree { list-style: none; margin: 12px 0 0; padding: 0; }
.outline-tree .outline-tree { margin: 3px 0 3px 14px; padding-left: 11px; border-left: 1px solid var(--line); }
.outline-link, .outline-label { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 0; border-radius: 6px; background: transparent; text-align: left; padding: 7px 6px; font-size: 10px; }
.outline-link { cursor: pointer; }
.outline-link:hover { background: var(--soft); color: var(--teal-dark); }
.outline-link small, .outline-label small { color: var(--muted); font-size: 8px; }
.detail-list { list-style: none; margin: 9px 0 0; padding: 0; }
.detail-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #edf1f3; font-size: 10px; }
.detail-list li:last-child { border: 0; }
.detail-list li > span { display: grid; gap: 2px; }
.detail-list small { color: var(--muted); font-size: 8px; }
.detail-list.compact li > span { display: inline; color: var(--muted); }
.attachments-card { grid-column: 1 / -1; }
.attachment-list li > span { min-width: 0; }
.attachment-list strong { overflow-wrap: anywhere; }
.diagnostics-toolbar { margin-bottom: 14px; }
.diagnostic-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.diagnostic-list li { display: grid; grid-template-columns: 90px 1fr auto; align-items: start; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 10px; }
.diagnostic-list li.warning { border-left: 3px solid #e5a720; }
.diagnostic-list li.error { border-left: 3px solid var(--coral); }
.diagnostic-list li.information { border-left: 3px solid var(--blue); }
.diag-level { text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-size: 8px; font-weight: 800; }
.diagnostic-list p { margin: 4px 0 0; color: var(--muted); }
.diagnostic-list code { color: var(--muted); }
.empty-result { min-height: 210px; display: grid; grid-template-columns: 52px auto; place-content: center; align-items: center; gap: 15px; text-align: left; }
.empty-result > span { width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center; background: var(--soft); color: var(--teal); font-weight: 900; font-size: 19px; }
.empty-result strong { font-size: 14px; }
.empty-result p { max-width: 420px; margin: 5px 0 0; color: var(--muted); font-size: 11px; }

footer { max-width: 1560px; margin: 0 auto; padding: 24px clamp(22px, 5vw, 76px); display: flex; justify-content: space-between; color: #667582; font-size: 10px; background: #dce5e7; }
.boot-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 18px; background: var(--ink); color: #c3d0db; font-size: 12px; }
.boot-mark { height: 38px; display: flex; align-items: flex-end; gap: 5px; }
.boot-mark span { width: 7px; border-radius: 4px; background: var(--aqua); animation: boot 1s ease-in-out infinite alternate; }
.boot-mark span:nth-child(1) { height: 17px; }
.boot-mark span:nth-child(2) { height: 36px; animation-delay: .2s; }
.boot-mark span:nth-child(3) { height: 25px; animation-delay: .4s; }
@keyframes boot { to { opacity: .35; transform: scaleY(.7); } }
.not-found { min-height: 100vh; display: grid; place-content: center; justify-items: start; padding: 30px; background: var(--ink); color: white; }
.not-found h1 { font-size: clamp(36px, 7vw, 72px); margin: 0 0 28px; }
#blazor-error-ui { display: none; position: fixed; z-index: 1000; left: 18px; right: 18px; bottom: 18px; padding: 13px 18px; border-radius: 10px; background: #fff1c9; color: #6d5416; box-shadow: var(--shadow); font-size: 12px; }
#blazor-error-ui .reload { margin-left: 10px; font-weight: 800; }
#blazor-error-ui .dismiss { float: right; border: 0; background: transparent; cursor: pointer; }

@media (max-width: 1050px) {
    .hero { align-items: flex-start; flex-direction: column; }
    .hero-stats { width: 100%; grid-template-columns: repeat(3, 1fr); }
    .hero-stats div { display: grid; grid-template-columns: 1fr; gap: 2px; }
    .workspace { grid-template-columns: 300px minmax(0, 1fr); }
    .overview-grid, .capability-grid { grid-template-columns: repeat(2, 1fr); }
    .structure-grid { grid-template-columns: 1fr 1fr; }
    .structure-grid > article:first-child { grid-row: span 2; }
    .page-facts { display: none; }
    .export-panel { align-items: flex-start; flex-direction: column; }
    .export-actions { justify-content: flex-start; }
}

@media (max-width: 760px) {
    .topbar { height: 67px; padding: 0 18px; }
    .privacy-pill { display: none; }
    .hero { min-height: auto; padding: 45px 22px; }
    .hero-stats { grid-template-columns: 1fr; gap: 8px; }
    .hero-stats div { grid-template-columns: 75px 1fr; }
    .workspace { display: flex; flex-direction: column; }
    .control-panel { border-right: 0; border-bottom: 1px solid var(--line); padding: 27px 20px; }
    .canvas-area { min-height: 490px; padding: 24px 12px; }
    .viewer-toolbar { padding: 0 12px; }
    .page-navigation { flex: 1; justify-content: space-between; }
    .viewer-actions .download-action { max-width: 104px; overflow: hidden; text-overflow: ellipsis; }
    .inspector { padding: 40px 20px; }
    .overview-grid, .capability-grid, .structure-grid { grid-template-columns: 1fr; }
    .structure-grid > article:first-child { grid-row: auto; }
    .text-tools { align-items: flex-start; flex-direction: column; }
    .inline-actions, .section-toolbar { width: 100%; justify-content: flex-start; }
    .search-box { width: 100%; }
    footer { flex-direction: column; gap: 7px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
