/* Stable SSR record workspace. Native controls and live socket remain owners
   of data; content size and verdict must never change the page geometry. */
html.page--record_detail.ph8550-design-system body .main { box-sizing:border-box!important; width:100%!important; max-width:none!important; min-width:0!important; margin-inline:0!important; padding:26px 0 0!important; }
html.page--record_detail.ph8550-design-system body .main>.row,
html:is(.page--problem_detail,.page--problem_submit) body .main>.row {
  box-sizing:border-box!important; width:calc(100% - 32px)!important; max-width:1200px!important; margin-inline:auto!important; padding-inline:0!important;
}
html.page--record_detail.ph8550-design-system body .main>.row { display:grid!important; grid-template-columns:minmax(0,1fr) 320px!important; grid-template-areas:none!important; gap:22px!important; align-items:start!important; }
html.page--record_detail.ph8550-design-system body .main>.row::before,html.page--record_detail.ph8550-design-system body .main>.row::after { content:none!important; display:none!important; }
html.page--record_detail.ph8550-design-system body .main>.row>:is(.medium-9,.medium-3).columns { grid-area:auto!important; float:none!important; width:auto!important; max-width:none!important; min-width:0!important; margin:0!important; padding:0!important; }
html.page--record_detail.ph8550-design-system body .main>.row>.medium-9 { container:ph8610-main / inline-size; }
html body .ph8610-record-heading { display:flex; justify-content:space-between; align-items:center; gap:20px; box-sizing:border-box; width:calc(100% - 32px); max-width:1200px; margin:0 auto 22px; padding:22px 25px; border:1px solid var(--ph8570-line); border-radius:14px; background:var(--ph8570-bg); color:var(--ph8570-text); }
html body .ph8610-record-heading>div { min-width:0; }
html body .ph8610-record-heading span { color:var(--ph8570-blue); font-size:9px; font-weight:700; letter-spacing:.12em; }
html body .ph8610-record-heading h1 { margin:9px 0 10px; color:var(--ph8570-text)!important; font-size:21px; line-height:1.65; overflow-wrap:anywhere; }
html.theme--dark body .ph8610-record-heading h1 { color:var(--ph8570-gold)!important; }
html body .ph8610-record-heading small { display:block; color:var(--ph8570-muted); font-size:10px; line-height:1.7; overflow-wrap:anywhere; }
html body .ph8610-record-heading code { background:transparent!important; color:inherit; font-size:inherit; }
html body .ph8610-record-heading>a { display:inline-flex; gap:8px; align-items:center; flex:none; color:var(--ph8570-blue); font-size:11px; text-decoration:none; }
html body .ph8610-record-heading>a svg { width:16px; height:16px; transform:rotate(180deg); }
html.page--record_detail.ph8550-design-system body .main>.row .section { margin:0 0 22px!important; border:1px solid var(--ph8570-line)!important; border-radius:14px!important; background:var(--ph8570-bg)!important; box-shadow:0 5px 18px #182c4410!important; overflow:hidden; }
html.page--record_detail.ph8550-design-system body .main>.row .section>.section__header { display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding:18px 20px!important; border-bottom:1px solid var(--ph8570-line); background:transparent!important; }
html.page--record_detail.ph8550-design-system body .main>.row .section>.section__header .section__title { font-size:16px; line-height:1.7; color:var(--ph8570-text); }
html.page--record_detail.ph8550-design-system body .main>.row .section__tools { position:static!important; display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-left:auto; }
html.page--record_detail.ph8550-design-system body .main>.row .section__body { color:var(--ph8570-text); }
html.page--record_detail.ph8550-design-system body .main>.row .medium-9>.section:not(#status)>.section__body { padding:0!important; }
html.page--record_detail.ph8550-design-system body .main .ph8610-status { --verdict:#3977bd; }
html.page--record_detail.ph8550-design-system body .main .ph8610-status[data-verdict=pass] { --verdict:#248a69; }
html.page--record_detail.ph8550-design-system body .main .ph8610-status[data-verdict=fail] { --verdict:#c25064; }
html.page--record_detail.ph8550-design-system body .main .ph8610-status[data-verdict=ignored] { --verdict:#7b889b; }
html.page--record_detail.ph8550-design-system body .main .ph8610-status>.ph8610-verdict-header { display:flex; flex-wrap:nowrap; gap:18px; padding:25px!important; border-top:3px solid var(--verdict); }
html body .ph8610-verdict-mark { display:grid; place-items:center; width:56px; height:56px; flex:none; border:1px solid color-mix(in srgb,var(--verdict) 25%,transparent); border-radius:15px; background:color-mix(in srgb,var(--verdict) 8%,transparent); color:var(--verdict); }
html body .ph8610-verdict-mark>.icon { color:var(--verdict)!important; font-size:25px; }
html body .ph8610-verdict-copy { flex:1; min-width:0; }
html body .ph8610-verdict-copy small { display:block; color:var(--ph8570-muted); font-size:8px; letter-spacing:.1em; font-weight:700; }
html.page--record_detail.ph8550-design-system body .ph8610-verdict-copy h1.section__title { margin:7px 0!important; font-size:23px!important; line-height:1.5!important; }
html body .ph8610-verdict-copy h1 span { color:var(--verdict)!important; }
html body .ph8610-verdict-copy p { margin:0; color:var(--ph8570-muted); font-size:10px; line-height:1.9; }
html body .ph8610-result-score { display:grid; gap:5px; text-align:center; min-width:65px; color:var(--verdict); flex:none; font-variant-numeric:tabular-nums; }
html body .ph8610-result-score b { font-size:34px; line-height:1.25; }
html body .ph8610-result-score span { color:var(--ph8570-muted); font-size:8px; letter-spacing:.14em; }
html body .ph8610-judge-stages { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; padding:20px 25px; margin:0; list-style:none; }
html body .ph8610-judge-stages li { display:flex; align-items:center; gap:8px; color:var(--ph8570-muted); font-size:10px; line-height:1.8; }
html body .ph8610-judge-stages i { display:block; width:8px; height:8px; border:1px solid currentColor; border-radius:50%; flex:none; }
html body .ph8610-judge-stages .is-active { color:var(--ph8570-blue); font-weight:700; }
html body .ph8610-judge-stages .is-active i { background:currentColor; box-shadow:0 0 0 4px #438ad51c; }
html body .ph8610-judge-stages .is-done { color:#248a69; }
html body .ph8610-judge-stages .is-done i { background:currentColor; }
html body .ph8610-judge-progress { height:4px; overflow:hidden; background:var(--ph8570-soft); }
html body .ph8610-judge-progress>span { display:block; height:100%; background:var(--ph8570-blue); }
html body .ph8610-judge-progress.is-indeterminate>span { width:35%; animation:ph8610-judging 1.8s ease-in-out infinite; }
@keyframes ph8610-judging { from { transform:translateX(-105%); } to { transform:translateX(390%); } }
html body .ph8610-result-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1px; background:var(--ph8570-line); border-bottom:1px solid var(--ph8570-line); }
html body .ph8610-result-metrics>div { display:flex; flex-direction:column; align-items:flex-start; min-width:0; padding:18px; background:var(--ph8570-soft); }
html body .ph8610-result-metrics span { display:block; color:var(--ph8570-muted); font-size:9px; line-height:1.8; }
html body .ph8610-result-metrics strong { display:block; margin:0; margin-top:auto; padding-top:8px; color:var(--ph8570-text); font-size:18px; line-height:1.5; font-variant-numeric:tabular-nums; }
html body .ph8610-result-metrics strong small { font-size:10px; font-weight:400; }
html body .ph8610-test-results>summary { display:flex; gap:12px; align-items:center; padding:18px 23px; color:var(--ph8570-text); cursor:pointer; font-size:11px; font-weight:700; list-style:none; }
html body .ph8610-test-results>summary::-webkit-details-marker { display:none; }
html body .ph8610-test-results>summary b { margin-left:auto; font-size:9px; color:var(--ph8570-muted); font-weight:400; }
html body .ph8610-test-results>summary i { color:var(--ph8570-blue); font-style:normal; }
html body .ph8610-test-results[open]>summary i { transform:rotate(180deg); }
html body .ph8610-test-results>.section__body { max-height:520px; overflow:auto; overscroll-behavior:contain; content-visibility:auto; }
html.page--record_detail.ph8550-design-system body #status .record_detail__table { width:100%!important; min-width:510px; font-size:11px!important; background:var(--ph8570-bg); color:var(--ph8570-text); }
html.page--record_detail.ph8550-design-system body #status .record_detail__table :is(td,th) { padding:12px 14px!important; border-color:var(--ph8570-line)!important; white-space:normal; }
html.page--record_detail.ph8550-design-system body #status .record_detail__table th { background:var(--ph8570-soft)!important; }
html.page--record_detail.ph8550-design-system body #status .record_detail__table .subtask td { background:var(--ph8570-soft)!important; font-weight:700; }
html.page--record_detail.ph8550-design-system body .main>.row .medium-9>.section:not(#status) pre { max-width:100%!important; max-height:650px!important; overflow:auto!important; border-radius:0!important; }
html.page--record_detail.ph8550-design-system body :is(.judge-text,.compiler-text) { max-width:100%; max-height:280px; overflow:auto; font-size:11px; line-height:1.8; }
html.page--record_detail.ph8550-design-system body .main>.row .medium-3 .section__body { padding:18px!important; }
html.page--record_detail.ph8550-design-system body .main>.row .medium-3 .section__body.no-padding { padding:14px 18px!important; }
html.page--record_detail.ph8550-design-system body .main>.row .medium-3 dl { min-width:0; max-width:100%; }
html.page--record_detail.ph8550-design-system body .main>.row .medium-3 dd { overflow-wrap:anywhere; }
/* Native #summary remains in the DOM for socket updates; metrics above own its visual role. */
html.page--record_detail.ph8550-design-system body .main>.row .medium-3 #summary { display:none!important; }
/* Three explicit toolbar tracks: title, language metadata, actions. No arbitrary flex wrapping. */
html.page--record_detail.ph8550-design-system body .main>.row .medium-9>.section:not(#status)>.section__header {
  display:grid!important; grid-template-columns:auto minmax(0,1fr) auto!important; gap:12px!important;
  min-height:76px!important; padding:18px 20px!important; justify-content:normal!important;
}
html.page--record_detail.ph8550-design-system body .main>.row .section>.section__header .section__title { margin:0!important; }
html.page--record_detail.ph8550-design-system body .main>.row .medium-9>.section:not(#status)>.section__header .section__title { grid-area:1 / 1!important; white-space:nowrap; font-size:16px!important; line-height:1.6!important; }
html.page--record_detail.ph8550-design-system body .main>.row .ph815-code-meta {
  display:flex!important; align-items:center!important; justify-content:flex-start!important;
  grid-area:1 / 2!important; order:0!important; gap:6px!important; flex-wrap:wrap!important; min-width:0!important; margin:0!important;
}
html.page--record_detail.ph8550-design-system body .main>.row .medium-9 .section__tools {
  display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr))!important;
  grid-area:1 / 3!important; width:238px!important; max-width:100%!important; gap:8px!important; margin:0!important; justify-self:end;
}
html.page--record_detail.ph8550-design-system body .main>.row .medium-9 .section__tools>.button {
  display:inline-flex!important; align-items:center!important; justify-content:center!important; gap:7px!important;
  box-sizing:border-box!important; width:100%!important; min-width:0!important; min-height:40px!important;
  margin:0!important; padding:0 10px!important; white-space:nowrap!important; line-height:1.4!important;
}
html.page--record_detail.ph8550-design-system body .main>.row .medium-9 .section__tools>.button:only-child { grid-column:1 / -1; }
html.page--record_detail.ph8550-design-system body .main>.row .medium-9 .section__tools>.button>span:last-child:not(.icon) { min-width:0; overflow:hidden; text-overflow:ellipsis; }
/* Permission-gated actions keep equal hit targets without crowding the panel title. */
html.page--record_detail.ph8550-design-system body .main>.row .medium-3 .ph820-record-action-body {
  display:block!important; padding:14px 18px 16px!important; min-height:0!important;
}
html.page--record_detail.ph8550-design-system body .main>.row .medium-3 .ph820-record-action-body::before {
  position:static!important; display:block!important; margin:0 0 10px!important; line-height:1.5!important;
  color:var(--ph8570-muted)!important;
}
html.page--record_detail.ph8550-design-system body .main>.row .medium-3 .ph820-record-actions {
  display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr))!important; width:100%!important; gap:8px!important; margin:0!important; padding:0!important;
}
html.page--record_detail.ph8550-design-system body .main>.row .medium-3 .ph820-record-actions :is(.menu__item,form,.menu__link) {
  width:100%!important; min-width:0!important; max-width:none!important; margin:0!important;
}
html.page--record_detail.ph8550-design-system body .main>.row .medium-3 .ph820-record-actions .menu__link { min-height:40px!important; }
html.page--record_detail.ph8550-design-system body .main>.row .medium-3 .ph820-record-meta { display:grid!important; grid-template-columns:minmax(0,1fr)!important; gap:8px!important; }
html.page--record_detail.ph8550-design-system body .main>.row .medium-3 .ph820-info-item { padding:11px 12px!important; }
html.page--record_detail.ph8550-design-system body .main>.row .medium-3 .ph820-info-item>dt { font-size:10px!important; line-height:1.5!important; }
html.page--record_detail.ph8550-design-system body .main>.row .medium-3 .ph820-info-item>dd { font-size:12px!important; line-height:1.6!important; }
/* Compact workspace only, independent of browser zoom or sidebar presence. */
@container ph8610-main (max-width:540px) {
  html.page--record_detail.ph8550-design-system body .main>.row .medium-9>.section:not(#status)>.section__header { grid-template-columns:auto minmax(0,1fr)!important; }
  html.page--record_detail.ph8550-design-system body .main>.row .medium-9 .section__tools { grid-area:2 / 1 / auto / -1!important; width:100%!important; justify-self:stretch; }
}
@media(min-width:901px) and (max-width:1020px) {
  html body .ph8610-result-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:900px) {
  html.page--record_detail.ph8550-design-system body .main>.row { gap:0!important; }
  html.page--record_detail.ph8550-design-system body .main>.row { grid-template-columns:minmax(0,1fr)!important; }
  html.page--record_detail.ph8550-design-system body .main>.row .medium-3 { display:grid; grid-template-columns:1fr; }
}
@media(max-width:480px) {
  html.page--record_detail.ph8550-design-system body .main { padding-top:18px!important; }
  html.page--record_detail.ph8550-design-system body .main>.row,html body .ph8610-record-heading { width:calc(100% - 24px)!important; }
  html body .ph8610-record-heading { padding:19px; flex-wrap:wrap; gap:12px; }
  html body .ph8610-record-heading h1 { font-size:17px; }
  html.page--record_detail.ph8550-design-system body .main .ph8610-status>.ph8610-verdict-header { padding:20px 16px!important; gap:12px; }
  html body .ph8610-verdict-mark { width:40px; height:40px; border-radius:11px; }
  html.page--record_detail.ph8550-design-system body .ph8610-verdict-copy h1.section__title { font-size:17px!important; }
  html body .ph8610-result-score { min-width:42px; }
  html body .ph8610-result-score b { font-size:26px; }
  html body .ph8610-result-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  html body .ph8610-judge-stages { grid-template-columns:1fr 1fr; padding:18px; gap:15px; }
  html body .ph8610-result-metrics>div { padding:15px 12px; }
  html body .ph8610-result-metrics strong { font-size:14px; }
}
@media(prefers-reduced-motion:reduce) { html body .ph8610-judge-progress.is-indeterminate>span { animation:none; width:100%; opacity:.45; } }
