/*
 * Uttarakhand State Symbols — linear study article
 * ------------------------------------------------
 * Shared topbar, footer, typography and long-article sidebar are owned by
 * root assets. This file owns only the page's reading column and study blocks.
 *
 * Visual direction intentionally matches World History / World Geography:
 * blue-indigo light theme, graphite-gold dark theme, restrained cards,
 * single-column reading flow and simple headings/lists/tables.
 */

body.state-symbols-page {
  --paper: #f5f7fb;
  --paper-2: #eef2f8;
  --card: #ffffff;
  --ink: #182033;
  --ink-soft: #4e5b73;
  --ink-faint: #667189;
  --line: #cfd7e6;
  --line-soft: #e3e8f1;
  --accent: #425cc7;
  --accent-2: #2f469f;
  --accent-soft: rgba(66, 92, 199, .10);
  --success: #0b7768;
  --danger: #a9443e;
  --gold: #b5842a;
  --gold-soft: #fff6dc;
  --shadow: 0 8px 24px rgba(24, 32, 51, .055);
  --radius: 16px;

  --completion-accent: var(--accent);
  --completion-accent-strong: var(--accent-2);
  --completion-bg: var(--paper);
  --completion-border: var(--line);
  --completion-text: var(--ink);

  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

html[data-theme="dark"] body.state-symbols-page,
html.dark body.state-symbols-page {
  --paper: #111111;
  --paper-2: #181818;
  --card: #1f1f1f;
  --ink: #f3f0e9;
  --ink-soft: #c9c3b8;
  --ink-faint: #aaa49a;
  --line: #3b3935;
  --line-soft: #2c2b28;
  --accent: #d2aa6a;
  --accent-2: #efd7aa;
  --accent-soft: rgba(210, 170, 106, .14);
  --success: #65c58d;
  --danger: #e88b84;
  --gold: #d2aa6a;
  --gold-soft: rgba(210, 170, 106, .12);
  --shadow: none;
}

.state-symbols-page *,
.state-symbols-page *::before,
.state-symbols-page *::after {
  box-sizing: border-box;
}

.state-symbols-page #main-content {
  min-width: 0;
}

.state-symbols-page .reader {
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: 38px clamp(16px, 4vw, 46px) 76px;
}

.state-symbols-page .study-article {
  min-width: 0;
}

/* Breadcrumb -------------------------------------------------------------- */

.state-symbols-page .page-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 18px;
  color: var(--ink-faint);
  font-size: .78rem;
  font-weight: 700;
}

.state-symbols-page .page-breadcrumb a {
  color: var(--accent-2);
  text-decoration: none;
}

.state-symbols-page .page-breadcrumb a:hover,
.state-symbols-page .page-breadcrumb a:focus-visible {
  text-decoration: underline;
}

/* Hero -------------------------------------------------------------------- */

.state-symbols-page .hero {
  margin-bottom: 30px;
  padding: 30px 0 32px;
  border-bottom: 2px solid var(--line);
}

.state-symbols-page .eyebrow {
  display: block;
  color: var(--accent-2);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: 1.6px;
}

.state-symbols-page .hero h1 {
  margin: 9px 0 12px;
  padding-bottom: 14px;
  border-bottom: 3px solid var(--accent);
  color: var(--ink);
}

.state-symbols-page .hero > p {
  max-width: 850px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 18px !important;
  line-height: 1.72 !important;
  text-align: justify;
  text-justify: inter-word;
}

.state-symbols-page .hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.state-symbols-page .hero-meta > span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--card);
  font-size: .75rem;
  font-weight: 800;
}

/* Top-level study sections ------------------------------------------------ */

.state-symbols-page .symbol-section {
  position: relative;
  margin: 22px 0;
  padding: 24px clamp(16px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  scroll-margin-top: calc(var(--shared-topbar-height, 64px) + 14px);
}

.state-symbols-page .symbol-section > h2 {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 8px;
  color: var(--ink);
}

.state-symbols-page .symbol-section .idx {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: #fff;
  background: var(--accent);
  font-family: var(--study-font-mono);
  font-size: .82rem;
  font-weight: 800;
}

.state-symbols-page .symbol-section .actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  margin-left: auto;
}

.state-symbols-page .h2-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: var(--paper);
  cursor: pointer;
}

.state-symbols-page .h2-btn:hover,
.state-symbols-page .h2-btn:focus-visible,
.state-symbols-page .h2-btn.active {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.state-symbols-page .reader-bookmark-icon {
  width: 18px;
  height: 18px;
}

.state-symbols-page .section-intro {
  margin: 0 0 20px;
  color: var(--ink-faint);
  font-weight: 700;
}

.state-symbols-page .symbol-section h3 {
  margin: 28px 0 10px;
  padding: 7px 11px;
  border-left: 4px solid var(--accent);
  color: var(--ink);
  background: var(--accent-soft);
}

.state-symbols-page .symbol-section h4 {
  margin: 22px 0 8px;
  color: var(--accent-2);
}

.state-symbols-page .symbol-section p,
.state-symbols-page .symbol-section li {
  color: var(--ink-soft);
  text-align: justify;
  text-justify: inter-word;
}

.state-symbols-page .symbol-section strong {
  color: var(--ink);
}

/* Simple media ------------------------------------------------------------ */

.state-symbols-page .symbol-figure {
  width: min(720px, 100%);
  margin: 20px auto 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-2);
}

.state-symbols-page .symbol-figure img {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  background: var(--paper-2);
}

.state-symbols-page .symbol-figure figcaption {
  padding: 9px 12px;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-faint);
  background: var(--card);
  font-size: .75rem;
  text-align: center;
}

.state-symbols-page .symbol-figure a {
  color: var(--accent-2);
}

.state-symbols-page .emblem-study-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 46px);
  align-items: center;
  margin: 18px 0 8px;
}

.state-symbols-page .emblem-figure {
  width: 100%;
  margin: 0;
}

.state-symbols-page .emblem-figure img {
  height: 330px;
  max-height: none;
  padding: 16px;
  object-fit: contain;
}

.state-symbols-page .emblem-facts {
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.state-symbols-page .emblem-facts > div {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
  padding: 12px 2px;
}

.state-symbols-page .emblem-facts > div + div {
  border-top: 1px solid var(--line-soft);
}

.state-symbols-page .emblem-facts dt {
  color: var(--accent-2);
  font-size: .78rem;
  font-weight: 900;
}

.state-symbols-page .emblem-facts dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
}

.state-symbols-page .visual-fact-layout {
  display: grid;
  grid-template-columns: minmax(250px, 330px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 44px);
  align-items: center;
  margin: 18px 0 24px;
}

.state-symbols-page .visual-fact-layout .symbol-figure {
  width: 100%;
  margin: 0;
}

.state-symbols-page .visual-fact-layout .symbol-figure img {
  height: 310px;
  max-height: none;
  object-fit: contain;
}

.state-symbols-page .visual-fact-layout .key-facts {
  margin: 0;
}

/* Stacked fact list ------------------------------------------------------- */

.state-symbols-page .key-facts {
  margin: 18px 0 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.state-symbols-page .key-facts > div {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 11px 4px;
}

.state-symbols-page .key-facts > div + div {
  border-top: 1px solid var(--line-soft);
}

.state-symbols-page .key-facts dt {
  flex: 0 0 190px;
  color: var(--ink-faint);
  font-size: .78rem;
  font-weight: 800;
}

.state-symbols-page .key-facts dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

/* Lists ------------------------------------------------------------------- */

.state-symbols-page .study-list {
  margin: 8px 0 20px;
  padding-left: 24px;
}

.state-symbols-page .study-list li {
  margin: 7px 0;
  padding-left: 2px;
}

.state-symbols-page ul.study-list > li::marker {
  color: var(--accent);
}

.state-symbols-page .ordered-list > li::marker {
  color: var(--accent-2);
  font-family: var(--study-font-mono);
  font-weight: 800;
}

/* Callouts ---------------------------------------------------------------- */

.state-symbols-page .exam-box,
.state-symbols-page .note-box {
  margin: 22px 0 8px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 13px;
  background: var(--card);
}

.state-symbols-page .exam-box {
  border-left-color: var(--gold);
  background: var(--gold-soft);
}

.state-symbols-page .note-box {
  border-left-color: var(--accent);
  background: var(--accent-soft);
}

.state-symbols-page .exam-box > strong,
.state-symbols-page .note-box > strong {
  display: block;
  margin-bottom: 6px;
  color: var(--accent-2);
}

.state-symbols-page .exam-box .study-list,
.state-symbols-page .note-box p {
  margin-bottom: 0;
}

.state-symbols-page .quote-box {
  margin: 10px 0 22px;
  padding: 14px 17px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 13px;
  color: var(--ink);
  background: var(--accent-soft);
  font-weight: 800;
}

@media (max-width: 880px) {
  .state-symbols-page .study-sidebar {
    height: calc(100dvh - var(--shared-topbar-height, 60px));
    max-height: none;
  }
}

/* Conservation timeline -------------------------------------------------- */

.state-symbols-page .conservation-list {
  margin: 12px 0 24px;
  padding: 0;
  list-style: none;
  border-left: 2px solid var(--line);
}

.state-symbols-page .conservation-list > li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin: 0;
  padding: 8px 0 18px 18px;
  position: relative;
}

.state-symbols-page .conservation-list > li::before {
  position: absolute;
  top: 14px;
  left: -7px;
  width: 12px;
  height: 12px;
  border: 3px solid var(--card);
  border-radius: 999px;
  background: var(--accent);
  content: "";
}

.state-symbols-page .conservation-list time {
  flex: 0 0 58px;
  color: var(--accent-2);
  font-family: var(--study-font-mono);
  font-size: .78rem;
  font-weight: 800;
}

.state-symbols-page .conservation-list div {
  min-width: 0;
}

.state-symbols-page .conservation-list strong {
  display: block;
}

.state-symbols-page .conservation-list p {
  margin: 4px 0 0;
}

/* Comparison table ------------------------------------------------------- */

.state-symbols-page .table-wrap {
  max-width: 100%;
  margin: 16px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card);
}

.state-symbols-page table {
  width: 100%;
  min-width: 660px;
  border-collapse: collapse;
}

.state-symbols-page caption {
  padding: 11px 14px;
  color: var(--ink-soft);
  background: var(--paper-2);
  font-weight: 800;
  text-align: left;
}

.state-symbols-page th,
.state-symbols-page td {
  padding: 12px 14px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
  text-align: left;
}

.state-symbols-page th:last-child,
.state-symbols-page td:last-child {
  border-right: 0;
}

.state-symbols-page thead th {
  color: var(--ink);
  background: var(--paper-2);
}

.state-symbols-page tbody th {
  color: var(--accent-2);
}

.state-symbols-page tbody tr:last-child > * {
  border-bottom: 0;
}

/* Completion + bottom navigation ---------------------------------------- */

.state-symbols-page .complete-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

.state-symbols-page .section-meta {
  color: var(--ink-faint);
  font-size: .75rem;
  font-weight: 800;
}

.state-symbols-page .article-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 30px 0 18px;
}

.state-symbols-page .article-nav a {
  display: block;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--card);
  text-decoration: none;
}

.state-symbols-page .article-nav a:hover,
.state-symbols-page .article-nav a:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.state-symbols-page .article-nav small,
.state-symbols-page .article-nav strong {
  display: block;
}

.state-symbols-page .article-nav small {
  margin-bottom: 2px;
  color: var(--ink-faint);
  font-size: .72rem;
  font-weight: 800;
}

.state-symbols-page .article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: .78rem;
}

.state-symbols-page .article-meta strong {
  color: var(--ink-soft);
}

/* Responsive ------------------------------------------------------------- */

@media (max-width: 700px) {
  .state-symbols-page .emblem-study-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .state-symbols-page .emblem-figure {
    width: min(250px, 78vw);
    margin-inline: auto;
  }

  .state-symbols-page .emblem-figure img {
    height: 245px;
    padding: 10px;
  }

  .state-symbols-page .emblem-facts > div {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    padding-block: 10px;
  }

  .state-symbols-page .visual-fact-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .state-symbols-page .visual-fact-layout .symbol-figure {
    width: min(280px, 84vw);
    margin-inline: auto;
  }

  .state-symbols-page .visual-fact-layout .symbol-figure img {
    height: 265px;
  }

  .state-symbols-page .reader {
    padding: 24px 12px 58px;
  }

  .state-symbols-page .hero {
    margin-bottom: 20px;
    padding: 18px 4px 24px;
  }

  .state-symbols-page .hero > p,
  .state-symbols-page .symbol-section p,
  .state-symbols-page .symbol-section li {
    text-align: start;
  }

  .state-symbols-page .hero-meta {
    gap: 7px;
  }

  .state-symbols-page .hero-meta > span {
    min-height: 30px;
    padding: 5px 9px;
    font-size: .69rem;
  }

  .state-symbols-page .symbol-section {
    margin: 16px 0;
    padding: 19px 14px;
    border-radius: 13px;
  }

  .state-symbols-page .symbol-section > h2 {
    gap: 9px;
  }

  .state-symbols-page .symbol-section .idx {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    font-size: .74rem;
  }

  .state-symbols-page .symbol-section h3 {
    margin-top: 23px;
    padding: 6px 9px;
  }

  .state-symbols-page .symbol-figure {
    margin: 16px auto 20px;
    border-radius: 11px;
  }

  .state-symbols-page .symbol-figure img {
    max-height: 430px;
  }

  .state-symbols-page .key-facts > div {
    display: block;
    padding: 10px 2px;
  }

  .state-symbols-page .key-facts dt {
    margin-bottom: 3px;
  }

  .state-symbols-page .study-list {
    padding-left: 22px;
  }

  .state-symbols-page .conservation-list > li {
    gap: 10px;
    padding-left: 16px;
  }

  .state-symbols-page .conservation-list time {
    flex-basis: 52px;
  }

  .state-symbols-page .complete-row {
    align-items: flex-end;
  }
}

@media (max-width: 440px) {
  .state-symbols-page .reader {
    padding-inline: 9px;
  }

  .state-symbols-page .symbol-section {
    padding-inline: 12px;
  }

  .state-symbols-page .symbol-section .actions {
    margin-left: 2px;
  }

  .state-symbols-page .h2-btn {
    width: 34px;
    height: 34px;
  }

  .state-symbols-page .section-meta {
    display: none;
  }
}

/* Print ------------------------------------------------------------------ */

@media print {
  body.state-symbols-page {
    background: #fff;
    color: #111;
  }

  .state-symbols-page .reader {
    width: 100%;
    padding: 0;
  }

  .state-symbols-page .page-breadcrumb,
  .state-symbols-page .hero-meta,
  .state-symbols-page .actions,
  .state-symbols-page .complete-row,
  .state-symbols-page .article-nav {
    display: none !important;
  }

  .state-symbols-page .hero {
    padding-top: 0;
  }

  .state-symbols-page .symbol-section {
    break-inside: auto;
    box-shadow: none;
    border-color: #aaa;
  }

  .state-symbols-page .symbol-figure {
    max-width: 520px;
    break-inside: avoid;
  }

  .state-symbols-page .exam-box,
  .state-symbols-page .note-box,
  .state-symbols-page .table-wrap {
    break-inside: avoid;
  }
}

/* Gold accent becomes the dark-theme action surface; use dark ink on it. */
:is(html.dark, html[data-theme="dark"]) body.state-symbols-page .symbol-section .idx,
:is(html.dark, html[data-theme="dark"]) body.state-symbols-page .h2-btn:is(:hover, :focus-visible, .active) {
  color: #1a1712;
}
