@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --charcoal: #111412;
  --deep: #090b0a;
  --canvas: #e8ebe5;
  --paper: #f6f7f2;
  --ink: #171a18;
  --muted: #6c736e;
  --line: #343a35;
  --cut: #d7ff45;
  --coral: #ff5d4a;
  --cyan: #55d4c4;
  --blue: #5c75ff;
  --radius: 6px;
  font-family: Manrope, Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--canvas); }
button, input { font: inherit; letter-spacing: 0; }
button, label { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, label:focus-within, a:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
main { width: 100%; max-width: 100%; overflow-x: hidden; }

.cutroom {
  min-height: 100vh;
  padding: 14px clamp(14px, 2vw, 30px) 30px;
  color: #f4f6f0;
  background:
    radial-gradient(circle at 65% 15%, rgba(85, 212, 196, .11), transparent 31%),
    linear-gradient(135deg, #111412 0 60%, #0d100e 60% 100%);
}

.topbar { height: 38px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid #303631; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-size: 12px; font-weight: 800; }
.brand-cut { position: relative; width: 22px; height: 12px; border-top: 3px solid var(--cut); border-bottom: 3px solid var(--cut); }
.brand-cut::after { content: ''; position: absolute; inset: -3px auto -3px 9px; width: 3px; background: var(--coral); transform: rotate(25deg); }
.privacy-line { margin: 0; color: #bac1bb; font-size: 11px; }
.icon-button { justify-self: end; width: 30px; height: 30px; border: 1px solid #454b46; border-radius: 50%; color: #fff; background: transparent; font-weight: 800; }

.tool-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; padding: 20px 0 18px; }
.tool-heading h1 { max-width: 920px; margin: 0; font-family: 'Arial Black', Manrope, sans-serif; font-size: clamp(28px, 3.8vw, 58px); line-height: .98; letter-spacing: 0; }
.tool-heading p { max-width: 390px; margin: 0; color: #bfc5c0; font-size: 12px; line-height: 1.55; }

.room-grid { display: grid; grid-template-columns: minmax(190px, 22fr) minmax(460px, 52fr) minmax(230px, 26fr); min-height: 570px; border: 1px solid #3b413c; background: #151916; }
.source-zone, .export-zone { padding: 18px; background: #1a1e1b; }
.source-zone { border-right: 1px solid #3b413c; }
.export-zone { border-left: 1px solid #3b413c; }
.zone-title { display: flex; align-items: center; justify-content: space-between; color: #9ca39d; font-size: 10px; text-transform: uppercase; }
.zone-title strong { color: var(--cut); font-size: 9px; }
.source-zone h2, .export-zone h2 { margin: 16px 0 14px; font-size: 18px; line-height: 1.1; }

.file-button, .sample-button, .export-button, .cancel-button { display: block; width: 100%; min-height: 44px; border: 0; border-radius: var(--radius); padding: 12px; text-align: center; font-size: 11px; font-weight: 800; }
.file-button { color: var(--ink); background: var(--cut); }
.sample-button { margin-top: 8px; color: #fff; border: 1px solid #4c534d; background: transparent; }
.file-button:hover, .sample-button:hover, .export-button:hover:not(:disabled), .cancel-button:hover { transform: translateY(-1px); }

.source-meta { margin: 18px 0 0; }
.source-meta div, .result-actions dl div { display: grid; grid-template-columns: 62px 1fr; gap: 8px; padding: 9px 0; border-bottom: 1px solid #353a36; }
.source-meta dt, .source-meta dd, .result-actions dt, .result-actions dd { margin: 0; font-size: 10px; }
.source-meta dt, .result-actions dt { color: #858c86; }
.source-meta dd, .result-actions dd { min-width: 0; overflow: hidden; color: #fff; text-overflow: ellipsis; white-space: nowrap; }
.source-note { margin: 16px 0; color: #aeb5af; font-size: 10px; line-height: 1.55; }
.receipt-memory { padding: 10px; border-left: 3px solid var(--cyan); color: #131714; background: var(--cyan); }
.receipt-memory span { display: block; font-size: 9px; text-transform: uppercase; }
.receipt-memory strong { display: block; margin-top: 4px; font-size: 10px; }

.edit-zone { min-width: 0; padding: 12px; background: #090b0a; }
.preview-shell { position: relative; aspect-ratio: 16 / 8.3; max-height: 340px; overflow: hidden; border: 1px solid #343a35; background: #030403; }
.preview-shell video { width: 100%; height: 100%; display: block; object-fit: contain; background: #030403; }
.interval-invalid .preview-shell { border-color: var(--coral); }
.interval-invalid .preview-shell::after {
  content: 'INVALID INTERVAL: OUT MUST FOLLOW IN';
  position: absolute;
  z-index: 5;
  right: 10px;
  bottom: 10px;
  max-width: calc(100% - 20px);
  padding: 7px 9px;
  color: #fff;
  border: 1px solid var(--coral);
  background: rgba(45, 24, 21, .94);
  font-size: 9px;
  font-weight: 800;
}
.preview-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; color: #818882; text-align: center; }
.preview-empty strong { margin-top: 14px; color: #bdc3bd; font-size: 13px; }
.preview-empty p { margin: 5px 0 0; font-size: 10px; }
.empty-frame { width: 88px; height: 52px; border: 1px solid #555c56; box-shadow: inset 0 0 0 7px #101310; }
.time-burn, .preview-label { position: absolute; z-index: 2; top: 10px; padding: 5px 7px; color: #fff; background: rgba(7, 9, 8, .78); font-size: 9px; font-variant-numeric: tabular-nums; }
.time-burn { right: 10px; }
.preview-label { left: 10px; }

.transport { display: grid; grid-template-columns: 38px 90px 38px 1fr; align-items: center; gap: 6px; padding: 10px 0 9px; }
.transport button { height: 32px; border: 1px solid #414741; border-radius: 3px; color: #fff; background: #1b201c; font-size: 9px; font-weight: 800; }
.transport .play-button { color: var(--ink); border-color: var(--cut); background: var(--cut); }
.transport span { justify-self: end; color: #aeb5af; font-size: 10px; font-variant-numeric: tabular-nums; }

.timeline { position: relative; height: 76px; padding-top: 23px; }
.timeline-ruler { position: absolute; inset: 0 0 auto; display: flex; justify-content: space-between; color: #737a74; font-size: 8px; }
.track-visual { position: relative; height: 34px; overflow: hidden; border: 1px solid #353b36; background: repeating-linear-gradient(90deg, #191d1a 0 16px, #222722 16px 17px); }
.selected-track { position: absolute; inset: 0 auto 0 0; width: 100%; background: rgba(215, 255, 69, .72); }
.playhead { position: absolute; z-index: 3; top: -4px; bottom: -4px; left: 0; width: 2px; background: var(--coral); }
.range { position: absolute; z-index: 4; left: 0; right: 0; top: 32px; width: 100%; height: 25px; margin: 0; appearance: none; pointer-events: none; background: transparent; }
.range::-webkit-slider-thumb { width: 15px; height: 43px; appearance: none; pointer-events: auto; cursor: ew-resize; border: 2px solid #080a08; border-radius: 2px; background: var(--cut); box-shadow: 0 0 0 1px var(--cut); }
.range-out::-webkit-slider-thumb { background: var(--coral); box-shadow: 0 0 0 1px var(--coral); }
.range::-moz-range-thumb { width: 15px; height: 43px; pointer-events: auto; cursor: ew-resize; border: 2px solid #080a08; border-radius: 2px; background: var(--cut); }
.range-out::-moz-range-thumb { background: var(--coral); }

.timecode-row { display: grid; grid-template-columns: 1fr 110px 1fr; align-items: end; gap: 10px; }
.timecode-control label { display: block; margin-bottom: 5px; color: #8e958f; font-size: 9px; }
.timecode-control > div { display: grid; grid-template-columns: 36px 1fr 36px; }
.timecode-control button, .timecode-control input { height: 36px; border: 1px solid #3d443e; color: #fff; background: #181c19; font-size: 9px; }
.timecode-control input { min-width: 0; padding: 0 4px; text-align: center; font-variant-numeric: tabular-nums; }
.duration-block { padding-bottom: 3px; text-align: center; }
.duration-block span { display: block; color: #818882; font-size: 8px; }
.duration-block strong { display: block; margin-top: 4px; color: var(--cut); font-size: 15px; font-variant-numeric: tabular-nums; }
.interval-feedback { margin-top: 11px; min-height: 38px; padding: 10px; border-left: 3px solid #59605a; color: #b8beb9; background: #171b18; font-size: 10px; line-height: 1.5; }
.interval-feedback.valid { border-color: var(--cut); color: #e9f4c2; }
.interval-feedback.error { border-color: var(--coral); color: #ffd0ca; background: #2d1815; }

.mode-switch { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border: 1px solid #424943; border-radius: var(--radius); background: #111512; }
.mode-switch button { min-height: 34px; border: 0; border-radius: 3px; color: #959c96; background: transparent; font-size: 9px; font-weight: 800; }
.mode-switch button.active { color: var(--ink); background: var(--cyan); }
.mode-explainer { min-height: 110px; margin: 12px 0; padding: 12px; border-left: 3px solid var(--cyan); background: #111512; }
.mode-explainer strong { font-size: 11px; }
.mode-explainer p { margin: 7px 0 0; color: #aeb5af; font-size: 10px; line-height: 1.55; }
.export-button { color: var(--ink); background: var(--cut); }
.cancel-button { margin-top: 8px; color: #fff; border: 1px solid var(--coral); background: transparent; }
.process-meter { margin-top: 14px; }
.meter-heading, .process-facts { display: flex; align-items: center; justify-content: space-between; color: #969d97; font-size: 9px; }
.meter-heading strong { color: #fff; }
.meter-track { height: 7px; margin: 7px 0; overflow: hidden; background: #303530; }
.meter-track span { display: block; width: 0; height: 100%; background: var(--cut); transition: width .25s ease; }
.process-facts { margin-bottom: 7px; }
.process-meter code { display: block; min-height: 38px; max-height: 52px; overflow: hidden; padding: 8px; color: #84cabf; background: #080a08; font: 8px/1.45 ui-monospace, monospace; word-break: break-word; }
.memory-warning { margin: 12px 0; color: #9ba29c; font-size: 9px; line-height: 1.5; }
.edge-button { width: 100%; min-height: 32px; border: 1px solid #4a504b; color: #c4cac5; background: transparent; font-size: 9px; }

.result-strip { display: grid; grid-template-columns: 1.1fr 1fr .8fr; align-items: center; gap: 24px; padding: 18px; border: 1px solid var(--cut); border-top: 0; color: var(--ink); background: var(--cut); }
.result-copy > span { font-size: 9px; font-weight: 800; text-transform: uppercase; }
.result-copy h2 { margin: 5px 0; font-size: clamp(18px, 2vw, 29px); line-height: 1.05; }
.result-copy p { margin: 0; font-size: 10px; line-height: 1.5; }
.result-strip video { width: 100%; max-height: 145px; background: #050605; }
.result-actions button { width: 100%; min-height: 38px; margin-bottom: 6px; border: 1px solid var(--ink); color: #fff; background: var(--ink); font-size: 9px; font-weight: 800; }
.result-actions button + button { color: var(--ink); background: transparent; }
.result-actions dl { margin: 6px 0 0; }
.result-actions dt { color: #303530; }
.result-actions dd { color: var(--ink); }

.method-band { display: grid; grid-template-columns: 34% 66%; min-height: 780px; padding: 150px clamp(20px, 6vw, 90px); background: var(--paper); }
.method-heading { align-self: start; max-width: 390px; }
.method-heading h2 { margin: 0; font-family: 'Arial Black', Manrope, sans-serif; font-size: clamp(34px, 4.4vw, 68px); line-height: 1; }
.method-heading p { max-width: 270px; margin: 24px 0; color: var(--muted); line-height: 1.6; }
.method-steps { display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: dense; gap: 0; border-top: 1px solid #9ca39d; border-left: 1px solid #9ca39d; }
.method-steps article { min-height: 220px; padding: clamp(22px, 4vw, 55px); border-right: 1px solid #9ca39d; border-bottom: 1px solid #9ca39d; transition: color .4s ease, background .4s ease; }
.method-steps article:hover { color: #fff; background: var(--ink); }
.method-steps strong { font-size: clamp(20px, 2vw, 32px); }
.method-steps p { max-width: 360px; margin: 18px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.method-steps article:hover p { color: #c9cec9; }

.truth-band { display: grid; grid-template-columns: 1.4fr .6fr; align-items: center; gap: 80px; padding: 150px clamp(20px, 6vw, 90px); color: #fff; background: var(--coral); }
.truth-copy h2 { max-width: 950px; margin: 0; font-family: 'Arial Black', Manrope, sans-serif; font-size: clamp(38px, 6vw, 92px); line-height: .95; }
.truth-copy p { max-width: 760px; margin: 28px 0 0; font-size: 15px; line-height: 1.7; }
.runtime-card { padding: 30px; border: 1px solid #fff; }
.runtime-card span { font-size: 9px; }
.runtime-card strong { display: block; margin-top: 18px; font-size: 20px; }
.runtime-card p { margin: 8px 0 0; font-size: 11px; }

footer { min-height: 170px; display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 30px; padding: 40px clamp(20px, 6vw, 90px); color: #fff; background: var(--charcoal); }
footer p { margin: 0; color: #aab1ab; font-size: 10px; }
footer button { min-height: 42px; padding: 0 18px; border: 1px solid var(--cut); color: var(--ink); background: var(--cut); font-size: 10px; font-weight: 800; }

@media (max-width: 1000px) {
  .tool-heading { align-items: start; flex-direction: column; }
  .room-grid { grid-template-columns: 190px minmax(430px, 1fr); }
  .export-zone { grid-column: 1 / -1; display: grid; grid-template-columns: 180px 1fr 180px; gap: 12px; border-top: 1px solid #3b413c; border-left: 0; }
  .export-zone .zone-title, .export-zone h2 { grid-column: 1; }
  .mode-switch, .mode-explainer { grid-column: 2; }
  .export-button, .cancel-button { grid-column: 3; }
  .process-meter { grid-column: 1 / -1; }
  .memory-warning { grid-column: 1 / 3; }
  .edge-button { grid-column: 3; }
}

@media (max-width: 720px) {
  .cutroom { padding: 10px 10px 20px; }
  .topbar { grid-template-columns: 1fr auto; }
  .privacy-line { display: none; }
  .tool-heading { gap: 8px; padding: 15px 0 12px; }
  .tool-heading h1 { max-width: 680px; font-size: 30px; }
  .tool-heading p { max-width: 100%; font-size: 10px; }
  .room-grid { display: flex; min-height: 0; flex-direction: column; }
  .source-zone { order: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; border-right: 0; border-bottom: 1px solid #3b413c; }
  .source-zone .zone-title, .source-zone h2, .source-meta, .source-note, .receipt-memory { grid-column: 1 / -1; }
  .source-zone h2 { display: none; }
  .source-meta { display: grid; grid-template-columns: 1fr 1fr; margin: 3px 0 0; }
  .source-meta div { padding: 4px 0; }
  .source-note { display: none; }
  .sample-button { margin: 0; }
  .edit-zone { order: 2; padding: 8px; }
  .preview-shell { aspect-ratio: 16 / 9; max-height: none; }
  .transport { grid-template-columns: 34px 80px 34px 1fr; padding: 7px 0; }
  .timeline { height: 64px; }
  .timecode-row { grid-template-columns: 1fr 76px 1fr; gap: 5px; }
  .timecode-control > div { grid-template-columns: 30px minmax(54px, 1fr) 30px; }
  .duration-block strong { font-size: 12px; }
  .export-zone { order: 3; display: block; padding: 12px; border-left: 0; }
  .export-zone h2 { margin: 10px 0; }
  .mode-explainer { min-height: 0; }
  .result-strip { grid-template-columns: 1fr; gap: 12px; padding: 14px; }
  .method-band { display: block; min-height: 0; padding: 95px 16px; }
  .method-steps { margin-top: 55px; grid-template-columns: 1fr; }
  .method-steps article { min-height: 150px; }
  .truth-band { grid-template-columns: 1fr; gap: 55px; padding: 95px 16px; }
  footer { grid-template-columns: 1fr; padding: 45px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
