:root {
  color: #171717; background: #e9e8e2; font-family: Arial, Helvetica, sans-serif;
  font-synthesis: none; text-rendering: optimizeLegibility;
  --paper: #f8f7f2; --ink: #171717; --muted: #62615d; --accent: #8a6a16;
  --panel-width: min(24rem, calc(100vw - 4rem));
}
* { box-sizing: border-box; }
html, body { width: 100%; min-width: 320px; min-height: 100%; margin: 0; }
body { min-height: 100dvh; overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; }
.app-shell { position: relative; width: 100vw; height: 100dvh; overflow: hidden; background: var(--paper); }
.chart-shell, .chart, .combined-chart { width: 100%; height: 100%; margin: 0; }
.combined-chart { position: relative; background: var(--paper); }
.series-chart { display: block; width: 100%; height: 100%; overflow: hidden; touch-action: manipulation; }
.brand-watermark { position: fixed; z-index: 2; top: clamp(.7rem, 2vw, 1.4rem); left: clamp(2.8rem, 5vw, 4.2rem); margin: 0; opacity: .26; pointer-events: none; font-size: clamp(1.1rem, 2.4vw, 2rem); line-height: .9; letter-spacing: -.055em; }
.brand-name { color: #3f403e; }
.brand-chart { color: var(--accent); font-style: italic; font-weight: 600; letter-spacing: -.035em; }
.primary-links { position: fixed; z-index: 4; top: .75rem; left: 50%; display: flex; gap: .55rem; transform: translateX(-50%); }
.primary-link { position: relative; display: grid; width: 2.8rem; height: 2.8rem; place-items: center; border: 1px solid #77766f; border-radius: 50%; background: rgb(248 247 242 / 88%); color: #3f403e; text-decoration: none; box-shadow: 0 .15rem .55rem rgb(23 23 23 / 10%); transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease; }
.primary-link:hover, .primary-link:focus-visible { border-color: var(--ink); background: #e6e4dc; color: var(--accent); outline: none; transform: translateY(-1px); }
.primary-link:focus-visible { box-shadow: 0 0 0 3px rgb(138 106 22 / 25%); }
.primary-link svg { width: 1.35rem; height: 1.35rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.primary-link::after { position: absolute; top: calc(100% + .5rem); left: 50%; width: max-content; max-width: 15rem; padding: .36rem .52rem; border: 1px solid #9d9c96; background: var(--paper); box-shadow: 0 .2rem .6rem rgb(23 23 23 / 12%); color: var(--ink); content: attr(data-tooltip); font-size: .68rem; font-weight: 700; letter-spacing: .025em; opacity: 0; pointer-events: none; transform: translate(-50%, -.2rem); transition: opacity .14s ease, transform .14s ease; white-space: nowrap; }
.primary-link:hover::after, .primary-link:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.status { position: fixed; z-index: 2; right: 3.2rem; bottom: .7rem; color: #5e5d58; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.import-status { position: fixed; z-index: 2; left: 3.2rem; bottom: .7rem; color: #696863; font-size: .65rem; }
.import-status.is-invalid { color: #812020; }
.curve-link-status { position: fixed; z-index: 30; top: 4.25rem; left: 50%; width: min(34rem, calc(100vw - 5rem)); padding: .75rem 1rem; border: 1px solid #812020; background: #fff8f5; box-shadow: 0 .2rem .8rem rgb(23 23 23 / 14%); color: #681919; font-size: .8rem; line-height: 1.4; text-align: center; transform: translateX(-50%); }
.empty-state { display: grid; height: 100%; margin: 0; place-items: center; color: #5b5b57; }
.empty-state.is-error { color: #812020; }
.chart-axis { stroke: var(--ink); stroke-width: 1.6; }
.chart-grid { stroke: #d9d8d2; stroke-width: 1; }
.chart-grid-horizontal { stroke-dasharray: 3 5; }
.axis-label { fill: #55544f; font-size: 13px; text-anchor: middle; }
.axis-title { fill: #343432; font-size: 14px; font-weight: 700; letter-spacing: .055em; text-anchor: middle; text-transform: uppercase; }
.curve-observed, .curve-historical, .curve-projection { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.curve-observed { stroke-width: 3; }
.curve-historical { stroke-width: 2.4; stroke-dasharray: 8 6; opacity: .8; }
.curve-projection { stroke-width: 2.5; stroke-dasharray: 2 6; opacity: .9; }
.curve-role-core .curve-observed { stroke-width: 3.4; }
.curve-role-core .curve-historical { stroke-width: 2.7; }
.curve-role-core .curve-projection { stroke-width: 2.8; }
.curve-role-deep_dive { opacity: .72; }
.curve-role-deep_dive .curve-observed { stroke-width: 2.2; }
.curve-role-deep_dive .curve-historical, .curve-role-deep_dive .curve-projection { stroke-width: 1.8; }
.curve-point { pointer-events: none; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.curve-point.is-historical { stroke-width: 2; }
.curve-point.is-projection { stroke-width: 1.8; stroke-dasharray: 1 1; }
.curve-threshold-crossing { pointer-events: none; stroke-width: 4; stroke-linecap: square; vector-effect: non-scaling-stroke; }
.curve-threshold-crossing.is-highRisk { stroke-width: 5; }
.curve-series { cursor: pointer; outline: none; transition: opacity .16s ease; }
.curve-series:hover, .curve-series:focus-visible { opacity: 1; }
.curve-observed.is-segment-selected, .curve-historical.is-segment-selected, .curve-projection.is-segment-selected { filter: drop-shadow(0 0 2px rgb(23 23 23 / 45%)); stroke-width: 5; opacity: 1; }
.curve-point.is-segment-selected { filter: drop-shadow(0 0 2px rgb(23 23 23 / 55%)); stroke-width: 3; }
.curve-touch-target { cursor: pointer; pointer-events: stroke; }
.curve-touch-marker { pointer-events: none; stroke-width: 3; vector-effect: non-scaling-stroke; }
.curve-value-popover { position: absolute; z-index: 6; display: grid; min-width: 9rem; max-width: min(20rem, calc(100vw - 6rem)); gap: .15rem; padding: .5rem .65rem; border: 1px solid var(--ink); background: rgb(248 247 242 / 97%); box-shadow: 0 .2rem .7rem rgb(23 23 23 / 18%); font-size: .72rem; line-height: 1.25; pointer-events: none; transform: translate(-50%, calc(-100% - .8rem)); }
.curve-value-popover[hidden] { display: none; }
.curve-value-popover strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.curve-value-popover span { color: var(--muted); font-weight: 700; }
.curve-value-popover small { margin-top: .15rem; padding-top: .25rem; border-top: 1px solid #d2d1cb; color: #77766f; font-size: .62rem; }
.historical-event { outline: none; }
.historical-event-band { fill: #5c5c58; opacity: .045; transition: opacity .16s ease; }
.historical-event.is-point .historical-event-band { opacity: .13; }
.historical-event-guide { stroke: #555550; stroke-width: 1.25; stroke-dasharray: 5 5; opacity: 0; pointer-events: none; transition: opacity .16s ease; vector-effect: non-scaling-stroke; }
.historical-event-label { fill: #77766f; font-size: 12px; letter-spacing: .025em; text-anchor: start; }
.historical-event:hover .historical-event-band, .historical-event:focus .historical-event-band { opacity: .16; }
.historical-event:hover .historical-event-guide, .historical-event:focus .historical-event-guide { opacity: .7; }
.historical-event:hover .historical-event-label, .historical-event:focus .historical-event-label { fill: var(--ink); font-weight: 700; }
.side-panel { position: fixed; z-index: 20; top: 0; bottom: 0; width: var(--panel-width); padding: 1.25rem; overflow-y: auto; border-color: var(--ink); background: rgb(248 247 242 / 97%); box-shadow: 0 0 2rem rgb(23 23 23 / 18%); transition: transform .24s ease; }
.side-panel-left { left: 0; border-right: 1px solid; transform: translateX(-102%); }
.side-panel-right { right: 0; border-left: 1px solid; transform: translateX(102%); }
.side-panel[aria-hidden="false"] { transform: translateX(0); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: .35rem solid var(--ink); }
.panel-heading h2 { margin: .1rem 0 0; font-size: 1.65rem; line-height: 1; }
.panel-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem .7rem; }
.panel-context-link { margin-top: .1rem; padding: .42rem .55rem; border: 1px solid #77766f; background: transparent; color: var(--ink); font-size: .68rem; font-weight: 700; line-height: 1.15; text-decoration: none; }
.panel-context-link:hover, .panel-context-link:focus-visible { border-color: var(--ink); background: #e6e4dc; color: var(--accent); outline: none; }
.panel-context-link:focus-visible { box-shadow: 0 0 0 3px rgb(138 106 22 / 25%); }
.panel-heading .panel-title-wide { font-size: 1.25rem; line-height: 1.15; white-space: nowrap; }
.panel-kicker { color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.panel-close { width: 2rem; height: 2rem; padding: 0; border: 0; background: transparent; font-size: 1.7rem; line-height: 1; cursor: pointer; }
.panel-content { padding-top: 1rem; }
.panel-handle { position: fixed; z-index: 15; top: 50%; display: grid; width: 2.25rem; height: 7.5rem; padding: 0; place-items: center; border: 1px solid var(--ink); background: #efeee8; cursor: pointer; transform: translateY(-50%); transition: background .16s ease, transform .24s ease; }
.panel-handle:hover, .panel-handle:focus-visible { background: #deddd6; }
.panel-handle span { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; writing-mode: vertical-rl; }
.panel-handle-left { left: 0; border-left: 0; border-radius: 0 .45rem .45rem 0; }
.panel-handle-right { right: 0; height: auto; min-height: 11rem; padding: 1rem 0; border-right: 0; border-radius: .45rem 0 0 .45rem; }
.panel-handle-right span { font-size: .75rem; letter-spacing: .08em; white-space: nowrap; }
.app-shell:has(.side-panel-left[aria-hidden="false"]) .panel-handle-left { transform: translate(var(--panel-width), -50%); }
.app-shell:has(.side-panel-right[aria-hidden="false"]) .panel-handle-right { transform: translate(calc(var(--panel-width) * -1), -50%); }
.panel-backdrop { position: fixed; z-index: 10; inset: 0; border: 0; background: rgb(23 23 23 / 12%); cursor: default; }
.filter-search { width: 100%; margin-bottom: .8rem; padding: .68rem .75rem; border: 1px solid #9a9993; border-radius: 0; background: #fff; }
.filter-section { border-bottom: 1px solid #cfcec8; }
.filter-section summary { display: flex; align-items: center; justify-content: space-between; padding: .9rem 0; font-size: .82rem; font-weight: 800; letter-spacing: .08em; list-style: none; text-transform: uppercase; cursor: pointer; }
.filter-section summary::-webkit-details-marker { display: none; }
.filter-section summary::after { content: "+"; font-size: 1.2rem; font-weight: 400; }
.filter-section[open] summary::after { content: "−"; }
.filter-options { display: grid; gap: .65rem; padding: 0 0 1rem; }
.filter-group-label { margin-top: .25rem; padding: .55rem 0 .15rem; border-top: 1px solid #deddd7; color: #77766f; font-size: .64rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.filter-group-label:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.filter-option { display: grid; grid-template-columns: 1.1rem 1fr auto; gap: .6rem; align-items: start; font-size: .82rem; cursor: pointer; }
.filter-option input { width: 1rem; height: 1rem; margin: .08rem 0 0; accent-color: var(--ink); }
.filter-option small { color: #77766f; font-size: .68rem; }
.filter-option.is-empty { color: #92918b; cursor: default; }
.filter-option.is-empty input { opacity: .5; }
.filter-actions { display: flex; gap: .5rem; padding: 1rem 0; }
.filter-actions button { flex: 1; padding: .55rem; border: 1px solid var(--ink); background: transparent; cursor: pointer; }
.filter-actions button:first-child { background: var(--ink); color: var(--paper); }
.filter-result { margin: .1rem 0 0; color: var(--muted); font-size: .75rem; }
.side-panel-right { width: min(42rem, calc(100vw - 4rem)); }
.app-shell:has(.side-panel-right[aria-hidden="false"]) .panel-handle-right { transform: translate(calc(min(42rem, calc(100vw - 4rem)) * -1), -50%); }
.selection-hint, .selection-message { font-size: .78rem; line-height: 1.5; }
.selection-hint { color: var(--muted); }
.selection-message:empty { display: none; }
.selection-list-filters { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.selection-list-filters label { min-width: 0; font-size: .75rem; }
.selection-list-filters select { display: block; width: 100%; margin-top: .3rem; padding: .5rem; border: 1px solid #9a9993; background: white; color: var(--ink); font: inherit; }
.selection-only { display: flex; align-items: center; gap: .5rem; margin: 1rem 0; font-size: .8rem; }
.selection-actions { flex-wrap: wrap; gap: .5rem; }
.selection-actions button { flex: 1 1 45%; font-size: .75rem; }
.selection-actions button:disabled { opacity: .6; cursor: wait; }
.start-view-publication { display: flex; align-items: center; gap: .75rem; flex: 1 1 100%; }
.start-view-publication button { flex: 1 1 auto; }
.publication-count { flex: 0 0 auto; font-size: .78rem; }
.publication-count:empty { display: none; }
.curve-selection-table { width: 100%; border-collapse: collapse; font-size: .78rem; line-height: 1.4; }
.curve-selection-table caption { text-align: left; font-weight: 700; padding-bottom: .5rem; }
.curve-selection-table th { text-align: left; font-size: .68rem; border-bottom: 2px solid var(--ink); }
.curve-selection-table th, .curve-selection-table td { padding: .65rem .35rem; vertical-align: top; }
.curve-selection-table td { border-bottom: 1px solid #cfcec8; }
.curve-selection-table th:first-child { width: 3.7rem; }
.curve-selection-table td:last-child { width: 33%; color: var(--muted); font-size: .7rem; }
.curve-selection-table input, .selection-only input { width: 1.1rem; height: 1.1rem; accent-color: var(--ink); }
.curve-selection-table label { cursor: pointer; }
.selection-swatch { display: block; width: 1.8rem; border-top: 3px solid var(--series-color); margin: .2rem 0 .45rem; }
.curve-selection-table tr:has(input:checked) { background: #eeece3; }
.selection-actions button:focus-visible, .curve-selection-table input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.embed-full-link, .embed-legend { display: none; }
html.is-embed-view .primary-links,
html.is-embed-view .panel-handle,
html.is-embed-view .status,
html.is-embed-view .import-status { display: none; }
html.is-embed-view body { padding: 0; background: #fff; }
html.is-embed-view .app-shell {
  display: grid; width: 100vw; height: 100dvh;
  grid-template-rows: minmax(0, 1fr) auto; padding: .45rem .75rem .6rem;
  border: 0; background: #fff; box-shadow: none;
}
html.is-embed-view .chart-shell { min-height: 0; }
html.is-embed-view .combined-chart { background: #fff; }
html.is-embed-view .brand-watermark { top: .75rem; left: 1rem; opacity: .42; }
html.is-embed-view .curve-series,
html.is-embed-view .historical-event { pointer-events: none; }
html.is-embed-view .embed-legend {
  position: static; z-index: 7; display: flex; align-items: center; justify-content: flex-start;
  max-width: none; min-height: 2rem; padding: .35rem 13.5rem .05rem 0;
  gap: .45rem 1rem; flex-wrap: wrap; color: #4c4b47;
  font-size: .682rem; font-weight: 700; line-height: 1.2;
}
html.is-embed-view .embed-legend-item { position: relative; padding-left: 1.5rem; }
html.is-embed-view .embed-legend-item::before {
  position: absolute; top: .35em; left: 0; width: 1.1rem; border-top: 3px solid var(--series-color); content: "";
}
html.is-embed-view .embed-full-link {
  position: fixed; z-index: 8; right: 1rem; bottom: .8rem; display: inline-flex;
  align-items: center; gap: .45rem; padding: .58rem .72rem; border: 1px solid var(--ink);
  background: rgb(248 247 242 / 94%); color: var(--ink); box-shadow: 0 .15rem .55rem rgb(23 23 23 / 12%);
  font-size: .72rem; font-weight: 800; text-decoration: none;
}
html.is-embed-view .embed-full-link:hover,
html.is-embed-view .embed-full-link:focus-visible { background: var(--ink); color: var(--paper); outline: none; }
.series-legend { color: #555; font-size: .75rem; }
.legend-series-list { display: grid; gap: .8rem; }
.legend-series-row { display: grid; gap: .2rem; padding-bottom: .55rem; border-bottom: 1px solid #deddd7; }
.legend-series { position: relative; display: grid; width: 100%; gap: .16rem; padding: .2rem 0 .2rem 2.1rem; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.legend-series::before { position: absolute; top: .7rem; left: 0; width: 1.55rem; border-top: 4px solid var(--series-color); content: ""; }
.legend-series strong { color: #292927; font-size: .8rem; line-height: 1.25; }
.legend-series.is-selected { padding: .55rem .5rem .55rem 2.1rem; background: #e8e5da; }
.legend-types { display: grid; gap: .65rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #d2d1cb; }
.legend-types span { position: relative; min-height: .8rem; padding-left: 2.1rem; }
.legend-types span::before { position: absolute; top: .38rem; left: 0; width: 1.5rem; border-top: 3px solid var(--ink); content: ""; }
.legend-types span::after { position: absolute; top: .14rem; left: .62rem; width: .48rem; height: .48rem; border: 1.5px solid var(--ink); border-radius: 50%; background: var(--paper); content: ""; }
.legend-types .legend-observed::after { background: var(--ink); }
.legend-types .legend-historical::before { border-top-style: dashed; }
.legend-types .legend-projection::before { border-top-style: dotted; }
.legend-types .legend-threshold::before { top: .05rem; left: .72rem; width: 0; height: .9rem; border-top: 0; border-left: 4px solid var(--ink); }
.legend-types .legend-threshold::after { display: none; }
.curve-detail-panel { position: fixed; z-index: 18; right: clamp(3rem, 8vw, 8rem); bottom: 4cm; left: clamp(3rem, 8vw, 8rem); max-height: min(68dvh, calc(100dvh - 4cm - 1rem), 42rem); padding: 1rem 1.2rem 1.2rem; overflow: hidden; border: 1px solid var(--ink); background: rgb(248 247 242 / 98%); box-shadow: 0 -.5rem 1.8rem rgb(23 23 23 / 18%); transform: translateY(calc(102% + 4cm)); transition: transform .24s ease; }
.curve-detail-panel[aria-hidden="false"] { transform: translateY(0); }
.curve-detail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding-bottom: .65rem; border-bottom: .28rem solid var(--ink); }
.curve-detail-heading h2 { margin: .08rem 0 0; font-size: 1.15rem; line-height: 1.1; }
.curve-detail-content { max-height: calc(min(68dvh, calc(100dvh - 4cm - 1rem), 42rem) - 5rem); padding-top: .75rem; overflow-y: auto; }
.curve-detail-content .curve-reference { display: grid; grid-template-columns: minmax(11rem, .55fr) minmax(0, 1.45fr); gap: .7rem 1.2rem; margin: 0; padding: 0; border: 0; background: transparent; }
.curve-reference-overview { grid-column: 1; grid-row: 1 / span 2; padding-right: 1.2rem; border-right: 1px solid #cac8bf; }
.curve-detail-content .curve-provenance { grid-column: 2; grid-row: 1; min-width: 0; margin: 0; overflow-wrap: anywhere; }
.curve-detail-content .curve-data-documentation { grid-column: 2; grid-row: 2; min-width: 0; margin-top: 0; overflow-wrap: anywhere; }
.curve-reference { margin-top: 1rem; padding: .85rem; border-left: .28rem solid #77766f; background: #efeee8; color: #343432; font-size: .78rem; line-height: 1.4; }
.curve-reference-title { display: block; margin-bottom: .35rem; font-size: .88rem; }
.curve-reference p { margin: .16rem 0; }
.curve-reference-status { font-weight: 700; }
.curve-reference-sources { color: #62615d; font-size: .7rem; }
.curve-reference a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .12em; }
.curve-provenance { margin-top: .75rem; padding: .7rem; border: 1px solid #cac8bf; background: #f8f7f2; }
.curve-provenance-title { display: block; margin-bottom: .4rem; font-size: .82rem; }
.curve-provenance p { margin: .28rem 0; }
.curve-provenance-actions { display: grid; gap: .28rem; margin-top: .55rem; padding-top: .45rem; border-top: 1px solid #dedcd4; }
.curve-provenance-actions a { width: fit-content; font-size: .7rem; font-weight: 700; }
.curve-certificate { margin-top: .85rem; padding-top: .75rem; border-top: 1px solid #cac8bf; font-size: .78rem; }
.curve-certificate-title { display: block; margin-bottom: .45rem; font-size: .88rem; }
.curve-certificate-status, .curve-certificate-empty { margin: .25rem 0; }
.curve-certificate-badge { display: inline-block; margin-right: .35rem; padding: .16rem .32rem; background: var(--ink); color: var(--paper); font-size: .62rem; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.curve-certificate-badge.is-example { border: 1px solid #8a6a16; background: #fff8dc; color: #674d0e; }
.curve-certificate-actions { display: flex; flex-wrap: wrap; gap: .4rem .8rem; margin-top: .45rem; }
.curve-certificate-actions a { color: inherit; font-size: .72rem; font-weight: 700; text-underline-offset: .12em; }
.curve-certificate-upload { display: grid; justify-items: start; gap: .35rem; margin-top: .65rem; padding-top: .65rem; border-top: 1px solid #dedcd4; }
.curve-certificate-upload input[type="file"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.curve-certificate-upload label { padding: .42rem .58rem; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font-size: .7rem; font-weight: 700; cursor: pointer; }
.curve-certificate-upload label:hover, .curve-certificate-upload input:focus-visible + label { background: var(--accent); }
.curve-certificate-upload small { color: var(--muted); font-size: .66rem; }
.curve-certificate-upload-status { color: var(--muted); font-size: .7rem; font-weight: 700; }
.curve-data-documentation { margin-top: .7rem; padding-top: .55rem; border-top: 1px solid #cac8bf; }
.curve-data-documentation summary { width: fit-content; font-size: .7rem; font-weight: 800; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .12em; cursor: pointer; }
.curve-data-documentation p { margin-top: .45rem; }
.curve-context-heading { display: block; margin-top: .8rem; padding-top: .65rem; border-top: 1px solid #dedcd4; font-size: .78rem; }
.curve-context-note { margin-top: .55rem; padding: .55rem .65rem; border: 1px solid #dedcd4; background: #f3f2ec; }
.curve-context-note p { margin: .22rem 0; }
.curve-derivation-note { font-weight: 700; }
.chart-caption { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; white-space: nowrap; }
.orientation-notice { display: none; }
@media (max-width: 760px) and (orientation: landscape) {
  .brand-watermark { top: .45rem; left: 2.75rem; font-size: 1rem; }
  .primary-links { top: .35rem; gap: .4rem; }
  .primary-link { width: 2.2rem; height: 2.2rem; }
  .primary-link svg { width: 1.05rem; height: 1.05rem; }
  .status, .import-status { bottom: .3rem; font-size: .55rem; }
  .status { right: 2.7rem; }
  .import-status { left: 2.7rem; max-width: 45vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .curve-link-status { top: .35rem; width: min(28rem, calc(100vw - 8rem)); padding: .55rem .75rem; font-size: .7rem; }
  .chart-caption { display: none; }
  .panel-handle { width: 1.8rem; height: 5.5rem; }
  .panel-handle span { font-size: .58rem; }
  .panel-handle-right { height: auto; min-height: 9.5rem; }
  .panel-handle-right span { font-size: .65rem; }
  .side-panel { padding: .85rem; }
  .panel-heading { gap: .6rem; padding-bottom: .7rem; }
  .panel-heading h2 { font-size: 1.35rem; }
  .panel-context-link { min-height: 2rem; padding: .42rem .5rem; }
  .curve-detail-panel { right: 2.3rem; left: 2.3rem; max-height: min(74dvh, calc(100dvh - 4cm - .5rem)); padding: .75rem; }
  .curve-detail-content { max-height: calc(min(74dvh, calc(100dvh - 4cm - .5rem)) - 4.5rem); }
  .curve-detail-content .curve-reference { grid-template-columns: 1fr; }
  .curve-reference-overview, .curve-detail-content .curve-provenance, .curve-detail-content .curve-data-documentation { grid-column: 1; grid-row: auto; padding-right: 0; border-right: 0; }
}
@media (max-width: 760px) and (orientation: portrait) {
  .app-shell { visibility: hidden; }
  .orientation-notice { position: fixed; z-index: 100; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: .65rem; padding: 2rem; background: var(--paper); text-align: center; }
  .orientation-notice strong { font-size: 1.2rem; }
  .orientation-notice span:last-child { max-width: 18rem; color: var(--muted); font-size: .82rem; line-height: 1.4; }
  .orientation-icon { font-size: 2.5rem; }
  html.is-embed-view .app-shell { visibility: visible; }
  html.is-embed-view .orientation-notice { display: none; }
  html.is-embed-view .brand-watermark { top: .5rem; left: .65rem; font-size: .9rem; }
  html.is-embed-view body { padding: 0; }
  html.is-embed-view .app-shell {
    width: 100vw; height: 100dvh; padding: .35rem .45rem .45rem;
    grid-template-rows: minmax(0, 1fr) auto auto;
  }
  html.is-embed-view .embed-legend {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: 1.7rem;
    padding: .25rem 0 0; gap: .3rem .7rem; font-size: .594rem;
  }
  html.is-embed-view .embed-full-link {
    position: static; justify-self: end; margin-top: .3rem; padding: .45rem .55rem; font-size: .62rem;
  }
}
@media (prefers-reduced-motion: reduce) { .side-panel, .panel-handle, .curve-detail-panel { transition: none; } }

.curve-value-example { margin: .7rem 0; padding: .65rem; background: #f3f2ec; border: 1px solid #dedcd4; font-size: .72rem; }
.curve-value-example ol { margin: .5rem 0 0; padding-left: 1.3rem; }
.curve-value-example li { margin-bottom: .7rem; }
.curve-value-example pre { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; font-size: .65rem; padding: .4rem; background: #fff; }
/* Keep the language choice accessible above the chart on desktop and mobile. */
.language-control { position: fixed; z-index: 4; top: .7rem; right: 3.2rem; display: flex; align-items: center; gap: .35rem; padding: .2rem .35rem; border: 1px solid #9d9c96; border-radius: .25rem; background: #f8f7f2; color: #343432; font-size: .7rem; }
.language-control select { max-width: 6rem; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.language-control:focus-within { outline: 2px solid #24708a; outline-offset: 2px; }
html:lang(zh-Hans) { font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif; }
html:lang(zh-Hans) .panel-heading h2 { line-height: 1.25; }
html:lang(zh-Hans) .panel-kicker, html:lang(zh-Hans) .panel-handle span { letter-spacing: .04em; }
.is-embed-view .language-control { top: .35rem; right: .5rem; }
@media (max-width: 760px) { .language-control { top: .4rem; right: 2.8rem; } .language-control > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } }
