/* Shared Modern Indian History article layout */
:root,
html[data-theme="light"] {
  --gg-bg: #f5f6f2;
  --gg-surface: #ffffff;
  --gg-surface-2: #edf2ec;
  --gg-ink: #19231f;
  --gg-muted: #5b6862;
  --gg-faint: #7c8782;
  --gg-line: rgba(25, 35, 31, 0.15);
  --gg-line-soft: rgba(25, 35, 31, 0.08);
  --gg-green: #176b55;
  --gg-green-dark: #104f40;
  --gg-green-soft: #e5f1eb;
  --gg-saffron: #b7662c;
  --gg-saffron-soft: #fff0e3;
  --gg-gold: #a8751d;
  --gg-gold-soft: #fff5d8;
  --gg-red: #a1423e;
  --gg-red-soft: #fbecea;
  --gg-blue: #315f87;
  --gg-blue-soft: #eaf1f7;
  --gg-shadow: 0 10px 28px rgba(27, 46, 38, 0.08);
  --gg-shadow-soft: 0 3px 12px rgba(27, 46, 38, 0.06);
  --gg-radius: 18px;
  --gg-sidebar: 286px;
  --gg-topbar: var(--shared-topbar-height, 64px);
}

html[data-theme="dark"],
html.dark {
  --gg-bg: #111513;
  --gg-surface: #191f1c;
  --gg-surface-2: #222a26;
  --gg-ink: #f0f5f2;
  --gg-muted: #bdc8c2;
  --gg-faint: #909d96;
  --gg-line: rgba(232, 242, 237, 0.17);
  --gg-line-soft: rgba(232, 242, 237, 0.09);
  --gg-green: #69c2a4;
  --gg-green-dark: #8ad5bd;
  --gg-green-soft: rgba(74, 175, 143, 0.13);
  --gg-saffron: #e4a16d;
  --gg-saffron-soft: rgba(205, 113, 48, 0.14);
  --gg-gold: #edbf60;
  --gg-gold-soft: rgba(206, 158, 47, 0.14);
  --gg-red: #ea8f88;
  --gg-red-soft: rgba(194, 73, 68, 0.14);
  --gg-blue: #91bce1;
  --gg-blue-soft: rgba(72, 126, 174, 0.14);
  --gg-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
  --gg-shadow-soft: 0 4px 14px rgba(0, 0, 0, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--gg-topbar) + 24px);
}

body {
  margin: 0;
  color: var(--gg-ink);
  background:
    radial-gradient(circle at 92% 4%, color-mix(in srgb, var(--gg-saffron) 7%, transparent), transparent 28rem),
    radial-gradient(circle at 8% 18%, color-mix(in srgb, var(--gg-green) 6%, transparent), transparent 25rem),
    var(--gg-bg);
  font-family: "Hind", "Noto Sans Devanagari", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.sidebar-open {
  overflow: hidden;
}

a {
  color: var(--gg-green-dark);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

::selection {
  color: var(--gg-ink);
  background: color-mix(in srgb, var(--gg-gold) 28%, transparent);
}

.skip-link {
  position: fixed;
  z-index: 3000;
  top: -70px;
  left: 16px;
  padding: 9px 14px;
  color: #fff;
  background: var(--gg-green-dark);
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

.gg-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}

.shared-study-topbar::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  content: "";
  background: linear-gradient(
    90deg,
    var(--gg-saffron) 0 calc(var(--gg-scroll, 0) * 1%),
    transparent calc(var(--gg-scroll, 0) * 1%) 100%
  );
  pointer-events: none;
}

.gg-shell {
  display: grid;
  grid-template-columns: var(--gg-sidebar) minmax(0, 1fr);
  min-height: calc(100vh - var(--gg-topbar));
}

.gg-sidebar {
  position: sticky;
  z-index: 30;
  top: var(--gg-topbar);
  height: calc(100vh - var(--gg-topbar));
  overflow-y: auto;
  padding: 20px 16px 28px;
  background: color-mix(in srgb, var(--gg-surface-2) 92%, transparent);
  border-right: 1px solid var(--gg-line);
  scrollbar-width: thin;
}

.gg-sidebar__head {
  padding: 16px;
  background: var(--gg-surface);
  border: 1px solid var(--gg-line);
  border-radius: 14px;
  box-shadow: var(--gg-shadow-soft);
}

.gg-sidebar__eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--gg-saffron);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gg-sidebar__head strong {
  display: block;
  font-family: "Poppins", "Hind", sans-serif;
  font-size: 1rem;
  line-height: 1.35;
}

.gg-sidebar__head small {
  display: block;
  margin-top: 4px;
  color: var(--gg-muted);
  font-size: 0.75rem;
  line-height: 1.45;
}

.gg-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0 18px;
}

.gg-tool {
  min-height: 40px;
  padding: 8px 9px;
  color: var(--gg-muted);
  background: var(--gg-surface);
  border: 1px solid var(--gg-line);
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.25;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.gg-tool:hover,
.gg-tool:focus-visible,
.gg-tool[aria-pressed="true"] {
  color: var(--gg-green-dark);
  background: var(--gg-green-soft);
  border-color: var(--gg-green);
  outline: none;
}

.gg-tool--quiz {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-inline: 12px;
}

.gg-tool--quiz small {
  padding: 2px 7px;
  color: var(--gg-faint);
  background: var(--gg-surface-2);
  border: 1px solid var(--gg-line-soft);
  border-radius: 999px;
  font-size: 0.59rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.gg-tool:disabled {
  color: var(--gg-faint);
  background: color-mix(in srgb, var(--gg-surface-2) 82%, transparent);
  border-color: var(--gg-line-soft);
  cursor: not-allowed;
  opacity: 0.82;
}

.gg-tool:disabled:hover {
  color: var(--gg-faint);
  background: color-mix(in srgb, var(--gg-surface-2) 82%, transparent);
  border-color: var(--gg-line-soft);
}

[data-theme="dark"] .gg-tool,
html.dark .gg-tool,
[data-theme="dark"] .complete-btn,
html.dark .complete-btn,
[data-theme="dark"] .gg-bookmark,
html.dark .gg-bookmark {
  color: #d4ddd8;
  background: #1d2521;
  border-color: rgba(232, 242, 237, 0.24);
}

[data-theme="dark"] .gg-tool--quiz small,
html.dark .gg-tool--quiz small {
  color: #c1ccc6;
  background: #28322d;
}

[data-theme="dark"] .gg-tool:hover,
[data-theme="dark"] .gg-tool:focus-visible,
[data-theme="dark"] .gg-tool[aria-pressed="true"],
html.dark .gg-tool:hover,
html.dark .gg-tool:focus-visible,
html.dark .gg-tool[aria-pressed="true"],
[data-theme="dark"] .complete-btn:hover,
[data-theme="dark"] .complete-btn:focus-visible,
[data-theme="dark"] .complete-btn.is-complete,
[data-theme="dark"] .complete-btn[aria-pressed="true"],
html.dark .complete-btn:hover,
html.dark .complete-btn:focus-visible,
html.dark .complete-btn.is-complete,
html.dark .complete-btn[aria-pressed="true"] {
  color: #b8f0de;
  background: rgba(74, 175, 143, 0.2);
  border-color: #69c2a4;
}

.gg-toc-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 7px 8px;
  color: var(--gg-faint);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gg-toc {
  display: grid;
  gap: 5px;
}

.gg-toc a {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  padding: 8px 9px;
  color: var(--gg-muted);
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
}

.gg-toc a:hover,
.gg-toc a.active {
  color: var(--gg-ink);
  background: var(--gg-surface);
  border-color: var(--gg-line);
}

.gg-toc__num {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--gg-green-dark);
  background: var(--gg-green-soft);
  border-radius: 7px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.62rem;
}

.gg-toc__state {
  color: var(--gg-green);
  font-size: 0.72rem;
}

.gg-toc-empty {
  padding: 12px 8px;
  color: var(--gg-faint);
  font-size: 0.78rem;
}

.gg-scrim {
  display: none;
}

.gg-main {
  min-width: 0;
}

.gg-reader {
  width: min(100%, 1060px);
  margin: 0 auto;
  padding: 34px clamp(18px, 4vw, 48px) 76px;
}

.gg-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--gg-faint);
  font-size: 0.74rem;
  font-weight: 700;
}

.gg-breadcrumb a {
  text-decoration: none;
}

.gg-breadcrumb a:hover {
  text-decoration: underline;
}

.gg-breadcrumb__sep {
  color: var(--gg-line);
}

.gg-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
  padding: clamp(24px, 5vw, 44px);
  color: #f8fbf9;
  background:
    linear-gradient(135deg, rgba(17, 69, 54, 0.97), rgba(25, 101, 78, 0.93)),
    var(--gg-green-dark);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 24px;
  box-shadow: 0 22px 54px rgba(18, 61, 49, 0.2);
}

.gg-hero::before,
.gg-hero::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  pointer-events: none;
}

.gg-hero::before {
  width: 280px;
  height: 280px;
  top: -175px;
  right: -70px;
}

.gg-hero::after {
  width: 190px;
  height: 190px;
  right: 64px;
  bottom: -150px;
}

.gg-hero__kicker {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 6px 10px;
  color: #fff0d2;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.gg-hero h1 {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0;
  color: #fff;
  font-family: "Poppins", "Tiro Devanagari Hindi", "Hind", sans-serif;
  font-size: clamp(2.1rem, 6vw, 4.2rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.gg-hero__lead {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 13px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(0.98rem, 2vw, 1.15rem);
  line-height: 1.62;
}

.gg-hero__byline {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 7px;
  margin: 9px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.76rem;
  line-height: 1.5;
}

.gg-hero__byline a {
  color: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.gg-hero__byline a:hover,
.gg-hero__byline a:focus-visible {
  color: #fff;
}

.gg-hero__facts {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 25px;
}

.gg-hero__fact {
  min-width: 0;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.085);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
}

.gg-hero__fact span,
.gg-hero__fact strong {
  display: block;
}

.gg-hero__fact span {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.67rem;
  font-weight: 700;
}

.gg-hero__fact strong {
  margin-top: 2px;
  color: #fff;
  font-size: 0.84rem;
  line-height: 1.35;
}

.gg-exam-strip {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin: 0 0 28px;
  padding: 17px 20px;
  background: var(--gg-gold-soft);
  border: 1px solid color-mix(in srgb, var(--gg-gold) 35%, var(--gg-line));
  border-left: 5px solid var(--gg-gold);
  border-radius: 14px;
}

.gg-exam-strip strong {
  color: var(--gg-gold);
  font-family: "Poppins", "Hind", sans-serif;
  font-size: 0.85rem;
}

.gg-exam-strip p {
  margin: 0;
  color: var(--gg-ink);
  font-size: 0.88rem;
  line-height: 1.55;
}

.gg-section {
  position: relative;
  scroll-margin-top: calc(var(--gg-topbar) + 20px);
  margin: 22px 0;
  padding: clamp(20px, 3.6vw, 30px);
  background: var(--gg-surface);
  border: 1px solid var(--gg-line);
  border-radius: var(--gg-radius);
  box-shadow: var(--gg-shadow-soft);
}

.gg-section.bookmarked {
  border-color: color-mix(in srgb, var(--gg-gold) 60%, var(--gg-line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gg-gold) 11%, transparent), var(--gg-shadow-soft);
}

.gg-person {
  --gg-person-accent: var(--gg-green);
  border-top: 4px solid var(--gg-person-accent);
}

.gg-person--adam {
  --gg-person-accent: var(--gg-red);
}

.gg-person--amherst {
  --gg-person-accent: var(--gg-blue);
}

.gg-person-divider {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: -28px -28px 24px;
  padding: 14px 28px;
  color: var(--gg-person-accent);
  background: color-mix(in srgb, var(--gg-person-accent) 9%, var(--gg-surface));
  border-bottom: 1px solid color-mix(in srgb, var(--gg-person-accent) 27%, var(--gg-line));
  border-radius: calc(var(--gg-radius) - 2px) calc(var(--gg-radius) - 2px) 0 0;
}

.gg-person-divider span {
  flex: 0 0 auto;
  padding: 3px 8px;
  color: var(--gg-surface);
  background: var(--gg-person-accent);
  border-radius: 999px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.65rem;
  font-weight: 800;
}

.gg-person-divider strong {
  color: var(--gg-ink);
  font-size: 0.92rem;
  line-height: 1.4;
}

.gg-section__head {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gg-line);
}

.gg-section__index {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--gg-green-dark);
  background: var(--gg-green-soft);
  border: 1px solid color-mix(in srgb, var(--gg-green) 27%, var(--gg-line));
  border-radius: 12px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 800;
}

.gg-section__title-wrap {
  min-width: 0;
}

.gg-section__label {
  display: block;
  color: var(--gg-saffron);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gg-section h2 {
  margin: 2px 0 0;
  color: var(--gg-ink);
  font-family: "Poppins", "Tiro Devanagari Hindi", "Hind", sans-serif;
  font-size: clamp(1.24rem, 2.5vw, 1.65rem);
  line-height: 1.3;
  letter-spacing: -0.018em;
}

.gg-bookmark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--gg-faint);
  background: var(--gg-surface);
  border: 1px solid var(--gg-line);
  border-radius: 11px;
  cursor: pointer;
  font-size: 1.05rem;
}

.gg-bookmark:hover,
.gg-bookmark:focus-visible,
.gg-bookmark[aria-pressed="true"] {
  color: var(--gg-gold);
  background: var(--gg-gold-soft);
  border-color: var(--gg-gold);
  outline: none;
}

.gg-section h3 {
  margin: 25px 0 9px;
  color: var(--gg-green-dark);
  font-family: "Poppins", "Hind", sans-serif;
  font-size: 1rem;
  line-height: 1.45;
}

.gg-section h3:first-child {
  margin-top: 0;
}

.gg-section p {
  margin: 8px 0;
  color: var(--gg-muted);
}

.gg-section ul,
.gg-section ol {
  margin: 8px 0 14px;
  padding-left: 1.25rem;
}

.gg-section li {
  margin: 6px 0;
  padding-left: 0.24rem;
  color: var(--gg-muted);
}

.gg-section li::marker {
  color: var(--gg-saffron);
  font-weight: 800;
}

.gg-section strong {
  color: var(--gg-ink);
}

.gg-compact > li {
  margin: 3px 0;
}

.gg-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.gg-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gg-fact-card {
  padding: 15px 16px;
  background: color-mix(in srgb, var(--gg-surface) 82%, var(--gg-surface-2));
  border: 1px solid var(--gg-line);
  border-radius: 13px;
}

.gg-fact-card__tag {
  display: inline-flex;
  margin-bottom: 7px;
  padding: 3px 7px;
  color: var(--gg-green-dark);
  background: var(--gg-green-soft);
  border-radius: 6px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gg-fact-card h3,
.gg-fact-card h4 {
  margin: 0 0 6px;
  color: var(--gg-ink);
  font-family: "Poppins", "Hind", sans-serif;
  font-size: 0.93rem;
  line-height: 1.4;
}

.gg-fact-card p,
.gg-fact-card ul {
  margin-top: 5px;
  margin-bottom: 0;
  font-size: 0.88rem;
  line-height: 1.58;
}

.gg-callout {
  margin: 16px 0;
  padding: 14px 16px;
  background: var(--gg-green-soft);
  border: 1px solid color-mix(in srgb, var(--gg-green) 28%, var(--gg-line));
  border-left: 4px solid var(--gg-green);
  border-radius: 11px;
}

.gg-callout--trap {
  background: var(--gg-red-soft);
  border-color: color-mix(in srgb, var(--gg-red) 30%, var(--gg-line));
  border-left-color: var(--gg-red);
}

.gg-callout--context {
  background: var(--gg-blue-soft);
  border-color: color-mix(in srgb, var(--gg-blue) 30%, var(--gg-line));
  border-left-color: var(--gg-blue);
}

.gg-callout--gold {
  background: var(--gg-gold-soft);
  border-color: color-mix(in srgb, var(--gg-gold) 30%, var(--gg-line));
  border-left-color: var(--gg-gold);
}

.gg-callout__title {
  display: block;
  margin-bottom: 4px;
  color: var(--gg-green-dark);
  font-size: 0.8rem;
  font-weight: 800;
}

.gg-callout--trap .gg-callout__title {
  color: var(--gg-red);
}

.gg-callout--context .gg-callout__title {
  color: var(--gg-blue);
}

.gg-callout--gold .gg-callout__title {
  color: var(--gg-gold);
}

.gg-callout p,
.gg-callout ul {
  margin-top: 3px;
  margin-bottom: 0;
  font-size: 0.87rem;
  line-height: 1.58;
}

.gg-timeline {
  position: relative;
  display: grid;
  gap: 11px;
  margin: 14px 0;
  padding-left: 23px;
}

.gg-timeline::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 6px;
  width: 2px;
  content: "";
  background: var(--gg-line);
}

.gg-event {
  position: relative;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 14px;
  padding: 12px 14px;
  background: color-mix(in srgb, var(--gg-surface) 87%, var(--gg-surface-2));
  border: 1px solid var(--gg-line);
  border-radius: 12px;
}

.gg-event::before {
  position: absolute;
  top: 50%;
  left: -21px;
  width: 10px;
  height: 10px;
  content: "";
  background: var(--gg-surface);
  border: 3px solid var(--gg-saffron);
  border-radius: 50%;
  transform: translateY(-50%);
}

.gg-event__year {
  color: var(--gg-saffron);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.5;
}

.gg-event__body strong {
  display: block;
  margin-bottom: 2px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.gg-event__body p,
.gg-event__body ul {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.55;
}

.gg-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 16px 0;
  counter-reset: flow;
}

.gg-flow__item {
  position: relative;
  min-height: 116px;
  padding: 14px;
  background: var(--gg-surface-2);
  border: 1px solid var(--gg-line);
  border-radius: 12px;
}

.gg-flow__item:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -17px;
  content: "→";
  color: var(--gg-saffron);
  font-size: 1.1rem;
  font-weight: 800;
  transform: translateY(-50%);
}

.gg-flow__item span {
  display: block;
  margin-bottom: 5px;
  color: var(--gg-saffron);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.64rem;
  font-weight: 800;
}

.gg-flow__item strong {
  display: block;
  font-size: 0.86rem;
  line-height: 1.4;
}

.gg-flow__item p {
  margin: 4px 0 0;
  font-size: 0.78rem;
  line-height: 1.48;
}

.gg-table-wrap {
  width: 100%;
  margin: 14px 0;
  overflow-x: auto;
  border: 1px solid var(--gg-line);
  border-radius: 13px;
  scrollbar-width: thin;
}

.gg-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  background: var(--gg-surface);
  font-size: 0.84rem;
  line-height: 1.5;
}

.gg-table th,
.gg-table td {
  padding: 11px 13px;
  text-align: left;
  vertical-align: top;
  border-right: 1px solid var(--gg-line-soft);
  border-bottom: 1px solid var(--gg-line);
}

.gg-table th:last-child,
.gg-table td:last-child {
  border-right: 0;
}

.gg-table tr:last-child td {
  border-bottom: 0;
}

.gg-table thead th {
  color: var(--gg-ink);
  background: var(--gg-surface-2);
  font-size: 0.74rem;
  font-weight: 800;
}

.gg-table tbody th {
  color: var(--gg-green-dark);
  background: color-mix(in srgb, var(--gg-green-soft) 46%, var(--gg-surface));
  font-weight: 800;
}

.gg-table ul {
  margin: 0;
  padding-left: 1.1rem;
}

.gg-table li {
  margin: 2px 0;
}

.gg-section__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-top: 15px;
  border-top: 1px solid var(--gg-line);
}

.complete-btn {
  min-height: 40px;
  padding: 8px 13px;
  color: var(--gg-muted);
  background: var(--gg-surface);
  border: 1px solid var(--gg-line);
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.77rem;
  font-weight: 700;
}

.complete-btn:hover,
.complete-btn:focus-visible,
.complete-btn.is-complete,
.complete-btn[aria-pressed="true"] {
  color: var(--gg-green-dark);
  background: var(--gg-green-soft);
  border-color: var(--gg-green);
  outline: none;
}

.complete-btn.is-complete::before,
.complete-btn[aria-pressed="true"]::before {
  content: "✓ ";
}

.gg-section__time {
  color: var(--gg-faint);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  font-weight: 700;
}

.gg-summary {
  border-top: 5px solid var(--gg-saffron);
}

.gg-summary .gg-section__index {
  color: var(--gg-saffron);
  background: var(--gg-saffron-soft);
  border-color: color-mix(in srgb, var(--gg-saffron) 35%, var(--gg-line));
}

.gg-summary-note {
  margin: 0 0 14px;
  color: var(--gg-muted);
  font-size: 0.84rem;
}

.gg-next {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin: 26px 0 0;
  padding: 16px 18px;
  color: var(--gg-ink);
  background: var(--gg-surface);
  border: 1px solid var(--gg-line);
  border-radius: 14px;
  box-shadow: var(--gg-shadow-soft);
  text-decoration: none;
}

.gg-next:hover {
  border-color: var(--gg-green);
}

.gg-next__direction {
  color: var(--gg-faint);
  font-size: 0.72rem;
  font-weight: 700;
}

.gg-next strong,
.gg-next small {
  display: block;
}

.gg-next small {
  color: var(--gg-faint);
  font-size: 0.7rem;
}

.gg-next__arrow {
  color: var(--gg-saffron);
  font-size: 1.3rem;
}

.unified-site-footer {
  margin-top: 32px;
  color: var(--gg-muted);
  background: var(--gg-surface-2);
  border-top-color: var(--gg-line);
}

.unified-site-footer-inner {
  padding: 28px clamp(18px, 4vw, 48px) 18px;
  grid-template-columns: minmax(230px, 1.25fr) repeat(3, minmax(145px, 0.8fr));
  gap: 22px clamp(22px, 3.2vw, 42px);
}

.unified-site-footer h2,
.unified-site-footer-brand strong {
  color: var(--gg-ink);
}

.unified-site-footer-copy {
  border-top-color: var(--gg-line-soft);
}

@media (max-width: 900px) {
  .unified-site-footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .unified-site-footer-brand,
  .unified-site-footer-copy {
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px) {
  .gg-shell {
    grid-template-columns: 1fr;
  }

  .gg-sidebar {
    position: fixed;
    top: var(--gg-topbar);
    left: 0;
    width: min(86vw, 320px);
    height: calc(100dvh - var(--gg-topbar));
    transform: translateX(-104%);
    transition: transform 0.22s ease;
    box-shadow: 18px 0 44px rgba(0, 0, 0, 0.2);
  }

  .gg-sidebar.open,
  .gg-sidebar.active {
    transform: none;
  }

  .gg-scrim {
    position: fixed;
    z-index: 25;
    inset: var(--gg-topbar) 0 0;
    display: block;
    visibility: hidden;
    background: rgba(8, 15, 12, 0.48);
    opacity: 0;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }

  body.sidebar-open .gg-scrim {
    visibility: visible;
    opacity: 1;
  }

  .gg-reader {
    padding-top: 26px;
  }

  .gg-hero__facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gg-grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  body {
    font-size: 16px;
  }

  .gg-reader {
    padding-right: 13px;
    padding-left: 13px;
  }

  .gg-breadcrumb {
    margin-left: 4px;
  }

  .gg-hero {
    border-radius: 18px;
  }

  .gg-hero__facts,
  .gg-grid,
  .gg-grid--3 {
    grid-template-columns: 1fr;
  }

  .gg-exam-strip {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .gg-section {
    border-radius: 15px;
  }

  .gg-section__head {
    grid-template-columns: 40px minmax(0, 1fr) 36px;
    gap: 9px;
  }

  .gg-section__index {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .gg-bookmark {
    width: 36px;
    height: 36px;
  }

  .gg-event {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .gg-flow {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .gg-flow__item {
    min-height: auto;
  }

  .gg-flow__item:not(:last-child)::after {
    top: auto;
    right: 50%;
    bottom: -14px;
    content: "↓";
    transform: translateX(50%);
  }

  .gg-table-wrap {
    border: 0;
    border-radius: 0;
    overflow: visible;
  }

  .gg-table {
    min-width: 0;
    background: transparent;
  }

  .gg-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .gg-table,
  .gg-table tbody,
  .gg-table tr,
  .gg-table td,
  .gg-table tbody th {
    display: block;
    width: 100%;
  }

  .gg-table tr {
    margin: 0 0 11px;
    overflow: hidden;
    background: var(--gg-surface);
    border: 1px solid var(--gg-line);
    border-radius: 11px;
  }

  .gg-table td,
  .gg-table tbody th {
    padding: 9px 11px;
    border: 0;
    border-bottom: 1px solid var(--gg-line-soft);
  }

  .gg-table td:last-child {
    border-bottom: 0;
  }

  .gg-table td::before {
    display: block;
    margin-bottom: 3px;
    color: var(--gg-faint);
    content: attr(data-label);
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .gg-section__foot {
    align-items: flex-start;
    flex-direction: column;
  }

  .complete-btn {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .gg-hero {
    padding: 21px 18px;
  }

  .gg-hero__facts {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .gg-section {
    padding: 18px 14px;
  }

  .gg-person-divider {
    margin: -18px -14px 19px;
    padding: 12px 14px;
  }

  .gg-section h2 {
    font-size: 1.14rem;
  }
}

@media (max-width: 480px) {
  .unified-site-footer-inner {
    grid-template-columns: 1fr;
    padding: 24px 18px 16px;
    gap: 20px;
  }

  .unified-site-footer-brand,
  .unified-site-footer-copy {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  :root {
    --gg-bg: #fff;
    --gg-surface: #fff;
    --gg-ink: #111;
    --gg-muted: #222;
    --gg-line: #bbb;
  }

  @page {
    size: A4;
    margin: 14mm 13mm 16mm;
  }

  body {
    background: #fff !important;
    font-size: 10.5pt;
    line-height: 1.48;
  }

  .shared-study-topbar,
  .gg-sidebar,
  .gg-scrim,
  .gg-breadcrumb,
  .gg-tools,
  .gg-bookmark,
  .gg-section__foot,
  .gg-next,
  .unified-site-footer {
    display: none !important;
  }

  .gg-shell {
    display: block;
  }

  .gg-reader {
    width: 100%;
    padding: 0;
  }

  .gg-hero {
    margin: 0 0 8mm;
    padding: 9mm;
    color: #111;
    background: #eef4f0 !important;
    border: 1px solid #777;
    box-shadow: none;
  }

  .gg-hero h1,
  .gg-hero__fact strong {
    color: #111;
  }

  .gg-hero__lead,
  .gg-hero__byline,
  .gg-hero__fact span {
    color: #333;
  }

  .gg-hero__kicker {
    color: #444;
    border-color: #aaa;
  }

  .gg-hero__fact {
    border-color: #aaa;
  }

  .gg-section {
    break-inside: avoid;
    margin: 6mm 0;
    padding: 6mm;
    box-shadow: none;
  }

  .gg-section__head {
    break-after: avoid;
  }

  .gg-answer {
    color: inherit !important;
    background: transparent !important;
    filter: none !important;
  }

  .gg-table-wrap {
    overflow: visible;
  }

  .gg-table {
    min-width: 0;
  }

}
