/* mechanicut.xyz: dressed as a Premiere Pro workspace, like the panel itself.
   Black gutters, rounded #1D1D1D panels with tab rows, blue timecode, a
   header bar whose workspace tabs are the site's navigation. Reference:
   Premiere Pro 2025/2026 on Windows. No web fonts: Segoe UI on Windows (the
   only platform Mechanicut runs on), the system font elsewhere. */

:root {
  --gutter: #000;
  --panel: #1d1d1d;          /* Premiere's exact panel grey (Chris eyedropped it) */
  --panel-2: #232323;
  --hover: #262626;
  --line: #2e2e2e;
  --field: #000;
  --ink: #c6c6c6;
  --bright: #ececec;
  --dim: #8c8c8c;
  --blue: #2d8ceb;           /* timecode, values, links */
  --blue-btn: #1473e6;       /* the blue Export button */
  --blue-btn-hover: #0d66d0;
  --clip-v: #3f7fb0;         /* video clips on the timeline */
  --clip-a: #2e8a76;         /* audio clips */
  --cut: #b04a4a;            /* silence that will go: same red as the panel */
  --draft: #f0b429;
  --radius: 6px;
  --mono: Consolas, "Cascadia Mono", "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--gutter); color: var(--ink);
  font: 15px/1.6 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img, video { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
h1, h2, h3 { color: var(--bright); line-height: 1.25; font-weight: 600; margin: 0 0 .5em; }
h1 { font-size: clamp(26px, 4vw, 38px); letter-spacing: -.01em; }
h2 { font-size: 22px; }
h3 { font-size: 17px; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
li { margin: .25em 0; }
code, kbd { font-family: var(--mono); font-size: .9em; color: var(--bright); background: #000; border: 1px solid var(--line); border-radius: 3px; padding: 0 .35em; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; z-index: 50; background: var(--panel); padding: 6px 10px; }

/* ---------------------------------------------------------------------------
   the window: a title strip, then the header bar with the workspace tabs
   --------------------------------------------------------------------------- */
.titlebar {
  height: 26px; padding: 0 12px; display: flex; align-items: center;
  font-size: 12px; color: var(--dim); background: #000; white-space: nowrap; overflow: hidden;
}
.titlebar .dots { margin-left: auto; letter-spacing: 14px; color: #666; }
.appbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  min-height: 46px; padding: 6px 12px; background: #111; border-bottom: 1px solid #000;
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--bright); font-weight: 600; margin-right: 14px; }
.brand:hover { text-decoration: none; }
.brand img { height: 24px; width: auto; }
.tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.tabs a {
  color: #a8a8a8; padding: 6px 12px; border-radius: 4px; font-size: 14px; position: relative;
}
.tabs a:hover { color: var(--bright); background: var(--hover); text-decoration: none; }
.tabs a[aria-current="page"] { color: #fff; }
.tabs a[aria-current="page"]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; background: #e0e0e0; border-radius: 1px;
}
.appbar .doc { margin: 0 auto; color: var(--dim); font-size: 13px; }
.appbar .right { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* ---------------------------------------------------------------------------
   buttons: black panel buttons, and the blue pill for the one thing to do
   --------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 14px; color: var(--ink); background: #000;
  border: 1px solid #343434; border-radius: 4px; padding: 6px 16px; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: #1a1a1a; color: var(--bright); text-decoration: none; }
.btn-blue {
  background: var(--blue-btn); border-color: var(--blue-btn); color: #fff; border-radius: 16px; font-weight: 600; padding: 7px 20px;
}
.btn-blue:hover { background: var(--blue-btn-hover); border-color: var(--blue-btn-hover); color: #fff; }
.btn-buy {
  background: transparent; border: 1.5px solid #e6e6e6; color: #f2f2f2; border-radius: 16px; font-weight: 600; padding: 6px 19px;
}
.btn-buy:hover { background: rgba(255,255,255,.08); color: #fff; }
.btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

/* "download, try, buy if you want": the try-first strip */
.tryflow { list-style: none; padding: 0; margin: 16px 0 6px; display: flex; flex-wrap: wrap; gap: 6px 0; font-size: 14px; }
.tryflow li { margin: 0; display: flex; align-items: center; color: var(--ink); }
.tryflow li + li::before { content: "\203A"; color: var(--dim); margin: 0 10px; font-size: 18px; line-height: 1; }
.tryflow b { color: var(--bright); font-weight: 600; }

/* free demo vs full, side by side */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 6px; }
@media (max-width: 520px) { .plans { grid-template-columns: 1fr; } }
.plan { border: 1px solid #343434; border-radius: 6px; padding: 14px 16px; background: #181818; display: flex; flex-direction: column; }
.plan.full { border-color: #4a4a4a; }
.plan h3 { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.plan h3 span { font-family: var(--mono); color: var(--blue); font-weight: 400; font-size: 15px; }
.plan .checks { margin-bottom: 12px; font-size: 14px; flex: 1; }
.plan .btn { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 14px 0 4px; }

/* ---------------------------------------------------------------------------
   the workspace: black gutters around rounded panels
   --------------------------------------------------------------------------- */
.workspace { max-width: 1240px; margin: 0 auto; padding: 6px; display: grid; gap: 6px; }
.row { display: grid; gap: 6px; }
.row.two { grid-template-columns: 3fr 2fr; }
.row.half { grid-template-columns: 1fr 1fr; }
.row.side { grid-template-columns: 240px 1fr; align-items: start; }
@media (max-width: 880px) { .row.two, .row.half, .row.side { grid-template-columns: 1fr; } }

.panel { background: var(--panel); border-radius: var(--radius); overflow: hidden; min-width: 0; }
.panel-tabs {
  display: flex; align-items: center; gap: 18px; height: 34px; padding: 0 14px;
  border-bottom: 1px solid var(--line); font-size: 13px; color: #8f8f8f; white-space: nowrap; overflow: hidden;
}
.panel-tabs .on { color: var(--bright); position: relative; }
.panel-tabs .on::after { content: " \2261"; color: var(--dim); }   /* the ≡ panel menu */
.panel-body { padding: 18px 20px 20px; }
.panel-body > :last-child { margin-bottom: 0; }
.lead { font-size: 18px; color: #d4d4d4; }
.muted { color: var(--dim); }
.small { font-size: 13px; }

/* sticky "Project" panel used as a page index on long pages */
.toc { position: sticky; top: 58px; }
.toc ul { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.toc li { margin: 0; }
.toc a { display: block; padding: 4px 8px; border-radius: 3px; color: var(--ink); }
.toc a:hover { background: var(--hover); text-decoration: none; color: var(--bright); }
.toc .bin::before { content: "\25B8  "; color: var(--dim); }

/* ---------------------------------------------------------------------------
   Program monitor: media with a timecode/transport row under it
   --------------------------------------------------------------------------- */
.monitor { display: flex; flex-direction: column; }
.monitor .screen { flex: 1; min-height: 0; background: #000; position: relative; aspect-ratio: 4 / 3; }
/* the hero video is 4:3: it fills the screen edge to edge (a hair of crop if the
   panel is a little wider or taller than 4:3), never black bars */
.monitor .screen .media { position: absolute; inset: 0; width: auto; aspect-ratio: auto; }
.monitor .screen .media video, .monitor .screen .media img { object-fit: cover; }
.monitor .transport {
  display: flex; align-items: center; gap: 12px; padding: 6px 12px; background: var(--panel);
  font-family: var(--mono); font-size: 13px; color: var(--blue);
}
.monitor .transport .fit { margin-left: auto; color: var(--dim); font-family: inherit; }
.monitor .transport .total { color: var(--dim); }

/* media slots: a dashed placeholder until the file exists (site.js) */
.media { position: relative; background: #000; aspect-ratio: 16 / 9; width: 100%; overflow: hidden; }
.media.tall { aspect-ratio: 4 / 3; }
.media.square { aspect-ratio: 1 / 1; }
.media.wide { aspect-ratio: 21 / 9; }
.media img, .media video { width: 100%; height: 100%; object-fit: contain; }
.media.missing {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  border: 1px dashed #4a4a4a; color: #777; font-size: 13px; padding: 16px;
}
.media.missing .file { font-family: var(--mono); color: #9a9a9a; }
figure { margin: 0 0 16px; }
figcaption { font-size: 13px; color: var(--dim); margin-top: 6px; }

/* ---------------------------------------------------------------------------
   Effect Controls rows: twirl-down <details>, blue value on the right
   --------------------------------------------------------------------------- */
.fx { border-top: 1px solid var(--line); }
.fx:last-child { border-bottom: 1px solid var(--line); }
.fx > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
  padding: 8px 6px; color: var(--bright);
}
.fx > summary::-webkit-details-marker { display: none; }
.fx > summary::before {
  content: ""; width: 7px; height: 7px; border-right: 1.6px solid #b4b4b4; border-bottom: 1.6px solid #b4b4b4;
  transform: rotate(-45deg); margin: 0 4px 0 2px; transition: transform .12s; flex: none;
}
.fx[open] > summary::before { transform: rotate(45deg); }
.fx > summary:hover { background: var(--hover); }
.fx > summary .val { margin-left: auto; color: var(--blue); font-family: var(--mono); font-size: 13px; }
.fx .fx-body { padding: 4px 6px 14px 26px; }
.fx .fx-body > :last-child { margin-bottom: 0; }

/* a settings table in Effect Controls style */
.props { width: 100%; border-collapse: collapse; font-size: 14px; }
.props td { padding: 6px 8px; border-top: 1px solid var(--line); vertical-align: top; }
.props td:first-child { color: var(--bright); white-space: nowrap; }
.props td.v { color: var(--blue); font-family: var(--mono); white-space: nowrap; }

/* steps */
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps > li { counter-increment: step; position: relative; padding-left: 40px; margin: 0 0 18px; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%;
  background: #000; border: 1px solid #3a3a3a; color: var(--bright); font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}

/* a Premiere-style ⓘ note box */
.note {
  border: 1px solid var(--line); border-left: 3px solid var(--blue); background: var(--panel-2);
  border-radius: 4px; padding: 10px 14px; margin: 0 0 16px; font-size: 14px;
}
.note.warn { border-left-color: #d9a441; }

/* the price, like an Export dialog summary */
.price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.price b { font-size: 44px; color: #fff; font-weight: 600; letter-spacing: -.02em; }
.checks { list-style: none; padding: 0; }
.checks li { padding-left: 24px; position: relative; }
.checks li::before {
  content: ""; position: absolute; left: 2px; top: .45em; width: 11px; height: 11px; border-radius: 2px; background: #c8c8c8;
}
.checks li::after {
  content: ""; position: absolute; left: 6px; top: .5em; width: 3px; height: 6px;
  border: solid #111; border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* changelog */
.release { border-top: 1px solid var(--line); padding: 16px 0; }
.release:first-of-type { border-top: 0; padding-top: 0; }
.release h3 { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.release .date { font-family: var(--mono); font-size: 13px; color: var(--blue); font-weight: 400; }

/* ---------------------------------------------------------------------------
   the animated timeline on the home page: silences turn red, then close up
   --------------------------------------------------------------------------- */
.timeline { font-size: 12px; user-select: none; }
.tl-ruler { display: flex; align-items: center; gap: 14px; padding: 6px 12px 4px; }
.tl-ruler .tc { font-family: var(--mono); font-size: 18px; color: var(--blue); }
.tl-ruler .ticks {
  flex: 1; height: 14px;
  background: repeating-linear-gradient(90deg, #555 0 1px, transparent 1px 40px) bottom / 100% 6px no-repeat,
              repeating-linear-gradient(90deg, #444 0 1px, transparent 1px 8px) bottom / 100% 3px no-repeat;
}
.tl { display: grid; grid-template-columns: 74px 1fr; padding: 0 12px 12px; gap: 0 6px; }
.tl-heads { display: grid; grid-auto-rows: 34px; gap: 3px; }
.tl-head {
  display: flex; align-items: center; gap: 6px; padding: 0 6px; background: #161616; border-radius: 3px; color: var(--dim);
}
.tl-head b { display: inline-flex; width: 22px; height: 18px; align-items: center; justify-content: center; border-radius: 3px; background: #2a62b8; color: #fff; font-weight: 600; font-size: 11px; }
.tl-head b.off { background: #333; color: #9a9a9a; }   /* not the track Mechanicut listens to */
.tl-head.target { background: #1d1d1d; color: var(--bright); }
.tl-tracks { position: relative; overflow: hidden; }
.tl-cols { display: flex; height: 100%; }
.tl-col { display: grid; grid-auto-rows: 34px; gap: 3px; flex: 0 0 auto; min-width: 0; overflow: hidden; }
.tl-col .v, .tl-col .a, .tl-col .m { border-radius: 3px; margin-right: 1px; min-width: 0; }
.tl-col .v { background: var(--clip-v); border-top: 3px solid #6aa3cf; }
/* audio clips: Premiere's green with a pale waveform. site.js draws one
   waveform across the whole track and gives each clip its own slice of it,
   so when a silence closes up its piece is really gone (the stripes below are
   only the no-script fallback). The mic (A1) is a touch lighter, as if
   selected; its waveform goes flat in the stretches about to be cut. */
.tl-col .a, .tl-col .m {
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.28) 0 1px, transparent 1px 3px) center / 100% 60% no-repeat;
  background-color: #2f6a33;
}
.tl-col .a { background-color: #3d8442; }
.tl-col.sil .a { background-size: 100% 8%; }
.tl-col.sil { animation: sil 8.5s infinite; }
.tl-col.sil > div { animation: silfill 8.5s infinite; }
.tl-playhead { position: absolute; top: 0; bottom: 0; width: 1px; background: #4fa0ff; left: 0; animation: ph 8.5s infinite linear; }
.tl-playhead::before { content: ""; position: absolute; top: -2px; left: -5px; border: 5px solid transparent; border-top: 7px solid #4fa0ff; }
/* One 8.5 s loop: 1.5 s of plain timeline, then the playhead sweeps (to 41%),
   the silences turn red (34% to 69%), close up (42% to 69%), stay closed, and
   reopen (93% to 100%). The red clears while they are closed (69% to 72%), so
   they come back in their own colours instead of red that snaps at the loop. */
@keyframes sil {
  0%, 42.4% { flex-basis: var(--w); }
  68.7%, 93.4% { flex-basis: 0; }
  100% { flex-basis: var(--w); }
}
@keyframes silfill {
  0%, 27.5% { box-shadow: none; }
  34.1%, 68.7% { box-shadow: inset 0 0 0 999px rgba(176, 74, 74, .75); }
  72%, 100% { box-shadow: none; }
}
@keyframes ph {
  0% { left: 0; opacity: 0; } 2%, 17.6% { left: 0; opacity: 1; } 40.7% { left: 100%; opacity: 1; }
  40.71%, 68.7% { left: 0; opacity: 0; } 69.5% { left: 0; opacity: 1; } 93.4% { left: 70%; opacity: 1; } 100% { left: 70%; opacity: 0; }
}
.tl-caption { display: flex; justify-content: space-between; gap: 12px; padding: 0 12px 12px; color: var(--dim); font-size: 13px; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) {
  .tl-col.sil, .tl-col.sil > div, .tl-playhead { animation: none; }
  .tl-col.sil > div { box-shadow: inset 0 0 0 999px rgba(176, 74, 74, .75); }
}

/* ---------------------------------------------------------------------------
   footer, and the draft highlighter (?drafts in the URL, or the footer switch)
   --------------------------------------------------------------------------- */
.footer .panel-body { display: flex; gap: 24px; flex-wrap: wrap; justify-content: space-between; font-size: 13px; color: var(--dim); }
.footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.footer a { color: var(--ink); }
body.show-drafts [data-draft] { outline: 1px dashed var(--draft); outline-offset: 3px; position: relative; }
body.show-drafts [data-draft]::before {
  content: "DRAFT"; position: absolute; top: -9px; right: 0; font: 600 9px/1 var(--mono); color: #000;
  background: var(--draft); padding: 2px 4px; border-radius: 2px; z-index: 5;
}
#draftCount { color: var(--draft); }
.prelaunch {
  max-width: 1240px; margin: 6px auto 0; padding: 8px 14px; border-radius: var(--radius);
  background: #2b2414; border: 1px solid #5a4a1e; color: #f0d9a0; font-size: 14px;
}
@media (max-width: 1252px) { .prelaunch { margin: 6px 6px 0; } }
.promo {
  max-width: 1240px; margin: 6px auto 0; padding: 15px 16px; border-radius: var(--radius);
  background: #2d8ceb; border: 3px solid #fff; color: #fff; text-align: center;
  font-size: clamp(16px, 2.9vw, 36px); font-weight: 800; line-height: 1.15;
  text-transform: uppercase; letter-spacing: .02em;
}
.promo b {
  display: inline-block; margin: 3px 4px; padding: 1px 10px; border-radius: 6px;
  background: #fff; color: #0b3d75; font-family: var(--mono); letter-spacing: .06em; user-select: all;
}
@media (max-width: 1252px) { .promo { margin: 6px 6px 0; } }

@media (max-width: 560px) {
  body { font-size: 15px; }
  .titlebar { display: none; }
  .appbar .doc { display: none; }
  /* phones: logo + Buy on one row, the tabs one scrollable row under it, not sticky */
  .appbar { position: static; gap: 4px 6px; padding: 8px 10px 4px; }
  .brand { margin-right: 0; }
  .appbar .right { margin-left: auto; }
  .appbar .btn-blue { padding: 5px 14px; font-size: 13px; }
  .tabs { order: 3; width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { padding: 6px 10px; white-space: nowrap; }
  .toc { position: static; }
  .panel-body { padding: 14px 16px 16px; }
  .tl { grid-template-columns: 46px 1fr; }
  .tl-head span { display: none; }
}

/* Chris's colour marks: the waveform's own red and yellow */
.c-red { color: #e06c6c; }
.c-yellow { color: #e0b84a; }
/* an unticked box in a .checks list (what the demo doesn't include) */
.checks li.no { color: var(--dim); }
.checks li.no::before { background: transparent; border: 1px solid #8c8c8c; width: 9px; height: 9px; }
.checks li.no::after { display: none; }

/* before/after: two Premiere-style sequence tabs over two stacked stills.
   Same row as every .panel-tabs (34 px, dim tabs, white active one with the
   ≡ menu, hairline underneath), so it reads as Premiere's own tab strip. */
.ba-tabs {
  display: flex; align-items: center; gap: 18px; height: 34px; padding: 0 14px;
  background: var(--panel); border-bottom: 1px solid var(--line); overflow: hidden;
}
.ba-tabs button {
  font: inherit; font-size: 13px; color: #8f8f8f; background: transparent; border: 0; cursor: pointer;
  padding: 0; height: 100%; white-space: nowrap;
}
.ba-tabs button:hover { color: var(--bright); }
.ba-tabs button.on { color: var(--bright); }
.ba-tabs button.on::after { content: " \2261"; color: var(--dim); }   /* the ≡ panel menu */
/* gallery: line the pictures and captions up along the bottom, so the
   before/after tab strip sticks up above its picture instead of pushing it down */
.gallery { align-items: end; }
.ba-stage { position: relative; }
.ba-stage .ba-after { position: absolute; inset: 0; opacity: 0; transition: opacity .25s; }
.ba.show-after .ba-after { opacity: 1; }

/* the "do it yourself" box at the top of Support: Lemon Squeezy's My orders */
.selfserve {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: space-between;
  border: 1px solid #2f4f73; background: #13202e; border-radius: 6px; padding: 12px 16px; margin: 0 0 18px; font-size: 14px;
}
.selfserve > div { flex: 1 1 280px; }

/* 404: Premiere's "Media offline" frame (Chris's reference: media-originals/media offline.jpg).
   Real text, so it stays sharp at any size; font sizes follow the frame's width. */
.offline-screen { background: #000; padding: 4% 3%; }
.offline-frame {
  container-type: inline-size; aspect-ratio: 16 / 9; max-width: 1100px; margin: 0 auto;
  background: linear-gradient(#e04243, #c7383c 25%, #a02b31 50%, #7a2127 75%, #5f1820);
  padding: 9.2% 0 0 9.1%; color: #fff; overflow: hidden;
}
.offline-frame p { margin: 0; font: 400 3.55cqw/1.08 "Segoe UI", "Helvetica Neue", Arial, "Yu Gothic UI", "Microsoft YaHei UI", "Malgun Gothic", sans-serif; letter-spacing: .01em; white-space: nowrap; }
.offline-frame p.wide { letter-spacing: .08em; }
.offline-note { text-align: center; padding: 28px 20px; }
.offline-note .btn-row { justify-content: center; }
