:root {
  --bg-base: #F8F6F1;
  --bg-card: #FFFFFF;
  --bg-alt: #F1EFE9;
  --text-head: #111111;
  --text-body: #2A2A2A;
  --text-muted: #6B6B6B;
  --border-line: #E8E5DE;
  --border-strong: #D0CDC6;
  --shadow-soft: 0 4px 24px rgba(0,0,0,0.04);
  --shadow-hover: 0 8px 32px rgba(0,0,0,0.08);
  --focus-ring: rgba(0,0,0,0.2);
  --radius-md: 8px;
  --radius-lg: 12px;
  --max-w: 1120px;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Noto Sans SC", sans-serif;
  --space-section: 5rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-family: var(--font-sans); background: var(--bg-base); color: var(--text-body); line-height: 1.65; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { display: flex; flex-direction: column; min-height: 100vh; }
a { color: inherit; text-decoration: none; transition: color 0.2s, border-color 0.2s; }
a:focus-visible, button:focus-visible, details summary:focus-visible { outline: 2px solid var(--text-head); outline-offset: 3px; border-radius: 2px; }
img { max-width: 100%; height: auto; display: block; }
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }

/* Typography */
h1, h2, h3, h4 { color: var(--text-head); font-weight: 700; text-wrap: balance; line-height: 1.2; }
h1 { font-size: clamp(2.4rem, 4.5vw, 3.8rem); letter-spacing: -0.02em; margin-bottom: 1.25rem; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 1.75rem; }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); margin-bottom: 0.6rem; }
p { margin-bottom: 1rem; max-width: 72ch; }
small, .caption { font-size: 0.85rem; color: var(--text-muted); }
.section-label { display: inline-block; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.75rem; }
section { padding: var(--space-section) 0; border-bottom: 1px solid var(--border-line); }
section:last-of-type { border-bottom: none; }

/* Header / Footer */
header { position: sticky; top: 0; z-index: 100; background: rgba(248, 246, 241, 0.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 0.6rem; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.brand-text { font-weight: 700; font-size: 1.05rem; color: var(--text-head); letter-spacing: -0.01em; }
nav ul { display: flex; list-style: none; gap: 1.25rem; }
nav a { font-size: 0.92rem; font-weight: 500; padding: 0.4rem 0; position: relative; }
nav a[aria-current="page"] { color: var(--text-head); }
nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--text-head); }
footer { margin-top: auto; background: var(--text-head); color: #F4F4F4; padding: 3.5rem 0 2rem; font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2.5rem; }
.footer-col h4 { color: #FFFFFF; margin-bottom: 1rem; font-size: 0.95rem; font-weight: 600; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col a:hover { color: #CCCCCC; }
.copyright { text-align: center; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid #333; color: #888; font-size: 0.8rem; }

/* Components */
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.grid-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2.5rem; align-items: center; }
.card { background: var(--bg-card); border: 1px solid var(--border-line); border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow-soft); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.card-icon { width: 44px; height: 44px; margin-bottom: 1rem; color: var(--text-head); }
.card-icon svg { width: 100%; height: 100%; stroke: currentColor; stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.85rem 1.75rem; font-weight: 600; font-size: 1rem; border-radius: var(--radius-md); transition: all 0.2s ease; cursor: pointer; border: none; text-decoration: none; }
.btn-primary { background: var(--text-head); color: #FFFFFF; }
.btn-primary:hover { background: #333333; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,0.18); }
.btn-outline { background: transparent; border: 1.5px solid var(--text-head); color: var(--text-head); }
.btn-outline:hover { background: rgba(0,0,0,0.03); }
      table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.95rem; max-width: 100%; }
      th, td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--border-line); text-align: left; vertical-align: top; word-break: break-word; }
      th { background: rgba(0,0,0,0.02); font-weight: 600; color: var(--text-head); white-space: normal; }
      tr:hover td { background: rgba(0,0,0,0.015); }
details { margin-bottom: 1rem; border: 1px solid var(--border-line); border-radius: var(--radius-md); overflow: hidden; background: var(--bg-card); }
summary { padding: 1rem 1.25rem; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; font-size: 0.98rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.2rem; font-weight: 400; transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
details > div { padding: 1rem 1.25rem; color: var(--text-body); border-top: 1px solid var(--border-line); background: var(--bg-alt); }
.news-card { display: flex; flex-direction: column; height: 100%; }
.news-meta { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 0.5rem; font-weight: 500; }
.news-title { font-weight: 600; line-height: 1.4; margin-bottom: 0.6rem; }
.news-excerpt { font-size: 0.92rem; color: var(--text-body); flex-grow: 1; margin-bottom: 1rem; }
.link-btn { font-size: 0.88rem; font-weight: 600; color: var(--text-head); border-bottom: 1px solid var(--border-line); padding-bottom: 2px; }
.link-btn:hover { border-color: var(--text-head); }
.related-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0.8rem; }
.related-item a { display: block; padding: 0.7rem 0.9rem; border: 1px solid var(--border-line); border-radius: var(--radius-md); font-size: 0.9rem; transition: background 0.2s, border-color 0.2s; }
.related-item a:hover { background: rgba(0,0,0,0.02); border-color: #bbb; }
.step-list { counter-reset: step; list-style: none; margin-left: 0.5rem; }
.step-list li { position: relative; padding-left: 2.6rem; margin-bottom: 1.4rem; }
.step-list li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 1.8rem; height: 1.8rem; background: var(--text-head); color: #FFF; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; }
.mockup-container { position: relative; background: var(--bg-card); border: 1px solid var(--border-line); border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow-soft); overflow: hidden; }
.mockup-header { display: flex; align-items: center; gap: 0.6rem; padding-bottom: 0.8rem; border-bottom: 1px solid var(--border-line); margin-bottom: 1rem; }
.mockup-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.mockup-dot:first-child { background: #E57373; }
.mockup-dot:nth-child(2) { background: #FFB74D; }
.mockup-dot:nth-child(3) { background: #81C784; }

/* SVG Animations */
@keyframes sweep-highlight {
  0% { transform: translateX(-120%); opacity: 0; }
  15% { opacity: 0.85; }
  85% { opacity: 0.85; }
  100% { transform: translateX(150%); opacity: 0; }
}
@keyframes trace-outline {
  0%, 100% { stroke-dashoffset: 0; }
  50% { stroke-dashoffset: 1; }
}
@keyframes drift-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.svg-animated { animation-duration: 7s; animation-timing-function: ease-in-out; animation-iteration-count: infinite; }
.anim-sweep { animation-name: sweep-highlight; }
.anim-trace { animation-name: trace-outline; }
.anim-drift { animation-name: drift-y; animation-duration: 4.5s; }
.trace-path { stroke: rgba(0,0,0,0.06); stroke-width: 2; fill: none; stroke-dasharray: 1; stroke-dashoffset: 0; pathLength: 1; }
.sweep-glow { fill: url(#grad-sweep); opacity: 0; mix-blend-mode: screen; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .svg-animated { animation: none !important; }
  .trace-path { stroke-dashoffset: 0 !important; }
  .sweep-glow { opacity: 0.6 !important; }
}
