/* =========================================================
   LuvMacro — design tokens and shared parts
   ---------------------------------------------------------
   Taken from the desktop app (luvrrmacro DESIGN.md), not from rowen.work:
   true neutrals, one blue (play), one red (record), cyan only for
   keyboard focus, system fonts, and straight 45-degree cut corners in
   place of rounded rectangles. Used by the public page and the admin;
   nothing here reads the rest of the site's stylesheets, and nothing
   here is loaded by them.
   ========================================================= */
:root {
  color-scheme: dark;

  --band: #000000;
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --surface-hi: #242424;
  --border: #2e2e2e;
  --text: #ffffff;
  --muted: #a8a8a8;
  --faint: #5c5c5c;

  --blue: #1f5bff;
  --blue-hi: #1a4fe0;
  --blue-press: #1642c2;
  --red: #e5352b;
  --dot: #ff0000;
  --cyan: #22d3ee;
  --amber: #f2b441;
  --green: #4cc38a;

  --cut: 8px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "SF Pro Text", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", ui-monospace, SFMono-Regular, Consolas, Menlo, monospace;

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --ease: 120ms ease-out;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: 12px; top: -64px; z-index: 100;
  padding: 10px 16px; background: var(--text); color: #000; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---- the cut-corner material -------------------------------------
   Top-left and bottom-right corners cut at 45 degrees, like the app's
   controls. The 1px border is the element's own background showing
   around an inset ::before, so the diagonal edges keep a border too.
   (clip-path would clip an outline, so focus is drawn as the edge.) */
.cut {
  --c: var(--cut);
  --edge: var(--border);
  --fill: var(--surface);
  --inset: 1px;
  position: relative;
  isolation: isolate;
  background: var(--edge);
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}
.cut::before {
  content: "";
  position: absolute;
  inset: var(--inset);
  z-index: -1;
  background: var(--fill);
  clip-path: polygon(calc(var(--c) - 0.6px) 0, 100% 0, 100% calc(100% - var(--c) + 0.6px), calc(100% - var(--c) + 0.6px) 100%, 0 100%, 0 calc(var(--c) - 0.6px));
  transition: background-color var(--ease);
}

/* ---- buttons ---------------------------------------------------- */
.btn {
  --c: 8px;
  --edge: var(--blue);
  --fill: var(--blue);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px;
  border: 0; background-color: var(--edge);
  color: #fff; font-weight: 600; font-size: 15px; line-height: 1; letter-spacing: 0.005em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  position: relative; isolation: isolate;
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
  transition: background-color var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn::before {
  content: ""; position: absolute; inset: var(--inset, 1px); z-index: -1; background: var(--fill);
  clip-path: polygon(calc(var(--c) - 0.6px) 0, 100% 0, 100% calc(100% - var(--c) + 0.6px), calc(100% - var(--c) + 0.6px) 100%, 0 100%, 0 calc(var(--c) - 0.6px));
  transition: background-color var(--ease);
}
.btn .ico { width: 20px; height: 20px; flex: none; }
.btn--primary:hover { --edge: var(--blue-hi); --fill: var(--blue-hi); }
.btn--primary:active { --edge: var(--blue-press); --fill: var(--blue-press); }
.btn--ghost { --edge: var(--border); --fill: var(--surface); }
.btn--ghost:hover { --edge: #454545; --fill: var(--surface-hi); }
.btn--ghost:active { --fill: #2d2d2d; }
.btn--danger { --edge: var(--red); --fill: #3a1512; color: #fff; }
.btn--danger:hover { --fill: #4d1a16; }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 14px; --c: 6px; }
.btn--lg { min-height: 56px; padding: 0 30px; font-size: 16px; }
.btn--block { display: flex; width: 100%; }
.btn:focus-visible { outline: none; --edge: var(--cyan); --inset: 2px; }
.btn[disabled], .btn[aria-disabled="true"] { --edge: var(--border); --fill: #151515; color: var(--faint); cursor: not-allowed; }
.btn.is-busy { cursor: progress; }

a:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}
.btn:focus-visible { outline: none; }

::selection { background: var(--blue); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
@media (forced-colors: active) {
  .cut, .btn { clip-path: none; border: 1px solid CanvasText; background: Canvas; }
  .cut::before, .btn::before { display: none; }
  .btn:focus-visible { outline: 2px solid Highlight; }
}
