/* Friction Ramp: the work order and controls beside the Grip Test Lab bench, inside the practice shell's stage. */
.frx { position: absolute; inset: 0; display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 12px; padding: 8px 12px; color: var(--tlg-text, #172c38); }
.frx-panel { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow-y: auto; padding: 2px; }

/* the work order */
.frx-ticket { padding: 8px 12px 10px; border-radius: var(--tlg-radius-lg, 14px); border: 2px solid #c9a46a; background: #fbf5e6; color: #2b1d10;
  background-image: repeating-linear-gradient(0deg, transparent 0 25px, rgba(122, 90, 40, .12) 25px 26px); }
.frx-ticket-k { margin: 0 0 6px; font-size: 16px; font-weight: 800; text-transform: uppercase; letter-spacing: var(--tlg-tracking-caps, .08em); color: #8a3b12; }
.frx-evidence { margin: 0; display: flex; align-items: center; gap: 10px; }
.frx-sw svg { width: 56px; height: 35px; display: block; }
.frx-evidence-v { font-size: 19px; font-weight: 800; line-height: 1.25; }
.frx-chips { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.frx-chip { font-size: 17px; font-weight: 800; padding: 2px 9px; border-radius: 8px; background: #fff; border: 1.5px solid #c9a46a; }
html[data-theme="dark"] .frx-ticket { background-color: #2c2116; color: #f6e9d6; border-color: #9a6b3e; background-image: repeating-linear-gradient(0deg, transparent 0 25px, rgba(255, 220, 160, .08) 25px 26px); }
html[data-theme="dark"] .frx-ticket-k { color: #ffbf8a; }
html[data-theme="dark"] .frx-chip { background: #3a2a1a; border-color: #9a6b3e; }

/* controls */
.frx-field { border: 0; margin: 0; padding: 0; min-width: 0; position: relative; }
.frx-field legend { padding: 0; margin: 0 0 6px; font-size: 16px; font-weight: 800; }
.frx-crank { display: grid; grid-template-columns: 72px minmax(0, 1fr) 72px; gap: 8px; align-items: center; }
.frx-step { font: inherit; font-size: 19px; font-weight: 900; min-height: 52px; border-radius: 12px; cursor: pointer; touch-action: manipulation;
  color: #fff; background: #9a4a14; border: 0; box-shadow: 0 3px 0 #5a2a08; }
.frx-step:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 #5a2a08; }
.frx-step:disabled { opacity: .5; cursor: default; }
.frx-numwrap, .frx-numrow { display: flex; align-items: center; gap: 6px; justify-content: center; }
.frx-num { font: inherit; font-size: 22px; font-weight: 800; width: 90px; min-height: 48px; padding: 4px 8px; text-align: center; border-radius: 10px;
  border: 2px solid var(--tlg-border, #a5b6c1); background: var(--tlg-surface, #fff); color: var(--tlg-text, #172c38); }
.frx-num--wide { width: 170px; text-align: left; }
.frx-num:focus-visible { outline: 3px solid #c2410c; outline-offset: 2px; }
.frx-unit { font-size: 19px; font-weight: 800; }
.frx-range { width: 100%; margin: 10px 0 0; height: 32px; accent-color: #9a4a14; cursor: pointer; }
.frx-choices { display: grid; gap: 8px; }
.frx-choice { position: relative; font: inherit; cursor: pointer; color: var(--tlg-text, #172c38); background: var(--tlg-surface, #fff); border: 2px solid var(--tlg-border, #a5b6c1);
  border-radius: 12px; box-shadow: 0 2px 0 rgba(0, 0, 0, .1); touch-action: manipulation; display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 8px;
  padding: 6px 22px 6px 8px; min-height: 56px; text-align: left; }
.frx-choice-i svg { width: 64px; height: 40px; display: block; }
.frx-glyph { font-size: 28px; font-weight: 900; text-align: center; color: #9a4a14; }
.frx-choice-l { font-size: 17px; font-weight: 800; line-height: 1.2; }
.frx-choice:hover:not(:disabled) { border-color: #9a4a14; }
.frx-choice[aria-pressed="true"] { border-color: #c2410c; border-width: 3px; background: #fdf0e0; box-shadow: 0 0 0 3px rgba(194, 65, 12, .25); }
html[data-theme="dark"] .frx-choice[aria-pressed="true"] { background: #3a2716; border-color: #ffbf8a; }
html[data-theme="dark"] .frx-glyph { color: #ffbf8a; }
.frx-choice:disabled { cursor: default; opacity: 1; }
.frx-choice.is-ok { border-color: #2e8b57; border-width: 3px; }
.frx-choice.is-bad { border-color: #b42318; border-style: dashed; border-width: 3px; }
.frx-mark { position: absolute; top: -9px; right: -7px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; font-size: 16px; font-weight: 900; color: #fff !important; }
.frx-choice.is-ok .frx-mark { background: #1d6b40; } .frx-choice.is-bad .frx-mark { background: #b42318; }
.frx-field.is-ok .frx-num { border-color: #2e8b57; border-width: 3px; }
.frx-field.is-bad .frx-num { border-color: #b42318; border-style: dashed; border-width: 3px; }
.frx-key { margin: 4px 0 0; font-size: 16px; font-weight: 800; }
.frx-field.is-ok .frx-key { color: #1d6b40; } .frx-field.is-bad .frx-key { color: #b42318; }
html[data-theme="dark"] .frx-field.is-ok .frx-key { color: #7fcf7a; } html[data-theme="dark"] .frx-field.is-bad .frx-key { color: #ff8a80; }
.frx-msg { margin: 0; font-size: 16px; font-weight: 700; color: #8a3b12; }
.frx-msg:empty { display: none; }
html[data-theme="dark"] .frx-msg { color: #ffbf8a; }
.frx-about { font-size: 16px; line-height: 1.45; }
.frx-about summary { cursor: pointer; font-weight: 700; }
.frx-about p { margin: 6px 0 0; }

/* the bench */
.frx-view { position: relative; min-width: 0; min-height: 0; display: flex; align-items: flex-start; justify-content: center; }
.frx-scene { position: relative; width: 100%; aspect-ratio: 720 / 600; border-radius: var(--tlg-radius-lg, 14px); overflow: hidden; border: var(--tlg-border-width, 1px) solid var(--tlg-border, #a5b6c1); user-select: none; -webkit-user-select: none; touch-action: none; }
.frx-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.frx-t { font-family: var(--tlg-font-body, system-ui, sans-serif); fill: #1d2b2f; }
.frx-t-blk { font-size: 18px; font-weight: 900; }
.frx-t-tick { font-size: 17px; font-weight: 800; fill: #33414a; paint-order: stroke; stroke: rgba(255, 255, 255, .85); stroke-width: 4px; }
.frx-t-lcdk { font-size: 17px; font-weight: 800; fill: #7fd1b9; letter-spacing: .08em; }
.frx-t-lcd { font-size: 30px; font-weight: 900; fill: #b7ffe8; font-variant-numeric: tabular-nums; }
.frx-t-status { font-size: 17px; font-weight: 900; fill: #ffffff; letter-spacing: .06em; }
.frx-status.is-rest { fill: #1d6b40; } .frx-status.is-slide { fill: #b42318; } .frx-status.is-idle { fill: #55606a; } .frx-status.is-run { fill: #9a4a14; }
.frx-t-card { font-size: 18px; font-weight: 800; fill: #1d2b2f; }
.frx-t-lane { font-size: 17px; font-weight: 800; fill: #1d2b2f; }
.frx-t-slip { font-size: 17px; font-weight: 900; fill: #ffffff; }
.frx-t-geo { font-size: 18px; font-weight: 900; fill: #1d5f9e; paint-order: stroke; stroke: #fff; stroke-width: 4px; }
.frx-t-bar { font-size: 17px; font-weight: 800; fill: #1d2b2f; }
.frx-t-arrow { font-size: 17px; font-weight: 900; paint-order: stroke; stroke: rgba(255, 255, 255, .9); stroke-width: 4px; }
.frx-t-arrow.is-pull { fill: #a3330f; } .frx-t-arrow.is-grip { fill: #1d6b40; } .frx-t-arrow.is-weight { fill: #33414a; } .frx-t-arrow.is-normal { fill: #1d5f9e; }
.frx-card { fill: #fffdf6; stroke: #c9a46a; stroke-width: 2; }
.frx-card.is-strong { stroke: #1d5f9e; stroke-width: 3; }
.frx-sliptag { fill: #9a4a14; }
.frx-lane-hit { fill: transparent; stroke: none; cursor: pointer; }
.frx.is-locked .frx-lane-hit { cursor: default; }
.frx-lane:hover .frx-lane-hit { stroke: #c2410c; stroke-width: 3; stroke-opacity: .5; }
.frx.is-locked .frx-lane:hover .frx-lane-hit { stroke: none; }
.frx-lane.is-chosen .frx-lane-hit { stroke: #c2410c; stroke-width: 5; stroke-dasharray: 12 6; stroke-opacity: 1; }
.frx-lane.is-ok .frx-lane-hit { stroke: #1d7a46; stroke-width: 6; stroke-dasharray: none; stroke-opacity: 1; }
.frx-lane.is-bad .frx-lane-hit { stroke: #b42318; stroke-width: 5; stroke-dasharray: 8 6; stroke-opacity: 1; }
.frx-mark { }
.frx-prot .frx-mark { stroke-width: 4; }
.frx-prot path.frx-mark.is-ok { stroke: #1d7a46; } .frx-prot path.frx-mark.is-bad { stroke: #b42318; stroke-dasharray: 8 5; }
.frx-arrow { fill: none; stroke-width: 6; stroke-linecap: round; }
.frx-arrow.is-pull { stroke: #c2410c; } .frx-arrow.is-grip { stroke: #1d7a46; } .frx-arrow.is-weight { stroke: #33414a; } .frx-arrow.is-normal { stroke: #1d5f9e; }
.frx-maxtick { stroke: #1d7a46; stroke-width: 4; stroke-dasharray: 4 3; }
.frx-geo { stroke: #1d5f9e; stroke-width: 4; stroke-dasharray: 10 6; }
.frx-bar.is-pull { fill: #c2410c; } .frx-bar.is-grip { fill: #1d7a46; }
.frx-ramp { cursor: default; }
.frx--test:not(.is-locked) .frx-ramp, .frx-grab { cursor: grab; }
.frx-grab-dot { fill: #9a4a14; stroke: #fff; stroke-width: 3; }

/* reveal badge */
.frx-badge { position: absolute; left: 2%; right: 2%; top: 1%; padding: 7px 12px; border-radius: 10px; font-size: 17px; font-weight: 700; line-height: 1.3; pointer-events: none;
  background: rgba(255, 255, 255, .97); color: #10202c; border: 3px solid #9a4a14; box-shadow: 0 3px 8px rgba(0, 0, 0, .25); animation: frx-pop .25s ease-out; }
.frx-badge.is-ok { border-color: #1d6b40; }
.frx-badge.is-bad { border-color: #b42318; }
@keyframes frx-pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }

/* briefing + start */
.frx-example-svg { display: block; width: 100%; height: auto; max-height: 460px; }
.frx-start-svg { display: block; width: 100%; height: 100%; }

@media (prefers-reduced-motion: reduce) { .frx-badge { animation: none; } }
@media (max-width: 1100px) { .frx { grid-template-columns: 300px minmax(0, 1fr); } }
@media (max-width: 900px) {
  .frx { position: static; grid-template-columns: 1fr; }
  .frx-panel { overflow: visible; }
  .frx-view { display: block; order: -1; }
  .frx-scene { width: 100% !important; }
}
