/*
  MagicDocument public library
  Layout paradigm: editorial field guide. Mood: bright, confident stationery.
  This stylesheet is loaded only by server-rendered document pages.
*/

body {
  --ink: #20284a;
  --ink-soft: #4f5876;
  --paper: #fff8e9;
  --paper-deep: #f7ebd2;
  --cobalt: #2555d9;
  --violet: #7146b8;
  --coral: #e95f56;
  --mint: #a9e2c5;
  --sun: #ffd36b;
  --line: #d9cdb6;
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.58;
  text-rendering: optimizeLegibility;
}

body *,
body *::before,
body *::after { box-sizing: border-box; }

body a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: .18em; }
body a:hover { text-decoration-thickness: 2px; }
body img, body svg { max-width: 100%; }
body button, body input, body textarea, body select { font: inherit; }
body [hidden] { display: none !important; }

body :focus-visible {
  outline: 3px solid #ffbe33;
  outline-offset: 4px;
}

body .container {
  width: min(1160px, calc(100% - 2.5rem));
  margin-inline: auto;
}

body .skip-link {
  position: fixed;
  z-index: 100;
  top: .7rem;
  left: .7rem;
  padding: .65rem 1rem;
  border-radius: .35rem;
  color: var(--ink);
  background: var(--sun);
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 160ms ease;
}
body .skip-link:focus { transform: translateY(0); }

body .site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgb(255 255 255 / .2);
  color: #fff;
  background: linear-gradient(105deg, #1d3ea8 0%, #553a9d 65%, #7947b5 100%);
  box-shadow: 0 5px 20px rgb(32 40 74 / .16);
}
body .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  width: min(1220px, calc(100% - 2.5rem));
  min-height: 4.65rem;
  margin-inline: auto;
}
body .brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  flex: 0 0 auto;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 850;
  letter-spacing: -.04em;
  text-decoration: none;
}
body .brand svg { width: 1.45rem; height: auto; }
body .site-header nav { display: flex; align-items: center; gap: .35rem; }
body .site-header nav a {
  padding: .55rem .7rem;
  border-radius: .35rem;
  color: rgb(255 255 255 / .9);
  font-size: .91rem;
  font-weight: 700;
  text-decoration: none;
}
body .site-header nav a:hover { color: #fff; background: rgb(255 255 255 / .13); }
body .site-header nav .nav-login { margin-left: .3rem; color: #273359; background: var(--sun); }
body .site-header nav .nav-login:hover { color: #273359; background: #ffe299; }

body .eyebrow {
  margin: 0 0 .72rem;
  color: var(--violet);
  font-size: .71rem;
  font-weight: 900;
  letter-spacing: .15em;
  line-height: 1.25;
}
body h1, body h2, body h3, body p { overflow-wrap: anywhere; }
body h1, body h2, body h3 { margin-top: 0; color: var(--ink); letter-spacing: -.045em; line-height: 1.04; }
body h1 { font-size: clamp(2.6rem, 6.1vw, 5.35rem); }
body h2 { font-size: clamp(1.7rem, 3.2vw, 2.8rem); }
body h3 { font-size: 1.2rem; }
body p { max-width: 72ch; }

body .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
  padding: .75rem 1.05rem;
  border: 0;
  border-radius: .42rem;
  color: #fff;
  background: var(--cobalt);
  box-shadow: 0 4px 0 #173b9e;
  cursor: pointer;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}
body .button:hover { background: #1745c1; transform: translateY(-2px); box-shadow: 0 6px 0 #173b9e; }
body .button:active { transform: translateY(3px); box-shadow: 0 1px 0 #173b9e; }
body .button-light { color: var(--ink); background: var(--sun); box-shadow: 0 4px 0 #d99a22; }
body .button-light:hover { color: var(--ink); background: #ffe29a; box-shadow: 0 6px 0 #d99a22; }
body .text-link { color: var(--cobalt); font-weight: 800; text-decoration: none; }
body .text-link:hover { text-decoration: underline; }

/* Library */
body .directory-hero, body .guide-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(118deg, #2048bd 0%, #4d3aa3 57%, #a34b9d 100%);
}
body .directory-hero::before, body .guide-hero::before {
  position: absolute;
  z-index: -1;
  width: 36rem;
  height: 36rem;
  right: -13rem;
  bottom: -22rem;
  border-radius: 50%;
  background: var(--coral);
  content: "";
  opacity: .86;
}
body .directory-hero::after, body .guide-hero::after {
  position: absolute;
  z-index: -1;
  width: 30rem;
  height: 12rem;
  top: 3rem;
  left: -8rem;
  background: var(--mint);
  content: "";
  opacity: .72;
  transform: rotate(-15deg);
}
body .directory-hero .container { padding-block: clamp(4.25rem, 8vw, 7rem) 3.3rem; }
body .directory-hero .eyebrow, body .guide-hero .eyebrow { color: var(--sun); }
body .directory-hero h1, body .guide-hero h1 { max-width: 14ch; color: #fff; }
body .hero-description { margin: 1.35rem 0 0; color: rgb(255 255 255 / .92); font-size: clamp(1.05rem, 1.8vw, 1.25rem); }
body .hero-note { margin: 1.1rem 0 0; color: rgb(255 255 255 / .77); font-size: .88rem; }

body .search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12rem auto;
  gap: .75rem;
  align-items: end;
  max-width: 980px;
  margin-top: 2.6rem;
  padding: 1rem;
  border: 1px solid rgb(255 255 255 / .4);
  border-radius: .85rem;
  color: var(--ink);
  background: #fff9ed;
  box-shadow: 0 16px 30px rgb(27 32 95 / .17);
}
body .search-panel label { grid-row: 1; font-size: .78rem; font-weight: 850; letter-spacing: .02em; }
body .search-panel label:first-child { grid-column: 1; }
body .search-panel .category-label { grid-column: 2; }
body .search-panel input, body .search-panel select {
  width: 100%;
  min-height: 3.1rem;
  padding: .65rem .75rem;
  border: 1.5px solid #b6b1c9;
  border-radius: .35rem;
  color: var(--ink);
  background: #fff;
}
body .search-panel input { grid-column: 1; grid-row: 2; }
body .search-panel select { grid-column: 2; grid-row: 2; }
body .search-panel #search-count { grid-column: 3; grid-row: 2; margin: 0; padding: .5rem; color: var(--ink-soft); font-size: .78rem; line-height: 1.25; }

body .directory-content { padding-block: clamp(3.5rem, 7vw, 6.5rem); }
body .category-section + .category-section { margin-top: clamp(4rem, 8vw, 7rem); }
body .category-heading { display: flex; align-items: end; gap: 1rem; margin-bottom: 1.7rem; }
body .category-heading .eyebrow { margin-bottom: .35rem; }
body .category-heading h2 { margin: 0; }
body .category-number, body .section-number {
  color: var(--coral);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: .02em;
}
body .document-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line); background: var(--line); }
body .document-card { position: relative; min-height: 15.5rem; padding: 1.45rem; background: #fffaf0; transition: background-color 150ms ease, transform 150ms ease; }
body .document-card:hover { z-index: 1; background: #fff; transform: translateY(-4px); box-shadow: 0 11px 22px rgb(53 57 93 / .12); }
body .document-card:nth-child(4n+2) .card-icon { color: var(--violet); }
body .document-card:nth-child(4n+3) .card-icon { color: var(--coral); }
body .document-card:nth-child(4n) .card-icon { color: #23916e; }
body .card-icon { display: block; margin-bottom: 1.9rem; color: var(--cobalt); font-size: 1.35rem; font-weight: 900; }
body .document-card h3 { margin: 0 0 .65rem; }
body .document-card h3 a { text-decoration: none; }
body .document-card h3 a::after { position: absolute; inset: 0; content: ""; }
body .document-card p { margin: 0 0 1rem; color: var(--ink-soft); font-size: .9rem; line-height: 1.47; }
body .document-card .text-link { position: relative; z-index: 2; font-size: .85rem; }
body #no-results { max-width: none; padding: 2rem; border: 1px dashed var(--violet); color: var(--ink-soft); text-align: center; }

/* Individual guide */
body .guide-hero .container { padding-block: 1.15rem clamp(4rem, 7vw, 6.3rem); }
body .breadcrumbs { display: flex; flex-wrap: wrap; gap: .35rem .6rem; margin-bottom: clamp(2.8rem, 6vw, 5rem); color: rgb(255 255 255 / .77); font-size: .83rem; }
body .breadcrumbs a { color: #fff; }
body .guide-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(21rem, .68fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
body .guide-heading { padding-top: .6rem; }
body .guide-heading .hero-description { max-width: 56ch; }
body .process-strip { display: flex; flex-wrap: wrap; gap: .55rem 1.2rem; margin: 2rem 0 1.25rem; color: #fff; font-size: .84rem; font-weight: 650; }
body .process-strip span { display: flex; align-items: center; gap: .4rem; }
body .process-strip b { color: var(--sun); font-size: .75rem; }
body .hero-secondary { color: #fff; font-size: .9rem; font-weight: 800; }
body .starter-card {
  padding: clamp(1.35rem, 3vw, 2rem);
  border: 2px solid #ffe08d;
  border-radius: .85rem;
  color: var(--ink);
  background: linear-gradient(140deg, #fffdf6, #faefd8);
  box-shadow: 0 16px 0 rgb(30 39 100 / .14);
}
body .starter-label { display: block; margin-bottom: 1.25rem; color: var(--violet); font-size: .66rem; font-weight: 900; letter-spacing: .13em; }
body .starter-card h2 { margin-bottom: .35rem; font-size: clamp(1.7rem, 3vw, 2.25rem); }
body .starter-card > p { margin: 0 0 1.35rem; color: var(--ink-soft); font-size: .92rem; }
body .starter-card label { display: block; margin-bottom: .45rem; font-size: .9rem; font-weight: 800; line-height: 1.35; }
body .starter-card textarea { display: block; width: 100%; resize: vertical; min-height: 6.8rem; padding: .7rem; border: 1.5px solid #b9b2c7; border-radius: .35rem; color: var(--ink); background: #fffefa; line-height: 1.45; }
body .field-help, body .starter-disclosure, body .starter-price { margin: .55rem 0 0; color: var(--ink-soft); font-size: .74rem; line-height: 1.45; }
body .starter-card .button { width: 100%; margin-top: 1rem; }
body .starter-price { padding-top: .85rem; border-top: 1px solid #dfd1b5; }
body #starter-error { color: #a52e3c; font-weight: 700; }

body .guide-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, .38fr); gap: clamp(2.5rem, 7vw, 7.5rem); padding-block: clamp(3.5rem, 7vw, 6.5rem); }
body .guide-body { min-width: 0; }
body .guide-body > section { padding-block: 2.7rem; border-bottom: 1px solid var(--line); }
body .guide-body > section:first-child { padding-top: 0; }
body .guide-body h2 { max-width: 19ch; margin-bottom: 1rem; }
body .guide-body p { color: #4b5471; font-size: 1.04rem; }
body .checklist-panel { margin-inline: 0; padding-inline: 1.3rem; border-block: 0 !important; border-radius: .75rem; background: #c5efd9; }
body .checklist-panel .eyebrow { color: #176b54; }
body .checklist { display: grid; gap: .82rem; max-width: 55ch; padding: 0; margin: 1.4rem 0 0; list-style: none; }
body .checklist li { position: relative; padding-left: 1.75rem; }
body .checklist li::before { position: absolute; left: 0; top: .27rem; width: .9rem; height: .9rem; border: 2px solid #197557; border-radius: 50%; content: ""; }
body .checklist li::after { position: absolute; left: .3rem; top: .47rem; width: .3rem; height: .14rem; border-left: 2px solid #197557; border-bottom: 2px solid #197557; content: ""; transform: rotate(-45deg); }
body .guide-section { position: relative; padding-left: 3.25rem !important; }
body .guide-section .section-number { position: absolute; top: 2.95rem; left: 0; }
body .mistakes-panel { margin-inline: 0; padding-inline: 1.3rem; border-block: 0 !important; border-radius: .75rem; background: #ffe1cd; }
body .mistakes-panel h2 { font-size: clamp(1.55rem, 2.7vw, 2.2rem); }
body .mistakes-panel ul { padding-left: 1.1rem; }
body .mistakes-panel li + li { margin-top: .65rem; }
body .faq-section details { border-top: 1px solid var(--line); }
body .faq-section details:last-child { border-bottom: 1px solid var(--line); }
body .faq-section summary { padding: 1.1rem 2.1rem 1.1rem 0; cursor: pointer; color: var(--ink); font-weight: 800; }
body .faq-section details p { margin-top: 0; padding-bottom: 1rem; }
body .review-note { margin-top: 2.7rem; padding: 1.4rem 1.45rem !important; border: 1px solid #c9c5de !important; border-left: 5px solid var(--violet) !important; border-radius: 0 .55rem .55rem 0; background: #eeebfa; }
body .review-note h2 { font-size: 1.35rem; }
body .review-note p { margin-bottom: 0; font-size: .91rem; }
body .guide-sidebar { align-self: start; }
body .sidebar-card { padding: 1.4rem; border-radius: .72rem; color: #fff; background: var(--violet); }
body .sidebar-card .eyebrow { color: var(--sun); }
body .sidebar-card h2 { color: #fff; font-size: 2rem; }
body .sidebar-card p:not(.eyebrow) { color: rgb(255 255 255 / .88); font-size: .92rem; }
body .sidebar-card .button { width: 100%; margin: .55rem 0 1rem; color: var(--ink); background: var(--sun); box-shadow: 0 4px 0 #ca8e1d; }
body .sidebar-card .text-link { color: #fff; font-size: .85rem; }
body .related-guides { margin-top: 2rem; }
body .related-guides h2 { font-size: 1.15rem; letter-spacing: -.025em; }
body .related-guides > a:not(.text-link) { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-top: 1px solid var(--line); color: var(--ink); font-size: .91rem; font-weight: 760; text-decoration: none; }
body .related-guides > a:not(.text-link):hover { color: var(--cobalt); }
body .related-guides .text-link { display: inline-block; margin-top: 1rem; font-size: .85rem; }

body .bottom-cta { position: relative; overflow: hidden; color: #fff; background: linear-gradient(115deg, #dd5b53, #d9527a 49%, #6744ad); }
body .bottom-cta::after { position: absolute; width: 19rem; height: 19rem; right: 8%; top: -10rem; border-radius: 50%; background: var(--mint); content: ""; opacity: .58; }
body .bottom-cta .container { position: relative; z-index: 1; padding-block: clamp(3.5rem, 7vw, 5.8rem); }
body .bottom-cta .eyebrow { color: #fff5b9; }
body .bottom-cta h2 { margin-bottom: .7rem; color: #fff; }
body .bottom-cta p:not(.eyebrow) { margin: 0 0 1.5rem; color: rgb(255 255 255 / .9); }

body .site-footer { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2rem 5rem; padding: 3rem max(1.25rem, calc((100% - 1160px) / 2)); color: #fff4da; background: #222b54; }
body .site-footer .brand { font-size: 1.2rem; }
body .site-footer p { margin: .45rem 0 0; color: rgb(255 244 218 / .72); font-size: .84rem; }
body .site-footer nav { display: flex; flex-wrap: wrap; align-content: start; gap: .65rem 1.25rem; }
body .site-footer nav a { color: #fff4da; font-size: .84rem; font-weight: 700; }
body .site-footer .fine-print { grid-column: 1 / -1; max-width: 95ch; padding-top: 1rem; border-top: 1px solid rgb(255 244 218 / .22); font-size: .72rem; }
body .error-page { min-height: 55dvh; padding-block: 8rem; }

@media (min-width: 861px) {
  body .guide-sidebar { position: sticky; top: 6.2rem; }
}

@media (max-width: 860px) {
  body .document-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body .guide-hero-grid, body .guide-layout { grid-template-columns: 1fr; }
  body .guide-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
  body .related-guides { margin-top: 0; }
}

@media (max-width: 620px) {
  body .container { width: min(100% - 2rem, 1160px); }
  body .header-inner { width: min(100% - 2rem, 1220px); align-items: flex-start; min-height: 0; padding-block: .75rem; }
  body .site-header nav { flex: 1 1 auto; justify-content: flex-end; flex-wrap: wrap; gap: .1rem; }
  body .site-header nav a { padding: .42rem .45rem; font-size: .78rem; }
  body .site-header nav .nav-login { margin-left: 0; }
  body .brand { font-size: 1rem; }
  body .directory-hero .container { padding-top: 3.5rem; }
  body .search-panel { grid-template-columns: 1fr; padding: .85rem; }
  body .search-panel label, body .search-panel label:first-child, body .search-panel .category-label, body .search-panel input, body .search-panel select, body .search-panel #search-count { grid-column: 1; }
  body .search-panel label:first-child { grid-row: 1; }
  body .search-panel input { grid-row: 2; }
  body .search-panel .category-label { grid-row: 3; margin-top: .25rem; }
  body .search-panel select { grid-row: 4; }
  body .search-panel #search-count { grid-row: 5; padding: .25rem 0 0; }
  body .document-grid { grid-template-columns: 1fr; }
  body .document-card { min-height: auto; padding: 1.25rem; }
  body .card-icon { margin-bottom: 1rem; }
  body .guide-hero .container { padding-bottom: 3.5rem; }
  body .breadcrumbs { margin-bottom: 2.3rem; }
  body .process-strip { display: grid; gap: .55rem; }
  body .starter-card { box-shadow: 0 10px 0 rgb(30 39 100 / .14); }
  body .guide-sidebar { grid-template-columns: 1fr; }
  body .guide-section { padding-left: 2.4rem !important; }
  body .guide-section .section-number { top: 2.9rem; font-size: .85rem; }
  body .site-footer { grid-template-columns: 1fr; gap: 1.7rem; padding: 2.5rem 1rem; }
  body .site-footer .fine-print { grid-column: auto; }
}

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