/* Copied from pazarlama/tasarim/motion/hangar/hangar-motion.css by tools/hangar_motion_sync.mjs; every rule is scoped to .hg-bench. Do not edit here. */
/* Fly Before — Hangar bench (motion module). Spec: pazarlama/tasarim/08_hangar_hareket.md. Script: hangar-motion.js.
   One component: <figure class="hg-bench" data-hangar>. It goes where 07_hangar_ux.md puts the hero figure.
   Uses the site's role tokens only (--bg, --surface, --step, --text, --text-2, --muted, --line, --line-strong, --focus,
   --r-*, --s*, --ease-land, --ease-swap, --d-*). No inline styles anywhere (CSP: style-src 'self').
   Everything below works without the script: the still, the plan drawing, the summary and the list are plain HTML.
   Classes the script adds: .hg-js (script is running), .hg-lit (desk lamp on), .hg-live (canvas has painted),
   .is-on (pane shown), .is-drag, .is-down (bar draining).
   Fluid: nothing here assumes a pixel size. The stage takes whatever box its parent gives it (default 16:10; 4:3 on a
   phone), the scene covers that box, and the summary lays itself out from the component's own width (container query). */

.hg-bench { margin: 0; min-width: 0; container: hgbench / inline-size; --hg-night: #0B1524; --hg-paper: #EEF2F7; --hg-paper-2: #B2BDCB; --hg-paper-3: #8C9AAE;
  --hg-hair: rgba(238, 242, 247, .16); --hg-chip: rgba(11, 21, 36, .72); }
.hg-bench *, .hg-bench *::before, .hg-bench *::after { box-sizing: border-box; }

/* ---------- Stage: the plain screen frame (radius 12, hairline ring, no shadow) ---------- */
.hg-bench .hg-stage { position: relative; aspect-ratio: 16 / 10; overflow: hidden; overflow: clip; isolation: isolate; container-type: size; border-radius: var(--r-md, 12px);
  box-shadow: 0 0 0 1px var(--line-strong); background: #7F7A75; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.hg-bench.hg-js .hg-stage[data-turn] { cursor: grab; }
.hg-bench.hg-js .hg-stage.is-drag { cursor: grabbing; }
/* overflow: clip, not hidden: the scene is wider than a 4:3 stage and the lamp button sits partly outside it; a "hidden" box
   is still scrollable, and focusing the lamp scrolled the whole stage 14 px sideways on a phone (seen in round 3). */
/* The scene keeps the camera's 16:10 and COVERS the stage whatever its ratio: a narrower stage crops the sides, a wider one
   crops top and bottom a little; the aircraft's turning circle stays inside from 4:3 to 2:1. */
.hg-bench .hg-scene { position: absolute; left: 50%; top: 50%; width: 100%; width: max(100cqw, 160cqh); aspect-ratio: 16 / 10; transform: translate(-50%, -50%);
  /* where the aircraft layer and the lamp sit inside the scene (fractions of the scene). These are the values of the
     "bench" framing (seq/framing.json, printed by pack_app.py) for the page without script; the script sets them from the data. */
  --hg-bx: 7.396%; --hg-by: 24.167%; --hg-bw: 85.104%; --hg-bh: 75.833%;
  --hg-lx: 78.438%; --hg-ly: 28%; --hg-lw: 16.25%; --hg-lh: 21.167%; }
.hg-bench .hg-plate, .hg-bench .hg-plate img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.hg-bench .hg-plane, .hg-bench .hg-canvas { position: absolute; left: var(--hg-bx); top: var(--hg-by); width: var(--hg-bw); height: var(--hg-bh); display: block; }
.hg-bench .hg-plane img { width: 100%; height: 100%; display: block; }
.hg-bench .hg-stage img { -webkit-user-drag: none; }
.hg-bench .hg-canvas { pointer-events: none; }
.hg-bench .hg-live .hg-plane { visibility: hidden; }          /* the canvas has taken over from the still */
.hg-bench .hg-canvas + .hg-canvas { opacity: 0; }

/* Light: the page's own room picture has the ceiling lights on and the desk lamp OFF. A second capture of the same room
   with the desk lamp on lies over it and fades in: the lamp's pool falls on the bench. The aircraft was captured in both
   lights and the script mixes the two on the canvas at the same pace. The room never goes dark. No glow, no gradient.
   The script sets how long a change takes: 420 ms at the entrance, 320 ms from the lamp. */
.hg-bench .hg-plate--lamp { opacity: 0; transition: opacity var(--hg-light-ms, 0ms) var(--ease-land); }
.hg-bench .hg-lit .hg-plate--lamp { opacity: 1; }
/* an angle that has no lamp-off picture is toned down a little instead while the lamp is off (--hg-tone: 0..1, set by the script) */
.hg-bench .hg-canvas { filter: brightness(calc(1 - .07 * var(--hg-tone, 0))) saturate(calc(1 - .08 * var(--hg-tone, 0))); }
/* The desk lamp in the picture is the switch: a real button laid over the lamp, at least 44 px, hairline on hover and focus. */
.hg-bench .hg-lamp { position: absolute; left: var(--hg-lx); top: var(--hg-ly); width: var(--hg-lw); height: var(--hg-lh); min-width: 44px; min-height: 44px;
  padding: 0; border: 0; border-radius: var(--r-sm, 8px); background: none; cursor: pointer; }
.hg-bench .hg-lamp[hidden] { display: none; }
.hg-bench .hg-lamp:hover { box-shadow: inset 0 0 0 1px rgba(238, 242, 247, .5); }
.hg-bench .hg-lamp:focus-visible { outline: 2px solid #6BA9FF; outline-offset: -2px; }

/* ---------- Controls inside the frame: bottom corners only, never over the aircraft ---------- */
.hg-bench .hg-ctl { position: absolute; bottom: 12px; z-index: 3; display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px;
  border: 0; border-radius: var(--r-sm, 8px); background: var(--hg-chip); color: var(--hg-paper); box-shadow: inset 0 0 0 1px var(--hg-hair);
  font: 500 13px/1 var(--font, system-ui); font-variant-numeric: tabular-nums; }
.hg-bench .hg-ctl:focus-visible { outline: 2px solid #6BA9FF; outline-offset: 2px; }
.hg-bench .hg-ctl[hidden] { display: none; }
.hg-bench .hg-pause { right: 12px; width: 32px; padding: 0; justify-content: center; cursor: pointer; }
.hg-bench .hg-pause::before { content: ""; position: absolute; inset: -6px; }                 /* 44 px touch target */
.hg-bench .hg-pause svg { width: 16px; height: 16px; fill: currentColor; }
.hg-bench .hg-pause .hg-i-play, .hg-bench .hg-pause[aria-pressed="true"] .hg-i-pause { display: none; }
.hg-bench .hg-pause[aria-pressed="true"] .hg-i-play { display: block; }
.hg-bench .hg-turn { left: 12px; cursor: ew-resize; touch-action: none; }
.hg-bench .hg-turn::before { content: ""; position: absolute; inset: -6px 0; }
/* heading tape: one tick per 10 degrees, a longer one per 90, sliding under a fixed index mark */
.hg-bench .hg-tape { position: relative; width: 84px; height: 12px; overflow: hidden; }
.hg-bench .hg-tape i { position: absolute; left: 50%; top: 0; height: 100%; width: 720px; margin-left: -360px; transform: translateX(calc(var(--hg-a, 0) * -1px));
  background:
    repeating-linear-gradient(90deg, var(--hg-paper) 0 1px, transparent 1px 90px) 0 0 / 100% 100% no-repeat,
    repeating-linear-gradient(90deg, var(--hg-paper-3) 0 1px, transparent 1px 10px) 0 4px / 100% 8px no-repeat; }
.hg-bench .hg-tape::after { content: ""; position: absolute; left: 50%; top: 0; width: 1px; height: 100%; background: #6BA9FF; }
.hg-bench .hg-view-name { white-space: nowrap; }

/* ---------- Plan pane ---------- */
/* Without the script it is a second frame under the stage; with it, it lives inside the stage and wipes over the bench.
   Left: the top view over the side view, one scale, filling the height. Right: the aircraft's eight figures in a grid and
   the key to the shading. Every figure is the aircraft's own data (hangar.json); nothing is typed for the drawing. */
.hg-bench .hg-plan { position: relative; display: grid; grid-template-columns: minmax(0, 58fr) minmax(0, 42fr); grid-template-rows: minmax(0, 1fr); gap: 0 var(--s5, 24px);
  margin-top: var(--s3, 12px); padding: var(--s4, 16px) var(--s5, 24px) var(--s4, 16px) var(--s4, 16px); aspect-ratio: 16 / 10; overflow: hidden;
  border-radius: var(--r-md, 12px); box-shadow: 0 0 0 1px var(--line-strong); background: var(--hg-night); color: var(--hg-paper); }
.hg-bench .hg-air { margin-top: var(--s3, 12px); aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--r-md, 12px); box-shadow: 0 0 0 1px var(--line-strong); background: #1B2330; }
.hg-bench .hg-air picture, .hg-bench .hg-air img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hg-bench .hg-stage > .hg-plan, .hg-bench .hg-stage > .hg-air { position: absolute; inset: 0; z-index: 4; margin: 0; aspect-ratio: auto; border-radius: 0; box-shadow: none;
  visibility: hidden; cursor: default; }
.hg-bench .hg-stage > .is-on { visibility: visible; }
.hg-bench .hg-switch button[hidden] { display: none; }
.hg-bench .hg-plan-draw { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s3, 12px); min-width: 0; min-height: 0; }
.hg-bench .hg-plan-svg { display: block; flex: 3 1 0; width: 100%; min-height: 0; overflow: visible;
  --hg-u: 6.2; }                                   /* user units (mm) per CSS px; the script measures the real value */
.hg-bench .hg-side-svg { flex: 1 1 0; }
.hg-bench.hg-js .hg-plan-svg { flex: none; }                /* the script gives both drawings one scale and their sizes */
.hg-bench .hg-plan-svg path, .hg-bench .hg-plan-svg circle { fill: none; stroke: var(--hg-paper); stroke-width: calc(var(--hg-u) * 1.4px); stroke-linejoin: round; stroke-linecap: round; }
.hg-bench .hg-plan-svg .hg-ink2 path, .hg-bench .hg-plan-svg .hg-ink2 circle { stroke: var(--hg-paper-2); stroke-width: calc(var(--hg-u) * 1px); }
.hg-bench .hg-plan-svg .hg-dim path { stroke: var(--hg-paper-3); stroke-width: calc(var(--hg-u) * 1px); }
.hg-bench .hg-plan-svg .hg-guide { opacity: 0; }
.hg-bench .hg-plan-svg .hg-guide path { stroke: var(--hg-paper-2); stroke-width: calc(var(--hg-u) * 1px); stroke-dasharray: calc(var(--hg-u) * 7px) calc(var(--hg-u) * 6px); }
.hg-bench .hg-plan-svg mask path { stroke: #fff; stroke-width: calc(var(--hg-u) * 6px); }
.hg-bench .hg-plan-svg text { fill: var(--hg-paper); stroke: none; font: 500 calc(var(--hg-u) * 12.5px) / 1 var(--font, system-ui); font-variant-numeric: tabular-nums; text-anchor: middle; dominant-baseline: hanging; }
.hg-bench .hg-plan-svg [pathLength] { stroke-dasharray: 1; stroke-dashoffset: 0; }
.hg-bench .hg-plan-svg .hg-guide [pathLength] { stroke-dasharray: calc(var(--hg-u) * 7px) calc(var(--hg-u) * 6px); }
/* control surfaces: a flat tint of the line colour (no gradient); the scale bar: a plain line with two ticks and its true length */
.hg-bench .hg-plan-svg .hg-cf { fill: var(--hg-paper); fill-opacity: .2; stroke: none; }
.hg-bench .hg-plan-svg .hg-scale-t { fill: var(--hg-paper-3); text-anchor: start; dominant-baseline: middle; font-size: calc(var(--hg-u) * 12px); }
.hg-bench .hg-plan-info { display: flex; flex-direction: column; justify-content: center; gap: var(--s4, 16px); min-width: 0; min-height: 0; }
.hg-bench .hg-sheet { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3, 12px) var(--s4, 16px); min-width: 0; font-size: 13px; line-height: 1.3; }
.hg-bench .hg-sheet > div { display: grid; gap: 2px; align-content: start; padding-top: 10px; border-top: 1px solid var(--hg-hair); min-width: 0; }
.hg-bench .hg-sheet dt { color: var(--hg-paper-3); overflow-wrap: normal; word-break: normal; hyphens: none; }
.hg-bench .hg-sheet dd { margin: 0; font-weight: 500; font-size: 15px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.hg-bench .hg-legend { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 1.3; color: var(--hg-paper-3); }
.hg-bench .hg-legend[hidden] { display: none; }
.hg-bench .hg-legend i { flex: none; width: 18px; height: 10px; border-radius: 2px; background: rgba(238, 242, 247, .2); box-shadow: inset 0 0 0 1px var(--hg-paper-2); }

/* ---------- Caption row: caption left, view switch right ---------- */
.hg-bench .hg-capbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2, 8px) var(--s4, 16px); margin-top: var(--s3, 12px); min-height: 36px; }
.hg-bench .hg-cap { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.hg-bench .hg-switch { position: relative; display: none; padding: 2px; border-radius: var(--r-sm, 8px); box-shadow: inset 0 0 0 1px var(--line-strong); }
.hg-bench.hg-js .hg-switch { display: inline-flex; }
.hg-bench .hg-switch button { position: relative; z-index: 1; height: 32px; padding: 0 var(--s3, 12px); border: 0; border-radius: var(--r-xs, 6px); background: none;
  font: 500 14px/1 var(--font, system-ui); color: var(--text-2); cursor: pointer; transition: color var(--d-ui, 160ms) var(--ease-land); }
.hg-bench .hg-switch button[aria-pressed="true"] { color: var(--text); }
.hg-bench .hg-switch button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.hg-bench .hg-switch button::before { content: ""; position: absolute; inset: -6px 0; }                 /* 44 px touch target (H13) */
@media (pointer: coarse) { .hg-bench .hg-switch button { height: 44px; } .hg-bench .hg-ctl { height: 44px; } .hg-bench .hg-pause { width: 44px; } }   /* real 44 px boxes for a finger, not only a larger hit area */
.hg-bench .hg-mark { position: absolute; left: 0; top: 0; width: var(--hg-mw, 0); height: var(--hg-mh, 0); border-radius: var(--r-xs, 6px); background: var(--step);
  box-shadow: inset 0 0 0 1px var(--line-strong); transform: translate(var(--hg-mx, 0), var(--hg-my, 0)); pointer-events: none;
  transition: transform 320ms var(--ease-swap), width 320ms var(--ease-swap), height 320ms var(--ease-swap); }
.hg-bench .hg-mark.hg-instant { transition: none; }

/* ---------- Summary of the aircraft on the bench: the roster cell's content, once ---------- */
.hg-bench .hg-tag { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s3, 12px) var(--s6, 32px); align-items: start; margin-top: var(--s4, 16px); padding-top: var(--s4, 16px); border-top: 1px solid var(--line); }
.hg-bench .hg-tag p { margin: 0; }
.hg-bench .hg-class { font-size: 14px; line-height: 1.4; color: var(--muted); }
.hg-bench .hg-name { font-size: 22px; line-height: 1.25; font-weight: 500; letter-spacing: -.01em; color: var(--text); }
.hg-bench .hg-line { margin-top: 4px !important; font-size: 15px; line-height: 1.5; color: var(--text-2); max-width: 46ch; }
.hg-bench .hg-key { margin-top: 8px !important; font-size: 14px; line-height: 1.5; color: var(--muted); font-variant-numeric: tabular-nums; }
.hg-bench .hg-bars { margin: 4px 0 0; display: grid; gap: 8px; }
.hg-bench .hg-bars > div { display: grid; grid-template-columns: minmax(84px, auto) auto; gap: var(--s4, 16px); align-items: center; }
.hg-bench .hg-bars dt { font-size: 14px; line-height: 1.3; color: var(--text-2); }
.hg-bench .hg-bars dd { margin: 0; }
/* Five segments, 14 x 4, radius 2, 3 apart; filled = Ink, empty = hairline. Never the accent (07 §2.1). */
.hg-bench .hg-seg { display: flex; gap: 3px; }
.hg-bench .hg-seg i { position: relative; display: block; width: 14px; height: 4px; border-radius: 2px; background: var(--line-strong); overflow: hidden; }
.hg-bench .hg-seg b { position: absolute; inset: 0; border-radius: 2px; background: var(--text); transform: scaleX(0); transform-origin: 0 50%; }
.hg-bench .hg-seg i.on b { transform: none; }
.hg-bench.hg-js .hg-seg b { transition: transform 260ms var(--ease-land); }
.hg-bench.hg-js .hg-seg i:nth-child(2) b { transition-delay: 45ms; } .hg-bench.hg-js .hg-seg i:nth-child(3) b { transition-delay: 90ms; }
.hg-bench.hg-js .hg-seg i:nth-child(4) b { transition-delay: 135ms; } .hg-bench.hg-js .hg-seg i:nth-child(5) b { transition-delay: 180ms; }
.hg-bench.hg-js .hg-seg.is-down i:nth-child(5) b { transition-delay: 0ms; } .hg-bench.hg-js .hg-seg.is-down i:nth-child(4) b { transition-delay: 45ms; }
.hg-bench.hg-js .hg-seg.is-down i:nth-child(3) b { transition-delay: 90ms; } .hg-bench.hg-js .hg-seg.is-down i:nth-child(2) b { transition-delay: 135ms; }
.hg-bench.hg-js .hg-seg.is-down i:nth-child(1) b { transition-delay: 180ms; }

/* Drum: a changed character rolls up out of its cell and the new one rolls in. Old and new are both true values. */
.hg-bench .hg-drum { display: inline-block; height: 1.5em; height: 1lh; overflow: hidden; vertical-align: bottom; white-space: pre; }
.hg-bench .hg-drum > span { display: flex; flex-direction: column; }
.hg-bench .hg-drum b { display: block; font-weight: inherit; height: 1.5em; height: 1lh; }
.hg-bench .hg-fade { display: inline-block; }

/* ---------- Stage list: links to the roster cell without the script, buttons with it ---------- */
.hg-bench .hg-pick { position: relative; display: flex; flex-wrap: wrap; gap: var(--s2, 8px); margin: var(--s4, 16px) 0 0; padding: 0; list-style: none; }
.hg-bench .hg-pick a { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 var(--s3, 12px) 0 6px;
  border-radius: var(--r-sm, 8px); box-shadow: inset 0 0 0 1px var(--line-strong); font: 500 15px/1 var(--font, system-ui); color: var(--text-2); text-decoration: none; cursor: pointer;
  transition: color var(--d-ui, 160ms) var(--ease-land); }
.hg-bench .hg-pick a:hover { color: var(--text); }
.hg-bench .hg-pick a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.hg-bench .hg-pick a[aria-pressed="true"] { color: var(--text); background: var(--step); }
.hg-bench.hg-js .hg-pick a[aria-pressed="true"] { background: none; }
.hg-bench .hg-pick .hg-mark { border-radius: var(--r-sm, 8px); }
.hg-bench .hg-pick picture, .hg-bench .hg-pick img { display: block; width: 56px; height: 32px; object-fit: contain; }
.hg-bench .hg-pick picture { padding: 2px 4px; border-radius: 4px; background: #2A2620; }     /* the bench wood in shade: thumbs are cut-outs */

/* ---------- Phone ---------- */
@media (max-width: 760px) {
  .hg-bench .hg-stage { aspect-ratio: 4 / 3; border-radius: var(--r-sm, 8px); }
  .hg-bench .hg-plan { aspect-ratio: 4 / 3; padding: 12px; gap: 0 12px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-radius: var(--r-sm, 8px); }
  .hg-bench .hg-plan-draw { gap: 8px; } .hg-bench .hg-plan-svg { --hg-u: 11; } .hg-bench .hg-plan-info { gap: 8px; }
  /* one column of rows: label left, figure right; 12 px, the smallest size used anywhere in the pane */
  .hg-bench .hg-sheet { grid-template-columns: minmax(0, 1fr); gap: 4px; font-size: 12px; }
  .hg-bench .hg-sheet > div { grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: baseline; padding-top: 4px; }
  .hg-bench .hg-sheet > div:first-child { border-top: 0; padding-top: 0; }
  .hg-bench .hg-sheet dd { font-size: 12px; text-align: right; }
  .hg-bench .hg-legend { font-size: 12px; }
  .hg-bench .hg-ctl { bottom: 8px; } .hg-bench .hg-pause { right: 8px; } .hg-bench .hg-turn { left: 8px; }
  .hg-bench .hg-tape { width: 44px; }
  .hg-bench .hg-pick li { flex: 1 1 auto; } .hg-bench .hg-pick a { display: flex; }
}


/* The summary stacks when the component itself is narrow, wherever it is placed */
@container hgbench (max-width: 520px) { .hg-bench .hg-tag { grid-template-columns: minmax(0, 1fr); } }
/* Narrowest phones: six rows fit; motor and battery stay in the roster's Details panel */
@media (max-width: 360px) { .hg-bench .hg-plan { padding: 10px; gap: 0 10px; } .hg-bench .hg-sheet > div:nth-child(n+7) { display: none; } }

/* ---------- Reduced motion and print: no movement, same content ---------- */
@media (prefers-reduced-motion: reduce) {
  .hg-bench *, .hg-bench *::before, .hg-bench *::after { transition: none !important; animation: none !important; }
}
.hg-bench.hg-rm *, .hg-bench.hg-rm *::before, .hg-bench.hg-rm *::after { transition: none !important; animation: none !important; }
@media print { .hg-bench .hg-ctl, .hg-bench .hg-lamp, .hg-bench .hg-switch { display: none !important; } .hg-bench .hg-stage > .hg-plan { position: relative; visibility: visible; } }
