/* ==========================================================================
   rbxcloud — file console
   Dark, type-driven, yellow primary + magenta accent. Strict grid, no mascots.
   ========================================================================== */

:root {
  --bg:           #0b0b0e;
  --bg-elev:      #14141b;
  --bg-elev-2:    #1c1c25;
  --bg-input:     #0f0f15;

  --line:         #232330;
  --line-2:       #34343f;

  --text:         #ffffff;
  --text-dim:     #a3a3b3;
  --text-mute:    #5d5d6d;

  --acc:       #ABCDEF;
  --acc-2:     #c5dcf5;
  --acc-deep:  #7fa6cf;
  --acc-soft:  rgba(171, 205, 239, 0.13);
  --acc-line:  rgba(171, 205, 239, 0.35);

  --pink:         #ff3e7f;
  --pink-soft:    rgba(255, 62, 127, 0.15);
  --ok:           #3ade8a;
  --warn:         #ff9a3a;
  --bad:          #ff4d4d;

  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-pill: 999px;

  --bar-h: 64px;
  --shell: 1240px;

  --sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
  /* subtle vignette only — no animated blobs */
  background-image:
    radial-gradient(80% 60% at 100% 0%, rgba(171, 205, 239, .05), transparent 60%),
    radial-gradient(70% 50% at 0% 100%, rgba(255, 62, 127, .04), transparent 60%);
  background-attachment: fixed;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }

::selection { background: var(--acc); color: var(--bg); }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

.skip {
  position: absolute;
  top: -200px; left: 16px;
  padding: 10px 16px;
  background: var(--acc);
  color: var(--bg);
  font-weight: 700;
  border-radius: var(--r-sm);
  z-index: 100;
}
.skip:focus-visible { top: 16px; }

.mark-acc { color: var(--acc); }

/* ==========================================================================
   Masthead
   ========================================================================== */

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 11, 14, 0.88);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.masthead__row {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--bar-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  flex-shrink: 0;
}

.brand__glyph { display: grid; place-items: center; }

.brand__type {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  line-height: 1;
}

.brand__word {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.brand__word em { font-style: normal; color: var(--acc); }

.brand__tag {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 3px 6px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
}

/* pill nav */
.pills {
  display: flex;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--bg-elev);
  flex-shrink: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.pills::-webkit-scrollbar { display: none; }

.pill {
  padding: 7px 14px;
  border-radius: var(--r-pill);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-dim);
  white-space: nowrap;
  transition: color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}
.pill:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.pill.is-active {
  background: var(--bg);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--acc-line);
}

.bar-side {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

/* live read-out — no pill, just inline numerics with a pulsing dot */
.liveread {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
  padding-right: 14px;
  border-right: 1px solid var(--line);
  margin-right: 4px;
}

.liveread__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ok);
  align-self: center;
  animation: pulse 2s ease-in-out infinite;
}

.liveread__n {
  font-weight: 700;
  color: var(--text);
  font-size: 13px;
  letter-spacing: 0;
}

.liveread__lbl {
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 10.5px;
  font-weight: 500;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.discord {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: var(--bg-elev-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  transition: border-color 140ms, background 140ms;
}
.discord:hover { border-color: var(--acc); background: var(--bg-elev); }
.discord svg { color: var(--text-dim); }

.burger {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.burger span {
  display: block;
  width: 16px; height: 2px;
  background: var(--text);
  transition: transform 180ms ease, opacity 180ms ease;
  border-radius: 2px;
}

/* ==========================================================================
   Stage / pages
   ========================================================================== */

.stage {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 56px 24px 64px;
}

.page { display: none; }
.page.is-active { display: block; }

/* ==========================================================================
   Hero (dashboard)
   ========================================================================== */

.hero {
  padding: 24px 0 56px;
  position: relative;
}

/* hello — single human-toned line above the headline */
.hello {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text-dim);
  padding: 14px 0;
  margin-bottom: 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  letter-spacing: -0.005em;
  max-width: 60ch;
}
.hello [data-stat] {
  color: var(--text);
  font-weight: 600;
}
.hello [data-stat="live"] {
  color: var(--acc);
  font-weight: 700;
}
.hello [data-stat="timestamp"],
.hello [data-stat="day-full"] {
  font-variant-numeric: tabular-nums;
}

.hero__h {
  font-weight: 800;
  font-size: clamp(44px, 6.4vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  color: var(--text);
  margin: 0 0 24px;
  max-width: 18ch;
}

.hero__h-line {
  display: inline-block;
}

.hero__sub {
  font-size: clamp(16px, 1.4vw, 18px);
  color: var(--text-dim);
  max-width: 56ch;
  margin: 0 0 32px;
  line-height: 1.6;
}

.hero__cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: background 140ms ease, transform 100ms ease, border-color 140ms ease, color 140ms ease;
  position: relative;
}

.btn--acc {
  background: var(--acc);
  color: var(--bg);
  border-color: var(--acc-deep);
  box-shadow: 0 6px 0 var(--acc-deep), 0 12px 28px rgba(171, 205, 239, .18);
}
.btn--acc:hover {
  background: var(--acc-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 0 var(--acc-deep), 0 16px 36px rgba(171, 205, 239, .25);
}
.btn--acc:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--acc-deep), 0 4px 10px rgba(171, 205, 239, .15);
}
.btn--acc[disabled] {
  background: var(--bg-elev-2);
  color: var(--text-mute);
  border-color: var(--line);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-2);
}
.btn--ghost:hover { border-color: var(--acc); color: var(--acc); background: var(--acc-soft); }

.btn--lg {
  padding: 16px 28px;
  font-size: 16px;
  border-radius: var(--r-md);
}

.btn--block { width: 100%; }

.btn__arrow {
  display: inline-block;
  font-size: 1.05em;
  transform: translateX(0);
  transition: transform 140ms ease;
}
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn--acc .btn__arrow { font-weight: 800; }

/* ==========================================================================
   Stat strip
   ========================================================================== */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-elev);
  overflow: hidden;
}

.stat {
  padding: 20px 24px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat:last-child { border-right: 0; }

.stat__v {
  font-weight: 800;
  font-size: clamp(28px, 3.6vw, 38px);
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--text);
}
.stat__v em { font-style: normal; color: var(--acc); font-size: 0.62em; margin-left: 2px; }

.stat__k {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin: 72px 0 24px;
  flex-wrap: wrap;
}

.section-head h2 {
  font-weight: 800;
  font-size: clamp(28px, 3vw, 36px);
  letter-spacing: -0.025em;
  line-height: 1.1;
}

/* ==========================================================================
   Modules grid
   ========================================================================== */

.modules {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* module = operation slip: left strip with rotated number + right body */
.mod {
  position: relative;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 0;
  min-height: 196px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-elev);
  overflow: hidden;
  isolation: isolate;
  transition: transform 320ms cubic-bezier(.22, .61, .36, 1),
              border-color 220ms ease,
              box-shadow 320ms ease;
}

/* perforated-look strip — dots drawn as background so they don't get clipped */
.mod__strip {
  position: relative;
  background-color: var(--bg-elev-2);
  background-image:
    radial-gradient(circle at 50% 0%, var(--bg) 0 3px, transparent 3.5px),
    radial-gradient(circle at 50% 100%, var(--bg) 0 3px, transparent 3.5px);
  background-repeat: no-repeat;
  border-right: 1.5px dashed var(--line-2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 0;
  transition: background-color 280ms ease, border-color 280ms ease;
}

/* large rotated number — graphic element, not just a label */
.mod__num {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 800;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--acc);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  transition: color 280ms ease, transform 320ms cubic-bezier(.22, .61, .36, 1);
}

/* body */
.mod__body {
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

.mod__title {
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.015em;
  line-height: 1.15;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.mod__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-mute);
  width: 28px; height: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  transition: color 240ms ease, transform 320ms cubic-bezier(.22, .61, .36, 1),
              border-color 240ms ease, background 240ms ease;
  flex-shrink: 0;
}

.mod__desc {
  color: var(--text-dim);
  font-size: 13.5px;
  line-height: 1.55;
  flex: 1;
}

.mod__cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-mute);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 4px;
  transition: color 220ms ease;
}
.mod__cta i {
  font-style: normal;
  color: var(--acc);
  font-size: 14px;
  transition: transform 280ms cubic-bezier(.22, .61, .36, 1);
  display: inline-block;
}

/* ---- hover state: card tilts, strip turns yellow, arrow snaps to corner ---- */
.mod:hover {
  border-color: var(--acc-line);
  transform: translateY(-4px) rotate(-0.4deg);
  z-index: 2;
  box-shadow:
    8px 12px 0 -3px rgba(171, 205, 239, 0.18),
    0 18px 36px rgba(0, 0, 0, 0.4);
}

.mod:hover .mod__strip {
  background: var(--acc);
  border-right-color: var(--acc-deep);
}

.mod:hover .mod__num {
  color: var(--bg);
  transform: rotate(180deg) translateY(-3px);
}

.mod:hover .mod__arrow {
  color: var(--bg);
  background: var(--acc);
  border-color: var(--acc-deep);
  transform: translate(4px, -4px) rotate(8deg);
}

.mod:hover .mod__cta { color: var(--text); }
.mod:hover .mod__cta i { transform: translateX(6px) translateY(3px); }

/* ==========================================================================
   How-it-works
   ========================================================================== */

.how {
  margin-top: 72px;
  padding: 40px 32px 36px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-elev);
  position: relative;
}

.how__head {
  margin-bottom: 28px;
}
.how__head h2 {
  font-weight: 800;
  font-size: clamp(26px, 2.6vw, 32px);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.how__head p {
  color: var(--text-dim);
  font-size: 15px;
}

.how__steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.how__steps li {
  padding-top: 22px;
  border-top: 2px solid var(--line-2);
  position: relative;
}
.how__steps li::before {
  content: '';
  position: absolute;
  top: -2px; left: 0;
  width: 48px; height: 2px;
  background: var(--acc);
}

.how__n {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--acc);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.how__steps h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.how__steps p {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.55;
}

/* ==========================================================================
   Kicker (final CTA)
   ========================================================================== */

.kicker {
  margin-top: 72px;
  padding: 40px 36px;
  border-radius: var(--r-lg);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
}
.kicker h2 {
  font-weight: 800;
  font-size: clamp(26px, 2.6vw, 32px);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  line-height: 1.1;
}
.kicker p { color: var(--text-dim); font-size: 15px; }

/* ==========================================================================
   Tool frame (each tool page)
   ========================================================================== */

.toolframe {
  position: relative;
  max-width: 720px;
  margin: 16px auto 0;
  padding: 32px 0 0;
}

.toolframe::before {
  content: attr(data-num);
  position: absolute;
  top: -20px;
  right: -12px;
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(140px, 22vw, 280px);
  line-height: 0.85;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--line-2);
  text-stroke: 1.5px var(--line-2);
  pointer-events: none;
  user-select: none;
  z-index: 0;
  letter-spacing: -0.05em;
}

.toolframe > * { position: relative; z-index: 1; }

/* breadcrumb trail — back arrow chip + path + position index */
.trail {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  flex-wrap: wrap;
}

.trail__back {
  display: inline-grid;
  place-items: center;
  width: 34px; height: 34px;
  border: 1px solid var(--line-2);
  border-bottom-width: 3px;
  border-radius: var(--r-sm);
  background: var(--bg-elev);
  color: var(--acc);
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}
.trail__back:hover {
  border-color: var(--acc);
  background: var(--acc-soft);
  transform: translateX(-2px);
}
.trail__back:active { transform: translateY(2px); }

.trail__arrow { transition: transform 160ms ease; }
.trail__back:hover .trail__arrow { transform: translateX(-1px); }

.trail__crumb {
  font-size: 12.5px;
  font-weight: 500;
}
.trail__crumb--link {
  color: var(--text-dim);
  border-bottom: 1px dashed var(--line-2);
  padding-bottom: 1px;
  transition: color 140ms ease, border-color 140ms ease;
}
.trail__crumb--link:hover { color: var(--acc); border-bottom-color: var(--acc); }

.trail__crumb--here {
  color: var(--text);
  font-weight: 600;
}

.trail__sep {
  color: var(--text-mute);
}

.trail__index {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 0.16em;
  padding: 4px 0 4px 14px;
  border-left: 1px solid var(--line);
}

.toolframe__h {
  font-weight: 800;
  font-size: clamp(48px, 6vw, 76px);
  line-height: 1;
  letter-spacing: -0.035em;
  margin-bottom: 18px;
}
.toolframe__h em {
  font-style: normal;
  color: var(--acc);
}

.toolframe__sub {
  font-size: 17px;
  color: var(--text-dim);
  line-height: 1.55;
  max-width: 56ch;
  margin-bottom: 36px;
}

/* ==========================================================================
   Slot (the form: single input + button)
   ========================================================================== */

.slot {
  padding: 22px 22px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-elev);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.slot__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.slot__label { color: var(--acc); font-weight: 600; }
.slot__hint  { color: var(--text-mute); }

.slot__input {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 18px 18px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-md);
  background: var(--bg-input);
  cursor: text;
  transition: border-color 140ms ease, background 140ms ease;
}
.slot__input:hover { border-color: var(--line-2); background: #111118; }
.slot__input:focus-within {
  border-color: var(--acc);
  background: #131319;
  border-style: solid;
  box-shadow: 0 0 0 4px var(--acc-soft);
}

.slot__caret {
  color: var(--acc);
  font-size: 12px;
  font-family: var(--mono);
}

.slot__input input {
  width: 100%;
  background: transparent;
  border: 0;
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: -0.005em;
  padding: 4px 0;
  outline: none;
}
.slot__input input::placeholder { color: var(--text-mute); }

/* readout */
.readout {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  align-self: flex-start;
}
.readout__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-mute);
}
.readout.is-running .readout__dot { background: var(--acc); animation: pulse 0.9s ease-in-out infinite; }
.readout.is-running .readout__txt { color: var(--acc); }
.readout.is-ok      .readout__dot { background: var(--ok); }
.readout.is-ok      .readout__txt { color: var(--ok); }
.readout.is-fail    .readout__dot { background: var(--bad); }
.readout.is-fail    .readout__txt { color: var(--bad); }

/* ==========================================================================
   Footer
   ========================================================================== */

.footbar {
  border-top: 1px solid var(--line);
  margin-top: 72px;
  padding: 28px 0 36px;
}

.footbar__row {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

.brand--sm .brand__word { font-size: 15px; }

.footbar__nav { display: flex; gap: 14px; flex-wrap: wrap; }
.footbar__nav a {
  font-size: 13px;
  color: var(--text-dim);
}
.footbar__nav a:hover { color: var(--acc); }

/* ==========================================================================
   Toast
   ========================================================================== */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  padding: 11px 18px;
  background: var(--text);
  color: var(--bg);
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 13.5px;
  z-index: 80;
  opacity: 0;
  transition: opacity 200ms ease, transform 200ms ease;
  box-shadow: 0 14px 32px rgba(0, 0, 0, .5);
}
.toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--acc);
}
.toast.is-ok   { background: var(--ok); }
.toast.is-ok   .toast__dot { background: var(--bg); }
.toast.is-fail { background: var(--bad); color: var(--text); }
.toast.is-fail .toast__dot { background: var(--text); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
  .masthead__row { gap: 12px; padding: 0 20px; }
  .pills { display: none; }
  .bar-side { display: none; }
  .burger { display: flex; }

  .masthead.is-open .pills {
    display: flex;
    position: absolute;
    top: var(--bar-h);
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(11, 11, 14, 0.97);
    border: 0;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
    padding: 12px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
  }
  .masthead.is-open .pill {
    padding: 12px 16px;
    border-radius: var(--r-sm);
    text-align: left;
    justify-content: flex-start;
  }
  .masthead.is-open .pill.is-active {
    background: var(--acc-soft);
    box-shadow: inset 3px 0 0 var(--acc);
  }

  .masthead.is-open .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .masthead.is-open .burger span:nth-child(2) { opacity: 0; }
  .masthead.is-open .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  .stat-strip { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--line); }

  .modules    { grid-template-columns: repeat(2, 1fr); }
  .how__steps { grid-template-columns: 1fr; gap: 18px; }
  .kicker     { grid-template-columns: 1fr; gap: 18px; }
}

@media (max-width: 640px) {
  .stage { padding: 36px 18px 48px; }
  .masthead__row { padding: 0 16px; }

  .brand__tag { display: none; }

  .hero { padding: 8px 0 36px; }
  .hero__cta .btn { flex: 1 1 auto; }

  .stat-strip { grid-template-columns: 1fr; }
  .stat { border-right: 0 !important; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: 0; }

  .modules { grid-template-columns: 1fr; }
  .how, .kicker { padding: 26px 22px; }
  .kicker .btn { width: 100%; }

  .toolframe { margin-top: 4px; }
  .toolframe::before { font-size: clamp(110px, 28vw, 180px); right: -8px; top: -10px; }
  .toolframe__h { font-size: clamp(40px, 9vw, 56px); }

  .footbar__row { flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* ==========================================================================
   Screen-reader only
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   File printer · operation slip (loading popup)
   A dark dot-matrix receipt that feeds out, prints its log line-by-line,
   gets an ink stamp, then tears off. Built from the site's own ticket DNA.
   ========================================================================== */

.printer {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
}
.printer[hidden] { display: none; }

.printer__scrim {
  position: absolute;
  inset: 0;
  background: rgba(7, 7, 10, 0.74);
  -webkit-backdrop-filter: blur(4px) saturate(120%);
  backdrop-filter: blur(4px) saturate(120%);
  opacity: 0;
  transition: opacity 280ms ease;
}
.printer.is-open .printer__scrim { opacity: 1; }
.printer.is-tearing .printer__scrim { opacity: 0; }

/* ---- the slip ---- */
.slip {
  --scallop: 9px;          /* notch radius for torn edges */
  --period: 18px;          /* notch spacing             */
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  padding: 22px 26px 18px;
  font-family: var(--mono);
  color: var(--text);

  /* paper = elevated console surface + faint thermal scanlines + edge punch-holes */
  background-color: var(--bg-elev-2);
  background-image:
    radial-gradient(circle 2.5px at 12px 11px, rgba(0, 0, 0, 0.55) 0 2.5px, transparent 3px),
    radial-gradient(circle 2.5px at calc(100% - 12px) 11px, rgba(0, 0, 0, 0.55) 0 2.5px, transparent 3px),
    repeating-linear-gradient(0deg, transparent 0 5px, rgba(255, 255, 255, 0.018) 5px 6px);
  background-repeat: repeat-y, repeat-y, repeat;
  background-size: 100% 22px, 100% 22px, 100% auto;

  /* scalloped (torn) top + bottom edges via mask; drop-shadow follows the mask shape */
  -webkit-mask:
    radial-gradient(var(--scallop) at 50% 0,   transparent 96%, #000) 0 0    / var(--period) 51% repeat-x,
    radial-gradient(var(--scallop) at 50% 100%, transparent 96%, #000) 0 100% / var(--period) 51% repeat-x;
          mask:
    radial-gradient(var(--scallop) at 50% 0,   transparent 96%, #000) 0 0    / var(--period) 51% repeat-x,
    radial-gradient(var(--scallop) at 50% 100%, transparent 96%, #000) 0 100% / var(--period) 51% repeat-x;
  filter: drop-shadow(0 28px 56px rgba(0, 0, 0, 0.6));

  opacity: 0;
  transform: translateY(-16px);
}

.printer.is-open .slip {
  animation: slip-feed 460ms steps(9, end) forwards;
}
@keyframes slip-feed {
  from { opacity: 0; transform: translateY(-16px); clip-path: inset(0 0 100% 0); }
  to   { opacity: 1; transform: translateY(0);     clip-path: inset(0 0 0 0);   }
}

.printer.is-tearing .slip {
  animation: slip-tear 520ms cubic-bezier(.5, 0, .75, 0) forwards;
}
@keyframes slip-tear {
  from { opacity: 1; transform: translateY(0) rotate(0); }
  to   { opacity: 0; transform: translateY(92vh) rotate(2deg); }
}

/* ---- header ---- */
.slip__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.slip__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.slip__brand em { font-style: normal; color: var(--acc); }
.slip__opno {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--text-mute);
  border: 1px solid var(--line-2);
  border-radius: 4px;
  padding: 3px 7px;
}

.slip__op {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.02em;
  line-height: 1.1;
  text-transform: uppercase;
  margin-bottom: 14px;
}

/* ---- dashed rules / perforation ---- */
.slip__rule {
  border-top: 1.5px dashed var(--line-2);
  margin: 12px 0;
}
.slip__rule--tear {
  position: relative;
  margin: 14px 0 10px;
}
.slip__scissors {
  position: absolute;
  left: 6px;
  top: -10px;
  background: var(--bg-elev-2);
  padding: 0 5px;
  color: var(--text-mute);
  font-size: 13px;
  line-height: 1;
}

/* ---- meta rows ---- */
.slip__meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
}
.slip__metarow {
  display: flex;
  gap: 10px;
}
.slip__metarow dt {
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  width: 44px;
  flex: none;
}
.slip__metarow dd { color: var(--text-dim); letter-spacing: 0.04em; }

/* ---- printed log ---- */
.slip__log {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 24px;
}
.slip__logline {
  display: flex;
  align-items: flex-end;
  font-size: 12.5px;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: var(--text-dim);
  animation: line-in 150ms steps(3, end) both;
}
@keyframes line-in {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}
.slip__ts {
  flex: none;
  color: var(--text-mute);
  margin-right: 9px;
  font-variant-numeric: tabular-nums;
}
.slip__txt {
  flex: 0 0 auto;
  white-space: nowrap;
  color: var(--acc);
}
.slip__logline.is-printing .slip__txt::after {
  content: '▌';
  margin-left: 1px;
  color: var(--acc);
  animation: caret 720ms steps(1, end) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

.slip__dots {
  flex: 1 1 auto;
  min-width: 10px;
  align-self: flex-end;
  height: 0.85em;
  margin: 0 8px 2px;
  border-bottom: 1.5px dotted var(--line-2);
}
.slip__ok {
  flex: none;
  font-weight: 600;
  color: var(--ok);
  opacity: 0;
  transform: scale(0.4);
  transform-origin: center;
}
.slip__ok--err {
  color: var(--bad);
}
.slip__logline.is-done .slip__ok {
  animation: ok-pop 240ms cubic-bezier(.2, 1.5, .4, 1) forwards;
}
@keyframes ok-pop {
  to { opacity: 1; transform: scale(1); }
}

/* per-line "working" spinner (frames driven by JS so it survives reduced motion) */
.slip__spin {
  flex: none;
  width: 1ch;
  text-align: center;
  color: var(--acc);
  font-weight: 600;
}
.slip__logline.is-done .slip__spin { visibility: hidden; }

/* ---- foot + quiet completion mark (no loud stamp) ---- */
.slip__foot {
  display: grid;
  place-items: center;
  min-height: 28px;
}
.slip__stamp {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--text-mute);
  opacity: 0;
}
.slip__stamp::before {
  content: '✓';
  margin-right: 8px;
  color: var(--ok);
  font-weight: 700;
}
.slip.is-stamped .slip__stamp {
  animation: finish-in 320ms ease forwards;
}
.slip.is-stamped--fail .slip__stamp {
  animation: finish-in 320ms ease forwards;
  color: var(--bad);
}
.slip.is-stamped--fail .slip__stamp::before {
  content: '✗';
  color: var(--bad);
}
@keyframes finish-in {
  from { opacity: 0; transform: translateY(3px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  .slip { width: 100%; padding: 20px 20px 16px; }
  .slip__txt { white-space: normal; }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

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

/* The file-printer popup is an explicitly-requested loading animation — keep it
   alive even when the OS asks to reduce motion (Windows Server reports "reduce"
   by default). Scoped to the popup only; the rest of the site still obeys the
   preference above. Higher specificity than the `*` rule, so these win. */
@media (prefers-reduced-motion: reduce) {
  .printer.is-open .slip    { animation-duration: 460ms !important; }
  .printer.is-tearing .slip { animation-duration: 520ms !important; }
  .printer__scrim           { transition-duration: 280ms !important; }
  .slip__logline            { animation-duration: 150ms !important; }
  .slip__logline.is-printing .slip__txt::after {
    animation-duration: 720ms !important;
    animation-iteration-count: infinite !important;
  }
  .slip__logline.is-done .slip__ok { animation-duration: 240ms !important; }
  .slip.is-stamped .slip__stamp,
  .slip.is-stamped--fail .slip__stamp { animation-duration: 320ms !important; }
}
