/* Norelyn Learn standalone brand + theme layer. */
:root { color-scheme: light dark; }

body.learn-page {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "PingFang TC", sans-serif;
}

.learn-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.learn-brand-lockup .brand-mark {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.learn-brand-lockup .brand-wordmark {
  width: auto;
  height: 18px;
  max-width: 118px;
}

.brand-divider {
  color: var(--muted);
  font-size: 18px;
  font-weight: 400;
  opacity: .55;
}

.brand-product {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.site-tools {
  display: inline-flex;
  align-items: center;
  margin-left: 2px;
  padding: 3px;
  border: 1px solid color-mix(in srgb, var(--line, #d7dfdf) 86%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface, #fff) 66%, transparent);
  backdrop-filter: blur(12px);
}

.theme-toggle {
  min-height: 31px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 8px;
  background: color-mix(in srgb, var(--ink, #0b1628) 6%, transparent);
  color: var(--ink, inherit);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, transform .15s ease;
}

.theme-toggle:hover {
  background: color-mix(in srgb, var(--ink, #0b1628) 10%, transparent);
}

.theme-toggle:active { transform: translateY(1px); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-icon { width: 14px; height: 14px; display: grid; place-items: center; }
.theme-label { line-height: 1; }

.footer-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-brand-wordmark {
  display: block;
  width: auto;
  height: 25px;
  max-width: 170px;
}

.footer-product-label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

html[data-theme="dark"] body.learn-page {
  --bg:#0a1113;
  --surface:#11191c;
  --ink:#edf4f2;
  --muted:#98a8ad;
  --line:#28363a;
  --soft:#172124;
  --accent:#82bbb5;
  --accent-soft:#17302d;
  background:
    radial-gradient(circle at 82% 7%, rgba(53,114,107,.20), transparent 30rem),
    linear-gradient(180deg,#0b1214 0%,#0a1113 58%,#091012 100%);
  color:var(--ink);
}

html[data-theme="dark"] body.learn-page .site-header {
  background:rgba(10,17,19,.88);
  border-bottom-color:rgba(255,255,255,.075);
}

html[data-theme="dark"] body.learn-page .brand-mark,
html[data-theme="dark"] body.learn-page .brand-wordmark,
html[data-theme="dark"] body.learn-page .footer-brand-wordmark {
  filter: brightness(0) invert(1);
  opacity: .94;
}

html[data-theme="dark"] body.learn-page .nav a,
html[data-theme="dark"] body.learn-page .muted,
html[data-theme="dark"] body.learn-page .site-footer,
html[data-theme="dark"] body.learn-page .footer-product-label {
  color:var(--muted);
}

html[data-theme="dark"] body.learn-page .site-tools {
  background:rgba(17,25,28,.72);
  border-color:#2b393d;
}

html[data-theme="dark"] body.learn-page .theme-toggle {
  color:var(--ink);
  background:rgba(255,255,255,.055);
}

html[data-theme="dark"] body.learn-page .theme-toggle:hover {
  background:rgba(255,255,255,.09);
}

html[data-theme="dark"] body.learn-page .learn-search-control,
html[data-theme="dark"] body.learn-page .article-note,
html[data-theme="dark"] body.learn-page .article-flow {
  background:color-mix(in srgb,var(--surface) 78%,transparent);
}

html[data-theme="dark"] body.learn-page .learn-search-control:focus-within {
  background:color-mix(in srgb,var(--surface) 92%,transparent);
}

html[data-theme="dark"] body.learn-page .article-body code {
  background:color-mix(in srgb,var(--surface) 88%,transparent);
}

html[data-theme="dark"] body.learn-page .site-footer,
html[data-theme="dark"] body.learn-page .section-kicker,
html[data-theme="dark"] body.learn-page .learn-list,
html[data-theme="dark"] body.learn-page .learn-card,
html[data-theme="dark"] body.learn-page .article-related-card {
  border-color:var(--line);
}

@media (min-width:901px) and (max-width:1120px) {
  .nav { gap: 18px; }
  .theme-toggle { width:31px; padding:0; justify-content:center; }
  .theme-label { display:none; }
}

@media (max-width:900px) {
  .learn-brand-lockup .brand-wordmark { height:17px; max-width:108px; }

  .site-tools {
    width:100%;
    margin:10px 0 0;
    padding:8px;
    justify-content:flex-end;
    border-radius:12px;
  }

  .theme-toggle {
    min-height:38px;
    padding-inline:12px;
  }

  html[data-theme="dark"] body.learn-page .nav {
    background:var(--bg);
    border-bottom-color:var(--line);
  }
}

@media (max-width:430px) {
  .learn-brand-lockup { gap:7px; }
  .learn-brand-lockup .brand-wordmark { max-width:96px; }
  .brand-product { font-size:13px; }
  .theme-toggle { padding-inline:10px; }
}
