/* Fadepic — shared foundation: fonts, tokens, reset, buttons, focus. */

@font-face { font-family: "General Sans"; src: url("../fonts/general-sans-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "General Sans"; src: url("../fonts/general-sans-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "General Sans"; src: url("../fonts/general-sans-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "General Sans"; src: url("../fonts/general-sans-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  /* graphite and orange */
  --bg: #18191b;
  --surface: #222427;
  --raised: #2b2d31;
  --ink: #eff0f1;
  --muted: #b9bbbf;
  --accent: #ff4a1f;
  --accent-ink: #18191b;
  --field: #eff0f1;
  --field-ink: #18191b;
  --field-muted: #54575c;
  /* product interface (inside the app and in data-ui fragments) */
  --line: #33363a;
  --control: #4a4d52;
  --faint: #a6a8ad;
  --positive: #3fc07a;
  --positive-bg: #172a1d;
  --negative: #f77f93;
  --negative-bg: #2c1a20;
  --r-card: 8px;
  --r-control: 6px;

  --font: "General Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --margin: clamp(16px, 2.2vw, 32px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: var(--step-body); line-height: 1.45; font-weight: 400;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, ul, ol, figure, blockquote, table { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 0.06em; }
a:hover { text-decoration-thickness: 0.12em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.num { font-variant-numeric: tabular-nums; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--margin); top: -80px; background: var(--ink); color: var(--bg); padding: 12px 16px; z-index: 50; }
.skip:focus { top: 12px; }

/* buttons: flat, square, one height */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px; border: 0; border-radius: 0;
  font-weight: 600; font-size: var(--step-body); line-height: 1; text-decoration: none; white-space: nowrap;
  transition: transform 160ms var(--ease), background-color 160ms linear, color 160ms linear;
}
.btn:active { transform: translateY(1px) scale(0.985); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: #ff6a45; }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-ink:hover { background: #ffffff; }
.btn-dark { background: var(--bg); color: var(--ink); }
.btn-dark:hover { background: #000000; }

/* top line shared by public pages */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 24px var(--margin); position: relative; z-index: 5;
}
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: var(--step-body); letter-spacing: -0.01em; text-decoration: none; }
.wordmark .mark { fill: var(--accent); flex: none; }
.top-links { display: flex; gap: 28px; font-size: var(--step-body); }
.top-links a, .top-login { text-decoration: none; }
.top-links a:hover, .top-login:hover { text-decoration: underline; }
.top-end { display: flex; align-items: center; gap: 20px; font-size: var(--step-body); }
.top-login { font-weight: 500; }
.top-signup { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: var(--r-control); background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 0.9375rem; text-decoration: none; white-space: nowrap; }
.top-signup:hover { background: #ff6a45; }

.lang { position: relative; }
.lang summary { list-style: none; cursor: pointer; padding: 8px 10px; font-weight: 500; font-size: 0.9375rem; background: var(--surface); }
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: ""; display: inline-block; margin-left: 8px; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.lang[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.lang:not([open]) ul { display: none; }
.lang ul { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; background: var(--raised); padding: 8px; min-width: 190px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.lang a { display: block; padding: 8px 10px; text-decoration: none; font-size: 0.9375rem; }
.lang a:hover, .lang a[aria-current] { background: var(--control); }
.lang a[aria-current] { font-weight: 600; }

@media (max-width: 860px) {
  .top-links { display: none; }
}
@media (max-width: 480px) {
  .top { gap: 10px; }
  .top-end { gap: 10px; }
  .top-login { font-size: 0.9375rem; white-space: nowrap; }
  .top-signup { height: 34px; padding: 0 10px; font-size: 0.875rem; }
  .lang summary { padding: 7px 7px; white-space: nowrap; font-size: 0.875rem; }
  .lang summary::after { margin-left: 5px; width: 6px; height: 6px; }
}
@media (max-width: 350px) {
  .wordmark span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
@media print { body { display: none; } }

/* cookie bar: shown only on public pages and only when measurement or advertising tags are configured */
.ck { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--surface); border-top: 1px solid var(--control); color: var(--ink); font-size: 0.9375rem; line-height: 1.4; }
.ck-in { max-width: 1180px; margin: 0 auto; padding: 16px var(--margin); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 28px; align-items: center; }
.ck-text { max-width: 78ch; color: var(--muted); }
.ck-text a { color: var(--ink); }
.ck-opts { grid-column: 1 / -1; display: grid; gap: 8px; }
.ck-opt { display: flex; gap: 10px; align-items: flex-start; }
.ck-opt input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--ink); flex: none; }
.ck-opt span { color: var(--muted); }
.ck-opt strong { color: var(--ink); font-weight: 600; margin-right: 6px; }
.ck-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ck-b { height: 40px; padding: 0 16px; border: 1px solid var(--control); border-radius: var(--r-control); background: transparent; color: var(--ink); font-size: 0.875rem; font-weight: 500; white-space: nowrap; }
.ck-b:hover { background: var(--raised); }
.ck-b-main { background: var(--ink); border-color: var(--ink); color: var(--bg); font-weight: 600; }
.ck-b-main:hover { background: #ffffff; }
@media (max-width: 760px) { .ck-in { grid-template-columns: 1fr; } .ck-btns { justify-content: stretch; } .ck-b { flex: 1 1 auto; } }
