/*
 * PaperGenie brand theme (logo colours): royal blue, genie gold, deep navy.
 * Loaded after style.css; changes colours only. No layout or behaviour changes.
 */
:root {
  --pg-brand-blue: #0A6FD6;
  --pg-brand-blue-dark: #0857A8;
  --pg-brand-blue-soft: #EAF3FD;
  --pg-brand-gold: #F5A623;
  --pg-brand-gold-dark: #C9780E;
  --pg-brand-navy: #032258;

  /* existing theme variables -> brand */
  --primary-color: var(--pg-brand-blue);
  --primary-hover: var(--pg-brand-blue-dark);
  --dark-hero-bg: var(--pg-brand-navy);
  --pg-blue: var(--pg-brand-blue);
  --pg-blue-dark: var(--pg-brand-blue-dark);
  --pg-blue-soft: var(--pg-brand-blue-soft);

  /* Bootstrap 5.3 primary (text-primary, bg-primary, links, focus rings) */
  --bs-primary: #0A6FD6;
  --bs-primary-rgb: 10, 111, 214;
  --bs-primary-text-emphasis: #063F7A;
  --bs-primary-bg-subtle: #EAF3FD;
  --bs-primary-border-subtle: #B9D6F5;
  --bs-link-color: #0A6FD6;
  --bs-link-color-rgb: 10, 111, 214;
  --bs-link-hover-color: #0857A8;
  --bs-link-hover-color-rgb: 8, 87, 168;
}

/* Buttons */
.btn-primary {
  --bs-btn-bg: #0A6FD6;
  --bs-btn-border-color: #0A6FD6;
  --bs-btn-hover-bg: #0857A8;
  --bs-btn-hover-border-color: #0857A8;
  --bs-btn-active-bg: #074A8F;
  --bs-btn-active-border-color: #074A8F;
  --bs-btn-disabled-bg: #0A6FD6;
  --bs-btn-disabled-border-color: #0A6FD6;
  --bs-btn-focus-shadow-rgb: 10, 111, 214;
}
.btn-outline-primary {
  --bs-btn-color: #0A6FD6;
  --bs-btn-border-color: #0A6FD6;
  --bs-btn-hover-bg: #0A6FD6;
  --bs-btn-hover-border-color: #0A6FD6;
  --bs-btn-active-bg: #0857A8;
  --bs-btn-active-border-color: #0857A8;
}
.form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: #8DBBEB;
  box-shadow: 0 0 0 .25rem rgba(10, 111, 214, .18);
}
.form-check-input:checked { background-color: #0A6FD6; border-color: #0A6FD6; }

/* Top bar stays the theme's light bar (style.css); only the wordmark takes the logo colours.
   Footer: logo navy instead of near-black. */
body > nav.navbar .navbar-brand { color: var(--pg-brand-navy) !important; }
body > nav.navbar .nav-link:hover, body > nav.navbar .nav-link.active { color: var(--pg-brand-blue) !important; }
footer.bg-dark { background-color: var(--pg-brand-navy) !important; }

/* Gold accents */
.pg-gold { color: var(--pg-brand-gold) !important; }
.badge.bg-primary { background-color: var(--pg-brand-blue) !important; }

/* Hero: soft blue glow and the logo */
.pg-hero-logo { display: block; width: min(440px, 88%); height: auto; margin: 0 auto 1rem; filter: drop-shadow(0 10px 22px rgba(3, 34, 88, .18)); }
section.text-center.container:first-of-type { position: relative; overflow: hidden; }

/* =====================================================================
   PAPER CONTROLS AS CHIPS (assets/js/chip-panel.js) - visual only
   ===================================================================== */
#demoForm { counter-reset: pgstep; }
#demoForm .pg-select-hidden {            /* the original dropdowns stay in the page and keep working */
  position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important;
  pointer-events: none !important; overflow: hidden !important; clip: rect(0 0 0 0) !important;
}
#demoForm > .mb-3 { margin-bottom: 1.35rem !important; }
#demoForm > .mb-3 > .form-label {         /* numbered step headings */
  display: flex; align-items: center; gap: .55rem; font-size: 1rem !important; font-weight: 800 !important;
  color: var(--pg-brand-navy) !important; margin-bottom: .65rem; letter-spacing: -.01em;
}
#demoForm > .mb-3 > .form-label::before {
  counter-increment: pgstep; content: counter(pgstep);
  width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--pg-brand-blue), #3D8EE6); color: #fff; font-size: .82rem; font-weight: 800;
  box-shadow: 0 3px 8px rgba(10, 111, 214, .28);
}

.pg-chips { display: flex; flex-wrap: wrap; gap: .55rem; }
.pg-chips.is-disabled { opacity: .55; pointer-events: none; }
.pg-chip-hint { color: #7B8798; font-size: .95rem; font-style: italic; padding: .35rem .1rem; }
.pg-chip-hint.is-loading { color: var(--pg-brand-blue); font-style: normal; animation: pgPulse 1.1s ease-in-out infinite; }
@keyframes pgPulse { 50% { opacity: .45; } }

/* Board, class, book: pills */
.pg-pill {
  display: inline-flex; align-items: center; gap: .4rem; border: 2px solid #DCE5F2; background: #fff; color: #1B2B45;
  font-size: 1rem; font-weight: 700; padding: .5rem 1.05rem; border-radius: 999px; line-height: 1.2;
  transition: transform .12s ease, border-color .15s, background .15s, box-shadow .15s; cursor: pointer;
}
.pg-pill:hover { border-color: #9CC2EC; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(10, 111, 214, .12); }
.pg-pill.on {
  background: linear-gradient(135deg, var(--pg-brand-blue), #2F86E3); border-color: transparent; color: #fff;
  box-shadow: 0 6px 16px rgba(10, 111, 214, .32);
}
.pg-pill.on i { color: #FFD666; }

/* Subjects: picture cards */
.pg-chips-subject { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.pg-subject {
  position: relative; display: flex; align-items: center; gap: .6rem; padding: .6rem .7rem; border-radius: 16px;
  border: 2px solid #E3EAF4; background: linear-gradient(180deg, #fff, #F7FAFE); text-align: left; cursor: pointer;
  font-size: 1rem; font-weight: 800; color: #1B2B45; transition: transform .12s ease, border-color .15s, box-shadow .15s;
}
.pg-subject img { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; filter: drop-shadow(0 3px 5px rgba(0,0,0,.12)); }
.pg-subject span { overflow: hidden; text-overflow: ellipsis; }
.pg-subject:hover { transform: translateY(-2px); border-color: #9CC2EC; box-shadow: 0 8px 18px rgba(3, 34, 88, .1); }
.pg-subject.on { border-color: var(--pg-brand-blue); background: linear-gradient(180deg, #F2F8FF, #E3F0FD); box-shadow: 0 8px 20px rgba(10, 111, 214, .18); }
.pg-subject > i { position: absolute; top: 6px; right: 8px; color: var(--pg-brand-blue); }

/* Chapters: numbered list */
.pg-chips-chapter { flex-direction: column; flex-wrap: nowrap; gap: .45rem; max-height: 330px; overflow-y: auto; padding-right: 4px; }
.pg-chapter {
  display: flex; align-items: center; gap: .7rem; width: 100%; padding: .65rem .8rem; border-radius: 14px;
  border: 2px solid #E3EAF4; background: #fff; text-align: left; cursor: pointer; font-size: 1rem; color: #1B2B45;
  transition: border-color .15s, background .15s, transform .12s ease;
}
.pg-chapter:hover { border-color: #9CC2EC; transform: translateX(2px); }
.pg-ch-num {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--pg-brand-blue-soft); color: var(--pg-brand-blue); font-weight: 900;
}
.pg-ch-name { flex: 1; font-weight: 700; line-height: 1.3; }
.pg-free { background: #E7F7EF; color: #1E9E63; font-size: .78rem; font-weight: 800; padding: .2rem .55rem; border-radius: 999px; }
.pg-chapter > .fa-lock { color: #C9780E; }
.pg-chapter.locked { background: #FBFCFE; color: #7B8798; }
.pg-chapter.locked .pg-ch-num { background: #F1F3F7; color: #9AA3B2; }
.pg-chapter.on { border-color: var(--pg-brand-blue); background: linear-gradient(90deg, #EEF6FF, #fff); }
.pg-chapter.on .pg-ch-num { background: var(--pg-brand-blue); color: #fff; }
.pg-chapter > .fa-circle-check { color: var(--pg-brand-blue); }

/* Question-type filter pills (already buttons in index.js): same look, readable size */
#demoTypesContainer { gap: .5rem !important; }
#demoTypesContainer .btn {
  font-size: .95rem !important; font-weight: 700; padding: .45rem .95rem !important; border-width: 2px;
  border-color: #DCE5F2; color: #1B2B45; background: #fff;
}
#demoTypesContainer .btn.btn-primary {
  background: linear-gradient(135deg, var(--pg-brand-blue), #2F86E3); border-color: transparent; color: #fff;
  box-shadow: 0 5px 14px rgba(10, 111, 214, .28);
}

/* Lock note + generate button */
#demoForm .bg-warning-subtle { font-size: .95rem !important; padding: .7rem .85rem !important; border-radius: 12px !important; }
#btnGenerate {
  font-size: 1.05rem; background: linear-gradient(135deg, var(--pg-brand-blue), #2F86E3); border: 0;
  box-shadow: 0 10px 22px rgba(10, 111, 214, .3) !important;
}
#btnGenerate:not(:disabled):hover { filter: brightness(1.05); transform: translateY(-1px); }
@media (max-width: 400px) { .pg-chips-subject { grid-template-columns: 1fr; } }

/* "Load Chapter Questions" is not needed (questions load automatically on chapter/book/type);
   its place goes to the basket button added by chip-panel.js */
#btnGenerate { display: none !important; }
.pg-basket-cta-wrap { margin-top: .4rem; }
.pg-basket-hint { color: #6E7A92; font-size: .95rem; text-align: center; padding: .85rem; border: 2px dashed #DCE5F2; border-radius: 14px; }
.pg-basket-hint i { color: var(--pg-brand-gold); margin-right: .35rem; }
.pg-basket-cta { display: none; }
.pg-basket-cta-wrap.has-items .pg-basket-hint { display: none; }
.pg-basket-cta-wrap.has-items .pg-basket-cta {
  display: flex; align-items: center; justify-content: center; gap: .75rem; width: 100%; border: 0; cursor: pointer;
  padding: .85rem 1rem; border-radius: 999px; color: var(--pg-brand-navy); text-align: left;
  background: linear-gradient(135deg, #FFD666, var(--pg-brand-gold)); box-shadow: 0 10px 22px rgba(245, 166, 35, .38);
  transition: transform .12s ease, filter .15s; animation: pgCtaIn .35s ease-out;
}
.pg-basket-cta:hover { transform: translateY(-2px); filter: brightness(1.04); }
.pg-basket-cta > i { font-size: 1.3rem; }
.pg-basket-cta b { display: block; font-size: 1.05rem; font-weight: 900; line-height: 1.2; }
.pg-basket-cta small { display: block; font-size: .9rem; font-weight: 700; opacity: .8; }
@keyframes pgCtaIn { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pg-basket-cta { animation: none !important; } }

/* Marks breakdown: "1 mark -> 4 questions" (chip-panel.js) */
.pg-marks-break:empty { display: none; }
.pg-marks-break {
  display: flex; flex-direction: column; gap: .45rem; margin-bottom: .75rem; padding: .85rem; border-radius: 16px;
  background: linear-gradient(160deg, #FFF8E8, #FFF1D2); border: 2px solid #F8DFA6;
}
.pg-mb-title { font-weight: 900; color: var(--pg-brand-navy); font-size: 1rem; margin-bottom: .1rem; }
.pg-mb-title i { color: var(--pg-brand-gold); margin-right: .3rem; }
.pg-mb-chip {
  display: flex; align-items: center; gap: .55rem; background: #fff; border-radius: 12px; padding: .5rem .7rem;
  font-size: 1rem; color: #1B2B45; box-shadow: 0 3px 10px rgba(201, 120, 14, .12); animation: pgCtaIn .3s ease-out;
}
.pg-mb-m {
  min-width: 34px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--pg-brand-navy), var(--pg-brand-blue)); color: #FFD666; font-weight: 900; font-size: .85rem;
}
.pg-mb-arrow { color: var(--pg-brand-gold); font-weight: 900; }
.pg-mb-chip b:last-child { color: var(--pg-brand-blue); }

/* =====================================================================
   HERO (business definition + "From selection to PDF")
   ===================================================================== */
.pg-hero2 {
  position: relative; overflow: hidden; margin: 1.25rem auto 2rem; padding: 2.4rem 2.2rem;
  background: radial-gradient(1200px 400px at 85% -10%, #E3F0FD 0%, transparent 60%), linear-gradient(135deg, #F7FAFF 0%, #EEF4FC 100%);
  border-radius: 2rem; border: 1px solid #E3EAF4;
}
.pg-eyebrow {
  display: inline-flex; align-items: center; gap: .45rem; background: #FFF4DC; color: #8A5A0B; font-weight: 800;
  font-size: .9rem; padding: .38rem .85rem; border-radius: 999px; border: 1px solid #F8DFA6; margin-bottom: .9rem;
}
.pg-eyebrow i { color: var(--pg-brand-gold); }
.pg-hero2-title { font-size: clamp(1.9rem, 3.4vw, 2.9rem); font-weight: 900; line-height: 1.12; color: var(--pg-brand-navy); letter-spacing: -.02em; margin-bottom: .9rem; }
.pg-hero2-title span { color: var(--pg-brand-blue); }
.pg-hero2-lead { font-size: 1.05rem; color: #3F4B60; line-height: 1.6; margin-bottom: 1rem; max-width: 640px; }
.pg-hero2-lead b { color: var(--pg-brand-navy); }
.pg-why { list-style: none; padding: 0; margin: 0 0 1.3rem; display: grid; gap: .55rem; max-width: 640px; }
.pg-why li { display: flex; gap: .7rem; align-items: flex-start; font-size: .98rem; color: #3F4B60; line-height: 1.45; }
.pg-why li > i {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: var(--pg-brand-blue); box-shadow: 0 3px 10px rgba(3, 34, 88, .08); margin-top: 1px;
}
.pg-why b { color: var(--pg-brand-navy); }
.pg-trust { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-size: .9rem; color: #5B6678; }
.pg-trust i { color: #1E9E63; margin-right: .3rem; }
.pg-hero2 .pg-hero-logo { width: min(400px, 92%); margin: 0 auto .9rem; }
.pg-steps { background: #fff; border-radius: 18px; padding: 1rem 1.1rem; box-shadow: 0 12px 30px rgba(3, 34, 88, .1); border: 1px solid #E8EEF6; }
.pg-steps-title { font-weight: 900; color: var(--pg-brand-navy); font-size: .98rem; margin-bottom: .55rem; }
.pg-steps ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.pg-steps li { display: flex; gap: .7rem; align-items: center; }
.pg-steps b { display: block; color: #1B2B45; font-size: .95rem; }
.pg-steps small { display: block; color: #6E7A92; font-size: .85rem; line-height: 1.3; }
.pg-step-n {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--pg-brand-blue), #3D8EE6); color: #fff; font-weight: 900; font-size: .85rem;
}
.pg-step-n.gold { background: linear-gradient(135deg, #FFD666, var(--pg-brand-gold)); color: var(--pg-brand-navy); }
@media (max-width: 991px) { .pg-hero2 { padding: 1.6rem 1.1rem; } .pg-hero2 .col-lg-7 { text-align: left; } }

/* =====================================================================
   LEFT PANEL: compact but clear (overrides the sizes above)
   ===================================================================== */
#live-demo .col-lg-4 > .card { padding: 1.1rem 1.15rem !important; }
#demoForm > .mb-3 { margin-bottom: .95rem !important; }
#demoForm > .mb-3 > .form-label { font-size: .92rem !important; margin-bottom: .45rem; gap: .45rem; }
#demoForm > .mb-3 > .form-label::before { width: 22px; height: 22px; font-size: .75rem; }
.pg-chips { gap: .4rem; }
.pg-chip-hint { font-size: .88rem; padding: .15rem .1rem; }
.pg-pill { font-size: .9rem; padding: .36rem .8rem; border-width: 1.5px; }
.pg-chips-subject { gap: .45rem; }
.pg-subject { padding: .42rem .55rem; border-radius: 13px; font-size: .92rem; gap: .5rem; border-width: 1.5px; }
.pg-subject img { width: 34px; height: 34px; }
.pg-subject span { overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.pg-chips-chapter { gap: .35rem; max-height: 300px; }
.pg-chapter { padding: .45rem .6rem; border-radius: 11px; font-size: .92rem; gap: .55rem; border-width: 1.5px; }
.pg-ch-num { width: 26px; height: 26px; border-radius: 8px; font-size: .82rem; }
.pg-free { font-size: .72rem; padding: .15rem .45rem; }
#demoTypesContainer { gap: .35rem !important; }
#demoTypesContainer .btn { font-size: .84rem !important; padding: .3rem .7rem !important; border-width: 1.5px; }
#demoForm .bg-warning-subtle { font-size: .86rem !important; padding: .5rem .7rem !important; border-radius: 10px !important; }
.pg-basket-hint { font-size: .88rem; padding: .6rem; }
.pg-marks-break { padding: .65rem; gap: .35rem; margin-bottom: .6rem; border-radius: 14px; border-width: 1.5px; }
.pg-mb-title { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: .92rem; }
.pg-mb-chip { font-size: .9rem; padding: .35rem .55rem; gap: .45rem; border-radius: 10px; }
.pg-mb-m { min-width: 30px; height: 26px; font-size: .78rem; border-radius: 8px; }
.pg-mb-clear {
  border: 1.5px solid #F1C9C9; background: #fff; color: #C62F3B; font-size: .8rem; font-weight: 800;
  padding: .22rem .6rem; border-radius: 999px; cursor: pointer; transition: background .15s;
}
.pg-mb-clear:hover { background: #FDECEE; }
.pg-basket-cta-wrap.has-items .pg-basket-cta { padding: .62rem .9rem; gap: .6rem; }
.pg-basket-cta > i { font-size: 1.1rem; }
.pg-basket-cta b { font-size: .95rem; }
.pg-basket-cta small { font-size: .82rem; }

/* ===== policy pages & footer (Oct 2026) ===== */
.pg-legal { background: #f6f8fc; padding: 32px 0 8px; }
.pg-legal-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.pg-legal-nav a { font-size: 13px; padding: 6px 12px; border-radius: 30px; background: #fff; border: 1px solid #e3e8f0; color: #032258; text-decoration: none; }
.pg-legal-nav a.on, .pg-legal-nav a:hover { background: #0A6FD6; border-color: #0A6FD6; color: #fff; }
.pg-legal-doc { background: #fff; border: 1px solid #e3e8f0; border-radius: 18px; padding: clamp(20px, 4vw, 40px); max-width: 920px; box-shadow: 0 10px 30px rgba(3, 34, 88, .05); line-height: 1.75; color: #2b3445; }
.pg-legal-doc h1 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; color: #032258; margin-bottom: 6px; }
.pg-legal-doc h2 { font-size: 19px; font-weight: 700; color: #032258; margin: 26px 0 8px; }
.pg-legal-doc .lead { font-size: 17px; color: #4b5565; }
.pg-legal-doc ul, .pg-legal-doc ol { padding-left: 1.2rem; }
.pg-legal-doc li { margin-bottom: 6px; }
.pg-legal-doc a { color: #0A6FD6; }
.pg-legal-date { color: #8a94a6; font-size: 13px; margin-bottom: 18px; }
.pg-legal-contact { background: #f6f8fc; border-left: 4px solid #F5A623; border-radius: 10px; padding: 14px 16px; margin-top: 18px; font-size: 15px; }
.pg-contact-grid, .pg-policy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 18px 0 8px; }
.pg-contact-card, .pg-policy-card { display: flex; flex-direction: column; gap: 4px; border: 1px solid #e3e8f0; border-radius: 14px; padding: 16px; text-decoration: none; color: #2b3445; background: #fff; }
.pg-contact-card i { color: #0A6FD6; font-size: 22px; margin-bottom: 4px; }
.pg-contact-card b, .pg-policy-card b { color: #032258; }
.pg-contact-card span, .pg-policy-card span { font-size: 14px; color: #5b6475; word-break: break-word; }
a.pg-contact-card:hover, .pg-policy-card:hover { border-color: #0A6FD6; box-shadow: 0 6px 18px rgba(10, 111, 214, .12); }
.pg-footer a { display: block; color: rgba(255, 255, 255, .6); text-decoration: none; margin-bottom: 4px; }
.pg-footer p a { display: inline; }
.pg-footer a:hover { color: #F5A623; }