/* Content pages (about, aurora, sunset, weather, night sky). They reuse the studio's tokens
   (see ../STYLES.md, "Content pages"); styles.css itself is not loaded, since it locks the
   page to one screen for the studio. */
:root {
  --ink: #f4f7f5;
  --secondary: #d7ded9;
  --muted: #aab4ae;
  --subtext: rgba(255, 255, 255, 0.52);
  --accent: #00ddf5;
  --accent-fill: rgba(0, 221, 245, 0.15);
  --accent-line: rgba(0, 221, 245, 0.35);
  /* The studio's picked card (styles.css --selection-card-*): a solid deep teal fill under a gradient ring. */
  --selection-card-fill: #021317;
  --selection-card-stroke: linear-gradient(180deg, rgba(150, 245, 255, 0.7) 0%, rgba(0, 221, 245, 0.32) 28%, rgba(0, 221, 245, 0.1) 72%, rgba(0, 221, 245, 0.24) 100%);
  --focus: var(--accent);
  --line: rgba(255, 255, 255, 0.12);
  --control-fill: rgba(255, 255, 255, 0.055);
  --text-micro: 8px;
  --text-meta: 10px;
  --text-caption: 12px;
  --text-body: 14px;
  --text-label: 16px;
  --text-heading: 18px;
  --text-display: 24px;
  /* Long-read headings on these pages only, a step above the studio's 18/24px. */
  --text-page-section: 20px;
  --text-page-title: 28px;
  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 650;
  --tracking-text: 0px;
  --tracking-heading: 0.5px;
  color-scheme: dark;
}
::selection { background: rgba(0, 221, 245, 0.35); color: var(--ink); }
* { box-sizing: border-box; }
body {
  margin: 0;
  background: #000;
  color: var(--secondary);
  font-family: 'Google Sans Flex', sans-serif;
  font-synthesis: none;
  font-size: var(--text-label);
  font-weight: var(--weight-regular);
  line-height: 1.6;
  letter-spacing: var(--tracking-text);
}
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
/* Wide: nav column on the left, article centred on the page (an empty column on the right
   balances the nav). Narrower: nav then article; phones: nav stacked above the article. */
.layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 600px) 220px;
  justify-content: center;
  gap: 64px;
  padding: 64px 32px 0;
}
.site-side { position: sticky; top: 64px; align-self: start; display: flex; flex-direction: column; gap: 32px; }
/* As wide as the mark, so the empty column beside it is not a link. */
.brand { display: block; align-self: flex-start; }
/* The studio's own mark (styles.css .brand-logo): the S and "ky tudyo" in one image, 40px tall here (32px in the studio). */
.brand img { display: block; width: auto; height: 40px; }
/* One numbered list, a hairline above each row and below the last. */
.site-nav ul { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--line); }
.site-nav li { margin: 0; border-top: 1px solid var(--line); }
.site-nav a { display: flex; gap: 16px; padding: 14px 0; color: var(--muted); font-size: var(--text-body); font-weight: var(--weight-medium); line-height: 1.45; text-decoration: none; }
.nav-num { flex: none; color: var(--subtext); font-weight: var(--weight-light); font-style: italic; font-synthesis-style: auto; font-variant-numeric: tabular-nums; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: var(--weight-semibold); }
.site-nav a[aria-current="page"] .nav-num { color: var(--accent); }
/* The one call to action: a mini pill under the nav, dressed as the studio's picked card
   (#section-style .style.active): a faint teal fill and a gradient ring masked to the border. */
.side-open {
  position: relative;
  align-self: flex-start;
  padding: 8px 16px;
  border: 0.5px solid transparent;
  border-radius: 999px;
  background: var(--selection-card-fill);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  color: var(--ink);
  font-size: var(--text-body);
  font-weight: var(--weight-semibold);
  line-height: 1.45;
  text-decoration: none;
  transition: background 0.16s ease;
}
.side-open::before {
  content: "";
  position: absolute;
  inset: -0.5px;
  padding: 1px;
  border-radius: inherit;
  background: var(--selection-card-stroke);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}
.side-open:hover { background: rgba(0, 221, 245, 0.12); color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .side-open { transition: none; } }
.content { min-width: 0; }

@media (max-width: 1100px) {
  .layout { grid-template-columns: 200px minmax(0, 600px); gap: 48px; }
}
@media (max-width: 760px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 40px; padding: 32px 16px 0; }
  .site-side { position: static; gap: 24px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
}
/* A window too short to hold the whole nav lets it scroll away with the page. */
@media (max-height: 560px) {
  .site-side { position: static; }
}

main { padding-bottom: 64px; }
h1, h2, h3 { color: var(--ink); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-heading); line-height: 1.2; }
h1 { font-size: var(--text-page-title); margin: 0 0 24px; }
h2 { font-size: var(--text-page-section); margin: 56px 0 16px; }
h3 { font-size: var(--text-label); margin: 32px 0 8px; }
p, ul, ol { margin: 0 0 20px; }
li { margin-bottom: 8px; }
strong { color: var(--ink); font-weight: var(--weight-semibold); }
figure { margin: 32px 0; }
figure img, figure video, figure iframe { display: block; width: 100%; height: auto; border-radius: 16px; }
figure iframe { aspect-ratio: 16 / 9; }
figcaption { margin-top: 8px; color: var(--muted); font-size: var(--text-caption); }

/* FAQ: the heading (a normal section h2), then one <details> per question (closed by default):
   a leading chevron (right when closed, down when open) and the question, with a subtle divider
   between questions. The chevron follows the question in the markup; row-reverse leads with it. */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  /* Beside the first line of a question that wraps (h3: 16px at line height 1.2). */
  align-items: flex-start;
  gap: 12px;
  padding: 18px 0;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { margin: 0; }
.faq details p { margin: 0 0 20px; padding-left: 32px; }
.faq-chevron {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(-90deg);
  transition: transform 0.2s ease, stroke 0.16s ease;
}
.faq summary:hover .faq-chevron { stroke: var(--ink); }
.faq details[open] .faq-chevron { transform: none; }
@media (prefers-reduced-motion: reduce) { .faq-chevron { transition: none; } }
.related { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; padding: 0; list-style: none; }
.related li, .thumbs li { margin: 0; }
.related a { display: block; height: 100%; padding: 12px 16px; border-radius: 12px; background: var(--control-fill); color: var(--ink); font-size: var(--text-body); font-weight: var(--weight-medium); text-decoration: none; }
.related a:hover { background: var(--control-hover); }
.related span { display: block; color: var(--muted); font-size: var(--text-caption); font-weight: var(--weight-regular); }

/* Footer: the studio panel's own (styles.css .create-footer*), same values. */
.create-footer { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 40px 0 64px; }
.create-footer-logomark { display: block; width: auto; height: 60px; user-select: none; -webkit-user-drag: none; }
.create-footer-meta { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.create-footer-version { display: flex; align-items: center; gap: 4px; margin: 0; color: var(--ink); font-size: var(--text-meta); line-height: 1; }
.create-footer-version:empty { display: none; }
.create-footer-channel { padding: 2px 4px; border: 0.5px solid rgba(255, 255, 255, 0.12); border-radius: 4px; background: rgba(255, 255, 255, 0.06); color: var(--secondary); font-size: var(--text-micro); font-weight: var(--weight-medium); line-height: 1; }
.create-footer-link { margin: 0; color: var(--muted); font-size: var(--text-meta); line-height: 1; text-align: center; text-decoration: none; opacity: 0.6; transition: color 0.16s ease, opacity 0.16s ease; }
.create-footer-link:hover { color: var(--ink); text-decoration: underline; }
.create-footer-credit { margin-top: 32px; opacity: 0.3; }
.create-footer-credit:hover { color: var(--muted); text-decoration: none; }
.create-footer-credit a { color: inherit; }
.create-footer-credit a:hover { color: var(--ink); }

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin: 0 0 24px; padding: 0; list-style: none; }
.thumbs figure { margin: 0; }
.thumbs img { border-radius: 8px; }
table { width: 100%; margin: 0 0 16px; border-collapse: collapse; font-size: var(--text-body); }
th, td { padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--ink); font-weight: var(--weight-semibold); }
