:root {
  --au-ink: #0f172a;
  --au-body: #334155;
  --au-muted: #64748b;
  --au-line: #e2e8f0;
  --au-paper: #ffffff;
  --au-tint: #f1f5f9;
  --au-accent: #2563eb;
  --au-accent-ink: #1d4ed8;
  --au-radius: 14px;
  --au-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px rgba(15, 23, 42, .06);
  --au-shadow-lg: 0 24px 60px rgba(15, 23, 42, .12);
  --au-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html { scroll-behavior: smooth; }
body {
  color: var(--au-body);
  background: var(--au-tint);
  font-family: var(--au-sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--au-accent); }
a:hover { color: var(--au-accent-ink); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .55);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Header / navigation ---------- */
.pkp_structure_head { background: var(--au-paper); border-bottom: 1px solid var(--au-line); }
.pkp_head_wrapper { max-width: 1240px; min-height: 96px; margin: 0 auto; }
.pkp_site_name { padding: 1.25rem 1.5rem; }
.pkp_site_name .is_text {
  color: var(--au-ink);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.02em;
}
.pkp_site_name .is_image img { max-height: 64px; }
.pkp_navigation_primary_wrapper,
.pkp_navigation_user_wrapper { background: var(--au-paper); }
.pkp_navigation_primary > li > a {
  color: var(--au-body);
  font-weight: 600;
  border: 0;
  padding: .9rem .25rem;
  margin: 0 .9rem;
}
.pkp_navigation_primary > li > a:hover,
.pkp_navigation_primary > li > a:focus { color: var(--au-accent); box-shadow: inset 0 -2px 0 var(--au-accent); }
.pkp_navigation_user > li > a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: .35rem .9rem;
  border-radius: 999px;
  color: var(--au-body);
  font-weight: 600;
  text-shadow: none;
  background: var(--au-tint);
}
.pkp_navigation_user > li > a:hover,
.pkp_navigation_user > li > a:focus { background: var(--au-accent); color: #fff; }
.aurora-theme-toggle-item { display: inline-flex; }
.aurora-theme-toggle {
  display: inline-grid;
  width: 36px;
  height: 36px;
  margin-left: .25rem;
  place-items: center;
  padding: 0;
  background: var(--au-tint);
  border: 1px solid var(--au-line);
  border-radius: 999px;
  color: var(--au-ink);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.aurora-theme-toggle:hover { background: var(--au-accent); color: #fff; transform: translateY(-1px); }

/* ---------- Layout shell ---------- */
.pkp_structure_content { padding: 0; max-width: none; background: var(--au-tint); }
.pkp_structure_main { float: none; width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 1.5rem 4rem; }
.pkp_structure_main:before, .pkp_structure_main:after { display: none; }
.pkp_structure_sidebar { display: none; }
.pkp_page_title { display: none; }

/* ---------- Hero ---------- */
.aurora-journal { margin-top: 0; }
.aurora-hero {
  position: relative;
  background: var(--au-paper);
  border-bottom: 1px solid var(--au-line);
  overflow: hidden;
}
.aurora-hero::before {
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--au-accent) 0%, #38bdf8 100%);
  content: "";
}
.aurora-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4.5rem) 1.5rem;
  align-items: center;
}
.aurora-eyebrow {
  margin: 0 0 .65rem;
  color: var(--au-accent);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.aurora-hero h1 {
  margin: 0;
  color: var(--au-ink);
  font-size: clamp(2rem, 4.5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.03em;
}
.aurora-hero__lead { max-width: 56ch; margin: 1.25rem 0 0; color: var(--au-body); font-size: 1.05rem; line-height: 1.7; }
.aurora-hero__lead p { margin: 0 0 .75rem; }
.aurora-hero__actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.75rem; }
.aurora-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: .7rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.aurora-btn--primary { background: var(--au-accent); color: #fff; box-shadow: var(--au-shadow); }
.aurora-btn--primary:hover { background: var(--au-accent-ink); color: #fff; transform: translateY(-1px); }
.aurora-btn--ghost { background: transparent; color: var(--au-ink); border-color: var(--au-line); }
.aurora-btn--ghost:hover { background: var(--au-tint); color: var(--au-ink); transform: translateY(-1px); }
.aurora-hero__media { align-self: stretch; }
.aurora-hero__media img {
  width: 100%;
  height: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: var(--au-radius);
  box-shadow: var(--au-shadow-lg);
}

/* ---------- Two-column body ---------- */
.aurora-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2.5rem;
  padding-top: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}
.aurora-main { min-width: 0; }
.aurora-block-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin: 0 0 1.75rem;
}
.aurora-block-head h2 { margin: .25rem 0 0; color: var(--au-ink); font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em; }
.aurora-kicker { margin: 0; color: var(--au-accent); font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.aurora-link {
  flex: 0 0 auto;
  color: var(--au-accent);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.aurora-link:hover { border-bottom-color: var(--au-accent); }

/* ---------- Latest articles (restyle default issue TOC) ---------- */
.aurora-articles { margin: -.5rem 0 0; }
.aurora-articles .cmp_article_list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.aurora-articles .cmp_article_list > li,
.aurora-articles .obj_article_details {
  margin: 0;
  padding: 1.5rem;
  background: var(--au-paper);
  border: 1px solid var(--au-line);
  border-radius: var(--au-radius);
  box-shadow: var(--au-shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.aurora-articles .obj_article_details:hover { transform: translateY(-2px); box-shadow: var(--au-shadow-lg); }
.aurora-articles .obj_article_details > .image { display: none; }
.aurora-articles .obj_article_details .title { margin: 0 0 .35rem; font-size: 1.2rem; font-weight: 700; line-height: 1.3; }
.aurora-articles .obj_article_details .title a { color: var(--au-ink); text-decoration: none; }
.aurora-articles .obj_article_details .title a:hover { color: var(--au-accent); }
.aurora-articles .obj_article_details .meta,
.aurora-articles .obj_article_details .authors { color: var(--au-muted); font-size: .92rem; }
.aurora-articles .obj_article_details .series { display: inline-block; margin-bottom: .6rem; color: var(--au-accent); font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.aurora-articles .obj_article_details .galleys { margin-top: .85rem; }
.aurora-articles .cmp_galleys li,
.aurora-articles .obj_galley_link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: .3rem .8rem;
  border: 1px solid var(--au-line);
  border-radius: 999px;
  color: var(--au-body);
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
}
.aurora-articles .obj_galley_link:hover { background: var(--au-accent); border-color: var(--au-accent); color: #fff; }
.aurora-articles .obj_article_details .doi a,
.aurora-articles .obj_article_details .doi { color: var(--au-muted); font-size: .82rem; }
.aurora-articles .obj_article_details .doi a:hover { color: var(--au-accent); }
.aurora-articles .section { margin-top: 1.5rem; }
.aurora-articles .section:first-child { margin-top: 0; }
.aurora-articles .section .title {
  margin: 0 0 1rem;
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--au-tint);
  color: var(--au-ink);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -.01em;
}

/* ---------- Empty state ---------- */
.aurora-empty {
  padding: 2.5rem;
  text-align: center;
  background: var(--au-paper);
  border: 1px dashed var(--au-line);
  border-radius: var(--au-radius);
}
.aurora-empty h2 { margin: 0 0 .5rem; color: var(--au-ink); }
.aurora-empty p { margin: 0 0 1.25rem; color: var(--au-muted); }

/* ---------- Sidebar ---------- */
.aurora-side {
  position: sticky;
  top: 1rem;
  display: grid;
  gap: 1.25rem;
}
.aurora-card {
  padding: 1.5rem;
  background: var(--au-paper);
  border: 1px solid var(--au-line);
  border-radius: var(--au-radius);
  box-shadow: var(--au-shadow);
}
.aurora-card__title {
  margin: 0 0 1rem;
  padding-bottom: .65rem;
  border-bottom: 1px solid var(--au-line);
  color: var(--au-ink);
  font-size: 1rem;
  font-weight: 700;
}
.aurora-snapshot__list { margin: 0; }
.aurora-snapshot__list > div { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--au-tint); }
.aurora-snapshot__list > div:last-of-type { border-bottom: 0; }
.aurora-snapshot__list dt { margin: 0; color: var(--au-muted); font-size: .85rem; }
.aurora-snapshot__list dd { margin: 0; color: var(--au-ink); font-weight: 600; font-size: .92rem; }
.aurora-snapshot__badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.aurora-badge {
  padding: .28rem .65rem;
  background: rgba(37, 99, 235, .1);
  border-radius: 999px;
  color: var(--au-accent-ink);
  font-size: .75rem;
  font-weight: 600;
}
.aurora-quick__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.aurora-quick__list a {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 0;
  color: var(--au-body);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--au-tint);
}
.aurora-quick__list a::before { color: var(--au-accent); content: "\2192"; transition: transform .15s ease; }
.aurora-quick__list a:hover { color: var(--au-accent); }
.aurora-quick__list a:hover::before { transform: translateX(3px); }
.aurora-quick__list li:last-child a { border-bottom: 0; }

/* ---------- Announcements (default component restyle) ---------- */
.aurora-side .cmp_announcements { margin: 0; }
.aurora-side .cmp_announcements h2,
.aurora-side .cmp_announcements h3 { margin: 0 0 1rem; padding-bottom: .65rem; border-bottom: 1px solid var(--au-line); color: var(--au-ink); font-size: 1rem; font-weight: 700; }
.aurora-side .obj_announcement_summary { padding: .25rem 0 .85rem; border-bottom: 1px solid var(--au-tint); }
.aurora-side .obj_announcement_summary:last-child { border-bottom: 0; }
.aurora-side .obj_announcement_summary .title { margin: 0 0 .3rem; font-size: .98rem; font-weight: 700; }
.aurora-side .obj_announcement_summary .title a { color: var(--au-ink); text-decoration: none; }
.aurora-side .obj_announcement_summary .title a:hover { color: var(--au-accent); }
.aurora-side .obj_announcement_summary .date { color: var(--au-muted); font-size: .8rem; }
.aurora-side .obj_announcement_summary .summary { margin: .4rem 0 0; color: var(--au-body); font-size: .9rem; line-height: 1.6; }

/* ---------- Footer ---------- */
.pkp_structure_footer_wrapper { background: var(--au-ink); color: #cbd5e1; }
.pkp_structure_footer { max-width: 1240px; margin: 0 auto; padding: 2.5rem 1.5rem; }
.pkp_structure_footer a { color: #93c5fd; }
.pkp_structure_footer a:hover { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .aurora-layout { grid-template-columns: 1fr; gap: 2rem; }
  .aurora-side { position: static; }
}
@media (max-width: 760px) {
  .aurora-hero__inner { grid-template-columns: 1fr; padding: 2.5rem 1.25rem; }
  .aurora-hero__media { order: -1; }
  .aurora-hero__media img { max-height: 240px; }
  .pkp_structure_main { padding: 0 1.25rem 3rem; }
  .aurora-block-head { flex-direction: column; align-items: flex-start; gap: .5rem; }
}
@media (max-width: 480px) {
  .aurora-hero h1 { font-size: 2rem; }
  .aurora-hero__actions { width: 100%; }
  .aurora-btn { width: 100%; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* ---------- Dark mode ---------- */
html[data-aurora-theme="dark"] { color-scheme: dark; }
html[data-aurora-theme="dark"] body,
html[data-aurora-theme="dark"] .pkp_structure_content { background: #0b1120; color: #cbd5e1; }
html[data-aurora-theme="dark"] .pkp_structure_head,
html[data-aurora-theme="dark"] .pkp_navigation_primary_wrapper,
html[data-aurora-theme="dark"] .pkp_navigation_user_wrapper,
html[data-aurora-theme="dark"] .aurora-hero { background: #0f172a; border-color: #1e293b; }
html[data-aurora-theme="dark"] .pkp_site_name .is_text,
html[data-aurora-theme="dark"] .pkp_navigation_primary > li > a { color: #e2e8f0; }
html[data-aurora-theme="dark"] .pkp_navigation_user > li > a,
html[data-aurora-theme="dark"] .aurora-theme-toggle { background: #1e293b; color: #e2e8f0; border-color: #334155; }
html[data-aurora-theme="dark"] .aurora-hero h1,
html[data-aurora-theme="dark"] .aurora-block-head h2,
html[data-aurora-theme="dark"] .aurora-card__title,
html[data-aurora-theme="dark"] .aurora-empty h2,
html[data-aurora-theme="dark"] .aurora-articles .obj_article_details .title a,
html[data-aurora-theme="dark"] .aurora-articles .section .title { color: #f8fafc; }
html[data-aurora-theme="dark"] .aurora-hero__lead,
html[data-aurora-theme="dark"] .aurora-empty p,
html[data-aurora-theme="dark"] .aurora-articles .obj_article_details .meta,
html[data-aurora-theme="dark"] .aurora-articles .obj_article_details .authors,
html[data-aurora-theme="dark"] .aurora-articles .obj_article_details .doi { color: #94a3b8; }
html[data-aurora-theme="dark"] .aurora-articles .obj_article_details,
html[data-aurora-theme="dark"] .aurora-card,
html[data-aurora-theme="dark"] .aurora-empty { background: #111c33; border-color: #1e293b; box-shadow: none; }
html[data-aurora-theme="dark"] .aurora-articles .section .title,
html[data-aurora-theme="dark"] .aurora-card__title,
html[data-aurora-theme="dark"] .aurora-side .cmp_announcements h2,
html[data-aurora-theme="dark"] .aurora-side .cmp_announcements h3 { border-color: #1e293b; }
html[data-aurora-theme="dark"] .aurora-snapshot__list > div,
html[data-aurora-theme="dark"] .aurora-quick__list a,
html[data-aurora-theme="dark"] .aurora-side .obj_announcement_summary { border-color: #1e293b; }
html[data-aurora-theme="dark"] .aurora-snapshot__list dd,
html[data-aurora-theme="dark"] .aurora-side .obj_announcement_summary .title a { color: #f1f5f9; }
html[data-aurora-theme="dark"] .aurora-badge { background: rgba(56, 189, 248, .15); color: #7dd3fc; }
html[data-aurora-theme="dark"] .aurora-articles .obj_article_details .galleys li,
html[data-aurora-theme="dark"] .aurora-articles .obj_galley_link { border-color: #334155; color: #cbd5e1; }
html[data-aurora-theme="dark"] a { color: #60a5fa; }
html[data-aurora-theme="dark"] .aurora-link,
html[data-aurora-theme="dark"] .aurora-eyebrow,
html[data-aurora-theme="dark"] .aurora-kicker,
html[data-aurora-theme="dark"] .aurora-articles .obj_article_details .series { color: #60a5fa; }
html[data-aurora-theme="dark"] .pkp_structure_footer_wrapper { background: #020617; }
