:root {
  --color-bg: #F8F6F3;
  --color-surface: #FFFFFF;
  --color-primary-start: #FF8C00;
  --color-primary-end: #FF4500;
  --color-accent: #00BFA6;
  --color-text: #1D1D1F;
  --color-text-secondary: #515154;
  --color-border: #E5E5EA;
  --color-highlight: #FFF4E6;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.10);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
section { padding: 80px 0; }
section.alt-bg { background-color: var(--color-surface); }
section.gradient-bg { background: linear-gradient(180deg, var(--color-bg) 0%, #FFFFFF 100%); }

h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); margin-bottom: 16px; }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 24px; position: relative; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); margin-bottom: 12px; }
p { margin-bottom: 16px; color: var(--color-text-secondary); }
a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
ul, ol { margin-left: 20px; margin-bottom: 16px; color: var(--color-text-secondary); }
li { margin-bottom: 8px; }

/* Header & Footer */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(248, 246, 243, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; }
.brand img { height: 32px; width: auto; display: block; }
nav ul { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
nav a { font-size: 0.95rem; font-weight: 500; color: var(--color-text-secondary); }
nav a:hover, nav a[aria-current="page"] { color: var(--color-primary-end); }
nav a[aria-current="page"] { border-bottom: 2px solid var(--color-primary-end); }
.footer { background: #111; color: #CCC; padding: 60px 0 32px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; margin-bottom: 40px; }
.footer-col h4 { color: #FFF; margin-bottom: 16px; font-size: 1rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: #AAA; font-size: 0.9rem; }
.footer-col a:hover { color: #FFF; }
.footer-bottom { border-top: 1px solid #333; padding-top: 24px; text-align: center; font-size: 0.85rem; color: #777; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 999px;
  background: linear-gradient(135deg, var(--color-primary-start), var(--color-primary-end));
  color: #FFF; font-weight: 600; font-size: 1rem;
  border: none; cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255, 70, 0, 0.35); }
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.btn-outline {
  background: transparent; color: var(--color-text);
  border: 1.5px solid var(--color-border);
}
.btn-outline:hover { border-color: var(--color-primary-end); color: var(--color-primary-end); }

/* Cards & Grid */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: 24px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.card-icon { width: 40px; height: 40px; margin-bottom: 16px; color: var(--color-primary-end); }
.card-icon svg { width: 100%; height: 100%; stroke-width: 1.8; }

/* Table */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 24px; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 500px; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: var(--color-highlight); font-weight: 600; color: var(--color-text); }
td { color: var(--color-text-secondary); }
tr:last-child td { border-bottom: none; }

/* FAQ */
.faq-item { margin-bottom: 12px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
summary {
  padding: 16px 20px; font-weight: 600; cursor: pointer;
  list-style: none; position: relative; padding-right: 40px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-size: 1.2rem; color: var(--color-text-secondary);
}
details[open] summary::after { content: "−"; }
.details-content { padding: 0 20px 20px; color: var(--color-text-secondary); border-top: 1px dashed var(--color-border); margin-top: -1px; padding-top: 16px; }
.faq-item:focus-within { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* SVG Animations */
@keyframes contour-flow {
  0%, 100% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
}
.contour-flow {
  path {
    pathLength: 1;
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
  }
  animation: contour-flow 8s linear infinite;
}
.contour-flow-slow { animation-duration: 14s; }
.contour-flow-fast { animation-duration: 5s; }
svg.animated-svg path { fill: none; stroke-linecap: round; }

@media (prefers-reduced-motion: reduce) {
  .contour-flow, .contour-flow-slow, .contour-flow-fast { animation: none !important; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* Utilities */
.text-center { text-align: center; }
.mt-2 { margin-top: 16px; }
.mb-2 { margin-bottom: 16px; }
.flow-wrap { overflow-wrap: break-word; word-break: break-word; }
.badge {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  background: var(--color-highlight); color: var(--color-primary-end);
  font-size: 0.8rem; font-weight: 600; margin-bottom: 12px;
}
.step-list { counter-reset: step; list-style: none; margin-left: 0; padding: 0; }
.step-list li {
  position: relative; padding-left: 40px; margin-bottom: 20px;
  counter-increment: step;
}
.step-list li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--color-primary-end); color: #FFF;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 0.9rem;
}
.downgrade-link { font-family: var(--font-mono); font-size: 0.85rem; color: var(--color-accent); }
.downgrade-link:hover { text-decoration: underline; }
.update-card time { font-family: var(--font-mono); font-size: 0.8rem; color: var(--color-text-secondary); }
.related-list { list-style: none; margin: 0; padding: 0; }
.related-list li { margin-bottom: 12px; padding-left: 16px; border-left: 3px solid var(--color-border); }
.related-list a { color: var(--color-text-secondary); font-size: 0.95rem; }
.related-list a:hover { color: var(--color-primary-end); }

@media (max-width: 768px) {
  section { padding: 60px 0; }
  .header-inner nav ul { gap: 16px; }
  .grid-cards { grid-template-columns: 1fr; }
}
