:root {
  --bg-paper: #FAF9F6;
  --bg-white: #FFFFFF;
  --ink-black: #1A1A1A;
  --ink-secondary: #4A4A4A;
  --accent-green: #25D366;
  --border-subtle: #E8E6E1;
  --shadow-card: 0 4px 12px rgba(0,0,0,0.05);
  --shadow-hover: 0 8px 24px rgba(0,0,0,0.09);
  --radius-lg: 14px;
  --radius-md: 8px;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container-max: 1180px;
  --space-section: clamp(3.5rem, 7vh, 6.5rem);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg-paper);
  color: var(--ink-black);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; transition: color 0.2s ease, background-color 0.2s ease; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent-green); outline-offset: 3px; border-radius: 2px; }

.container { max-width: var(--container-max); margin: 0 auto; padding: 0 clamp(1.2rem, 4vw, 2.5rem); }
.section-pad { padding: var(--space-section) 0; }

/* Typography */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.15; letter-spacing: -0.025em; color: var(--ink-black); }
h1 { font-size: clamp(2.6rem, 6.5vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); margin-bottom: 1.8rem; }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.6rem); margin-bottom: 1rem; }
p { margin-bottom: 1.2rem; color: var(--ink-secondary); font-size: clamp(0.95rem, 1.8vw, 1.05rem); }
.text-muted { color: var(--ink-secondary); opacity: 0.85; }
.text-center { text-align: center; }

/* Header & Nav */
header { background: rgba(250,249,246,0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border-subtle); padding: 1rem 0; position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.brand img { width: 150px; height: auto; object-fit: contain; }
nav ul { display: flex; gap: 2rem; list-style: none; }
nav a { font-weight: 500; font-size: 0.95rem; padding: 0.6rem 0; position: relative; }
nav a:hover { color: var(--accent-green); }
nav a[aria-current="page"] { color: var(--accent-green); font-weight: 600; }
nav a::after { content: ""; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--accent-green); transition: width 0.25s ease; }
nav a:hover::after { width: 100%; }

/* Footer */
footer { background: var(--ink-black); color: #C4C4C4; padding: 4.5rem 0 2rem; margin-top: var(--space-section); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 3rem; margin-bottom: 3rem; }
footer h4 { color: #FFFFFF; margin-bottom: 1.2rem; font-size: 1.1rem; font-weight: 600; }
footer ul { list-style: none; }
footer li { margin-bottom: 0.7rem; }
footer a:hover { color: #FFFFFF; }
.copyright { border-top: 1px solid #2A2A2A; padding-top: 2rem; text-align: center; font-size: 0.9rem; color: #888; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.95rem 2.2rem; font-weight: 600; border-radius: var(--radius-md); cursor: pointer; transition: all 0.25s ease; border: none; font-size: 1rem; text-decoration: none; }
.btn-primary { background: var(--ink-black); color: #fff; }
.btn-primary:hover { background: #2E2E2E; transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn-outline { background: transparent; border: 1.5px solid var(--ink-black); color: var(--ink-black); }
.btn-outline:hover { background: var(--ink-black); color: #fff; }

/* Layout Utilities */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 3rem; align-items: start; }
.divider { height: 1px; background: var(--border-subtle); margin: 3rem 0; }

/* Cards */
.card { background: var(--bg-white); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 2rem; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card-meta { font-size: 0.85rem; color: var(--ink-secondary); margin-bottom: 0.8rem; display: block; }

/* Features List */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.feature-item { padding: 1.5rem; border-left: 3px solid var(--accent-green); background: #FAFAF8; }
.feature-item h3 { margin-bottom: 0.6rem; }

/* Tables */
.table-wrapper { overflow-x: auto; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { padding: 1rem 1.2rem; text-align: left; border-bottom: 1px solid var(--border-subtle); }
th { background: #F4F3EF; font-weight: 600; color: var(--ink-black); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #FAFAF8; }

/* FAQ */
.faq-list { margin-top: 1rem; }
details { margin-bottom: 1.2rem; border-bottom: 1px solid var(--border-subtle); padding-bottom: 1.2rem; }
summary { cursor: pointer; font-weight: 600; padding: 0.5rem 0; list-style: none; display: flex; justify-content: space-between; align-items: center; font-size: 1.05rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.3rem; font-weight: 400; transition: transform 0.2s ease; margin-left: 1rem; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin-top: 0.9rem; font-size: 0.98rem; color: var(--ink-secondary); }

/* Link Grid */
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.5rem; }
.link-item a { display: block; font-weight: 500; padding: 1rem; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); transition: all 0.2s; height: 100%; }
.link-item a:hover { border-color: var(--accent-green); background: #F4FFF7; }
.link-item span { display: block; font-size: 0.85rem; color: var(--ink-secondary); margin-top: 0.4rem; line-height: 1.4; }

/* SVG Animation Framework */
.svg-container { width: 100%; max-width: 420px; height: auto; position: relative; overflow: hidden; }
.svg-base { width: 100%; height: auto; display: block; }
.stroke-path { fill: none; stroke: var(--ink-black); stroke-width: 2; pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; stroke-linecap: round; stroke-linejoin: round; }
.stroke-accent { fill: none; stroke: var(--accent-green); stroke-width: 2; pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; stroke-linecap: round; stroke-linejoin: round; }
@keyframes drawPath {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes highlightSweep {
  0% { transform: translateX(-100%); opacity: 0; }
  25% { opacity: 0.7; }
  75% { opacity: 0.7; }
  100% { transform: translateX(200%); opacity: 0; }
}
.anim-draw { animation: drawPath 6s ease-in-out infinite alternate; }
.anim-sweep { animation: highlightSweep 5s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
.transform-box-center { transform-box: fill-box; transform-origin: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .anim-draw, .anim-sweep { animation: none; }
}
