.platform-page { min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(ellipse at 87% 9%, #121f38 0, transparent 36rem), #070a10; }
.platform-nav .back-site { margin-left: auto; }
.platform-main { flex: 1; padding-block: clamp(2.5rem,5.2vw,5rem) clamp(3rem,5.5vw,5.5rem); }
.platform-intro { max-width: 51rem; margin-bottom: clamp(1.6rem,3vw,2.85rem); }
.platform-intro h1 { font-size: clamp(2.6rem,5vw,4.7rem); }
.workspace { overflow: hidden; min-width: 0; border: 1px solid #35445a; border-radius: 14px; color: #ecf2fd; background: #0f1520; box-shadow: 0 16px 45px #0003; font-variant-numeric: tabular-nums; }
.workspace-fallback { padding: 2rem; }
.workspace-fallback p { margin-top: .65rem; color: var(--muted); }
.work-top, .work-toolbar, .work-panel-head, .chart-head { display: flex; align-items: center; justify-content: space-between; }
.work-top, .work-toolbar, .work-panel { padding-inline: clamp(1rem,2.7vw,2.5rem); }
.work-top { min-height: 3.2rem; gap: .75rem; border-bottom: 1px solid #29374c; background: linear-gradient(110deg,#192439,#111a29 80%); }
.work-name, .sample-label { display: inline-flex; align-items: center; gap: .55rem; }
.work-name { font-size: .91rem; font-weight: 550; }
.grid-icon { width: 1rem; height: 1rem; display: inline-block; background: linear-gradient(#93b4ff 0 0) 0 0/42% 42%, linear-gradient(#769eea 0 0) 100% 0/42% 42%, linear-gradient(#769eea 0 0) 0 100%/42% 42%, linear-gradient(#5079cd 0 0) 100% 100%/42% 42%; background-repeat: no-repeat; }
.sample-label { color: #c4d2e7; font-size: .75rem; font-weight: 450; }
.work-toolbar { gap: 1rem; padding-block: 1rem; border-bottom: 1px solid #293447; }
.work-tabs { display: inline-flex; gap: .15rem; padding: .2rem; border: 1px solid #354057; border-radius: 7px; background: #0a101b; }
.work-tabs button { border: 1px solid transparent; border-radius: 4px; min-height: 2.35rem; padding: .38rem .83rem; color: #b9c6da; font-size: .85rem; font-weight: 540; white-space: nowrap; }
.work-tabs button:hover { color: #fff; background: #172132; }
.work-tabs button[aria-selected=true] { background: #26395a; color: #f5f8ff; border-color: #47628b; }
.period { display: inline-flex; gap: .65rem; align-items: center; color: #bdc9dc; font-size: .8rem; }
.period select { background: #111b2a; min-height: 2.5rem; border: 1px solid #45546d; border-radius: 5px; padding: .25rem .65rem; color: #e3ecfa; font-size: .85rem; }
.work-panel { padding-block: clamp(1.2rem,2.4vw,2rem); }
.work-panel-head { gap: .75rem; margin-bottom: 1.05rem; }
.work-panel-head [data-area-title] { font-size: clamp(1.35rem,2.1vw,1.85rem); letter-spacing: -.04em; }
.work-panel-head > span { color: #b2bfd3; font-size: .8rem; }
.metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .75rem; }
.metrics > div { display: flex; flex-direction: column; justify-content: space-between; gap: .3rem; min-width: 0; padding: .83rem 1.05rem; border: 1px solid #2c394e; border-radius: 6px; background: #121c2b; }
.metrics dt { color: #bfcde2; font-size: .81rem; }
.metrics dd { font-size: clamp(1.9rem,3vw,2.6rem); letter-spacing: -.06em; line-height: 1.08; font-weight: 505; }
.chart-layout { display: grid; grid-template-columns: 1.75fr 1fr; gap: .8rem; margin-block: .85rem; }
.trend-panel, .breakdown-panel { min-width: 0; padding: clamp(1rem,2vw,1.55rem); border: 1px solid #2e3a4e; border-radius: 7px; background: #0d1521; }
.chart-head { gap: .6rem 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.chart-head h3, .breakdown-panel h3 { font-size: 1.02rem; letter-spacing: -.02em; font-weight: 580; }
.chart-legend { display: flex; gap: .8rem; flex-wrap: wrap; }
.chart-legend span { display: inline-flex; align-items: center; gap: .3rem; color: #c3d0e2; font-size: .72rem; }
.chart-legend b { font-weight: 450; }
.chart-legend i { width: 1rem; height: 0; border-top: 2px solid #729dff; }
.chart-legend span:nth-child(2) i { border-top: 2px dashed #72d7ce; }
.plot { position: relative; width: 100%; height: clamp(10.3rem,15.5vw,14.3rem); }
.plot canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: pan-y; }
.day-control { margin-top: .4rem; display: grid; grid-template-columns: auto minmax(2rem,1fr) 3.6rem; align-items: center; gap: .65rem; }
.day-control label, .day-control output { font-size: .75rem; color: #cbd7ec; }
.day-control output { text-align: right; font-weight: 570; }
.day-control input { width: 100%; height: 1.45rem; margin: 0; accent-color: #92b4ff; cursor: pointer; }
.day-values { margin-top: .2rem; color: #aebdd2; font-size: .74rem; }
.breakdown-panel { display: flex; flex-direction: column; }
.breakdown-values { display: grid; gap: .88rem; margin: 1.15rem 0; padding: 0; list-style: none; }
.breakdown-values li { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .3rem .6rem; font-size: .77rem; color: #c2d0e3; }
.breakdown-values b { color: #e4eeff; font-weight: 570; }
.breakdown-values i { display: block; grid-column: 1/-1; height: .43rem; }
.breakdown-values li:nth-child(2) i::before { background: #79aaa9; }
.breakdown-panel p { color: #acbcd2; font-size: .85rem; line-height: 1.51; margin-bottom: .5rem; }
.work-cta { margin-top: auto; font-size: .83rem; }
.records { border-top: 1px solid #2e394b; }
.records summary { display: inline-flex; align-items: center; gap: .6rem; min-height: 2.75rem; font-size: .84rem; font-weight: 525; color: #c6d7f4; cursor: pointer; list-style: none; }
.records summary::-webkit-details-marker { display: none; }
.records summary span { width: .43rem; height: .43rem; margin-top: -.2rem; border: solid currentColor; border-width: 0 1px 1px 0; transform: rotate(45deg); }
.records[open] summary span { margin-top: .15rem; transform: rotate(225deg); }
.records-table { max-height: 20rem; overflow: auto; overscroll-behavior: contain; }
.records table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .82rem; }
.records thead th { position: sticky; top: 0; background: #172335; color: #dbe7fa; }
.records td, .records th { padding: .55rem .7rem; border-bottom: 1px solid #2a374b; }
.records th { font-weight: 550; }
.records tbody th { color: #c5d2e6; font-weight: 450; }
.records td { color: #c7d5e8; }
.records th:first-child { text-align: left; }
.records th:not(:first-child), .records td { text-align: right; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 820px) {
  .platform-nav { gap: 1.1rem; }
  .chart-layout { grid-template-columns: 1.45fr 1fr; }
  .chart-legend { gap: .55rem; }
}
@media (max-width: 700px) {
  .chart-layout { grid-template-columns: 1fr; }
  .breakdown-panel { padding-block: 1rem .65rem; }
  .breakdown-values { margin-block: .85rem; }
}
@media (max-width: 560px) {
  .work-top, .work-toolbar, .work-panel { padding-inline: .8rem; }
  .work-toolbar { align-items: stretch; gap: .6rem; flex-direction: column; padding-block: .7rem; }
  .work-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .work-tabs button { min-height: 2.6rem; padding-inline: .25rem; font-size: .79rem; }
  .period { align-self: end; gap: .45rem; }
  .period select { min-height: 2.2rem; }
  .work-panel-head { align-items: start; flex-direction: column; gap: .25rem; }
  .metrics { gap: .38rem; }
  .metrics > div { padding: .63rem .51rem; }
  .metrics dt { font-size: .72rem; line-height: 1.27; }
  .metrics dd { font-size: 1.65rem; }
  .trend-panel { padding: .8rem .65rem; }
  .day-values { line-height: 1.5; }
  .records th, .records td { padding: .43rem .3rem; font-size: .73rem; }
  .platform-nav { gap: .55rem; }
  .back-site { font-size: .77rem; }
  .platform-page .brand img { width: 4.5rem; }
}
@media (max-width: 370px) {
  .chart-head { align-items: start; flex-direction: column; }
  .work-top { column-gap: .4rem; }
  .work-name { font-size: .8rem; }
  .sample-label { font-size: .66rem; }
  .day-control { gap: .35rem; }
  .platform-nav { gap: .38rem; }
}
