:root {
  --forest-950: #073c2b;
  --forest-900: #0a4b35;
  --forest-800: #0d5a3f;
  --forest-700: #14704e;
  --leaf-500: #70ad3f;
  --leaf-200: #dcecc9;
  --gold-500: #e0b84f;
  --gold-100: #fbf0c9;
  --sky-500: #49a4bc;
  --sky-100: #dff2f6;
  --terracotta-500: #bd7357;
  --red-500: #b74e4e;
  --cream-50: #fffdf7;
  --cream-100: #fbf4e4;
  --cream-200: #f1e5ca;
  --ink-900: #17312a;
  --ink-700: #3f5750;
  --ink-500: #6a7d77;
  --white: #ffffff;
  --shadow-sm: 0 10px 30px rgba(7, 60, 43, 0.08);
  --shadow-md: 0 20px 55px rgba(7, 60, 43, 0.14);
  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 32px;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink-900);
  background:
    radial-gradient(circle at 10% 0%, rgba(224, 184, 79, 0.15), transparent 26rem),
    radial-gradient(circle at 95% 20%, rgba(73, 164, 188, 0.12), transparent 28rem),
    var(--cream-50);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .3;
  background-image: radial-gradient(rgba(10, 75, 53, .13) 0.7px, transparent 0.7px);
  background-size: 18px 18px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
  z-index: -1;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
img { max-width: 100%; display: block; }

.container {
  width: min(calc(100% - 36px), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  transform: translateY(-140%);
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--forest-900);
  color: white;
  z-index: 100;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(7, 60, 43, .08);
  background: rgba(255, 253, 247, .86);
  backdrop-filter: blur(18px);
}

.navbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  color: var(--forest-950);
}
.brand img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 13px;
  box-shadow: var(--shadow-sm);
}
.brand small {
  display: block;
  margin-top: -4px;
  font-size: .62rem;
  letter-spacing: .15em;
  color: var(--leaf-500);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-links a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--ink-700);
  font-weight: 700;
  transition: .2s ease;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--forest-950);
  background: var(--leaf-200);
}

.menu-toggle {
  display: none;
  border: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--cream-100);
  color: var(--forest-950);
  cursor: pointer;
  font-size: 1.2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 19px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--forest-900), var(--forest-700));
  box-shadow: 0 12px 24px rgba(10, 75, 53, .22);
}
.btn-secondary {
  color: var(--forest-950);
  border-color: rgba(7, 60, 43, .15);
  background: rgba(255,255,255,.7);
}
.btn-small { min-height: 40px; padding-inline: 15px; font-size: .9rem; }

.hero {
  padding: 78px 0 54px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  align-items: center;
  gap: 64px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 13px;
  border: 1px solid rgba(20, 112, 78, .16);
  border-radius: 999px;
  color: var(--forest-800);
  background: rgba(220, 236, 201, .65);
  font-size: .84rem;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.hero h1,
.page-hero h1 {
  margin: 22px 0 18px;
  color: var(--forest-950);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 7vw, 6.4rem);
  line-height: .94;
  letter-spacing: -.055em;
}
.hero h1 span { color: var(--leaf-500); }
.hero-lead {
  max-width: 650px;
  margin: 0;
  color: var(--ink-700);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  margin-top: 30px;
  color: var(--ink-500);
  font-size: .92rem;
  font-weight: 700;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }

.logo-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 520px;
}
.logo-stage::before,
.logo-stage::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
}
.logo-stage::before {
  width: 420px;
  height: 420px;
  background: rgba(224, 184, 79, .18);
}
.logo-stage::after {
  width: 310px;
  height: 310px;
  border: 1px dashed rgba(10, 75, 53, .3);
  animation: spin 35s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.logo-card {
  position: relative;
  z-index: 2;
  width: min(100%, 500px);
  padding: 22px;
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 38px;
  background: rgba(255, 253, 247, .76);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-md);
  transform: rotate(1.5deg);
}
.logo-card img { border-radius: 26px; }
.floating-pill {
  position: absolute;
  z-index: 4;
  padding: 10px 15px;
  border-radius: 999px;
  background: white;
  box-shadow: var(--shadow-sm);
  color: var(--forest-900);
  font-size: .84rem;
  font-weight: 850;
}
.pill-one { top: 12%; left: 0; }
.pill-two { right: 0; bottom: 15%; }

.section { padding: 72px 0; }
.section-alt {
  background: linear-gradient(180deg, rgba(251,244,228,.8), rgba(255,253,247,.4));
  border-block: 1px solid rgba(7,60,43,.07);
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 30px;
}
.section-heading h2 {
  margin: 8px 0 0;
  color: var(--forest-950);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
}
.section-heading p { max-width: 590px; margin: 0; color: var(--ink-700); }

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.category-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 24px;
  border: 1px solid rgba(7,60,43,.09);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.82);
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.category-card::after {
  content: "";
  position: absolute;
  width: 110px;
  height: 110px;
  right: -36px;
  top: -36px;
  border-radius: 50%;
  background: var(--accent-soft, var(--leaf-200));
}
.category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent, var(--forest-700));
}
.category-card .icon {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--accent-soft, var(--leaf-200));
  font-size: 1.55rem;
}
.category-card h3 { margin: 22px 0 8px; color: var(--forest-950); font-size: 1.18rem; }
.category-card p { margin: 0; color: var(--ink-700); }
.category-card .card-footer {
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--accent, var(--forest-700));
  font-weight: 850;
  font-size: .9rem;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.value-card {
  padding: 28px;
  border-radius: var(--radius-md);
  color: white;
  background: linear-gradient(145deg, var(--forest-950), var(--forest-800));
  box-shadow: var(--shadow-md);
}
.value-card:nth-child(2) { background: linear-gradient(145deg, #7d631e, #d2a839); }
.value-card:nth-child(3) { background: linear-gradient(145deg, #22667a, #49a4bc); }
.value-card:nth-child(4) { background: linear-gradient(145deg, #456f27, #79ac47); }
.value-card strong { display: block; margin-bottom: 8px; font-size: 1.2rem; }
.value-card p { margin: 0; opacity: .88; }

.notice-banner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 25px 28px;
  border: 1px solid rgba(224,184,79,.34);
  border-radius: var(--radius-md);
  background: linear-gradient(120deg, var(--gold-100), rgba(255,255,255,.92));
  box-shadow: var(--shadow-sm);
}
.notice-banner .notice-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: white;
  font-size: 1.45rem;
}
.notice-banner h3 { margin: 0 0 2px; color: var(--forest-950); }
.notice-banner p { margin: 0; color: var(--ink-700); }

.page-hero { padding: 62px 0 38px; }
.page-hero h1 { font-size: clamp(2.9rem, 6vw, 5.2rem); }
.page-hero p { max-width: 760px; margin: 0; color: var(--ink-700); font-size: 1.08rem; }

.rules-toolbar {
  position: sticky;
  top: 77px;
  z-index: 30;
  padding: 15px 0;
  border-block: 1px solid rgba(7,60,43,.08);
  background: rgba(255,253,247,.91);
  backdrop-filter: blur(16px);
}
.toolbar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}
.search-box {
  position: relative;
  flex: 1;
}
.search-box span {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-500);
}
.search-box input {
  width: 100%;
  height: 50px;
  padding: 0 48px 0 46px;
  border: 1px solid rgba(7,60,43,.13);
  border-radius: 16px;
  outline: none;
  color: var(--ink-900);
  background: white;
  box-shadow: 0 8px 20px rgba(7,60,43,.05);
}
.search-box input:focus {
  border-color: var(--forest-700);
  box-shadow: 0 0 0 4px rgba(20,112,78,.10);
}
.clear-search {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: none;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: var(--cream-100);
  color: var(--ink-700);
  cursor: pointer;
}
.clear-search.visible { display: grid; }
.rules-count {
  flex: 0 0 auto;
  padding: 11px 15px;
  border-radius: 14px;
  color: var(--forest-900);
  background: var(--leaf-200);
  font-weight: 850;
  white-space: nowrap;
}

.rules-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 32px;
  padding: 38px 0 82px;
}
.rules-sidebar {
  position: sticky;
  top: 160px;
  align-self: start;
}
.sidebar-card {
  padding: 14px;
  border: 1px solid rgba(7,60,43,.09);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.78);
  box-shadow: var(--shadow-sm);
}
.sidebar-title {
  padding: 7px 10px 12px;
  color: var(--ink-500);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.category-nav { display: grid; gap: 5px; }
.category-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border-radius: 12px;
  color: var(--ink-700);
  font-weight: 750;
  font-size: .9rem;
}
.category-nav a:hover,
.category-nav a.active {
  color: var(--forest-950);
  background: var(--leaf-200);
}
.category-nav .nav-count {
  margin-left: auto;
  color: var(--ink-500);
  font-size: .77rem;
}

.rules-content { min-width: 0; }
.rule-category {
  scroll-margin-top: 166px;
  margin-bottom: 28px;
  padding: 25px;
  border: 1px solid rgba(7,60,43,.09);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.76);
  box-shadow: var(--shadow-sm);
}
.rule-category.hidden { display: none; }
.category-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 19px;
}
.category-heading .big-icon {
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--accent-soft, var(--leaf-200));
  font-size: 1.65rem;
}
.category-heading h2 { margin: 0; color: var(--forest-950); font-size: 1.55rem; }
.category-heading p { margin: 2px 0 0; color: var(--ink-700); }
.category-heading .category-total {
  margin-left: auto;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--accent, var(--forest-700));
  background: var(--accent-soft, var(--leaf-200));
  font-size: .8rem;
  font-weight: 850;
}
.rule-list { display: grid; gap: 10px; }
.rule-item {
  border: 1px solid rgba(7,60,43,.09);
  border-radius: 16px;
  background: white;
  overflow: hidden;
}
.rule-item.hidden { display: none; }
.rule-button {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 13px;
  align-items: center;
  padding: 17px;
  border: 0;
  text-align: left;
  color: var(--ink-900);
  background: transparent;
  cursor: pointer;
}
.rule-number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--forest-900);
  background: var(--cream-100);
  font-size: .8rem;
  font-weight: 900;
}
.rule-title-wrap { min-width: 0; }
.rule-title { display: block; font-weight: 850; }
.rule-level {
  display: inline-flex;
  align-items: center;
  margin-top: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.level-info { color: #236276; background: var(--sky-100); }
.level-important { color: #775e18; background: var(--gold-100); }
.level-strict { color: #8f3737; background: #f8dede; }
.chevron {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--forest-900);
  background: var(--cream-100);
  transition: transform .2s ease;
}
.rule-item.open .chevron { transform: rotate(180deg); }
.rule-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .25s ease;
}
.rule-item.open .rule-panel { grid-template-rows: 1fr; }
.rule-panel-inner { overflow: hidden; }
.rule-text {
  margin: 0;
  padding: 0 17px 17px 64px;
  color: var(--ink-700);
}
.rule-note {
  display: block;
  margin-top: 10px;
  padding: 10px 12px;
  border-left: 3px solid var(--gold-500);
  border-radius: 0 10px 10px 0;
  background: var(--gold-100);
  color: var(--ink-900);
}
.empty-state {
  grid-column: 2;
  display: none;
  padding: 52px 24px;
  text-align: center;
  border: 1px dashed rgba(7,60,43,.2);
  border-radius: var(--radius-md);
  color: var(--ink-700);
  background: rgba(255,255,255,.65);
}
.empty-state.visible { display: block; }
.empty-state strong { display: block; margin-bottom: 5px; color: var(--forest-950); font-size: 1.1rem; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.legend > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-700);
  font-size: .82rem;
}
.legend i { width: 9px; height: 9px; border-radius: 50%; }
.legend .info-dot { background: var(--sky-500); }
.legend .important-dot { background: var(--gold-500); }
.legend .strict-dot { background: var(--red-500); }

.site-footer {
  padding: 46px 0;
  color: rgba(255,255,255,.78);
  background: var(--forest-950);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr .6fr;
  gap: 30px;
  align-items: end;
}
.footer-brand { display: flex; gap: 14px; align-items: center; }
.footer-brand img { width: 52px; height: 52px; border-radius: 15px; }
.footer-brand strong { display: block; color: white; font-size: 1.08rem; }
.footer-brand span { font-size: .88rem; }
.footer-links {
  display: flex;
  justify-content: end;
  flex-wrap: wrap;
  gap: 14px;
  font-weight: 750;
}
.footer-links a:hover { color: white; }
.footer-bottom {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: .82rem;
}

.accent-green { --accent: var(--forest-700); --accent-soft: var(--leaf-200); }
.accent-gold { --accent: #9b791d; --accent-soft: var(--gold-100); }
.accent-blue { --accent: #2b768a; --accent-soft: var(--sky-100); }
.accent-terracotta { --accent: #9d543d; --accent-soft: #f5e1d9; }
.accent-red { --accent: #9c4242; --accent-soft: #f8dede; }

@media (max-width: 1050px) {
  .hero-grid { gap: 30px; }
  .category-grid, .values-grid { grid-template-columns: repeat(2, 1fr); }
  .rules-layout { grid-template-columns: 230px minmax(0, 1fr); gap: 22px; }
}

@media (max-width: 820px) {
  .empty-state { grid-column: 1; }
  .menu-toggle { display: grid; place-items: center; }
  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    left: 18px;
    right: 18px;
    display: none;
    padding: 12px;
    border: 1px solid rgba(7,60,43,.1);
    border-radius: 18px;
    background: rgba(255,253,247,.98);
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: grid; }
  .nav-links a { width: 100%; }
  .nav-links .btn { margin-top: 4px; }
  .hero { padding-top: 48px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero-lead { margin-inline: auto; }
  .hero-actions, .hero-meta { justify-content: center; }
  .logo-stage { min-height: 440px; }
  .pill-one { left: 4%; }
  .pill-two { right: 4%; }
  .section-heading { align-items: start; flex-direction: column; }
  .rules-layout { grid-template-columns: 1fr; }
  .rules-sidebar { position: static; }
  .sidebar-card { overflow-x: auto; }
  .sidebar-title { display: none; }
  .category-nav { display: flex; width: max-content; }
  .category-nav a { background: var(--cream-100); white-space: nowrap; }
  .category-nav .nav-count { display: none; }
  .rule-category { scroll-margin-top: 148px; }
}

@media (max-width: 620px) {
  .container { width: min(calc(100% - 24px), var(--container)); }
  .navbar { min-height: 68px; }
  .brand img { width: 42px; height: 42px; }
  .hero h1 { font-size: clamp(3rem, 18vw, 4.7rem); }
  .hero-actions .btn { width: 100%; }
  .logo-stage { min-height: 365px; }
  .logo-card { padding: 14px; border-radius: 27px; }
  .logo-card img { border-radius: 20px; }
  .floating-pill { font-size: .72rem; }
  .category-grid, .values-grid { grid-template-columns: 1fr; }
  .notice-banner { grid-template-columns: auto 1fr; }
  .notice-banner .btn { grid-column: 1 / -1; }
  .toolbar-inner { align-items: stretch; flex-direction: column; }
  .rules-count { text-align: center; }
  .rule-category { padding: 17px; border-radius: 22px; }
  .category-heading { align-items: flex-start; }
  .category-heading .big-icon { width: 48px; height: 48px; border-radius: 15px; }
  .category-heading h2 { font-size: 1.24rem; }
  .category-heading .category-total { display: none; }
  .rule-button { grid-template-columns: auto 1fr; }
  .chevron { display: none; }
  .rule-text { padding-left: 17px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-links { justify-content: start; }
  .footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
