/* ---------------------------------------------------------------------------
   SoyleApps hub.
   Separate from styles.css on purpose: that stylesheet is SoyleStories' —
   purple sunset over a photographic ground — and the hub has to sit above all
   three apps without belonging to any of them. Loading both would mean two
   competing body rules and a fight over the same class names.
   --------------------------------------------------------------------------- */

@font-face {
  font-family: "Noto Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/noto-sans-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Noto Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/noto-sans-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Noto Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/noto-sans-devanagari.woff2") format("woff2");
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
}
@font-face {
  font-family: "Noto Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/noto-sans-greek.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

:root {
  --paper: #F7F8FB;
  --ink: #14161D;
  --ink-2: #3A4050;
  --muted: #6B7285;
  --rule: #DCE0EA;
  --rule-soft: #E9ECF3;
  --focus: #0B7BDC;
  --shadow: 0 1px 2px rgba(20, 22, 29, .05), 0 18px 34px -18px rgba(20, 22, 29, .3);
  --shadow-lift: 0 2px 6px rgba(20, 22, 29, .07), 0 36px 60px -22px rgba(20, 22, 29, .42);
}

*, *::before, *::after { box-sizing: border-box; }

.hub-body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Sans", "Segoe UI", Tahoma, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.hub-shell {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px 64px;
}

.hub-body a { color: inherit; }
.hub-body :focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 3px; }

.mono {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ---- masthead ---------------------------------------------------------- */
.hub-masthead {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 34px 0 24px;
  border-bottom: 1px solid var(--rule);
}

.hub-wordmark {
  font-weight: 800;
  font-size: 1.32rem;
  letter-spacing: -.02em;
  text-decoration: none;
}
.hub-wordmark .a { color: var(--ink); }
.hub-wordmark .b { color: var(--muted); font-weight: 500; }

.hub-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 22px;
  color: var(--muted);
}
.hub-meta a { text-decoration: none; }
.hub-meta a:hover { color: var(--ink); }

/* ---- language picker --------------------------------------------------- */
.lang-wrap { position: relative; display: inline-flex; }

.lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: #FFFFFF;
  color: var(--ink-2);
  padding: 9px 15px;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}
.lang-pill .caret { font-size: 8px; opacity: .55; }

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 90;
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: 340px;
  overflow-y: auto;
  border-radius: 14px;
  border: 1px solid var(--rule);
  background: #FFFFFF;
  box-shadow: var(--shadow-lift);
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
}
.lang-menu[hidden] { display: none; }
.lang-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 14px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
.lang-menu a:hover, .lang-menu a:focus-visible { background: var(--rule-soft); }
.lang-menu [aria-current="true"] { font-weight: 700; }
.lang-menu [aria-current="true"]::after { content: "\2713"; font-size: 11px; }

/* ---- opening ----------------------------------------------------------- */
.hub-opening {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  padding: 76px 0 58px;
  max-width: 720px;
  margin: 0 auto;
}

.hub-opening h1 {
  margin: 0;
  font-weight: 800;
  font-size: clamp(2rem, 5.2vw, 3.2rem);
  line-height: 1.06;
  letter-spacing: -.03em;
  text-wrap: balance;
}

.hub-standfirst { margin: 0; font-size: 1.14rem; line-height: 1.55; color: var(--ink-2); }

.hub-chooser {
  color: var(--muted);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule-soft);
  margin-bottom: 24px;
  text-align: center;
}

/* ---- tiles -------------------------------------------------------------
   Every tile is the same shape, so the row reads as one object; everything
   inside belongs to its own app. The icon is absolutely positioned rather
   than spaced with a margin, so copy of different lengths cannot move it. */
.hub-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
@media (max-width: 980px) { .hub-tiles { grid-template-columns: 1fr; } }

.tile {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  min-height: 460px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px 28px 28px;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 260ms cubic-bezier(.2, .7, .3, 1), box-shadow 260ms cubic-bezier(.2, .7, .3, 1);
}
.tile:hover, .tile:focus-visible { transform: translateY(-5px); box-shadow: var(--shadow-lift); }
@media (max-width: 980px) { .tile { min-height: 380px; } }

.tile-bg { position: absolute; inset: 0; }
.tile-bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-scrim { position: absolute; inset: 0; }

.tile-icon {
  position: absolute;
  top: 30px;
  left: 28px;
  width: 84px;
  height: 84px;
  border-radius: 19px;
  display: block;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .35), 0 16px 34px -12px rgba(0, 0, 0, .75);
}

.tile-body { position: relative; display: flex; flex-direction: column; }
.tile-body h2 {
  margin: 0;
  font-weight: 800;
  font-size: 1.62rem;
  letter-spacing: -.028em;
  line-height: 1.08;
  color: #FFFFFF;
}
.tile-line { margin: 10px 0 0; font-size: .95rem; line-height: 1.5; color: rgba(255, 255, 255, .8); }

.tile-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
}
.tile-status { display: flex; align-items: center; gap: 8px; }
.tile-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.tile-platform { color: rgba(255, 255, 255, .55); }
.tile-open { font-weight: 800; font-size: .88rem; letter-spacing: -.01em; text-transform: none; color: #FFFFFF; }
.tile-open .arrow { display: inline-block; transition: transform 260ms cubic-bezier(.2, .7, .3, 1); }
.tile:hover .tile-open .arrow { transform: translateX(5px); }

/* ---- colophon ---------------------------------------------------------- */
.hub-colophon {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
}
.hub-colophon-text { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.hub-colophon p { margin: 0; font-size: .95rem; line-height: 1.55; }
.hub-colophon strong { color: var(--ink-2); font-weight: 600; }
.hub-legal { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.hub-legal a { text-decoration: none; }
.hub-legal a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}

/* RTL: the tile icon is pinned to the reading-start edge, not the left. */
[dir="rtl"] .tile-icon { left: auto; right: 28px; }
[dir="rtl"] .lang-menu { right: auto; left: 0; }

/* ---- root language selector -------------------------------------------
   The front door at "/", before any locale is chosen. Same chrome as the
   hub, so arriving at the site looks like arriving at the site whichever
   door you come through. */
.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.lang-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: #FFFFFF;
  text-decoration: none;
  color: var(--ink);
  transition: transform 200ms cubic-bezier(.2, .7, .3, 1),
              box-shadow 200ms cubic-bezier(.2, .7, .3, 1),
              border-color 200ms ease;
}
.lang-card:hover, .lang-card:focus-visible {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--focus) 40%, var(--rule));
  box-shadow: var(--shadow);
}

.lang-card .code {
  flex: none;
  min-width: 34px;
  padding: 4px 7px;
  border-radius: 6px;
  background: var(--rule-soft);
  color: var(--muted);
  text-align: center;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .68rem;
  letter-spacing: .06em;
}

.lang-card .name { font-size: 1rem; font-weight: 600; line-height: 1.3; }

/* ---- app landing pages -------------------------------------------------
   One layout, themed per app through custom properties. Each app owns its
   ground and accent — that is the whole point of giving them separate pages
   — but the chrome around them (back-link, language picker, legal footer)
   stays identical so the site still feels like one site. */
.app-body {
  margin: 0;
  background: var(--app-bg);
  color: var(--app-ink);
  font-family: "Noto Sans", "Segoe UI", Tahoma, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.app-body a { color: var(--app-accent); }
.app-body :focus-visible { outline: 2px solid var(--app-accent); outline-offset: 3px; border-radius: 3px; }

.app-network  { --app-bg: #04101D; --app-ink: #E8F4FB; --app-accent: #7FDBFF; --app-cta: #0088FA; --app-cta-ink: #04101D; --app-dim: rgba(232,244,251,0.62); --app-rule: rgba(232,244,251,0.14); --app-tint: rgba(95,216,255,0.14); }
.app-tengerim { --app-bg: #0B0714; --app-ink: #F4F6FB; --app-accent: #FFB070; --app-cta: #FF7A18; --app-cta-ink: #0B0714; --app-dim: rgba(244,246,251,0.62); --app-rule: rgba(244,246,251,0.14); --app-tint: rgba(255,122,24,0.16); }

.app-atmos { position: absolute; inset: 0; height: 900px; pointer-events: none; }
.app-network .app-atmos {
  background: radial-gradient(48% 40% at 74% 26%, rgba(18,57,92,0.9) 0%, rgba(4,16,29,0) 72%),
              radial-gradient(40% 34% at 16% 74%, rgba(95,216,255,0.13) 0%, rgba(4,16,29,0) 70%);
}
.app-tengerim .app-atmos {
  background: radial-gradient(40% 32% at 10% 6%, rgba(255,122,24,0.42) 0%, rgba(255,122,24,0) 70%),
              radial-gradient(38% 30% at 90% 10%, rgba(255,45,149,0.38) 0%, rgba(255,45,149,0) 70%),
              radial-gradient(42% 34% at 4% 62%, rgba(16,217,160,0.3) 0%, rgba(16,217,160,0) 70%),
              radial-gradient(46% 38% at 96% 68%, rgba(123,59,255,0.4) 0%, rgba(123,59,255,0) 72%);
}

.app-shell { position: relative; width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 28px 64px; }

.app-topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap; padding: 30px 0 0;
}
.app-back { display: inline-flex; align-items: center; gap: 9px; color: var(--app-dim); text-decoration: none; }
.app-back:hover { color: var(--app-ink); }
.app-topbar-right { display: inline-flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.app-status { color: rgba(255,255,255,0.45); }

.app-body .lang-pill { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.28); color: var(--app-ink); }
.app-body .lang-menu { background: #14161D; border-color: rgba(255,255,255,0.18); }
.app-body .lang-menu a { color: #EDEFF6; }
.app-body .lang-menu a:hover, .app-body .lang-menu a:focus-visible { background: rgba(255,255,255,0.09); }

.app-hero {
  display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 56px; align-items: center; padding: 70px 0 84px;
}
@media (max-width: 900px) { .app-hero { grid-template-columns: 1fr; gap: 36px; padding: 48px 0 56px; } }

.app-hero-text { display: flex; flex-direction: column; gap: 20px; }
.app-icon { width: 92px; height: 92px; border-radius: 21px; display: block; box-shadow: 0 2px 6px rgba(0,0,0,0.5), 0 22px 44px -14px rgba(0,0,0,0.9); }
.app-hero h1 { margin: 0; font-weight: 800; font-size: clamp(2.2rem, 5.4vw, 3.9rem); line-height: 1.02; letter-spacing: -.02em; }
.app-tagline { margin: 0; font-size: 1.24rem; line-height: 1.5; color: rgba(255,255,255,0.82); max-width: 30em; }

.app-cta-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.app-cta {
  display: inline-flex; align-items: center; gap: 10px; padding: 15px 26px;
  border-radius: 8px; text-decoration: none; font-weight: 600;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .75rem; letter-spacing: .06em; text-transform: uppercase;
  background: var(--app-cta); color: var(--app-cta-ink); border: 1px solid transparent;
}
.app-cta.secondary { background: transparent; color: var(--app-ink); border-color: rgba(255,255,255,0.28); }
.app-note { color: rgba(255,255,255,0.5); }

.app-art { display: flex; justify-content: center; }
.app-art svg { width: 100%; max-width: 440px; height: auto; }

.app-label {
  color: rgba(255,255,255,0.5); padding-bottom: 14px;
  border-bottom: 1px solid var(--app-rule); margin-bottom: 32px;
}

/* Five points on Tengerim, four on Network Puzzle: auto-fit rather than a
   fixed count, so adding one does not mean editing the grid too. */
.app-points { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 24px; padding-bottom: 76px; }
@media (max-width: 1000px) { .app-points { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .app-points { grid-template-columns: 1fr; } }
.app-point { display: flex; flex-direction: column; gap: 12px; }
.app-point-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--app-tint); display: flex; align-items: center; justify-content: center; }
.app-point h3 { margin: 0; font-weight: 800; font-size: 1.2rem; }
.app-point p { margin: 0; font-size: .95rem; line-height: 1.6; color: rgba(255,255,255,0.7); }

/* Arcade / Real showcase */
.app-modes {
  padding: 34px 38px 38px; border: 1px solid rgba(95,216,255,0.22); border-radius: 14px;
  background: linear-gradient(140deg, rgba(18,57,92,0.55) 0%, rgba(4,16,29,0.2) 70%);
  margin-bottom: 72px;
}
.app-tabs { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; flex-wrap: wrap; }
.app-tab {
  padding: 13px 26px; border-radius: 999px; cursor: pointer;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600;
  background: transparent; color: rgba(232,244,251,0.72); border: 1px solid rgba(232,244,251,0.28);
}
.app-tab[aria-selected="true"] { background: #5FD8FF; color: #04101D; border-color: #5FD8FF; }
.app-pane { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: 46px; align-items: center; }
@media (max-width: 900px) { .app-pane { grid-template-columns: 1fr; gap: 30px; } .app-modes { padding: 26px 22px 30px; } }
.app-pane[hidden] { display: none; }
.app-pane-text { display: flex; flex-direction: column; gap: 16px; }
.app-pane h2 { margin: 0; font-weight: 800; font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.1; letter-spacing: -.015em; }
.app-pane p { margin: 0; font-size: .98rem; line-height: 1.6; color: rgba(232,244,251,0.78); }

.app-footer {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 28px; flex-wrap: wrap; padding-top: 28px; border-top: 1px solid var(--app-rule);
}
.app-footer p { margin: 0; font-size: .92rem; line-height: 1.55; color: var(--app-dim); }
.app-footer strong { color: var(--app-ink); font-weight: 600; }
.app-footer-legal { display: flex; gap: 20px; flex-wrap: wrap; }
.app-footer-legal a { color: var(--app-dim); text-decoration: none; }
.app-footer-legal a:hover { color: var(--app-ink); text-decoration: underline; }

[dir="rtl"] .app-back span:first-child { transform: scaleX(-1); }

/* ---- legal pages in hub style ------------------------------------------ */
.legal-masthead { padding-bottom: 20px; }

.wordmark-back {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  color: inherit;
}
.wordmark-back .back-arrow {
  color: var(--muted);
  font-weight: 500;
  transition: transform 160ms ease, color 160ms ease;
}
.wordmark-back:hover .back-arrow { color: var(--ink); transform: translateX(-3px); }

.legal-opening {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 0 28px;
}
.legal-opening h1 {
  margin: 0;
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -.03em;
  text-wrap: balance;
}

.legal-sheet {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 44px 44px;
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow: var(--shadow);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink-2);
}
@media (max-width: 640px) { .legal-sheet { padding: 28px 22px 32px; } }

.legal-sheet p { margin: 0 0 18px; }
.legal-sheet p:last-child { margin-bottom: 0; }
.legal-sheet strong { color: var(--ink); font-weight: 700; }
.legal-sheet a { color: var(--focus); overflow-wrap: anywhere; }

/* legal.js drives this picker, so it keeps its own class names and toggles
   .open rather than the [hidden] the hub's build-time picker uses. */
.hub-body .language-picker { position: relative; display: inline-flex; }
.hub-body .language-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-2);
  cursor: pointer;
  font: inherit;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.hub-body .language-toggle:hover { border-color: var(--muted); color: var(--ink); }

.hub-body .language-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  min-width: 180px;
  max-height: 320px;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: var(--shadow-lift);
}
.hub-body .language-picker.open .language-menu { display: block; }
.hub-body .language-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: .92rem;
  text-transform: none;
  letter-spacing: 0;
}
.hub-body .language-option:hover,
.hub-body .language-option:focus-visible { background: var(--rule-soft); }
.hub-body .language-option[aria-selected="true"] { font-weight: 700; color: var(--ink); }

/* ---- legal documents in their app's own style -------------------------- */
.app-legal-opening { max-width: 780px; margin: 0 auto; padding: 52px 0 26px; }
.app-legal-opening h1 {
  margin: 0; font-weight: 800; letter-spacing: -.03em; line-height: 1.08;
  font-size: clamp(1.7rem, 3.8vw, 2.5rem); text-wrap: balance;
}

.app-legal-sheet {
  max-width: 780px; margin: 0 auto; padding: 38px 42px 42px;
  background: rgba(255,255,255,0.035);
  border: 1px solid var(--app-rule); border-radius: 14px;
  font-size: 1rem; line-height: 1.72; color: rgba(255,255,255,0.78);
}
@media (max-width: 640px) { .app-legal-sheet { padding: 26px 20px 30px; } }

.app-legal-sheet h2 {
  margin: 34px 0 12px; font-weight: 800; font-size: 1.12rem;
  letter-spacing: -.01em; color: var(--app-ink);
}
.app-legal-sheet h2:first-child { margin-top: 0; }
.app-legal-sheet h3 { margin: 22px 0 8px; font-weight: 700; font-size: 1rem; color: var(--app-ink); }
.app-legal-sheet p { margin: 0 0 16px; }
.app-legal-sheet p:last-child { margin-bottom: 0; }
.app-legal-sheet ul, .app-legal-sheet ol { margin: 0 0 16px; padding-left: 22px; }
.app-legal-sheet li { margin-bottom: 7px; }
.app-legal-sheet strong { color: var(--app-ink); font-weight: 700; }
.app-legal-sheet a { color: var(--app-accent); overflow-wrap: anywhere; }
.app-legal-sheet table { width: 100%; border-collapse: collapse; margin: 0 0 18px; display: block; overflow-x: auto; }
.app-legal-sheet th, .app-legal-sheet td {
  border: 1px solid var(--app-rule); padding: 9px 11px; text-align: left; font-size: .93rem;
}
.app-legal-sheet th { color: var(--app-ink); font-weight: 700; }

.app-legal-sheet .np-callout {
  padding: 16px 18px; border-radius: 10px;
  background: var(--app-tint); border: 1px solid var(--app-rule);
}
.app-legal-sheet .np-action {
  display: inline-block; padding: 10px 18px; border-radius: 999px;
  background: var(--app-cta); color: var(--app-cta-ink);
  font-weight: 700; text-decoration: none;
}
.app-legal-sheet .np-action:hover { filter: brightness(1.08); }

.app-legal-nav {
  display: flex; flex-wrap: wrap; gap: 10px;
  max-width: 780px; margin: 26px auto 0;
}
.app-legal-nav a {
  padding: 8px 15px; border-radius: 999px;
  border: 1px solid var(--app-rule); color: var(--app-dim); text-decoration: none;
}
.app-legal-nav a:hover { border-color: var(--app-accent); color: var(--app-ink); }
.app-legal-nav a[aria-current="page"] { background: var(--app-tint); color: var(--app-ink); border-color: var(--app-accent); }

.app-hub-link { text-decoration: none; }
.app-hub-link:hover { color: var(--app-ink); }

/* The app legal pages reuse legal.js-style picker markup, not the build-time one. */
.app-body .language-picker { position: relative; display: inline-flex; }
.app-body .language-toggle {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.28);
  border-radius: 999px; color: var(--app-ink); cursor: pointer;
  font: inherit; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
}
.app-body .language-toggle:hover { border-color: var(--app-accent); }
.app-body .language-menu {
  display: none; position: absolute; top: calc(100% + 8px); right: 0; z-index: 20;
  min-width: 180px; max-height: 320px; overflow-y: auto;
  margin: 0; padding: 6px; list-style: none;
  background: #14161D; border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px; box-shadow: var(--shadow-lift);
}
.app-body .language-picker.open .language-menu { display: block; }
.app-body .language-option {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 12px; border-radius: 8px; cursor: pointer;
  font-size: .92rem; text-transform: none; letter-spacing: 0; color: #EDEFF6;
}
.app-body .language-option:hover { background: rgba(255,255,255,0.09); }
.app-body .language-option[aria-selected="true"] { font-weight: 700; }

/* ---- imprints keep the hub's paper look -------------------------------- */
.legal-sheet h2 { margin: 30px 0 10px; font-weight: 800; font-size: 1.1rem; color: var(--ink); }
.legal-sheet h2:first-child { margin-top: 0; }
.legal-sheet ul { margin: 0 0 18px; padding-left: 22px; }
.legal-sheet li { margin-bottom: 7px; }
.legal-sheet .np-callout {
  padding: 16px 18px; border-radius: 10px;
  background: var(--rule-soft); border: 1px solid var(--rule);
}
.legal-sheet .np-action {
  display: inline-block; padding: 10px 18px; border-radius: 999px;
  background: var(--ink); color: var(--paper); font-weight: 700; text-decoration: none;
}
