@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,wght@0,300..700;1,300..700&family=Manrope:wght@300..800&display=swap');

:root {
  --cream: #fff8f4;
  --cream-2: #fbf1ea;
  --cream-3: #f6e7de;
  --apricot: #f2d8c6;
  --plum: #a43d5e;
  --plum-dark: #7e2c47;
  --plum-deep: #4a1b2c;
  --ink: #1c1417;
  --ink-soft: #3a2f34;
  --muted: #6f6167;
  --line: #ecdcd3;
  --font-heading: 'Fraunces', Georgia, serif;
  --font-body: 'Manrope', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  padding-top: 64px;
  padding-bottom: env(safe-area-inset-bottom);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--plum-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--plum);
}

:focus-visible {
  outline: 2px solid var(--plum);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  background: var(--plum);
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 13px;
  text-decoration: none;
  transition: top 0.2s ease;
}

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

/* ---------- navigation ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 120;
  background: rgba(12, 17, 25, 0.88);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px rgba(12, 17, 25, 0.18);
}

@supports not ((backdrop-filter: blur(4px)) or (-webkit-backdrop-filter: blur(4px))) {
  .nav {
    background: #0d1319;
  }
}

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  height: 64px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff8f4;
  font-family: var(--font-heading);
  font-size: 21px;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand:hover {
  color: #fff;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--plum);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff8f4;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links > a,
.nav-btn {
  color: rgba(255, 248, 244, 0.9);
  font-size: 14px;
  font-family: var(--font-body);
  padding: 9px 12px;
  border-radius: 6px;
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.nav-links > a:hover,
.nav-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-btn[aria-expanded='true'] i {
  transform: rotate(180deg);
}

.nav-cta {
  background: var(--plum) !important;
  color: #fff8f4 !important;
  font-weight: 700;
  margin-left: 8px;
  padding: 10px 16px !important;
}

.nav-cta:hover {
  background: var(--plum-dark) !important;
}

.nav-burger {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: none;
  color: #fff8f4;
  font-size: 20px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-panel {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 17, 25, 0.97);
}

.nav-panel-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 32px 22px;
}

.nav-panel-title {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 248, 244, 0.6);
}

.nav-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  max-width: 760px;
}

.nav-grid a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 6px;
  color: rgba(255, 248, 244, 0.9);
  text-decoration: none;
  font-size: 14px;
}

.nav-grid a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-grid .no {
  width: 20px;
  font-size: 11px;
  color: #e2a9b9;
  flex: none;
}

.nav-article-list {
  max-height: 58vh;
  overflow-y: auto;
  grid-template-columns: 1fr;
  max-width: 640px;
}

.mobile-menu {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 17, 25, 0.98);
  padding: 16px 20px 96px;
  max-height: calc(100dvh - 64px);
  overflow-y: auto;
}

.mobile-menu h2 {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 248, 244, 0.6);
  margin: 18px 0 8px;
  font-family: var(--font-body);
}

.mobile-menu a {
  display: block;
  padding: 10px 8px;
  color: rgba(255, 248, 244, 0.92);
  text-decoration: none;
  font-size: 14px;
  border-radius: 6px;
}

.mobile-menu a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* ---------- shared layout ---------- */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 22px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--plum-dark);
  text-decoration: none;
}

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

.breadcrumb .sep {
  color: #bda9a0;
}

.page-head {
  padding: 18px 0 26px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--plum);
  font-weight: 700;
}

.page-head h1 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 38px;
  line-height: 1.16;
  letter-spacing: -0.01em;
  max-width: 900px;
}

.lead {
  margin: 14px 0 0;
  max-width: 760px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.page-meta {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

/* ---------- article ---------- */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(0, 1fr);
  gap: 40px;
  padding: 28px 0 10px;
  align-items: start;
}

.article {
  max-width: 760px;
  font-size: 15.5px;
  line-height: 1.78;
  color: var(--ink-soft);
}

.article > p:first-of-type {
  font-size: 16px;
  color: var(--ink);
}

.article h2 {
  margin: 34px 0 10px;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.3;
  color: var(--ink);
  scroll-margin-top: 88px;
}

.article h3 {
  margin: 22px 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  scroll-margin-top: 88px;
}

.article p {
  margin: 0 0 14px;
}

.article ul,
.article ol {
  margin: 0 0 16px;
  padding-left: 20px;
}

.article li {
  margin-bottom: 6px;
}

.article strong {
  color: var(--ink);
  font-weight: 700;
}

.article a {
  color: var(--plum-dark);
}

.toc {
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 22px;
}

.toc p {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--plum);
  font-weight: 700;
}

.toc ol {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
}

.toc li {
  margin-bottom: 4px;
}

.toc a {
  text-decoration: none;
}

.toc a:hover {
  text-decoration: underline;
}

.table-scroll {
  overflow-x: auto;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdfb;
}

table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 13px;
}

caption {
  caption-side: top;
  text-align: left;
  padding: 10px 12px 0;
  font-size: 12px;
  color: var(--muted);
}

th,
td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid #f1e6df;
  vertical-align: top;
}

thead th {
  background: var(--cream-2);
  font-weight: 700;
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.02em;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdfb;
}

.checklist li {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  margin: 0;
  border-bottom: 1px solid #f4eae4;
  font-size: 14px;
}

.checklist li:last-child {
  border-bottom: 0;
}

.checklist li::before {
  content: '☐';
  color: var(--plum);
  font-size: 15px;
  line-height: 1.4;
  flex: none;
}

.callout {
  border-left: 3px solid var(--plum);
  background: var(--cream-2);
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  margin: 0 0 18px;
  font-size: 14px;
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout .callout-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--plum);
  font-weight: 700;
  margin-bottom: 4px;
}

.example-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: -6px;
}

.side {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 14px;
}

.side-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fffdfb;
}

.side-card h2 {
  margin: 0 0 8px;
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
}

.side-card p {
  margin: 0 0 10px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--muted);
}

.side-card a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 42px;
  border-radius: 6px;
  background: var(--plum);
  color: #fff8f4;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  padding: 0 14px;
  white-space: nowrap;
}

.side-card a.btn:hover {
  background: var(--plum-dark);
  color: #fff;
}

.side-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
}

.side-card li {
  padding: 6px 0;
  border-bottom: 1px solid #f4eae4;
}

.side-card li:last-child {
  border-bottom: 0;
}

.related {
  margin-top: 34px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.related h2 {
  margin: 0 0 12px;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
}

.related ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.related li {
  margin: 0;
}

.related a {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fffdfb;
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.related a:hover {
  border-color: var(--plum);
  color: var(--plum-dark);
}

.related .hint {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

.backhome {
  margin-top: 24px;
}

.backhome a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--plum-dark);
  text-decoration: none;
}

.backhome a:hover {
  text-decoration: underline;
}

/* ---------- footer ---------- */
.site-footer {
  margin-top: 40px;
  background: var(--plum-deep);
  color: #f6e2e8;
  padding: 32px 0 96px;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

.site-footer h2 {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff8f4;
  margin: 0 0 10px;
  font-family: var(--font-body);
}

.site-footer p {
  margin: 0 0 10px;
  font-size: 12.5px;
  line-height: 1.7;
  color: #e6c7d1;
  max-width: 340px;
}

.site-footer a {
  color: #f0d3db;
  text-decoration: none;
  font-size: 12.5px;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
}

.footer-bottom {
  max-width: 1180px;
  margin: 24px auto 0;
  padding: 14px 32px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  font-size: 11px;
  color: #cfa9b6;
}

/* ---------- bottom bar + sheets ---------- */
.bottom-bar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 130;
  display: none;
  background: rgba(12, 17, 25, 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-bar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 60px;
}

.bottom-bar a,
.bottom-bar button {
  width: 100%;
  height: 100%;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: 0;
  color: rgba(255, 248, 244, 0.88);
  font-size: 10.5px;
  font-family: var(--font-body);
  text-decoration: none;
  cursor: pointer;
}

.bottom-bar i {
  font-size: 19px;
}

.bottom-bar a:hover,
.bottom-bar button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: rgba(12, 17, 25, 0.6);
}

.sheet {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 150;
  background: #12181f;
  color: #fff8f4;
  border-radius: 16px 16px 0 0;
  max-height: 85dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}

.sheet-handle {
  width: 40px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 248, 244, 0.3);
  margin: 9px auto 0;
  flex: none;
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 20px 10px;
  flex: none;
}

.sheet-head h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 500;
  color: #fff8f4;
}

.sheet-head p {
  margin: 4px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: rgba(255, 248, 244, 0.7);
}

.sheet-close {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 6px;
  border: 1px solid rgba(255, 248, 244, 0.25);
  background: none;
  color: #fff8f4;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sheet-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 20px 28px;
}

.sheet-body a {
  color: rgba(255, 248, 244, 0.92);
  text-decoration: none;
  font-size: 14px;
  display: block;
  padding: 10px 8px;
  border-radius: 6px;
}

.sheet-body a:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.sheet-body .no {
  color: #e2a9b9;
  font-size: 11px;
  margin-right: 8px;
}

.sheet-body .cat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

body.sheet-open {
  overflow: hidden;
}

/* ---------- responsive ---------- */
@media (max-width: 1023px) {
  .nav-links {
    display: none;
  }
  .nav-burger {
    display: flex;
  }
  .nav-panel {
    display: none !important;
  }
  .bottom-bar {
    display: block;
  }
  .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }
  .side {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 22px;
  }
}

@media (max-width: 767px) {
  body {
    font-size: 14.5px;
  }
  .wrap,
  .footer-inner,
  .footer-bottom {
    padding-left: 18px;
    padding-right: 18px;
  }
  .nav-inner {
    padding: 0 18px;
  }
  .page-head h1 {
    font-size: 27px;
  }
  .lead {
    font-size: 15px;
  }
  .article {
    font-size: 15px;
    line-height: 1.72;
  }
  .article h2 {
    font-size: 21px;
    margin-top: 28px;
  }
  .side {
    grid-template-columns: minmax(0, 1fr);
  }
  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
  }
  .site-footer {
    padding-bottom: 92px;
  }
  .sheet {
    border-radius: 14px 14px 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}