:root {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  color: #0f172a;
  background: #fff;
  --navy: #0f172a;
  --accent: #00b4d8;
  --muted: #657789;
  --line: #e0e6ed;
  --attention: #be2332;
}
* { box-sizing: border-box; }
body { margin: 0; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-underline-offset: 3px; }
button:focus-visible, a:focus-visible, summary:focus-visible, model-viewer:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
button:disabled { cursor: default; opacity: .48; }
[hidden] { display: none !important; }
.portfolio { width: 100%; max-width: 1128px; padding: 30px 24px 24px; margin: 0 auto; }
.portfolio-heading { margin-bottom: 23px; }
.portfolio-heading h1 { margin: 0; font-size: clamp(24px, 3vw, 32px); line-height: 1.2; letter-spacing: -.035em; font-weight: 650; }
.portfolio-heading p { margin: 9px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.model-stage { position: relative; height: 540px; overflow: hidden; background: radial-gradient(ellipse at 50% 42%, #fff 15%, #eef2f6 100%); border: 1px solid var(--line); border-radius: 18px; }
model-viewer { width: 100%; height: 100%; background: transparent; --progress-bar-height: 0; --poster-color: transparent; --min-hotspot-opacity: 0; }
.model-toolbar { position: absolute; z-index: 3; top: 16px; left: 17px; right: 17px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; pointer-events: none; }
.view-switch { display: flex; padding: 3px; gap: 2px; border: 1px solid #dae2eb; border-radius: 10px; background: #fffffff0; pointer-events: auto; }
.view-switch button { min-height: 36px; padding: 7px 14px; border: 0; border-radius: 7px; background: transparent; color: #61758b; font-size: 12px; }
.view-switch button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.overview-button { pointer-events: auto; min-height: 43px; padding: 9px 14px; border: 1px solid #dae2eb; border-radius: 10px; background: #fffffff0; color: var(--navy); font-size: 12px; }
.overview-button:hover:not(:disabled) { border-color: #96aabd; }
.model-help { position: absolute; bottom: 16px; left: 12px; right: 12px; margin: 0; color: #738497; font-size: 10px; line-height: 1.6; text-align: center; pointer-events: none; }
.model-feedback { position: absolute; inset: 0; z-index: 2; display: flex; justify-content: center; align-items: center; gap: 11px; padding: 70px 30px; background: #f4f6f9df; color: var(--muted); font-size: 12px; line-height: 1.7; text-align: center; pointer-events: none; }
.model-feedback.is-error { background: #f4f6f9e8; }
.loading-ring { width: 19px; height: 19px; border: 2px solid #dce4ed; border-top-color: var(--accent); border-radius: 50%; flex: 0 0 auto; animation: spin .8s linear infinite; }
.model-feedback.is-error .loading-ring { display: none; }
.illustration-caption { margin: 11px 0 17px; color: #8190a0; font-size: 10px; line-height: 1.6; text-align: center; }
.panel-selector { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 7px; margin: 0 0 19px; }
.panel-button { min-width: 0; min-height: 43px; padding: 8px 3px; border: 1px solid #dce4ec; border-radius: 8px; background: #fff; color: #385670; font-size: 12px; font-weight: 650; }
.panel-button:hover:not(:disabled) { border-color: #9cafc2; background: #f8fafc; }
.panel-button[aria-pressed="true"] { border-color: var(--accent); background: #e8f9fc; color: #08778e; box-shadow: 0 0 0 1px #00b4d824; }
.panel-card { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 27px; padding: 23px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.panel-image { margin: 0; }
.panel-image > a { display: flex; align-items: center; justify-content: center; height: 222px; padding: 13px; background: #eef2f6; border: 1px solid #e3e9ef; border-radius: 9px; text-decoration: none; }
.panel-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.panel-image figcaption { margin-top: 10px; text-align: center; color: #8190a0; font-size: 10px; line-height: 1.6; }
.panel-findings { min-width: 0; }
.panel-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 17px; margin-bottom: 13px; }
.panel-title-row h2 { margin: 0; font-size: 20px; line-height: 1.4; font-weight: 650; letter-spacing: -.03em; }
.panel-status { margin: 0; padding: 5px 9px; border-radius: 5px; color: #577088; background: #edf2f6; font-size: 10px; line-height: 1.6; font-weight: 600; }
.panel-status.is-attention { background: #fff0f1; color: #a31d2a; border: 1px solid #ecb5bb; }
.panel-observation, .recommendation p { margin: 0; color: #5c7186; font-size: 12px; line-height: 1.8; }
.recommendation { margin-top: 15px; }
.recommendation h3 { margin: 0 0 5px; font-size: 11px; line-height: 1.7; font-weight: 650; }
.data-feedback, .image-feedback { color: #7a6555; font-size: 12px; line-height: 1.7; }
.data-feedback { padding: 12px 15px; border-radius: 8px; background: #f7f3ed; }
.image-feedback { text-align: center; }
.panel-popup { width: min(420px, calc(100% - 28px)); max-height: min(82svh, 640px); margin: auto; padding: 21px; overflow: auto; overscroll-behavior: contain; border: 1px solid #dce5ed; border-radius: 17px; background: #fff; color: var(--navy); box-shadow: 0 18px 75px #0f172a33; }
.panel-popup::backdrop { background: #0f172a38; backdrop-filter: blur(2px); }
.popup-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.popup-heading h2 { margin: 0; font-size: 21px; line-height: 1.4; font-weight: 650; letter-spacing: -.03em; }
.popup-close { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; flex: 0 0 auto; border: 1px solid #e3e9f0; border-radius: 9px; background: #f5f8fb; color: #526c83; font-size: 26px; line-height: 1; }
.popup-close:hover { background: #eaf1f6; }
.panel-popup > .panel-status { width: fit-content; margin-bottom: 13px; }
.popup-image-wrap { display: flex; justify-content: center; align-items: center; height: 170px; padding: 10px; border-radius: 9px; background: #eef2f6; }
.popup-image-wrap img { display: block; max-width: 100%; height: 100%; object-fit: contain; }
.popup-observation, .popup-recommendation p { margin: 14px 0 0; color: #5c7186; font-size: 12px; line-height: 1.8; }
.popup-recommendation { margin-top: 15px; padding-top: 11px; border-top: 1px solid #e5ebf1; }
.popup-recommendation summary { width: fit-content; color: #3c657e; font-size: 11px; line-height: 1.8; cursor: pointer; }
.popup-recommendation p { margin-top: 9px; }
.hotspot { display: grid; place-items: center; width: 37px; height: 29px; padding: 0; border: 1px solid #ffffffda; border-radius: 6px; background: #0f172ae8; color: #fff; font-size: 10px; font-weight: 700; box-shadow: 0 2px 7px #0b223844; opacity: 0; visibility: hidden; pointer-events: none; }
.hotspot[data-visible] { opacity: 1; visibility: visible; pointer-events: auto; }
.hotspot:hover, .hotspot[aria-pressed="true"] { background: var(--accent); color: #0f172a; border-color: #fff; box-shadow: 0 0 0 3px #ffffffa8; z-index: 2; }
.attention-legend { display: flex; align-items: center; justify-content: center; gap: 9px; margin: -3px 0 17px; color: #942330; font-size: 12px; line-height: 1.65; }
.attention-symbol { display: grid; place-items: center; width: 22px; height: 22px; flex: 0 0 22px; border: 2px solid var(--attention); border-radius: 4px; color: var(--attention); font-weight: 800; }
.attention-legend button { padding: 4px 0; border: 0; background: transparent; color: inherit; font-weight: 650; line-height: inherit; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.panel-button.is-attention { border: 2px solid var(--attention); background: #fff4f4; color: #a31d2a; }
.panel-button.is-attention::after { content: " !"; font-weight: 800; }
.panel-button.is-attention:hover:not(:disabled), .panel-button.is-attention[aria-pressed="true"] { border-color: var(--attention); background: #fde0e3; color: #8a1823; box-shadow: 0 0 0 2px #be233226; }
.panel-card.is-attention, .panel-popup.is-attention { border: 2px solid var(--attention); }
.hotspot.is-attention { border: 2px solid #fff; background: var(--attention); color: #fff; box-shadow: 0 0 0 2px var(--attention), 0 2px 7px #0b223844; }
.hotspot.is-attention::after { content: "!"; position: absolute; top: -9px; right: -8px; display: grid; place-items: center; width: 15px; height: 15px; border: 1px solid #fff; border-radius: 50%; background: var(--attention); color: #fff; font-size: 10px; line-height: 1; }
.hotspot.is-attention:hover, .hotspot.is-attention[aria-pressed="true"] { background: #981b28; color: #fff; border-color: #fff; box-shadow: 0 0 0 3px #be23326b; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 760px) {
  .portfolio { padding: 23px 17px 20px; }
  .model-stage { height: 440px; }
  .panel-selector { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .panel-card { grid-template-columns: 165px minmax(0, 1fr); gap: 20px; padding: 20px; }
  .panel-image > a { height: 207px; }
}
@media (max-width: 560px) {
  .portfolio { padding: 20px 13px 17px; }
  .portfolio-heading { margin-bottom: 17px; }
  .portfolio-heading p { font-size: 12px; }
  .model-stage { height: 380px; border-radius: 14px; }
  .model-toolbar { top: 12px; left: 12px; right: 12px; }
  .view-switch button { padding-inline: 11px; font-size: 11px; min-height: 34px; }
  .overview-button { min-height: 41px; padding-inline: 11px; font-size: 11px; }
  .model-help { bottom: 13px; font-size: 9px; }
  .illustration-caption { font-size: 9px; margin-bottom: 14px; }
  .panel-selector { gap: 6px; margin-bottom: 16px; }
  .panel-button { min-height: 42px; font-size: 11px; }
  .panel-card { grid-template-columns: 1fr; gap: 19px; padding: 17px; }
  .panel-image > a { height: 190px; }
  .panel-image figcaption { margin-top: 7px; }
  .panel-title-row { gap: 8px 12px; }
  .panel-title-row h2 { font-size: 19px; }
  .panel-popup { padding: 17px; border-radius: 14px; }
  .popup-image-wrap { height: 145px; }
  .popup-heading h2 { font-size: 20px; }
  .hotspot:not([aria-pressed="true"]):not(.is-attention) { visibility: hidden; pointer-events: none; }
  .attention-legend { justify-content: flex-start; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.evidence-limit { margin: 13px 3px 0; color: #7d8b9a; font-size: 10px; line-height: 1.7; }
