/* =====================================================================
   tools.url2.at — studio edition
   Layout: quiet hero → one live stage (product switcher, browser window,
           info column) → catalogue list → API code panel → about → footer.
   ===================================================================== */

:root {
  /* Ground and ink: cool neutrals with a slight blue bias toward the url2.at accent */
  --bg: #F6F7F9;
  --nav-bg: rgba(246, 247, 249, 0.86);
  --surface: #FFFFFF;
  --surface-2: #F0F2F5;
  --surface-3: #E5E8ED;
  --ink: #121418;
  --ink-2: #3B414B;
  --muted: #5E6571;
  --line: #E2E5EA;
  --line-strong: #CCD1D9;

  /* One accent: the url2.at blue */
  --accent: #0A55F5;
  --accent-soft: rgba(10, 85, 245, 0.09);
  --accent-ring: rgba(10, 85, 245, 0.28);
  --btn-bg: #121418;
  --btn-fg: #FFFFFF;
  --btn-hover: #2B3038;

  /* Tool colours, taken from each logo; used only as small markers */
  --t-words: #7C5CF0;
  --t-url: #0A55F5;
  --t-cursor: #1B2D45;
  --t-notes: #F5A524;

  /* Semantic */
  --ok: #0F9D63;
  --warn: #D98A0B;
  --crit: #D64545;
  --crit-text: #B42318;
  --easy-bg: #E2F5EB;
  --easy-fg: #0B7448;
  --med-bg: #FFF1D4;
  --med-fg: #855600;
  --hard-bg: #FDE3E3;
  --hard-fg: #B42318;
  --dot-easy: #22B07D;
  --dot-med: #F5A524;
  --dot-hard: #EF5B5B;
  --light-r: #FF5F57;
  --light-y: #FEBC2E;
  --light-g: #28C840;

  /* Chart swatches */
  --c-auto: #7C5CF0;
  --c-m1: #3B82F6;
  --c-m2: #10B981;
  --c-m3: #F59E0B;

  /* Code stays dark in both themes */
  --code-bg: #0F1115;
  --code-fg: #E6E8EC;
  --code-dim: #8B93A0;
  --code-line: #252A33;
  --code-hover: #1B1F27;
  --syn-kw: #FF9E64;
  --syn-fn: #7AA2F7;
  --syn-str: #9ECE6A;
  --syn-num: #F7768E;

  /* Depth */
  --shadow-sm: 0 1px 2px rgba(16, 20, 28, 0.06);
  --shadow-md: 0 1px 2px rgba(16, 20, 28, 0.05), 0 10px 24px -10px rgba(16, 20, 28, 0.22);
  --shadow-lg: 0 1px 1px rgba(16, 20, 28, 0.04), 0 18px 40px -18px rgba(16, 20, 28, 0.22), 0 50px 100px -50px rgba(16, 20, 28, 0.3);

  /* Type */
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* Shape */
  --r-xs: 6px;
  --r-sm: 8px;
  --r: 10px;
  --r-lg: 14px;
  --r-xl: 18px;
  --wrap: 1200px;

  /* url2.at card (follows the theme, like url2.at itself) */
  --u2-bg: linear-gradient(180deg, #F8FAFC 0%, #E2E8F0 50%, #CBD5E1 100%);
  --u2-text: #0F172A;
  --u2-text-2: #475569;
  --u2-card-bg: rgba(255, 255, 255, 0.98);
  --u2-card-border: rgba(148, 163, 184, 0.5);
  --u2-input-bg: rgba(255, 255, 255, 0.95);
  --u2-input-border: rgba(100, 116, 139, 0.5);
  --u2-shadow: rgba(15, 23, 42, 0.15);
  --u2-result-bg: linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(79, 70, 229, 0.04) 100%);
  --u2-result-border: rgba(99, 102, 241, 0.4);
  --u2-result-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
  --u2-error: #B42318;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C0E11;
    --nav-bg: rgba(12, 14, 17, 0.84);
    --surface: #15181D;
    --surface-2: #1B1F25;
    --surface-3: #262B32;
    --ink: #ECEEF2;
    --ink-2: #C4C9D1;
    --muted: #9AA1AC;
    --line: #262B32;
    --line-strong: #363C46;
    --accent: #6E9BFF;
    --accent-soft: rgba(110, 155, 255, 0.13);
    --accent-ring: rgba(110, 155, 255, 0.36);
    --btn-bg: #ECEEF2;
    --btn-fg: #0C0E11;
    --btn-hover: #FFFFFF;
    --t-cursor: #8FA6C8;
    --ok: #34C38F;
    --warn: #F2B544;
    --crit: #F06A6A;
    --crit-text: #FF9C9C;
    --easy-bg: rgba(52, 195, 143, 0.14);
    --easy-fg: #4FD1A1;
    --med-bg: rgba(245, 165, 36, 0.15);
    --med-fg: #F7B955;
    --hard-bg: rgba(240, 106, 106, 0.15);
    --hard-fg: #FF9C9C;
    --code-bg: #090B0E;
    --code-line: #1E222A;
    --code-hover: #161A21;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45);
    --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 28px -10px rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 0 0 1px rgba(255, 255, 255, 0.02), 0 24px 60px -20px rgba(0, 0, 0, 0.75);
    --u2-bg: radial-gradient(circle at top, #1F2937 0%, #020617 45%, #020617 100%);
    --u2-text: #E5E7EB;
    --u2-text-2: #9CA3AF;
    --u2-card-bg: rgba(15, 23, 42, 0.98);
    --u2-card-border: rgba(148, 163, 184, 0.35);
    --u2-input-bg: rgba(15, 23, 42, 0.95);
    --u2-input-border: rgba(148, 163, 184, 0.5);
    --u2-shadow: rgba(15, 23, 42, 0.9);
    --u2-result-bg: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(79, 70, 229, 0.05) 100%);
    --u2-result-border: rgba(99, 102, 241, 0.35);
    --u2-result-shadow: 0 4px 24px rgba(15, 23, 42, 0.4);
    --u2-error: #FF9C9C;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0C0E11;
  --nav-bg: rgba(12, 14, 17, 0.84);
  --surface: #15181D;
  --surface-2: #1B1F25;
  --surface-3: #262B32;
  --ink: #ECEEF2;
  --ink-2: #C4C9D1;
  --muted: #9AA1AC;
  --line: #262B32;
  --line-strong: #363C46;
  --accent: #6E9BFF;
  --accent-soft: rgba(110, 155, 255, 0.13);
  --accent-ring: rgba(110, 155, 255, 0.36);
  --btn-bg: #ECEEF2;
  --btn-fg: #0C0E11;
  --btn-hover: #FFFFFF;
  --t-cursor: #8FA6C8;
  --ok: #34C38F;
  --warn: #F2B544;
  --crit: #F06A6A;
  --crit-text: #FF9C9C;
  --easy-bg: rgba(52, 195, 143, 0.14);
  --easy-fg: #4FD1A1;
  --med-bg: rgba(245, 165, 36, 0.15);
  --med-fg: #F7B955;
  --hard-bg: rgba(240, 106, 106, 0.15);
  --hard-fg: #FF9C9C;
  --code-bg: #090B0E;
  --code-line: #1E222A;
  --code-hover: #161A21;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 28px -10px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 0 0 1px rgba(255, 255, 255, 0.02), 0 24px 60px -20px rgba(0, 0, 0, 0.75);
  --u2-bg: radial-gradient(circle at top, #1F2937 0%, #020617 45%, #020617 100%);
  --u2-text: #E5E7EB;
  --u2-text-2: #9CA3AF;
  --u2-card-bg: rgba(15, 23, 42, 0.98);
  --u2-card-border: rgba(148, 163, 184, 0.35);
  --u2-input-bg: rgba(15, 23, 42, 0.95);
  --u2-input-border: rgba(148, 163, 184, 0.5);
  --u2-shadow: rgba(15, 23, 42, 0.9);
  --u2-result-bg: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(79, 70, 229, 0.05) 100%);
  --u2-result-border: rgba(99, 102, 241, 0.35);
  --u2-result-shadow: 0 4px 24px rgba(15, 23, 42, 0.4);
  --u2-error: #FF9C9C;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 60;
  background: var(--bg);
}
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font-family: inherit; }
code, pre, .mono { font-family: var(--mono); }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.vh {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: .6rem 1rem; border-radius: var(--r);
  background: var(--btn-bg); color: var(--btn-fg); font-weight: 500; text-decoration: none;
}
.skip:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 720px) {
  .wrap {
    padding-left: max(32px, env(safe-area-inset-left, 0px));
    padding-right: max(32px, env(safe-area-inset-right, 0px));
  }
}

/* ---------- Type ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin: 0 0 1rem;
  font-family: var(--mono);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.375rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.section-head__sub { margin: .75rem 0 0; max-width: 38em; font-size: 1.0625rem; color: var(--muted); }
.label {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 .4rem;
  font-family: var(--mono);
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}
.domain {
  font-family: var(--mono);
  font-size: .8125rem;
  color: var(--ink-2);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.domain span { color: var(--muted); }
.domain:hover { color: var(--accent); }
.domain:hover span { color: inherit; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 44px;
  padding: 0 1.1rem;
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.005em;
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--r);
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn svg { flex-shrink: 0; }
.btn--primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn--primary:hover { background: var(--btn-hover); }
.btn--secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn--secondary:hover { background: var(--surface-2); }
.btn--sm { min-height: 36px; padding: 0 .8rem; font-size: .875rem; border-radius: var(--r-sm); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  cursor: pointer;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn--sm { width: 34px; height: 34px; border-radius: var(--r-sm); }
#theme-toggle .i-theme-sun { display: none; }
#theme-toggle[data-mode="dark"] .i-theme-sun { display: block; }
#theme-toggle[data-mode="dark"] .i-theme-moon { display: none; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; gap: 1.5rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; }
.brand__mark { display: grid; grid-template-columns: repeat(2, 8px); gap: 2px; }
.brand__mark i { display: block; width: 8px; height: 8px; border-radius: 2px; background: var(--t-words); }
.brand__mark i:nth-child(2) { background: var(--t-url); }
.brand__mark i:nth-child(3) { background: var(--t-cursor); }
.brand__mark i:nth-child(4) { background: var(--t-notes); }
.brand__name { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.02em; }
.brand__name span { color: var(--muted); font-weight: 500; }
.nav__links { display: flex; gap: .25rem; margin-left: auto; }
.nav__links a {
  padding: .45rem .75rem;
  font-size: .9375rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border-radius: var(--r-sm);
  transition: color .15s ease, background-color .15s ease;
}
.nav__links a:hover { color: var(--ink); background: var(--surface-2); }
.nav__actions { display: flex; align-items: center; gap: .6rem; }
@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav__actions { margin-left: auto; }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(48px, 7vw, 88px) clamp(40px, 5vw, 64px); }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
  gap: clamp(40px, 5vw, 72px);
  align-items: center;
}
.hero__copy { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.hero__visual { min-width: 0; }
@media (max-width: 1000px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__visual { width: 100%; max-width: 520px; }
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 18%, transparent);
}
.hero__title {
  margin: 0;
  max-width: 13em;
  font-size: clamp(2.5rem, 5vw, 3.9rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.hero__title span { color: var(--muted); }
.hero__lead { margin: 1.5rem 0 2rem; max-width: 34em; font-size: clamp(1.0625rem, 1.4vw, 1.1875rem); color: var(--ink-2); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Option A: product mosaic, shaped like the logo mark */
.mosaic { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.mosaic__tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .3rem;
  min-height: 210px;
  padding: 1.1rem 1.1rem 1rem;
  color: var(--ink);
  text-decoration: none;
  background: color-mix(in srgb, var(--tool) 9%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--tool) 26%, var(--line));
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  animation: tile-in .7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.mosaic__tile::after {
  content: "";
  position: absolute;
  top: 18px;
  right: 18px;
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: var(--tool);
}
.mosaic__tile:nth-child(1) { --from: translate(14px, 14px); }
.mosaic__tile:nth-child(2) { --from: translate(-14px, 14px); animation-delay: .06s; }
.mosaic__tile:nth-child(3) { --from: translate(14px, -14px); animation-delay: .12s; }
.mosaic__tile:nth-child(4) { --from: translate(-14px, -14px); animation-delay: .18s; }
.mosaic__tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--tool) 48%, var(--line)); }
.mosaic__tile img { width: 44px; height: 44px; margin-bottom: auto; border-radius: 12px; border: 1px solid var(--line); object-fit: cover; }
.mosaic__name { margin-top: 1rem; font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.02em; }
.mosaic__desc { font-size: .8125rem; line-height: 1.4; color: var(--muted); }
.mosaic__go { display: inline-flex; align-items: center; gap: .3rem; margin-top: .4rem; font-size: .8125rem; font-weight: 500; color: var(--ink-2); }
.mosaic__tile:hover .mosaic__go { color: var(--accent); }
@keyframes tile-in { from { transform: var(--from) scale(0.92); } }
@media (max-width: 480px) {
  .mosaic { gap: 10px; }
  .mosaic__tile { min-height: 180px; padding: .9rem; border-radius: 18px; }
  .mosaic__desc { display: none; }
}

/* Option B: live widgets */
.widgets { display: grid; gap: 12px; }
.widget {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  margin: 0;
  padding: 1rem 1.1rem;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}
.widget__head { display: flex; align-items: center; gap: .5rem; font-size: .8125rem; font-weight: 600; color: var(--ink-2); }
.widget__head img { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; }
.widget__src { margin-left: auto; font-family: var(--mono); font-size: .6875rem; font-weight: 500; color: var(--muted); }
.widget__word-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem; }
.widget__word { margin: 0; font-size: 1.75rem; font-weight: 600; line-height: 1.1; letter-spacing: -0.03em; overflow-wrap: anywhere; transition: opacity .3s ease; }
.widget__pos { font-family: var(--mono); font-size: .6875rem; color: var(--ink-2); background: color-mix(in srgb, var(--tool) 16%, transparent); border-radius: 999px; padding: .1rem .5rem; }
.widget__pos:empty { display: none; }
.widget__text { margin: 0; font-size: .9375rem; color: var(--ink-2); }
.widget__link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  min-height: 28px;
  padding: 0;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
}
.widget__link:disabled { opacity: .6; cursor: progress; }
.widget__row { display: flex; gap: .5rem; }
.widget__row input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 .7rem;
  font-family: var(--mono);
  font-size: .8125rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
}
.widget__row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.widget__out { margin: 0; font-size: .8125rem; color: var(--muted); overflow-wrap: anywhere; }
.widget__out a, .widget__out strong { font-family: var(--mono); font-weight: 500; color: var(--accent); }
.widget__out.is-error { color: var(--crit-text); }
.widget__list { display: grid; gap: .4rem; list-style: none; margin: 0; padding: 0; font-size: .875rem; }
.widget__list li { display: flex; align-items: center; gap: .55rem; }
.widget__list li span:last-child { margin-left: auto; font-family: var(--mono); font-size: .6875rem; color: var(--muted); }
.q-dot { flex-shrink: 0; width: 7px; height: 7px; border-radius: 50%; }
.q-dot--easy { background: var(--dot-easy); }
.q-dot--medium { background: var(--dot-med); }
.q-dot--hard { background: var(--dot-hard); }

/* Option C: collage of the real screens (scaled to fit by app.js) */
.collage-fit { position: relative; width: 100%; }
.collage { position: absolute; top: 0; left: 0; width: 480px; height: 500px; transform-origin: top left; }
.collage__item {
  --t: none;
  position: absolute;
  display: block;
  color: inherit;
  text-decoration: none;
  width: max-content;
  transform: var(--t);
  transform-origin: top left;
  transition: transform .25s ease;
}
a.collage__item:hover { transform: translateY(-6px) var(--t); z-index: 6; }
.collage__item--notes { left: 4px; top: 40px; z-index: 3; --t: scale(.62); }
.collage__item--word { left: 262px; top: 6px; z-index: 2; --t: rotate(3deg) scale(.4); }
.collage__item--cursor { left: 268px; top: 176px; z-index: 4; --t: rotate(-2deg) scale(.56); }
.collage__item--url { left: 252px; top: 346px; z-index: 1; --t: rotate(2deg) scale(.37); }
.wd-card.wd-card--static { width: 540px; max-width: none; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; line-height: normal; letter-spacing: normal; animation: none; }
.wd-card--static .wd-next { display: block; text-align: center; }
.u2-card.u2-card--static {
  width: 620px;
  max-width: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: normal;
  letter-spacing: normal;
  color: var(--u2-text);
  animation: none;
}
.u2-fake-input {
  display: block;
  overflow: hidden;
  padding: 16px 20px;
  font-size: 16px;
  white-space: nowrap;
  color: var(--u2-text);
  background: var(--u2-input-bg);
  border: 1px solid var(--u2-input-border);
  border-radius: 14px;
}
.u2-card--static .u2-submit { display: block; text-align: center; }
.u2-card--static .u2-result { animation: none; }
.cu-card-root.cu-card-root--static { width: 360px; }
.cu-card-root--static::before { display: none; }

/* Logo-mark background (drawn by app.js) */
.bg-marks { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
main, .footer { position: relative; z-index: 1; }

/* Design options panel (preview only) */
.options {
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 70;
  width: min(312px, calc(100vw - 32px));
  font-size: .8125rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
}
.options__toggle {
  display: flex;
  align-items: center;
  gap: .6rem;
  width: 100%;
  min-height: 44px;
  padding: 0 .9rem;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  background: none;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
}
.options__toggle::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s ease;
}
.options__toggle[aria-expanded="false"]::after { transform: translateY(2px) rotate(-135deg); }
.options .brand__mark { grid-template-columns: repeat(2, 6px); }
.options .brand__mark i { width: 6px; height: 6px; border-radius: 1.5px; }
.options__body { padding: 0 .9rem .9rem; border-top: 1px solid var(--line); }
.options__label { margin: .8rem 0 .4rem; font-family: var(--mono); font-size: .6875rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.options__seg { display: flex; flex-wrap: wrap; gap: 3px; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.options__seg button {
  flex: 1 1 auto;
  min-height: 32px;
  padding: 0 .55rem;
  font-size: .78rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
}
.options__seg button:hover { color: var(--ink); }
.options__seg button[aria-pressed="true"] { color: var(--ink); background: var(--surface); border-color: var(--line); box-shadow: var(--shadow-sm); }
.options__fine { margin: .75rem 0 0; font-size: .72rem; color: var(--muted); }

/* Directory summary (moved out of the hero) */
.summary { display: flex; flex-wrap: wrap; margin: 0 0 1.25rem; }
.summary div { display: flex; flex-direction: column-reverse; gap: .1rem; padding: .25rem 1.75rem .25rem 0; }
.summary div + div { padding-left: 1.75rem; border-left: 1px solid var(--line); }
.summary dt { font-size: .8125rem; color: var(--muted); }
.summary dd { margin: 0; font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .summary { flex-direction: column; gap: .75rem; }
  .summary div, .summary div + div { padding: 0; border-left: 0; }
}

/* ---------- Stage ---------- */
.stage { padding-block: 0 clamp(72px, 9vw, 112px); }
.stage__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; margin-bottom: 1.25rem; }
.switcher {
  display: inline-flex;
  gap: 4px;
  max-width: 100%;
  padding: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.switcher::-webkit-scrollbar { display: none; }
.switcher__tab {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  flex-shrink: 0;
  min-height: 40px;
  padding: 0 .9rem 0 .55rem;
  font-size: .9375rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  transition: color .15s ease, background-color .15s ease;
}
.switcher__tab img { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; }
.switcher__tab:hover { color: var(--ink); }
.switcher__tab[aria-selected="true"] { color: var(--ink); background: var(--surface); border-color: var(--line); box-shadow: var(--shadow-sm); }
.modes { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.modes__btn {
  min-height: 34px;
  padding: 0 .8rem;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
}
.modes__btn:hover { color: var(--ink); }
.modes__btn[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); }

.panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
  gap: clamp(28px, 4vw, 48px);
  align-items: start;
  animation: rise .35s ease both;
}
[data-accent="words"] { --tool: var(--t-words); }
[data-accent="url"] { --tool: var(--t-url); }
[data-accent="cursor"] { --tool: var(--t-cursor); }
[data-accent="notes"] { --tool: var(--t-notes); }
@media (max-width: 1040px) { .panel { grid-template-columns: 1fr; } .info { max-width: 640px; } }

/* Browser window */
.window {
  container: win / inline-size;
  min-width: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}
.window__top {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  align-items: center;
  gap: .5rem;
  height: 46px;
  padding: 0 .75rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.lights { display: flex; gap: 7px; }
.lights i { display: block; width: 11px; height: 11px; border-radius: 50%; background: var(--light-r); }
.lights i:nth-child(2) { background: var(--light-y); }
.lights i:nth-child(3) { background: var(--light-g); }
.address {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: .45rem;
  width: min(100%, 440px);
  height: 30px;
  padding: 0 .75rem;
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.address svg { flex-shrink: 0; color: var(--muted); }
.address__text { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.address__text.is-typing::after { content: ""; display: inline-block; width: 1px; height: .95em; margin-left: 1px; vertical-align: -0.1em; background: var(--ink-2); }
.window__spacer { justify-self: end; }
.ext-icon {
  justify-self: end;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
}
.ext-icon img { width: 20px; height: 20px; border-radius: 5px; object-fit: cover; }
.ext-icon[aria-expanded="true"], .ext-icon--on { background: var(--accent-soft); border-color: var(--accent-ring); }
.ext-icon[aria-expanded="false"] { animation: ping 1.8s ease-out infinite; }
.window__body { padding: 1.5rem; min-height: 460px; }

/* Shared demo parts */
.chips { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.chips li, .chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: .75rem;
  padding: .1rem .5rem;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
}
.chip--accent { color: var(--ink); background: color-mix(in srgb, var(--tool, var(--accent)) 14%, transparent); border-color: color-mix(in srgb, var(--tool, var(--accent)) 30%, transparent); }
.count {
  display: inline-block;
  min-width: 1.4rem;
  padding: 0 .4rem;
  font-family: var(--mono);
  font-size: .6875rem;
  line-height: 1.6;
  text-align: center;
  letter-spacing: 0;
  color: var(--ink-2);
  background: var(--surface-3);
  border-radius: 999px;
}
.dot { display: inline-block; flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot--ok { background: var(--ok); }
.dot--idle { background: var(--warn); }
.source { display: inline-flex; align-items: center; gap: .45rem; margin: 0; font-family: var(--mono); font-size: .75rem; color: var(--muted); }
.tag {
  font-family: var(--mono);
  font-size: .625rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 .3rem;
  white-space: nowrap;
}
.diff { display: inline-block; font-family: var(--mono); font-size: .6875rem; font-weight: 500; line-height: 1.6; padding: 0 .5rem; border-radius: 999px; }
.diff--easy { color: var(--easy-fg); background: var(--easy-bg); }
.diff--medium { color: var(--med-fg); background: var(--med-bg); }
.diff--hard { color: var(--hard-fg); background: var(--hard-bg); }
.code {
  margin: 0;
  padding: .85rem 1rem;
  overflow-x: auto;
  font-size: .75rem;
  line-height: 1.65;
  white-space: pre;
  tab-size: 4;
  color: var(--code-fg);
  background: var(--code-bg);
  border: 1px solid var(--code-line);
  border-radius: var(--r);
}
.code .kw { color: var(--syn-kw); }
.code .fn { color: var(--syn-fn); }
.code .str { color: var(--syn-str); }
.code .num { color: var(--syn-num); }
.code .cm { color: var(--code-dim); }

/* ---------- Leetcode Notes: real screens bundled from the Next app (notes-demo.js/.css) ---------- */
.panel--wide { grid-template-columns: minmax(0, 1fr); gap: 28px; }
.notes-stage { min-width: 0; min-height: 760px; }
.noscript { margin: 0; padding: 2rem; color: var(--muted); text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }
.info.info--row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.25rem clamp(24px, 4vw, 48px);
  align-items: start;
  padding-top: 0;
}
.info__col { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
@media (max-width: 1040px) { .info.info--row { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) { .notes-stage { min-height: 640px; } }

/* ---------- url2.at: the shorten card from the url2.at home page (src/app/tinyurl/styles/app.css) ---------- */
.u2-scope {
  padding: 48px 28px 56px;
  text-align: center;
  color: var(--u2-text);
  background: var(--u2-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: normal;
  letter-spacing: normal;
}
.u2-hero > * { margin: 0; }
.u2-logo { display: flex; align-items: center; justify-content: center; width: 88px; height: 88px; margin: 0 auto 28px !important; }
.u2-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 12px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
.u2-title { margin-bottom: 12px !important; font-size: 48px; font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; }
.u2-title span { color: #4F46E5; }
.u2-tagline { max-width: 520px; margin: 0 auto 40px !important; font-size: 18px; color: var(--u2-text-2); }
.u2-card {
  max-width: 620px;
  margin: 0 auto;
  padding: 40px 36px;
  background: var(--u2-card-bg);
  border: 1px solid var(--u2-card-border);
  border-radius: 24px;
  box-shadow: 0 30px 80px var(--u2-shadow);
  animation: u2-fadeInScale .8s ease .2s backwards;
}
.u2-form { display: flex; flex-direction: column; gap: 16px; }
.u2-form input {
  width: 100%;
  padding: 16px 20px;
  font-family: inherit;
  font-size: 16px;
  color: var(--u2-text);
  background: var(--u2-input-bg);
  border: 1px solid var(--u2-input-border);
  border-radius: 14px;
  outline: none;
  transition: border-color .2s ease;
}
.u2-form input::placeholder { color: var(--u2-text-2); }
.u2-form input:focus { border-color: #4F46E5; box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2); }
.u2-submit {
  width: 100%;
  padding: 16px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .04em;
  color: #F9FAFB;
  background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: all .25s ease;
}
.u2-submit:hover { transform: translateY(-1px); box-shadow: 0 18px 45px var(--u2-shadow); filter: brightness(1.05); }
.u2-submit:disabled { opacity: .7; cursor: progress; }
.u2-error { margin: 12px 0 0; font-size: 14px; font-weight: 600; text-align: left; color: var(--u2-error); }
.u2-result { margin-top: 24px; overflow: hidden; text-align: left; border-radius: 16px; animation: u2-reveal .4s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.u2-result__inner { padding: 20px 24px; background: var(--u2-result-bg); border: 1px solid var(--u2-result-border); border-radius: 16px; box-shadow: var(--u2-result-shadow); }
.u2-result__label { margin: 0 0 10px; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--u2-text-2); }
.u2-url-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 4px; }
.u2-link { display: flex; flex: 1; min-width: 0; }
.u2-link a, .u2-link span {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  color: #4F46E5;
  word-break: break-all;
  text-decoration: none;
  background: var(--u2-input-bg);
  border: 1px solid var(--u2-card-border);
  border-radius: 10px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.u2-link a:hover { border-color: rgba(99, 102, 241, 0.5); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15); }
.u2-copy {
  flex-shrink: 0;
  padding: 12px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
  background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
  border: 1px solid #4F46E5;
  border-radius: 10px;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.u2-copy:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4); }
.u2-note { margin: 10px 0 0; font-size: 13px; color: var(--u2-text-2); }
.u2-scope :focus-visible { outline: 2px solid #6366F1; outline-offset: 2px; }
@keyframes u2-fadeInScale { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes u2-reveal { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@container win (max-width: 560px) {
  .u2-scope { padding: 32px 16px 40px; }
  .u2-title { font-size: 32px; }
  .u2-tagline { margin-bottom: 28px !important; font-size: 16px; }
  .u2-card { padding: 24px 20px; }
}

/* ---------- Word of the Day: the word card from words.url2.at (src/app/words/words.css) ---------- */
.wd-scope {
  display: grid;
  place-items: center;
  padding: 56px 32px;
  color: #E5E7EB;
  background: radial-gradient(circle at top, #1F2937 0%, #020617 45%, #020617 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: normal;
  letter-spacing: normal;
  color-scheme: dark;
}
.wd-card {
  width: 100%;
  max-width: 540px;
  padding: 40px 36px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.9);
  animation: wd-fadeInScale .8s ease .3s backwards;
}
.wd-card > * { margin: 0; }
.wd-label { margin-bottom: 12px !important; font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #A5B4FC; }
.wd-title { margin-bottom: 6px !important; font-size: 44px; font-weight: 800; letter-spacing: -0.02em; color: #F9FAFB; overflow-wrap: anywhere; transition: opacity .5s ease; }
.wd-pos {
  display: inline-block;
  margin-bottom: 18px !important;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #BFDBFE;
  background: rgba(59, 130, 246, 0.16);
  border-radius: 999px;
}
.wd-pos:empty { display: none; }
.wd-def { margin-bottom: 26px !important; font-size: 17px; line-height: 1.7; color: #E5E7EB; }
.wd-next {
  width: 100%;
  padding: 16px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #F9FAFB;
  background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: all .25s ease;
}
.wd-next:hover { transform: translateY(-1px); box-shadow: 0 18px 45px rgba(15, 23, 42, 0.9); filter: brightness(1.05); }
.wd-next:disabled { cursor: progress; }
.wd-scope :focus-visible { outline: 2px solid #A5B4FC; outline-offset: 3px; }
@keyframes wd-fadeInScale { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
@container win (max-width: 560px) {
  .wd-scope { padding: 28px 14px; }
  .wd-card { padding: 28px 22px; }
  .wd-title { font-size: 32px; }
}

/* ---------- Cursor Usage: the popup card from cursorusage.url2.at (css/cursor-tracker.css) ---------- */
.page { position: relative; display: flex; flex-direction: column; align-items: flex-end; padding: .9rem 1rem 1.5rem; }
.page__skeleton { position: absolute; inset: 1.5rem; display: flex; flex-direction: column; gap: 12px; pointer-events: none; }
.page__skeleton i { display: block; height: 8px; border-radius: 5px; background: var(--surface-3); opacity: .8; }
.page__skeleton--code i:nth-child(1) { width: 30%; }
.page__skeleton--code i:nth-child(2) { width: 44%; margin-left: 6%; }
.page__skeleton--code i:nth-child(3) { width: 38%; margin-left: 12%; }
.page__skeleton--code i:nth-child(4) { width: 52%; margin-left: 12%; }
.page__skeleton--code i:nth-child(5) { width: 28%; margin-left: 6%; }
.page__skeleton--code i:nth-child(6) { width: 16%; }
.page__skeleton--code i:nth-child(7) { width: 40%; }
.page__skeleton--code i:nth-child(8) { width: 48%; margin-left: 6%; }
.page__skeleton--code i:nth-child(9) { width: 24%; margin-left: 6%; }
.page__hint {
  position: relative;
  align-self: center;
  margin: auto 0;
  padding: .55rem .9rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r);
}
.cu-card-root {
  position: relative;
  z-index: 1;
  width: min(360px, 100%);
  padding: 18px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: normal;
  letter-spacing: normal;
  color: #F0F2FF;
  background: #13151A;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(112, 96, 232, 0.18), 0 4px 12px rgba(15, 17, 23, 0.06);
  color-scheme: dark;
}
.cu-card-root::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 10px;
  width: 12px;
  height: 12px;
  background: #13151A;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  transform: rotate(45deg);
}
.cu-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.cu-head img { width: 26px; height: 26px; border-radius: 6px; object-fit: cover; }
.cu-title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(120deg, #F0F2FF 30%, #B8A5FF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.cu-badge {
  padding: 3px 9px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #B8A5FF;
  background: rgba(122, 102, 240, 0.16);
  border: 1px solid rgba(122, 102, 240, 0.32);
  border-radius: 9999px;
}
.cu-card {
  margin-bottom: 8px;
  padding: 12px;
  background: linear-gradient(145deg, #1E1C38 0%, #231F48 50%, #1E1C38 100%);
  border: 1px solid rgba(130, 110, 245, 0.38);
  border-radius: 12px;
  box-shadow: 0 0 24px rgba(139, 118, 245, 0.16);
}
.cu-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.cu-label { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #A8B4D4; }
.cu-value {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, #FFFFFF 0%, #B8A5FF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.cu-sub { margin-top: 2px; font-size: 11px; color: #A8B4D4; }
.cu-sub--right { text-align: right; }
.cu-track { position: relative; height: 6px; margin-top: 12px; overflow: hidden; background: rgba(255, 255, 255, 0.07); border-radius: 9999px; }
.cu-fill { position: relative; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8B76F5 0%, #B8A5FF 100%); transition: width .35s ease; }
.cu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cu-mini { padding: 10px 12px; background: #1C1F27; border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 12px; }
.cu-mini--wide { grid-column: 1 / -1; }
.cu-mini .cu-value { font-size: 18px; color: #F0F2FF; background: none; -webkit-text-fill-color: #F0F2FF; }
.cu-mini .cu-sub { color: #6E7A9F; }

/* Simulator (in the info column) */
.sim { padding: 1rem 1.1rem .9rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.sim__row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.sim__row label { font-size: .875rem; font-weight: 500; }
.sim__row output { font-family: var(--mono); font-size: .9375rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.sim input[type="range"] { width: 100%; margin: .65rem 0 .4rem; accent-color: var(--accent); cursor: pointer; }
.switch { position: relative; display: flex; align-items: center; gap: .65rem; min-height: 40px; font-size: .875rem; font-weight: 500; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track { position: relative; flex-shrink: 0; width: 38px; height: 22px; background: var(--surface-3); border-radius: 999px; transition: background-color .15s ease; }
.switch__thumb { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: #FFFFFF; border-radius: 50%; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s ease; }
.switch input:checked + .switch__track { background: var(--accent); }
.switch input:checked + .switch__track .switch__thumb { transform: translateX(16px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--accent); outline-offset: 2px; }
.sim__note { margin: .4rem 0 0; font-size: .75rem; color: var(--muted); }

@container win (max-width: 540px) {
  .page { padding: .9rem .75rem 1.25rem; }
}

/* ---------- Info column ---------- */
.info { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; padding-top: .25rem; }
.info__head { display: flex; align-items: center; gap: .85rem; }
.info__head img { flex-shrink: 0; width: 44px; height: 44px; border-radius: 11px; border: 1px solid var(--line); object-fit: cover; }
.info__head h3 { margin: 0; font-size: 1.125rem; font-weight: 600; line-height: 1.25; letter-spacing: -0.02em; }
.info__pitch { margin: 0; font-size: 1rem; color: var(--ink-2); }
.ticks { display: grid; gap: .5rem; list-style: none; margin: 0; padding: 0; font-size: .9375rem; }
.ticks li { display: flex; align-items: flex-start; gap: .6rem; }
.ticks svg { flex-shrink: 0; margin-top: .25rem; color: var(--accent); }
.info__try { margin: 0; font-size: .875rem; color: var(--muted); }
.info__try strong { color: var(--ink); font-weight: 600; }
.info__ctas { display: flex; flex-wrap: wrap; gap: .5rem; }
.info__meta { margin: 0; padding-top: 1rem; font-size: .8125rem; color: var(--muted); border-top: 1px solid var(--line); }
.info__meta strong { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.steps { display: grid; gap: .8rem; list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; align-items: flex-start; gap: .75rem; }
.steps__n {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-top: .1rem;
  font-family: var(--mono);
  font-size: .75rem;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--surface-3);
  border-radius: 50%;
}
.steps strong { display: block; font-weight: 600; font-size: .9375rem; }
.steps div span { display: block; font-size: .875rem; color: var(--muted); }

/* ---------- Directory ---------- */
.directory { padding-block: clamp(72px, 9vw, 112px); border-top: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem 2rem; margin-bottom: 1.75rem; }
.filters { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.filters__btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 36px;
  padding: 0 .75rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  cursor: pointer;
}
.filters__btn span { font-family: var(--mono); font-size: .6875rem; color: var(--muted); }
.filters__btn:hover { color: var(--ink); }
.filters__btn[aria-pressed="true"] { color: var(--ink); background: var(--surface); border-color: var(--line); box-shadow: var(--shadow-sm); }
.catalog {
  display: grid;
  gap: 1px;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.row {
  display: grid;
  grid-template-columns: 48px minmax(0, 200px) minmax(0, 1fr) minmax(0, 232px) 80px auto;
  grid-template-areas: "logo id desc plat users actions";
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
}
.row__logo { grid-area: logo; width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--line); object-fit: cover; }
.row__id { grid-area: id; min-width: 0; }
.row__id h3 { margin: 0 0 .1rem; font-size: 1rem; font-weight: 600; letter-spacing: -0.015em; }
.row__desc { grid-area: desc; min-width: 0; }
.row__desc p { margin: 0; font-size: .9375rem; color: var(--ink-2); }
.row__desc .row__features { margin-top: .25rem; font-size: .8125rem; color: var(--muted); }
.platforms { grid-area: plat; display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.platforms li {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .15rem .5rem;
  font-size: .78rem;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.platforms svg { color: var(--muted); }
.row__users { grid-area: users; margin: 0; font-size: .8125rem; color: var(--muted); white-space: nowrap; }
.row__users strong { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.row__actions { grid-area: actions; display: flex; align-items: center; gap: .4rem; }
.filter-count { margin: .9rem 0 0; font-family: var(--mono); font-size: .75rem; color: var(--muted); }
@media (max-width: 1120px) {
  .row {
    grid-template-columns: 48px minmax(0, 1fr) auto auto;
    grid-template-areas:
      "logo id users actions"
      ". desc desc desc"
      ". plat plat plat";
    row-gap: .75rem;
  }
}
@media (max-width: 640px) {
  .row {
    grid-template-columns: 48px minmax(0, 1fr);
    grid-template-areas:
      "logo id"
      "desc desc"
      "plat plat"
      "users users"
      "actions actions";
    padding: 1.1rem;
  }
  .row__actions { flex-wrap: wrap; }
}

/* ---------- Public APIs ---------- */
.api { padding-block: clamp(72px, 9vw, 112px); border-top: 1px solid var(--line); }
.api__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (max-width: 920px) { .api__grid { grid-template-columns: 1fr; } }
.endpoints { display: grid; gap: .6rem; margin-top: 1.75rem; }
.endpoint {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: .25rem .75rem;
  width: 100%;
  padding: .9rem 1rem;
  text-align: left;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.endpoint:hover { border-color: var(--line-strong); }
.endpoint[aria-selected="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.method { font-family: var(--mono); font-size: .6875rem; font-weight: 500; padding: .1rem .45rem; border-radius: var(--r-xs); }
.method--get { color: var(--easy-fg); background: var(--easy-bg); }
.method--post { color: var(--accent); background: var(--accent-soft); }
.endpoint__path { min-width: 0; font-family: var(--mono); font-size: .875rem; font-weight: 500; overflow-wrap: anywhere; }
.endpoint__desc { grid-column: 2; font-size: .8125rem; color: var(--muted); }
.codepanel { min-width: 0; overflow: hidden; background: var(--code-bg); border: 1px solid var(--code-line); border-radius: 16px; box-shadow: var(--shadow-lg); }
.codepanel__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 44px;
  padding: .4rem 1rem;
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--code-dim);
  border-bottom: 1px solid var(--code-line);
}
.codepanel .code + .codepanel__bar { border-top: 1px solid var(--code-line); }
.codepanel .code { padding: 1rem 1.1rem; font-size: .8125rem; border: 0; border-radius: 0; background: transparent; }
.codepanel__copy {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 30px;
  padding: 0 .6rem;
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .04em;
  color: var(--code-fg);
  background: transparent;
  border: 1px solid var(--code-line);
  border-radius: 7px;
  cursor: pointer;
}
.codepanel__copy:hover { background: var(--code-hover); }

/* ---------- About ---------- */
.about { padding-block: 0 clamp(72px, 9vw, 112px); }
.about__box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  padding: clamp(24px, 4vw, 36px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
}
.about__title { margin: 0; font-size: 1.5rem; font-weight: 600; letter-spacing: -0.025em; }
.about__text { margin: .3rem 0 0; color: var(--muted); }

/* ---------- Footer ---------- */
.footer { padding-block: 40px; border-top: 1px solid var(--line); }
.footer__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem 2rem; align-items: start; }
.footer__tag { margin: .7rem 0 0; font-size: .875rem; color: var(--muted); }
.footer__links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem 1.25rem; max-width: 560px; }
.footer__links a { font-size: .875rem; color: var(--ink-2); text-decoration: none; }
.footer__links a:hover { color: var(--accent); }
.footer__legal { grid-column: 1 / -1; margin: 0; padding-top: 1.25rem; font-size: .8125rem; color: var(--muted); border-top: 1px solid var(--line); }
@media (max-width: 720px) {
  .footer__inner { grid-template-columns: 1fr; }
  .footer__links { justify-content: flex-start; }
}

/* ---------- Motion ---------- */
@keyframes rise { from { opacity: .35; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes flash { from { background-color: var(--accent-soft); } to { background-color: transparent; } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 var(--accent-ring); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
