/* =========================================
   STUDYAGORA QUICK NOTES
   FILE: /css/topic-notes.css

   Cream Notability-style grid system
   Full-page reading layout
   Minimal cards
   SEO notes + current affairs explainers
   ========================================= */


/* =========================================
   ROOT VARIABLES
========================================= */

:root {
  --paper: #f7f0dc;
  --paper-deep: #efe5c8;

  --grid: rgba(74, 85, 104, 0.09);

  --ink: #171717;
  --muted: #67635b;

  --line: rgba(23, 23, 23, 0.16);
  --line-soft: rgba(23, 23, 23, 0.10);

  --yellow: #ffe082;
  --pink: #f7b7c8;
  --blue: #b9def4;
  --green: #c8e6c9;
  --orange: #f6c58d;

  --paper-white: rgba(255, 253, 246, 0.50);
}


/* =========================================
   RESET
========================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;

  min-height: 100vh;

  color: var(--ink);

  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;

  line-height: 1.72;

  background-color: var(--paper);

  background-image:
    linear-gradient(
      var(--grid) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      var(--grid) 1px,
      transparent 1px
    );

  background-size: 28px 28px;
}

a {
  color: inherit;

  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

img {
  max-width: 100%;
  height: auto;
}


/* =========================================
   TOP NAVBAR
========================================= */

.topbar {
  position: sticky;

  top: 0;

  z-index: 100;

  border-bottom: 1px solid var(--line);

  background: rgba(247, 240, 220, 0.94);

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.topbar-inner {
  width: min(94%, 1120px);

  min-height: 62px;

  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 22px;
}

.brand {
  color: var(--ink);

  font-size: 1rem;
  font-weight: 900;

  letter-spacing: -0.025em;

  text-decoration: none;
}

.topnav {
  display: flex;

  align-items: center;

  gap: 20px;

  font-size: 0.92rem;
  font-weight: 750;
}

.topnav a {
  text-decoration: underline;

  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.topnav a:hover {
  opacity: 0.65;
}


/* =========================================
   MAIN READING CONTAINER
========================================= */

.note-container {
  width: min(94%, 1100px);

  margin: 0 auto;

  padding: 32px 0 78px;
}


/* =========================================
   BREADCRUMB
========================================= */

.breadcrumb {
  margin-bottom: 26px;

  color: var(--muted);

  font-size: 0.84rem;

  line-height: 1.55;
}

.breadcrumb a {
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}


/* =========================================
   HERO
========================================= */

.hero-note {
  padding: 8px 0 32px;

  border-bottom: 1px solid var(--line-soft);
}

.eyebrow-row {
  display: flex;

  flex-wrap: wrap;

  align-items: center;

  gap: 9px;

  margin-bottom: 15px;
}

.eyebrow,
.update-pill {
  display: inline-flex;

  align-items: center;

  min-height: 30px;

  padding: 5px 10px;

  border: 1px solid var(--line);

  border-radius: 999px;

  font-size: 0.72rem;

  font-weight: 850;

  letter-spacing: 0.06em;

  text-transform: uppercase;

  background: rgba(255, 255, 255, 0.25);
}

.eyebrow {
  background: var(--yellow);
}

.hero-note h1 {
  margin: 0;

  max-width: 1000px;

  color: var(--ink);

  font-size: clamp(2.8rem, 7vw, 5.9rem);

  line-height: 0.98;

  letter-spacing: -0.06em;

  font-weight: 900;
}

.hero-deck {
  max-width: 900px;

  margin: 20px 0 0;

  color: #302d28;

  font-size: clamp(1.05rem, 2.4vw, 1.28rem);

  line-height: 1.62;
}

.meta-line {
  display: flex;

  flex-wrap: wrap;

  gap: 9px 18px;

  margin-top: 19px;

  color: var(--muted);

  font-size: 0.84rem;

  font-weight: 650;
}


/* =========================================
   SECTION SYSTEM
========================================= */

.section {
  width: 100%;

  margin: 48px 0;
}

.section-label {
  display: inline-block;

  margin-bottom: 10px;

  padding: 4px 9px;

  border-radius: 4px;

  color: #111;

  font-size: 0.72rem;

  font-weight: 900;

  letter-spacing: 0.07em;

  line-height: 1.4;

  text-transform: uppercase;
}

.yellow {
  background: var(--yellow);
}

.pink {
  background: var(--pink);
}

.blue {
  background: var(--blue);
}

.green {
  background: var(--green);
}

.orange {
  background: var(--orange);
}

.section h2 {
  max-width: 1000px;

  margin: 4px 0 18px;

  color: var(--ink);

  font-size: clamp(1.8rem, 4vw, 2.7rem);

  line-height: 1.1;

  letter-spacing: -0.04em;
}

.section h3 {
  margin: 28px 0 10px;

  color: var(--ink);

  font-size: 1.25rem;

  line-height: 1.25;
}

.section p,
.current-update p {
  width: 100%;

  max-width: none;

  margin: 0 0 17px;

  color: #202020;

  font-size: 1.06rem;

  line-height: 1.82;
}

.section strong {
  font-weight: 800;
}


/* =========================================
   QUICK REVISION
========================================= */

.quick-box {
  width: 100%;

  margin: 36px 0 48px;

  padding: 0;

  border: 0;

  border-radius: 0;

  background: transparent;

  box-shadow: none;
}

.quick-box h2 {
  margin: 5px 0 16px;

  font-size: clamp(1.75rem, 4vw, 2.45rem);

  line-height: 1.12;

  letter-spacing: -0.035em;
}

.quick-grid {
  display: grid;

  grid-template-columns: repeat(3, minmax(0, 1fr));

  gap: 12px;

  margin-top: 16px;
}

.quick-item {
  min-width: 0;

  padding: 15px 16px;

  border: 1px solid var(--line);

  border-radius: 10px;

  background: rgba(255, 255, 255, 0.28);
}

.quick-item span {
  display: block;

  margin-bottom: 5px;

  color: var(--muted);

  font-size: 0.70rem;

  font-weight: 850;

  letter-spacing: 0.07em;

  text-transform: uppercase;
}

.quick-item strong {
  display: block;

  color: var(--ink);

  font-size: 1rem;

  line-height: 1.35;
}


/* =========================================
   CURRENT AFFAIRS UPDATE
========================================= */

.current-update {
  width: 100%;

  margin: 48px 0;

  padding: 0;

  border: 0;

  border-radius: 0;

  background: transparent;

  box-shadow: none;
}

.current-update h2 {
  max-width: 1000px;

  margin: 6px 0 18px;

  font-size: clamp(1.8rem, 4vw, 2.65rem);

  line-height: 1.1;

  letter-spacing: -0.04em;
}


/* =========================================
   FACT / EXAM / RELATED / SOURCES
   FLAT NOTE LAYOUT
========================================= */

.fact-box,
.exam-box,
.related-box,
.sources-box {
  width: 100%;

  margin: 18px 0 0;

  padding: 0;

  border: 0;

  border-radius: 0;

  background: transparent;

  box-shadow: none;
}

.fact-box ul,
.exam-box ul,
.related-box ul,
.sources-box ul {
  margin: 12px 0 0;

  padding-left: 1.35rem;
}

.fact-box li,
.exam-box li,
.related-box li,
.sources-box li {
  margin: 10px 0;

  padding-left: 3px;

  color: #202020;

  font-size: 1.04rem;

  line-height: 1.7;
}

.related-box a,
.sources-box a {
  font-weight: 700;
}

.related-box a:hover,
.sources-box a:hover {
  text-decoration-thickness: 2px;
}


/* =========================================
   NORMAL LISTS
========================================= */

.note-list {
  margin: 14px 0 0;

  padding-left: 1.35rem;
}

.note-list li {
  margin: 10px 0;

  color: #202020;

  font-size: 1.04rem;

  line-height: 1.72;
}


/* =========================================
   CALLOUT
========================================= */

.callout {
  margin: 26px 0;

  padding: 14px 0 14px 18px;

  border-left: 4px solid var(--ink);

  background: transparent;

  color: #202020;

  font-size: 1.04rem;

  font-weight: 650;

  line-height: 1.7;
}


/* =========================================
   TIMELINE
========================================= */

.timeline {
  margin: 22px 0 0 8px;

  padding-left: 25px;

  border-left: 2px solid rgba(23, 23, 23, 0.35);
}

.timeline-item {
  position: relative;

  padding: 0 0 26px;

  color: #202020;

  font-size: 1.03rem;

  line-height: 1.68;
}

.timeline-item::before {
  content: "";

  position: absolute;

  top: 7px;
  left: -32px;

  width: 10px;
  height: 10px;

  border: 2px solid var(--ink);

  border-radius: 50%;

  background: var(--paper);
}

.timeline-item strong {
  display: block;

  margin-bottom: 4px;

  color: var(--ink);

  font-size: 1rem;

  font-weight: 850;
}


/* =========================================
   TABLES
========================================= */

.simple-table {
  width: 100%;

  margin-top: 18px;

  border-collapse: collapse;

  background: transparent;
}

.simple-table th,
.simple-table td {
  padding: 13px 14px;

  border: 1px solid var(--line);

  color: #202020;

  text-align: left;

  vertical-align: top;

  font-size: 0.98rem;

  line-height: 1.55;
}

.simple-table th {
  color: #111;

  font-weight: 850;

  background: rgba(255, 224, 130, 0.55);
}


/* =========================================
   TEXT SELECTION
========================================= */

::selection {
  color: #111;

  background: var(--yellow);
}


/* =========================================
   FOOTER
========================================= */

.footer {
  padding: 30px 16px 38px;

  border-top: 1px solid var(--line);

  color: var(--ink);

  text-align: center;

  font-weight: 850;

  letter-spacing: 0.01em;
}


/* =========================================
   TABLET
========================================= */

@media (max-width: 900px) {

  .note-container {
    width: calc(100% - 36px);
  }

  .topbar-inner {
    width: calc(100% - 36px);
  }

  .quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 720px) {

  body {
    background-size: 24px 24px;
  }

  .topbar-inner {
    width: calc(100% - 28px);

    min-height: 58px;
  }

  .topnav {
    display: none;
  }

  .note-container {
    width: calc(100% - 28px);

    padding-top: 22px;
    padding-bottom: 62px;
  }

  .breadcrumb {
    margin-bottom: 20px;

    font-size: 0.76rem;
  }

  .hero-note {
    padding-bottom: 27px;
  }

  .hero-note h1 {
    font-size: clamp(2.55rem, 13vw, 4.2rem);

    line-height: 1;

    letter-spacing: -0.055em;
  }

  .hero-deck {
    margin-top: 16px;

    font-size: 1.02rem;

    line-height: 1.6;
  }

  .meta-line {
    font-size: 0.77rem;

    gap: 7px 13px;
  }

  .section {
    margin: 40px 0;
  }

  .section h2,
  .current-update h2 {
    font-size: clamp(1.65rem, 8vw, 2.25rem);

    line-height: 1.12;
  }

  .section p,
  .current-update p {
    font-size: 1rem;

    line-height: 1.76;
  }

  .quick-box {
    margin: 30px 0 40px;
  }

  .quick-grid {
    grid-template-columns: 1fr;

    gap: 9px;
  }

  .quick-item {
    padding: 13px 14px;
  }

  .fact-box li,
  .exam-box li,
  .related-box li,
  .sources-box li,
  .note-list li {
    font-size: 0.98rem;

    line-height: 1.65;
  }

  .callout {
    padding-left: 14px;

    font-size: 0.98rem;
  }

  .timeline {
    padding-left: 22px;
  }

  .timeline-item {
    font-size: 0.98rem;
  }

  .timeline-item::before {
    left: -29px;
  }

  .simple-table {
    font-size: 0.88rem;
  }

  .simple-table th,
  .simple-table td {
    padding: 10px;
  }

}


/* =========================================
   VERY SMALL MOBILE
========================================= */

@media (max-width: 420px) {

  .note-container {
    width: calc(100% - 22px);
  }

  .topbar-inner {
    width: calc(100% - 22px);
  }

  .eyebrow,
  .update-pill {
    min-height: 27px;

    padding: 4px 8px;

    font-size: 0.65rem;
  }

  .section-label {
    font-size: 0.66rem;
  }

}


/* =========================================
   REDUCED MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

}