:root {
  --green-950: #062d1b;
  --green-900: #073f24;
  --green-700: #11633a;
  --teal-700: #11736b;
  --mint-100: #e7f4eb;
  --mint-50: #f5fbf7;
  --gold-500: #d9a62e;
  --ink: #173329;
  --muted: #5e746a;
  --white: #fff;
  --line: rgba(7, 63, 36, 0.12);
  --shadow: 0 24px 70px rgba(7, 63, 36, 0.12);
  --container: 1120px;
  color-scheme: only light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: "Nunito Sans", Arial, sans-serif;
  background: radial-gradient(circle at 90% 8%, rgba(217, 166, 46, 0.13), transparent 30rem), #f8fbf7;
  line-height: 1.6;
}
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
.container { width: min(var(--container), calc(100% - 36px)); margin: 0 auto; }
.sr-only, .skip-link { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.skip-link:focus { z-index: 1000; top: 12px; left: 12px; width: auto; height: auto; padding: 10px 14px; clip: auto; color: #fff; background: var(--green-900); border-radius: 999px; }

.library-header { position: relative; z-index: 10; border-bottom: 1px solid var(--line); background: rgba(248, 251, 247, 0.9); backdrop-filter: blur(16px); }
.library-nav { display: flex; min-height: 80px; align-items: center; justify-content: space-between; gap: 24px; }
.library-brand img { width: 140px; height: auto; }
.library-nav-links { display: flex; align-items: center; gap: 22px; color: var(--green-900); font-weight: 800; }
.library-nav-links a:hover { color: var(--teal-700); }
.library-back { display: inline-flex; gap: 8px; align-items: center; }

.btn { display: inline-flex; min-height: 50px; padding: 14px 22px; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 999px; font-weight: 900; line-height: 1.1; text-align: center; transition: 180ms ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--green-900), var(--teal-700)); box-shadow: 0 14px 30px rgba(7,63,36,.2); }
.btn-secondary { color: var(--green-900); background: #fff; border-color: var(--line); }

.library-hero { padding: 88px 0 54px; text-align: center; }
.eyebrow { margin: 0 0 14px; color: var(--teal-700); font-size: .8rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.library-hero h1 { max-width: 820px; margin: 0 auto; color: var(--green-950); font-size: clamp(2.7rem, 7vw, 5.6rem); letter-spacing: -.055em; line-height: .98; }
.library-hero > .container > p:not(.eyebrow) { max-width: 680px; margin: 24px auto 0; color: var(--muted); font-size: 1.12rem; }
.breadcrumb { display: flex; justify-content: center; gap: 9px; margin-bottom: 28px; color: var(--muted); font-size: .9rem; }
.breadcrumb a { color: var(--green-700); font-weight: 800; }

.library-content { padding: 30px 0 100px; }
.niche-grid, .tier-grid { display: grid; gap: 24px; }
.niche-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tier-grid { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
.niche-card, .tier-card { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 30px; box-shadow: var(--shadow); }
.niche-card { display: grid; grid-template-columns: .8fr 1.2fr; }
.niche-visual { position: relative; display: grid; min-height: 360px; overflow: hidden; color: #743f35; background: linear-gradient(145deg,#ffe3c9,#f5ae82 55%,#df7e64); place-items: center; }
.niche-visual::before, .niche-visual::after { position: absolute; width: 230px; height: 230px; content: ""; border: 1px solid rgba(255,255,255,.55); border-radius: 50%; }
.niche-visual::before { top: -90px; left: -80px; }
.niche-visual::after { right: -100px; bottom: -90px; }
.niche-visual svg { width: 76px; height: 76px; }
.niche-visual-law { color: #cbd8d1; background: linear-gradient(145deg, #171b1a, #28312e 60%, #38594b); }
.library-layers { position: relative; width: 108px; height: 108px; }
.library-layers i { position: absolute; inset: 0; border: 1px solid currentColor; }
.library-layers i:nth-child(1) { transform: translate(-16px, -16px); opacity: .35; }
.library-layers i:nth-child(2) { transform: translate(0); opacity: .65; }
.library-layers i:nth-child(3) { transform: translate(16px, 16px); border-width: 2px; }
.niche-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 50px; }
.niche-copy h2 { margin: 0; color: var(--green-950); font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1; }
.niche-copy p { margin: 20px 0 28px; color: var(--muted); }
.coming-note { margin: 36px 0 0; color: var(--muted); text-align: center; }

.comparison-intro { max-width: 740px; margin: 0 auto 40px; text-align: center; }
.comparison-intro h2 { margin: 0; color: var(--green-950); font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.1; }
.comparison-intro p { color: var(--muted); }
.tier-card { position: relative; display: flex; min-height: 420px; padding: 34px; flex-direction: column; box-shadow: 0 15px 45px rgba(7,63,36,.07); }
.tier-card.available { border: 2px solid rgba(17,115,107,.45); transform: translateY(-8px); }
.tier-number { display: grid; width: 46px; height: 46px; margin-bottom: 30px; color: var(--green-900); background: var(--mint-100); border-radius: 15px; font-weight: 900; place-items: center; }
.status { display: inline-flex; width: max-content; margin-bottom: 18px; padding: 6px 11px; color: var(--muted); background: #eef2ef; border-radius: 999px; font-size: .74rem; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.available .status { color: var(--green-900); background: var(--mint-100); }
.tier-card h3 { margin: 0; color: var(--green-950); font-size: 1.55rem; line-height: 1.15; }
.tier-card p { margin: 16px 0 28px; color: var(--muted); }
.tier-card .btn, .tier-card .unavailable-label { margin-top: auto; }
.unavailable-label { color: #87958f; font-size: .9rem; font-weight: 800; }

.library-footer { padding: 42px 0; color: #d7e8de; background: var(--green-950); }
.library-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.library-footer img { width: 120px; filter: brightness(0) invert(1); }
.library-footer p { margin: 8px 0 0; }
.library-footer a { font-weight: 800; }
.library-footer a:hover { color: #fff; }

@media (max-width: 880px) {
  .niche-grid { grid-template-columns: 1fr; }
  .tier-grid { grid-template-columns: 1fr; }
  .tier-card { min-height: auto; }
  .tier-card.available { transform: none; }
}
@media (max-width: 680px) {
  .library-nav { min-height: 70px; }
  .library-nav-links a:not(.btn) { display: none; }
  .library-hero { padding: 62px 0 40px; }
  .library-hero h1 { font-size: clamp(2.6rem, 14vw, 4.2rem); }
  .niche-card { grid-template-columns: 1fr; }
  .niche-visual { min-height: 230px; }
  .niche-copy { padding: 30px 24px; }
  .library-footer-inner { align-items: flex-start; flex-direction: column; }
  .btn { width: 100%; }
}
