@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500&family=DM+Sans:wght@400;500;600&family=Manrope:wght@300;400;500;600&display=swap');
/* The North Star world: Landing 2's look on the run tab and a saved plan.
 *
 * theme-toggle.js sets html[data-world="northstar"] when a run or a plan is
 * opened from Landing 2 (?world=landing-2) and paints the page in the North
 * Star palette (lib/palette.js), so colours still come from the derivation
 * and keep its contrast rules. This file adds what a palette cannot carry:
 * Landing 2's type (DM Sans, Manrope, an italic serif for emphasis), its thin
 * outlines and small radii, and its atmosphere. Every rule is scoped to the
 * world, so no other page is touched. index.html loads it beside
 * night-world.css, and only index.html does: so both worlds' fonts come in
 * through the one @import below rather than a <link> in the page, which keeps
 * the page inside its first-visit budget (test/page-weight.mjs).
 */
html[data-world="northstar"] {
  --font-body: "DM Sans", "Vazirmatn", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Manrope", "Vazirmatn", -apple-system, "Segoe UI", sans-serif;
  --font-mono-ns: ui-monospace, SFMono-Regular, Menlo, monospace;
}
html[data-world="northstar"][data-theme="dark"] { color-scheme: dark; }

/* Atmosphere: a deep teal glow behind the page by night, parchment by day. */
html[data-world="northstar"][data-theme="dark"] body {
  background:
    radial-gradient(60% 45% at 50% -10%, rgba(35, 63, 75, 0.55), transparent 70%),
    radial-gradient(40% 30% at 90% 0%, color-mix(in srgb, var(--c-accent) 9%, transparent), transparent 70%),
    var(--c-ground);
  background-attachment: fixed;
}
html[data-world="northstar"][data-theme="light"] body {
  background:
    radial-gradient(55% 40% at 50% -10%, rgba(42, 80, 100, 0.08), transparent 70%),
    var(--c-ground);
  background-attachment: fixed;
}

/* Type: light Manrope headings with a serif italic for emphasis, as Landing 2
   sets them; panel titles are its small spaced monospace labels. */
html[data-world="northstar"] h1,
html[data-world="northstar"] h2 {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: -0.02em;
}
html[data-world="northstar"] h1 em,
html[data-world="northstar"] h2 em { font-family: Georgia, "Iowan Old Style", serif; font-style: italic; color: var(--c-accent); }
html[data-world="northstar"] .panel-head h2,
html[data-world="northstar"] .k,
html[data-world="northstar"] .section-kicker,
html[data-world="northstar"] .run-banner .rb-note {
  font-family: var(--font-mono-ns);
  font-weight: 500;
  font-size: 12px;   /* the site's floor; Landing 2 itself goes smaller */
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-ink-3);
}
html[data-world="northstar"] .panel-head h2 { color: var(--c-accent); }

/* Surfaces: thin outlines and small radii, no heavy shadows. */
html[data-world="northstar"] .pol-card,
html[data-world="northstar"] .card,
html[data-world="northstar"] .panel {
  border-color: var(--c-line);
  border-radius: 8px;
  box-shadow: none;
}
html[data-world="northstar"] .pri,
html[data-world="northstar"] .ghost,
html[data-world="northstar"] .acct-signin,
html[data-world="northstar"] .theme-toggle { border-radius: 5px; }

/* Fields: a raised surface by night, as Landing 2's inputs are. */
html[data-world="northstar"][data-theme="dark"],
html[data-world="northstar"][data-theme="dark"] body {   /* body too: the palette also writes its tokens on body.theme-dark */
  --c-field: #142632;
  --c-on-field: var(--c-ink);
}
html[data-world="northstar"] input::placeholder,
html[data-world="northstar"] textarea::placeholder { color: var(--c-ink-3); opacity: 1; }

/* The language switch: one outlined group, the chosen language in gold. */
html[data-world="northstar"] .lang-toggle {
  display: inline-flex;
  border: 1px solid var(--c-line);
  border-radius: 6px;
  padding: 3px;
  background: transparent;
}
html[data-world="northstar"] .lang-toggle button,
html[data-world="northstar"] body .lang-toggle button {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--c-ink-2);
  font: 500 12px var(--font-body);
}
html[data-world="northstar"] .lang-toggle button[aria-pressed="true"],
html[data-world="northstar"] body .lang-toggle button.active {
  background: var(--c-accent);
  color: var(--c-on-accent);
}
