/* Aurora Forecast blog — shared base styles. Articles are standalone HTML that link this file and
   may add their own inline <style> for per-article flourishes. Loaded with ?in_app=1 inside the app,
   which hides the nav/CTA/footer chrome (see the .in-app rules). */

:root {
  --bg: #ffffff;
  --fg: #1a1a2e;
  --muted: #5b5b74;
  --rule: rgba(120,120,160,.18);
  --accent: #5b8def;
  --card: rgba(120,120,160,.07);
  --max: 40rem;
}
@media (prefers-color-scheme: dark) {
  :root { --bg:#0c0c16; --fg:#e8e8f2; --muted:#9a9ab4; --rule:rgba(150,150,190,.16);
          --accent:#7aa2ff; --card:rgba(150,150,190,.08); }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  /* Modern system sans in both scripts — Latin via SF/Segoe/Roboto, Korean via Apple SD Gothic Neo /
     Malgun Gothic (avoids the dated system-serif fallback). No web-font download. */
  font: 18px/1.72 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard",
        "Segoe UI", "Malgun Gothic", Roboto, "Helvetica Neue", sans-serif;
}
/* 18px reads well on a wide screen but runs large in a narrow phone column — a line holds only
   ~16 Korean characters, well under a comfortable ~22-25. Ease it down on phones only; the desktop
   size is untouched. Korean glyphs are visually larger than Latin, so this helps CJK most. */
@media (max-width: 480px) {
  body { font-size: 16px; line-height: 1.66; }
}
/* Korean italics render as an ugly synthetic slant — emphasize with weight instead. */
:lang(ko) em, :lang(ko) i { font-style: normal; font-weight: 600; }
:lang(ko) .pull, :lang(ko) blockquote { font-style: normal; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }

/* Chrome */
nav.breadcrumb { font: 13px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--muted); padding: 18px 0 0; }
nav.breadcrumb a { color: inherit; text-decoration: none; }
nav.breadcrumb .lang { float: right; margin-top: -3px; background: var(--card); color: var(--fg);
  border: 1px solid var(--rule); border-radius: 8px; padding: 3px 6px; font-size: 12px; cursor: pointer; }
footer { font: 13px/1.6 -apple-system, sans-serif; color: var(--muted);
  border-top: 1px solid var(--rule); margin-top: 56px; padding: 24px 0 60px; }

/* Hero — a CSS aurora, no photo required */
.hero {
  margin-top: 14px; border-radius: 18px; overflow: hidden; padding: 60px 28px 30px;
  background:
    radial-gradient(120% 90% at 20% -10%, rgba(120,255,190,.45), transparent 60%),
    radial-gradient(120% 90% at 90% 10%, rgba(150,120,255,.45), transparent 55%),
    linear-gradient(160deg, #0a1a2e, #142244 60%, #241a44);
  color: #fff;
}
.hero .kicker { font: 600 12px/1 -apple-system, sans-serif; letter-spacing: .12em;
  text-transform: uppercase; opacity: .85; }
.hero h1 { font: 700 clamp(2rem, 6vw, 3rem)/1.12 -apple-system, "Segoe UI", sans-serif;
  margin: 12px 0 14px; }
.hero .meta { font: 14px/1.5 -apple-system, sans-serif; opacity: .82; }

/* Article body */
.article { padding-top: 6px; }
.article > p:first-of-type::first-letter {
  float: left; font-size: 3.4rem; line-height: .8; padding: 6px 10px 0 0; font-weight: 700;
  color: var(--accent);
}
.article h2 { font: 700 1.5rem/1.3 -apple-system, "Segoe UI", sans-serif; margin: 2em 0 .4em; }
.article h3 { font: 700 1.2rem/1.3 -apple-system, sans-serif; margin: 1.6em 0 .3em; }
.article a { color: var(--accent); }
.article img { max-width: 100%; height: auto; border-radius: 12px; display: block; }
figure { margin: 28px 0; text-align: center; }
figure img { margin: 0 auto; }
figure.portrait img { max-width: min(100%, 440px); }   /* keep tall photos from dominating the column */
figcaption { font: 13px/1.5 -apple-system, sans-serif; color: var(--muted); margin-top: 8px; }

/* Callout + pull quote */
.callout { font-size: .95em; background: var(--card); border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 14px 18px; margin: 26px 0; }
.pull { font-size: clamp(1.3rem, 3.4vw, 1.7rem); line-height: 1.35; font-style: italic;
  text-align: center; margin: 40px 0; color: var(--fg); }
blockquote { margin: 28px 0; padding-left: 20px; border-left: 3px solid var(--rule);
  font-style: italic; color: var(--fg); }
blockquote cite { display: block; font-style: normal; font-size: .8em; color: var(--muted); margin-top: 8px; }

/* App-download CTA (hidden inside the app) — uses the store badge images */
.cta { margin: 48px 0 0; padding: 26px; border-radius: 16px; text-align: center; color: #fff;
  background: linear-gradient(135deg, #1a1a3e, #2d1b4e);
  font: 15px/1.5 -apple-system, sans-serif; }
.cta .badges { margin-top: 14px; display: flex; gap: 12px; justify-content: center; align-items: center;
  flex-wrap: wrap; }
.cta .badges a { display: inline-flex; }
.cta .badges img { height: 44px; width: auto; display: block; }

/* Blog index cards (image-top magazine style; the thumb is optional) */
.card { display: block; color: inherit; text-decoration: none; margin: 22px 0; border-radius: 14px;
  overflow: hidden; background: var(--card); transition: transform .15s ease; }
.card:hover { transform: translateY(-2px); }
.card .thumb { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.card .card-body { padding: 15px 18px 20px; }
.card h2 { font: 700 1.35rem/1.25 -apple-system, "Segoe UI", sans-serif; margin: 0 0 6px; }
.card .meta { font: 13px/1.5 -apple-system, sans-serif; color: var(--muted); }
.card p { margin: 8px 0 0; color: var(--muted); }

/* In-app: strip browser-ish chrome so it feels native inside the WebView.
   The breadcrumb TRAIL goes, but the language picker has to stay — inside the app it is the only
   way to switch the article's language, and hiding the whole <nav> took the picker with it.
   font-size:0 on the row collapses the bare "›" text nodes; the select restores its own size. */
.in-app .cta, .in-app footer { display: none; }
.in-app nav.breadcrumb { font-size: 0; text-align: right; padding: 10px 0 0; }
.in-app nav.breadcrumb a { display: none; }
.in-app nav.breadcrumb .lang { float: none; font-size: 12px; margin-top: 0; }
.in-app .hero { margin-top: 10px; }
