/* SHAKL · PATH CHECK — same surfaces as the PathPilot editor:
   white panels, grey modules, editor lines, ink primary, violet selection. */

.artwork-check {
  max-width: 1440px;
  margin: auto;
  padding: 0 3vw 80px;
  color: var(--editor-text);
}

/* ── Topline ─────────────────────────────────── */
.check-topline {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 64px;
  margin-top: 12px;
  padding-inline: 12px;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 999px;
  background: linear-gradient(160deg, rgba(255,255,255,.78), rgba(255,255,255,.5));
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 12px 32px rgba(91,63,196,.08);
  position: sticky;
  top: 84px;
  z-index: 20;
  font-size: 14px;
}
.check-back {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--editor-line);
  border-radius: 999px;
  background: #fff;
  color: var(--editor-text);
  font-weight: 500;
  transition: background .18s var(--ease), border-color .18s var(--ease);
}
.check-back:hover { background: var(--editor-module); border-color: var(--editor-line-strong); }
.check-back:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.check-back .app-icon { color: var(--editor-text); transform: rotate(180deg); }
:dir(rtl) .check-back .app-icon { transform: none; }
.check-topline-divider { width: 1px; height: 24px; margin: 0 4px; background: var(--editor-line-strong); }
.check-stage:empty { display: none; }
.check-topline-end { display: flex; align-items: center; gap: 8px; }

.check-sound,
.check-info {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--editor-line);
  border-radius: 999px;
  background: #fff;
  color: var(--editor-text);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.check-sound:hover,
.check-info:hover { background: var(--editor-module); }
.check-sound[aria-pressed="true"],
.check-info[aria-expanded="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.check-sound[aria-pressed="true"] .app-icon { color: currentColor; }

/* ── Stage: one editor panel ─────────────────── */
.check-stage,
.check-review {
  border: 1px solid rgba(255,255,255,.75);
  border-radius: var(--editor-radius-panel);
  background: linear-gradient(160deg, rgba(255,255,255,.72), rgba(255,255,255,.42));
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 18px 44px rgba(91,63,196,.08);
}
.check-stage { margin: 8px 0 24px; overflow: hidden; }
.check-stage .check-profiles > button:not(.is-selected),
.check-stage .check-file-row,
.check-stage .check-settings select { border-color: rgba(10,10,10,.07); background: rgba(255,255,255,.55); }
.check-stage .check-profiles > button:hover:not(.is-selected) { background: rgba(255,255,255,.85); }

/* ── Intro ───────────────────────────────────── */
.check-intro {
  max-width: 720px;
  margin: 36px auto 28px;
  text-align: center;
}
.check-intro .eyebrow {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.check-intro h1 {
  margin: 10px 0 0;
  font-size: clamp(32px, 4vw, 60px);
  font-weight: 400;
  letter-spacing: -.055em;
  line-height: 1.07;
  outline: none;
}
.check-intro > p:last-child {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.check-orbit {
  position: relative;
  width: 80px;
  height: 80px;
  margin: auto;
  display: grid;
  place-items: center;
}
.check-orbit > span {
  position: absolute;
  inset: 1px;
  border: 1px solid #c9b2fb;
  border-radius: 50%;
  transform: rotateX(58deg) rotateZ(-30deg);
}
.check-orbit > span:nth-child(2) {
  border-color: var(--sky);
  transform: rotateX(58deg) rotateZ(60deg);
}
.check-orbit > div {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(185,154,248,.45);
  border-radius: 18px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 8px 28px rgba(185,154,248,.22);
  transform: rotate(-6deg);
}

/* ── Config ──────────────────────────────────── */
.check-config { padding: 28px 32px 32px; }
.check-config fieldset { margin: 0; padding: 0; border: 0; }
.check-config legend {
  margin-bottom: 12px;
  padding: 0;
  color: var(--editor-muted);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.check-profiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--editor-gap);
}
.check-profiles > button {
  min-width: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--editor-line);
  border-radius: var(--editor-radius-module);
  background: var(--editor-control);
  color: var(--editor-text);
  font: inherit;
  text-align: start;
  cursor: pointer;
  transition: background .18s var(--ease), border-color .18s var(--ease);
}
.check-profiles > button:hover:not(.is-selected) {
  background: var(--editor-module);
  border-color: var(--editor-line-strong);
}
.check-profiles > button.is-selected {
  background: var(--violet);
  border-color: var(--violet);
  color: #14092e;
}
.check-profile-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 9px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(20,9,46,.07);
}
.check-profiles > button.is-selected .check-profile-icon { background: rgba(255,255,255,.72); }
.check-profiles > button strong { display: block; font-size: 14px; font-weight: 500; letter-spacing: -.01em; }
.check-profiles > button small { display: block; margin-top: 2px; color: var(--editor-muted); font-size: 12px; }
.check-profiles > button.is-selected small { color: rgba(20,9,46,.74); }

.check-file-row {
  margin-top: 20px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--editor-line);
  border-radius: var(--editor-radius-module);
  background: var(--editor-control);
}
.check-file {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.check-file-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: var(--editor-radius-control);
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(20,9,46,.07);
}
.check-file strong {
  display: block;
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.check-file small { display: block; color: var(--editor-muted); font-size: 12px; }

.check-settings {
  margin-top: 20px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.check-settings label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--editor-text);
  font-size: 13px;
  white-space: nowrap;
}
.check-settings select {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--editor-line);
  border-radius: var(--editor-radius-control);
  background: var(--editor-control);
  color: var(--editor-text);
  font: inherit;
  font-size: 13px;
}
.check-settings select:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.check-settings > span {
  flex: 1;
  min-width: 0;
  color: var(--editor-muted);
  font-size: 12px;
}

.check-notice {
  margin: 14px 0 0;
  color: var(--editor-muted);
  font-size: 12px;
  line-height: 1.55;
}
.artwork-check .check-notice[role="alert"] { color: #b3261e; }

/* ── Scanning ────────────────────────────────── */
.check-compact-spacer { flex: 1; }

.check-scanning {
  padding: 56px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}
.check-scan-art { width: 180px; height: 90px; }
.check-scan-art svg { width: 100%; height: 100%; overflow: visible; }
.check-scan-art path { fill: none; stroke: var(--editor-line-strong); stroke-width: 2; stroke-linecap: round; }
.check-scan-art circle { fill: var(--editor-muted); }
.check-scan-beam {
  stroke: var(--violet) !important;
  stroke-width: 1.5 !important;
  animation: check-beam 1.8s var(--ease) infinite;
}
@keyframes check-beam { 0%,100% { transform: translateX(-90px); } 50% { transform: translateX(90px); } }
.check-scanning strong { font-size: 15px; font-weight: 500; }
.check-stage-dots { display: flex; gap: 8px; }
.check-stage-dots i {
  display: block;
  width: 28px;
  height: 3px;
  border-radius: 3px;
  background: var(--editor-line);
  transition: background .3s;
}
.check-stage-dots i.done { background: var(--violet); }
.is-scanning .check-orbit > div { animation: check-breathe 1.5s ease-in-out infinite; }
@keyframes check-breathe { 0%,100% { opacity: .6; } 50% { opacity: 1; } }

/* ── Buttons (editor .ed-btn) ────────────────── */
.check-primary,
.check-secondary {
  height: 40px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  border: 1px solid var(--editor-line);
  border-radius: 999px;
  background: #fff;
  color: var(--editor-text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.check-secondary:hover:not(:disabled) { background: var(--editor-module); }
.check-primary { border-color: var(--ink); background: var(--ink); color: #fff; }
.check-primary .app-icon { color: currentColor; }
.check-primary:hover:not(:disabled) { background: #2a2b2c; }
.check-primary:disabled,
.check-secondary:disabled {
  border-color: var(--editor-line);
  background: var(--editor-module);
  color: var(--editor-muted);
  cursor: not-allowed;
}
.check-primary:focus-visible,
.check-secondary:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }

/* ── Results ─────────────────────────────────── */
/* Header (84px) + bar (64px + 12px margin) + breathing room. */
.check-results { margin-top: 20px; outline: none; scroll-margin-top: 184px; }

.check-summary {
  margin-bottom: var(--editor-gap);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--editor-gap);
}
.check-summary > div {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--editor-line);
  border-radius: var(--editor-radius-module);
  background: var(--editor-panel);
}
.check-stat-row {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.check-stat-row > span:first-child {
  color: var(--editor-muted);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.check-stat-badge {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 9px;
  background: var(--editor-control);
  box-shadow: inset 0 0 0 1px rgba(20,9,46,.07);
}
.check-summary strong {
  display: block;
  font-size: clamp(26px, 2.4vw, 40px);
  font-weight: 500;
  letter-spacing: -.04em;
}
.check-summary small { color: var(--editor-muted); font-size: 11px; line-height: 1.4; }

.check-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: var(--editor-gap);
  align-items: start;
}
.check-map-card {
  border: 1px solid var(--editor-line);
  border-radius: var(--editor-radius-panel);
  background: var(--editor-panel);
  box-shadow: 0 10px 28px rgba(20,24,28,.035);
  overflow: hidden;
}
.check-review { display: flex; flex-direction: column; overflow: hidden; }
.check-review .check-review-head { border-bottom-color: rgba(10,10,10,.06); }
.check-review-head button:not([aria-pressed="true"]) { background: rgba(255,255,255,.6); border-color: rgba(10,10,10,.08); }
.check-map-head,
.check-review-head {
  min-height: 52px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--editor-line);
}
.check-map-head strong,
.check-review-head strong { font-size: 14px; font-weight: 500; letter-spacing: -.02em; }
.check-map-head > div,
.check-review-head [role="group"] { display: flex; gap: 6px; }
.check-map-head button,
.check-review-head button {
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--editor-line);
  border-radius: 999px;
  background: #fff;
  color: var(--editor-text);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background .18s var(--ease);
}
.check-map-head button:hover:not(:disabled),
.check-review-head button:hover:not([aria-pressed="true"]) { background: var(--editor-module); }
.check-map-head button[aria-pressed="true"],
.check-review-head button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.check-map-head button:disabled { color: var(--editor-muted); background: var(--editor-module); cursor: not-allowed; }

.check-map {
  display: block;
  width: 100%;
  height: clamp(300px, 44vh, 440px);
  background: var(--editor-control);
}

.check-legend {
  padding: 12px 16px;
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
  border-top: 1px solid var(--editor-line);
  color: var(--editor-muted);
  font-size: 11px;
}
.check-legend span { display: flex; align-items: center; gap: 6px; }
.check-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.check-legend .is-review { background: var(--violet); }
.check-legend .is-note { background: var(--editor-line-strong); }
.check-legend .is-clear { background: var(--ink); }

.check-curvature {
  padding: 14px 16px 16px;
  border-top: 1px solid rgba(10,10,10,.06);
  color: var(--editor-muted);
  font-size: 11px;
}
.check-curvature span { display: block; margin-bottom: 8px; }
.check-curvature svg { display: block; width: 100%; }
.check-graph-axis { stroke: var(--editor-line); stroke-width: 1; }
.check-graph-line { fill: none; stroke: var(--violet); stroke-width: 1.5; }
.check-curvature small { display: block; margin-top: 6px; }

/* Map overlays */
.check-heat { opacity: .92; }
.check-corner polygon {
  fill: rgba(247,214,120,.22);
  stroke: rgb(214,178,82);
  stroke-width: 1;
  stroke-dasharray: 4 3;
  vector-effect: non-scaling-stroke;
}
.check-corner .is-over {
  stroke: rgb(226,104,150);
  stroke-width: 3;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
/* Artwork as a grey outline; the selected run is the only dark line. */
.check-outline path { fill: none; stroke: #a6a7a2; stroke-width: 1.2; vector-effect: non-scaling-stroke; transition: stroke .18s var(--ease); }
.check-outline .is-context { stroke: var(--editor-muted); stroke-width: 1.5; }
.check-outline .is-selected { stroke: var(--ink); stroke-width: 2.2; }

/* Nodes and handles, drawn like a type editor */
.check-handle line { stroke: #a6a7a2; stroke-width: 1; vector-effect: non-scaling-stroke; }
.check-handle circle { fill: #fff; stroke: var(--editor-muted); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.check-node { stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.check-node.is-smooth { fill: #fff; stroke: var(--icon-on-light); }
.check-node.is-corner { fill: #fff; stroke: var(--ink); }
.check-node.is-start { fill: var(--icon-on-light); stroke: #fff; stroke-width: 1; }

.check-thickness line { stroke: var(--icon-on-light); stroke-width: 1; stroke-opacity: .45; vector-effect: non-scaling-stroke; }
.check-thickness .is-thin { stroke: var(--ink); stroke-width: 1.4; stroke-opacity: 1; }
.check-thickness polygon { fill: var(--ink); }
.check-thickness text { fill: var(--ink); font-weight: 500; dominant-baseline: middle; paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }

.check-legend .is-heat { width: 26px; border-radius: 3px; background: linear-gradient(90deg, rgb(247,214,120), rgb(226,104,150)); }
.check-legend .is-smooth { border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1.5px var(--icon-on-light); }
.check-legend .is-corner { border-radius: 1px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--ink); }
.check-legend .is-start { border-radius: 0; background: var(--icon-on-light); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.check-legend .is-thickness { width: 12px; height: 2px; border-radius: 0; background: var(--ink); }
.check-legend .is-handle { width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1.2px var(--editor-muted); }

.check-pin { cursor: pointer; }
.check-pin:focus-visible { outline: 2px solid var(--violet); }

/* One finding at a time */
.check-stepper {
  padding: 12px 12px 10px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
}
.check-step {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(10,10,10,.08);
  border-radius: 999px;
  background: rgba(255,255,255,.7);
  color: var(--editor-text);
  cursor: pointer;
  transition: background .18s var(--ease);
}
.check-step .app-icon { color: currentColor; }
.check-step.is-prev .app-icon { transform: rotate(180deg); }
:dir(rtl) .check-step.is-prev .app-icon { transform: none; }
:dir(rtl) .check-step.is-next .app-icon { transform: rotate(180deg); }
.check-step:hover:not(:disabled) { background: #fff; }
.check-step:disabled { color: var(--editor-muted); cursor: not-allowed; }
.check-step:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.check-step-label { text-align: center; }
.check-step-label strong { display: block; font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.check-step-label small { color: var(--editor-muted); font-size: 12px; }
.check-empty { margin: 0; padding: 20px 16px; color: var(--editor-muted); font-size: 13px; line-height: 1.5; }

.check-evidence {
  margin: 0 8px 8px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: 16px;
  border-radius: var(--editor-radius-module);
  background: linear-gradient(135deg, #cdb8fb 0%, var(--violet) 55%, #ab8df3 100%);
  color: #14092e;
}
.check-evidence h2 { margin: 0; font-size: 16px; font-weight: 500; letter-spacing: -.02em; }
.check-measurement {
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -.04em;
  white-space: nowrap;
}
.check-evidence p {
  grid-column: 1 / -1;
  margin: 8px 0 14px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: rgba(20,9,46,.74);
  font-size: 13px;
  line-height: 1.5;
}
.check-evidence .check-secondary {
  grid-column: 1 / -1;
  justify-self: start;
  border-color: transparent;
  background: rgba(255,255,255,.8);
  color: #14092e;
}
.check-evidence .check-secondary:hover:not(:disabled) { background: #fff; }
.check-evidence .check-secondary[aria-pressed="true"] { background: #14092e; color: #fff; }

.check-disclosure {
  margin: 20px 0 0;
  color: var(--editor-muted);
  font-size: 11px;
  line-height: 1.6;
}

/* ── Method ──────────────────────────────────── */
.check-method {
  margin-top: 24px;
  border: 1px solid var(--editor-line);
  border-radius: var(--editor-radius-panel);
  background: var(--editor-panel);
  overflow: hidden;
}
.check-method > div { padding: 28px 32px; }
.check-method p {
  max-width: 720px;
  margin: 0 0 14px;
  color: var(--editor-muted);
  font-size: 14px;
  line-height: 1.7;
}
.check-method ul { margin: 16px 0 0; padding: 0; display: grid; gap: 4px; list-style: none; }
.check-method li { font-size: 13px; }
.check-method a { color: var(--icon-on-light); text-decoration: underline; text-underline-offset: 3px; }

/* ── Mobile ──────────────────────────────────── */
@media (max-width: 760px) {
  .check-topline { top: 68px; overflow-x: auto; scrollbar-width: none; }
  .check-results { margin-top: 14px; scroll-margin-top: 160px; }
  .check-topline-end { flex-shrink: 0; }
  .check-stage { margin: 8px 0 16px; border-radius: 20px; }
  .check-config { padding: 20px 20px 24px; }
  .check-intro { margin: 22px auto; }
  .check-intro h1 { font-size: 34px; }
  .check-intro > p:last-child { font-size: 13px; }
  .check-scanning { padding: 40px 20px; }
  .check-profiles { grid-template-columns: 1fr; }
  .check-file-row { flex-wrap: wrap; }
  .check-settings > span { display: none; }
  .check-summary { grid-template-columns: 1fr 1fr; }
  .check-workbench { grid-template-columns: 1fr; }
  .check-method > div { padding: 22px 20px; }
}
