/* Aries Portal — shared stylesheet
   Palette derived for this publication: warm terracotta on ivory, muted teal accent.
   First-party only. No external assets beyond the Google Fonts stylesheet in <head>. */

:root {
  --ink: #26211c;
  --ink-soft: #4a4038;
  --ivory: #faf7f2;
  --surface: #ffffff;
  --surface-tint: #f3ece2;
  --border: #e2d7c7;
  --border-strong: #cbb9a1;
  --clay: #a8451f;
  --clay-dark: #8f3a19;
  --clay-deep: #6f2d13;
  --teal: #2f6f6a;
  --teal-dark: #235651;
  --focus: #1f4e8f;
  --maxw: 1140px;
  --radius: 8px;
  --radius-lg: 14px;
  --space: 1rem;
  --shadow: 0 1px 2px rgba(38, 33, 28, 0.06);
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

/* Typography */
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--clay-deep); line-height: 1.2; font-weight: 600; }
h1 { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 2.9rem); margin: 0 0 0.6em; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.45rem, 1.15rem + 1.4vw, 2rem); margin: 2.2em 0 0.6em; }
h3 { font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.4rem); margin: 1.8em 0 0.5em; color: var(--clay-dark); }
h4 { font-size: 1.08rem; margin: 1.4em 0 0.4em; color: var(--ink); }
p { margin: 0 0 1.1em; }
a { color: var(--clay-dark); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--clay-deep); }
strong { font-weight: 600; }
small { font-size: 0.85rem; }

ul, ol { margin: 0 0 1.2em; padding-left: 1.4em; }
li { margin: 0.35em 0; }

/* Skip link */
.skip-link {
  position: absolute; left: 0; top: -60px; background: var(--clay-deep); color: #fff;
  padding: 0.7rem 1.1rem; z-index: 200; border-radius: 0 0 var(--radius) 0; text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; color: #fff; }

/* Focus visibility */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px;
}

/* Header / nav */
.site-header {
  position: sticky; top: 0; z-index: 100; background: var(--ivory);
  border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--clay-deep); font-weight: 700; }
.brand:hover { color: var(--clay-deep); }
.brand-mark { flex: 0 0 auto; }
.brand-text { font-family: var(--font-head); font-size: 1.2rem; letter-spacing: -0.01em; line-height: 1.05; }
.brand-text span { display: block; font-family: var(--font-body); font-size: 0.66rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }

.nav-toggle {
  display: none; align-items: center; gap: 0.45rem; background: var(--surface);
  border: 1px solid var(--border-strong); color: var(--ink); font: inherit; font-weight: 600;
  padding: 0.5rem 0.8rem; border-radius: var(--radius); cursor: pointer;
}
.nav-toggle:hover { background: var(--surface-tint); }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 0.35rem; }
.site-nav a, .dropdown-toggle {
  display: inline-block; text-decoration: none; color: var(--ink); font-weight: 500;
  padding: 0.55rem 0.7rem; border-radius: var(--radius); font-size: 0.98rem;
  background: none; border: 0; font-family: inherit; cursor: pointer;
}
.site-nav a:hover, .dropdown-toggle:hover { background: var(--surface-tint); color: var(--clay-dark); }
.site-nav a[aria-current="page"] { color: var(--clay-dark); box-shadow: inset 0 -2px 0 var(--clay); }

.has-dropdown { position: relative; }
.dropdown-toggle::after { content: "▾"; margin-left: 0.35rem; font-size: 0.75em; color: var(--ink-soft); }
.dropdown {
  position: absolute; top: 100%; left: 0; min-width: 20rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 10px 30px rgba(38,33,28,0.12);
  padding: 0.5rem; margin-top: 0.35rem; display: none; flex-direction: column; gap: 0.1rem;
}
.dropdown[data-open] { display: flex; }
.dropdown li { margin: 0; }
.dropdown a { display: block; padding: 0.55rem 0.7rem; border-radius: var(--radius); }
.dropdown a b { display: block; font-weight: 600; color: var(--clay-dark); }
.dropdown a small { color: var(--ink-soft); }

/* Main layout */
main { display: block; }
.page { padding: 2.5rem 0 3.5rem; }
.layout { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
.layout.with-aside { grid-template-columns: minmax(0, 1fr) 17rem; }
.prose { max-width: 46rem; }
.layout.with-aside .prose { max-width: none; }

/* Sidebar */
.aside { align-self: start; position: sticky; top: 5.25rem; }
.aside-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.1rem 1.2rem; margin-bottom: 1.25rem; }
.aside-card h2 { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 0.7rem; font-family: var(--font-body); font-weight: 700; }
.step-list { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step-list li { margin: 0; }
.step-list a { display: flex; gap: 0.6rem; align-items: baseline; padding: 0.45rem 0.4rem; border-radius: var(--radius); text-decoration: none; color: var(--ink); font-size: 0.95rem; }
.step-list a:hover { background: var(--surface-tint); }
.step-list a[aria-current="page"] { background: var(--surface-tint); color: var(--clay-dark); font-weight: 600; }
.step-list a::before { counter-increment: step; content: counter(step); flex: 0 0 1.5rem; height: 1.5rem; width: 1.5rem; display: inline-grid; place-items: center; font-size: 0.75rem; font-weight: 700; color: #fff; background: var(--teal); border-radius: 50%; }
.step-list a[aria-current="page"]::before { background: var(--clay); }

/* Hero */
.hero { background: linear-gradient(180deg, var(--surface-tint), var(--ivory)); border-bottom: 1px solid var(--border); }
.hero-inner { padding: 3rem 0 2.4rem; max-width: 52rem; }
.eyebrow { display: inline-block; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; color: var(--teal-dark); margin-bottom: 0.8rem; }
.hero p.lead { font-size: 1.2rem; color: var(--ink-soft); margin-bottom: 0; }
.lead { font-size: 1.15rem; color: var(--ink-soft); }

/* Path grid on home */
.path-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; margin: 1.5rem 0; padding: 0; list-style: none; }
.path-grid li { margin: 0; }
.path-card { display: block; height: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.2rem 1.25rem; text-decoration: none; color: var(--ink); transition: border-color 0.15s ease, transform 0.15s ease; }
.path-card:hover { border-color: var(--border-strong); transform: translateY(-2px); color: var(--ink); }
.path-card .num { font-family: var(--font-head); font-size: 0.9rem; color: var(--teal-dark); font-weight: 600; }
.path-card h3 { margin: 0.2rem 0 0.4rem; font-size: 1.12rem; }
.path-card p { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }

/* Cards / callouts */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.4rem 1.5rem; margin: 1.5rem 0; }

.callout { border-left: 4px solid var(--teal); background: var(--surface-tint); border-radius: 0 var(--radius) var(--radius) 0; padding: 1rem 1.25rem; margin: 1.5rem 0; }
.callout h3, .callout h4 { margin-top: 0; color: var(--teal-dark); }
.callout p:last-child { margin-bottom: 0; }

.watch { border-left: 4px solid var(--clay); background: #fbf1eb; border-radius: 0 var(--radius) var(--radius) 0; padding: 1rem 1.25rem; margin: 1.5rem 0; }
.watch h3, .watch h4 { margin-top: 0; color: var(--clay-dark); }
.watch p:last-child { margin-bottom: 0; }

/* Affiliate disclosure box */
.disclosure {
  background: #fff8f2; border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  padding: 1.15rem 1.35rem; margin: 1.75rem 0;
}
.disclosure p { margin: 0; }
.disclosure p + p { margin-top: 0.6rem; }
.disclosure strong { color: var(--clay-dark); }
.aff-note { font-size: 0.92rem; color: var(--ink-soft); margin: 0.6rem 0 0; }

/* CTA button */
.btn {
  display: inline-block; background: var(--clay); color: #fff; text-decoration: none;
  font-weight: 600; padding: 0.8rem 1.4rem; border-radius: var(--radius); border: 1px solid var(--clay-dark);
}
.btn:hover { background: var(--clay-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--clay-dark); border-color: var(--border-strong); }
.btn-outline:hover { background: var(--surface-tint); color: var(--clay-deep); }

.cta-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; margin: 1.75rem 0; }
.cta-block h3 { margin-top: 0; }

/* Tables */
.table-scroll { overflow-x: auto; margin: 1.5rem 0; border: 1px solid var(--border); border-radius: var(--radius-lg); }
table { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: 0.97rem; }
caption { text-align: left; font-size: 0.9rem; color: var(--ink-soft); padding: 0.75rem 0.9rem; }
th, td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--border); vertical-align: top; }
thead th { background: var(--surface-tint); color: var(--clay-deep); font-family: var(--font-head); font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }

/* Definition list */
.defs { margin: 1.5rem 0; }
.defs dt { font-weight: 600; color: var(--clay-dark); margin-top: 1rem; }
.defs dd { margin: 0.2rem 0 0; padding-left: 0; }

/* Checklist */
.checklist { list-style: none; padding-left: 0; }
.checklist li { position: relative; padding-left: 2rem; margin: 0.6rem 0; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--teal-dark); font-weight: 700; }

/* Numbered procedure */
.steps-ol { counter-reset: proc; list-style: none; padding-left: 0; }
.steps-ol > li { position: relative; padding-left: 3rem; margin: 1.1rem 0; }
.steps-ol > li::before { counter-increment: proc; content: counter(proc); position: absolute; left: 0; top: 0; width: 2rem; height: 2rem; display: inline-grid; place-items: center; background: var(--teal); color: #fff; border-radius: 50%; font-weight: 700; font-size: 0.9rem; }

/* FAQ accordion */
.faq { margin: 1.5rem 0; }
.faq details { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 0.7rem; background: var(--surface); }
.faq summary { cursor: pointer; padding: 0.9rem 1.1rem; font-weight: 600; color: var(--clay-dark); font-family: var(--font-head); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; font-weight: 700; color: var(--ink-soft); }
.faq details[open] summary::after { content: "–"; }
.faq .faq-body { padding: 0 1.1rem 1rem; }
.faq .faq-body p:last-child { margin-bottom: 0; }

/* Resource links */
.resource-list { list-style: none; padding-left: 0; }
.resource-list li { padding: 0.7rem 0; border-bottom: 1px solid var(--border); }
.resource-list li:last-child { border-bottom: 0; }
.resource-list a { font-weight: 600; }
.resource-list span { display: block; color: var(--ink-soft); font-size: 0.95rem; }

/* Key points strip */
.keypoints { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; list-style: none; padding: 0; margin: 1.5rem 0; }
.keypoints li { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; }
.keypoints b { display: block; color: var(--clay-dark); font-family: var(--font-head); margin-bottom: 0.25rem; }

/* Meta / dates */
.page-meta { font-size: 0.9rem; color: var(--ink-soft); margin: -0.4em 0 1.5em; }

/* Breadcrumb */
.crumbs { font-size: 0.88rem; color: var(--ink-soft); margin-bottom: 1rem; }
.crumbs a { color: var(--ink-soft); }
.crumbs a:hover { color: var(--clay-dark); }

/* In-page contents */
.toc { background: var(--surface-tint); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.1rem 1.35rem; margin: 1.5rem 0; }
.toc h2 { font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 0.6rem; font-family: var(--font-body); color: var(--ink-soft); }
.toc ol { margin: 0; }

/* Prev / next */
.pager { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.pager a { display: block; max-width: 22rem; text-decoration: none; padding: 0.9rem 1.1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--ink); }
.pager a:hover { border-color: var(--border-strong); }
.pager small { display: block; color: var(--ink-soft); font-size: 0.8rem; }
.pager .next { margin-left: auto; text-align: right; }

/* Footer */
.site-footer { background: #2a231d; color: #ece3d7; margin-top: 3rem; }
.site-footer a { color: #f0c9b3; }
.site-footer a:hover { color: #ffdcc7; }
.footer-inner { padding: 2.5rem 0; display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; }
.publisher address { font-style: normal; line-height: 1.7; }
.publisher .site-name { font-family: var(--font-head); font-size: 1.15rem; color: #fff; display: block; margin-bottom: 0.4rem; }
.footer-nav h2 { font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: #b9ab99; font-family: var(--font-body); margin: 0 0 0.7rem; }
.footer-nav ul { list-style: none; padding: 0; margin: 0; }
.footer-nav li { margin: 0.35rem 0; }
.footer-policy-links { margin: 1rem 0 0; }
.footer-legal { border-top: 1px solid #3f362d; padding: 1.4rem 0 2rem; font-size: 0.86rem; color: #bcae9c; }
.footer-legal p { margin: 0 0 0.6rem; }
.footer-legal .tm { max-width: 60rem; }

/* Responsive */
@media (max-width: 900px) {
  .layout.with-aside { grid-template-columns: 1fr; }
  .aside { position: static; order: 2; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0; background: var(--ivory);
    border-bottom: 1px solid var(--border); box-shadow: 0 12px 24px rgba(38,33,28,0.12);
    display: none; padding: 0.6rem 1.25rem 1rem;
  }
  .site-nav[data-open] { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0.15rem; }
  .site-nav a, .dropdown-toggle { padding: 0.7rem 0.6rem; width: 100%; text-align: left; }
  .dropdown { position: static; box-shadow: none; border: 0; padding: 0 0 0 0.8rem; margin: 0; min-width: 0; }
  .dropdown[data-open] { display: flex; }
  .hero-inner { padding: 2.2rem 0 1.8rem; }
}

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