/* The look of every page affiliates see: the landing pages /uk and /hk (plus landing.css), /join, /partner/login
   and their dashboard /partner (plus partner.css). It is all scoped to .lp, so the admin pages (app.css) keep theirs.
   Inter (SIL Open Font License) is in static/vendor; Chinese uses the system's Traditional Chinese font.

   Two themes, light and dark: <html data-theme> is the visitor's pick (the switch in app.js, kept in the "theme"
   cookie), else light. Colours are the tokens below; the
   "ink" ones are for the bands at the top and bottom (hero, top bar, the sign-in side, footer). */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/vendor/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body:has(> .lp) { background: #edf6f4; }
:root[data-theme="dark"] body:has(> .lp) { background: #0a1020; }
:root:has(> body > .lp) { color-scheme: light; }
:root[data-theme="dark"]:has(> body > .lp) { color-scheme: dark; }

.lp {
  /* light */
  --ink: #edf6f4; --on-ink: #0b1324; --on-ink-2: #3b475c; --on-ink-3: #5d6a80; --on-ink-hi: #0b1324;
  --ink-line: rgba(11, 19, 36, .14); --ink-line-2: rgba(11, 19, 36, .26); --ink-sep: rgba(11, 19, 36, .08);
  --ink-fill: rgba(255, 255, 255, .6); --ink-fill-2: #fff; --ink-grid: rgba(11, 19, 36, .05);
  --ink-hover: rgba(11, 19, 36, .05); --ink-on: rgba(13, 148, 136, .14);
  --ink-glass: rgba(255, 255, 255, .84); --ink-panel: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .72));
  --ink-chip: rgba(255, 255, 255, .82); --ink-pill: #0b6b63;
  --glow-1: rgba(45, 212, 191, .3); --glow-2: rgba(99, 140, 255, .17);
  --photo-fade: linear-gradient(180deg, rgba(237, 246, 244, .97) 0%, rgba(237, 246, 244, .74) 28%, rgba(237, 246, 244, .08) 50%, rgba(237, 246, 244, .5) 72%, rgba(237, 246, 244, .97) 100%);
  --em: linear-gradient(100deg, #0f766e 0%, #0d9488 45%, #14b8a6 100%);
  --pop-shadow: 0 40px 80px -40px rgba(11, 19, 36, .35);
  --accent: #0d9488; --accent-2: #0f766e;
  --surface: #ffffff; --surface-2: #f5f7fb; --line: #e3e8f0;
  --text: #0b1324; --text-2: #3b475c; --muted: #66738a;
  --brand: #0f766e; --brand-text: #0b6b63; --brand-soft: #e5f5f2;
  --field: #ffffff; --field-line: #d5dce7; --field-line-hover: #b6c1d2;
  --ok: #047857; --ok-bg: #ecfdf5; --ok-line: #a7f3d0; --bad: #b91c1c; --bad-bg: #fef2f2; --bad-line: #fecaca;
  --amber: #b45309; --red: #dc2626; --blue: #4f46e5;  /* also the badges' colours (app.css), per theme */
  --green: #15803d; --green-soft: #e7f6ec; --amber-soft: #fdf5e1; --red-soft: #fdecec; --blue-soft: #e8efff; --gray-soft: #eef1f5;
  --card-shadow: 0 1px 2px rgba(11, 19, 36, .05), 0 10px 30px -12px rgba(11, 19, 36, .12);
  --float-shadow: 0 30px 60px -18px rgba(2, 6, 23, .4), 0 10px 20px -10px rgba(2, 6, 23, .25);
  font-family: "Inter", "PingFang HK", "PingFang TC", "Noto Sans TC", "Noto Sans CJK TC", "Microsoft JhengHei", system-ui, sans-serif;
  font-feature-settings: "cv11", "ss03";
  color: var(--text); background: var(--surface); line-height: 1.6; font-size: 16px; overflow-x: clip;
}
:root[data-theme="dark"] .lp {
  --ink: #0a1020; --on-ink: #e8edf6; --on-ink-2: #a8b3c7; --on-ink-3: #7b879d; --on-ink-hi: #fff;
  --ink-line: rgba(255, 255, 255, .18); --ink-line-2: rgba(255, 255, 255, .3); --ink-sep: rgba(255, 255, 255, .08);
  --ink-fill: rgba(255, 255, 255, .04); --ink-fill-2: rgba(255, 255, 255, .12); --ink-grid: rgba(255, 255, 255, .045);
  --ink-hover: rgba(255, 255, 255, .07); --ink-on: rgba(255, 255, 255, .14);
  --ink-glass: rgba(10, 16, 32, .88); --ink-panel: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .025));
  --ink-chip: rgba(10, 16, 32, .55); --ink-pill: #a7f3e6;
  --glow-1: rgba(20, 184, 166, .34); --glow-2: rgba(56, 89, 200, .3);
  --photo-fade: linear-gradient(180deg, rgba(10, 16, 32, .95) 0%, rgba(10, 16, 32, .66) 28%, rgba(10, 16, 32, .1) 50%, rgba(10, 16, 32, .5) 72%, rgba(10, 16, 32, .95) 100%);
  --em: linear-gradient(100deg, #99f6e4 0%, #2dd4bf 45%, #5eead4 100%);
  --pop-shadow: 0 40px 80px -40px rgba(0, 0, 0, .8);
  --accent: #2dd4bf; --accent-2: #5eead4;
  --surface: #0d1424; --surface-2: #0a111f; --line: #1f2a3e;
  --text: #e8edf6; --text-2: #b4bfd1; --muted: #8692a8;
  --brand-text: #5eead4; --brand-soft: rgba(45, 212, 191, .1);
  --field: #0a111f; --field-line: #27334a; --field-line-hover: #36445f;
  --ok: #6ee7b7; --ok-bg: #0b2a22; --ok-line: #14533f; --bad: #fca5a5; --bad-bg: #2a1215; --bad-line: #5b1d22;
  --amber: #fbbf24; --red: #f87171; --blue: #a5b4fc;
  --green: #4ade80; --green-soft: #12301f; --amber-soft: #352914; --red-soft: #3a1a1c; --blue-soft: #1a2647; --gray-soft: #1f2a3c;
  --card-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 20px 40px -24px rgba(0, 0, 0, .6);
  --float-shadow: 0 30px 60px -18px rgba(2, 6, 23, .55), 0 10px 20px -10px rgba(2, 6, 23, .35);
}
:where(.lp) a { color: inherit; text-decoration: none; }
:where(.lp) a:hover { text-decoration: none; }
.lp h1, .lp h2, .lp h3 { display: block; color: inherit; }
.lp-wrap { width: min(1200px, 100% - 48px); margin-inline: auto; }
@media (max-width: 640px) { .lp-wrap { width: calc(100% - 32px); } }

/* ---------- buttons: primary (bright, for the main action), ghost (on ink), soft (on a card) ---------- */
.lp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px;
  border-radius: 12px; border: 1px solid transparent; background: none; color: inherit; cursor: pointer;
  font: inherit; font-weight: 650; font-size: .96rem; white-space: nowrap;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
}
.lp-btn.sm { height: 38px; padding: 0 15px; font-size: .9rem; border-radius: 10px; }
.lp-btn.lg { height: 56px; padding: 0 26px; font-size: 1.03rem; border-radius: 14px; }
.lp-btn.block { display: flex; width: 100%; }
.lp-btn .i { transition: transform .2s ease; }
.lp-btn:hover .i { transform: translateX(3px); }
.lp .lp-btn.primary {
  color: #032723; background: linear-gradient(180deg, #5eead4, #2dd4bf);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 12px 28px -12px rgba(45, 212, 191, .8);
}
.lp .lp-btn.primary:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 16px 34px -12px rgba(45, 212, 191, .95); }
.lp .lp-btn.ghost { color: var(--on-ink-hi); border-color: var(--ink-line); background: var(--ink-fill); }
.lp .lp-btn.ghost:hover { background: var(--ink-fill-2); border-color: var(--ink-line-2); }
.lp .lp-btn.soft { color: var(--text); background: var(--surface); border-color: var(--field-line); box-shadow: 0 1px 2px rgba(11, 19, 36, .05); }
.lp .lp-btn.soft:hover { background: var(--surface-2); border-color: var(--field-line-hover); }
.lp :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- brand, the UK / 香港 switch and the light / dark switch (all on ink) ---------- */
.lp-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.06rem; letter-spacing: -.01em; color: var(--on-ink-hi); white-space: nowrap; }
.lp-mark { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #2dd4bf, #0f766e); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 8px 18px -8px rgba(45, 212, 191, .7); }
.lp .region-switch { flex: none; border-color: var(--ink-line); border-radius: 9px; }
.lp .region-switch a { color: var(--on-ink-2); padding: 5px 10px; }
.lp .region-switch a + a { border-color: var(--ink-line); }
.lp .region-switch a:hover { background: var(--ink-hover); color: var(--on-ink-hi); }
.lp .region-switch a.on { background: var(--ink-on); color: var(--on-ink-hi); }
.lp-theme {
  flex: none; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--ink-line); background: var(--ink-fill); color: var(--on-ink-2); transition: color .2s, background-color .2s, border-color .2s;
}
.lp-theme:hover { color: var(--on-ink-hi); background: var(--ink-hover); border-color: var(--ink-line-2); }
.lp-theme > span { display: grid; }
.lp-theme .to-light, :root[data-theme="dark"] .lp-theme .to-dark { display: none; }
:root[data-theme="dark"] .lp-theme .to-light { display: grid; }

/* Chinese reads better without the tight Latin tracking */
.lp:lang(zh-Hant-HK) h1, .lp:lang(zh-Hant-HK) h2, .lp:lang(zh-Hant-HK) h3 { letter-spacing: 0; }

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

/* ---------- form fields and messages: the landing page's publisher form, /join, sign-in, the dashboard ---------- */
.lp .pf { margin: 0 0 18px; min-width: 0; }
.lp .pf label { display: block; margin: 0 0 7px; font-size: .9rem; font-weight: 600; color: var(--text); }
.lp .pf :is(input, select, textarea) {
  display: block; width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--field-line); border-radius: 12px;
  background: var(--field); color: var(--text); font: inherit; font-size: 1rem; box-shadow: 0 1px 2px rgba(11, 19, 36, .04);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.lp .pf select {
  -webkit-appearance: none; appearance: none; padding-right: 42px; cursor: pointer;
  background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2366738a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 14px center / 16px;
}
.lp .pf textarea { height: auto; min-height: 96px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.lp .pf :is(input, select, textarea):hover { border-color: var(--field-line-hover); }
.lp .pf :is(input, select, textarea):focus { outline: none; border-color: #14b8a6; box-shadow: 0 0 0 4px rgba(20, 184, 166, .18); }
.lp .pf input:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.lp .pf ::placeholder { color: var(--muted); opacity: .7; }
.lp .pf .hint { margin-top: 7px; font-size: .84rem; line-height: 1.5; color: var(--muted); }
.lp .pf-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.lp .flash { margin: 0 0 20px; padding: 12px 16px; border-radius: 12px; border: 1px solid; font-size: .95rem; font-weight: 550; line-height: 1.5; overflow-wrap: anywhere; }
.lp .flash.ok { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-line); }
.lp .flash.error { color: var(--bad); background: var(--bad-bg); border-color: var(--bad-line); }
.lp .badge { padding: 3px 10px; font-size: .78rem; }
