:root {
  --color-bg: #fdfbf7;
  --color-surface: #ffffff;
  --color-primary: #d95a2b;
  --color-primary-light: #f4a261;
  --color-primary-dark: #b8431d;
  --color-text-main: #1f2937;
  --color-text-muted: #6b7280;
  --color-border: #e5e7eb;
  --color-accent-soft: rgba(244, 162, 97, 0.15);
  --font-sans: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Cascadia Code', Consolas, monospace;
  --space-section: clamp(4rem, 10vw, 8rem);
  --space-inline: clamp(1.5rem, 3vw, 3rem);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-hover: 0 8px 24px rgba(217, 90, 43, 0.12);
  --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text-main);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover, a:focus-visible {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-inline);
}

.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }

/* Typography */
h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  text-wrap: balance;
  color: var(--color-text-main);
}

h1 { font-size: clamp(2.4rem, 5.5vw, 3.6rem); margin-bottom: 1.25rem; }
h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-bottom: 1.5rem; }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.35rem); margin-bottom: 0.75rem; }

p {
  margin-bottom: 1rem;
  color: var(--color-text-main);
}

.text-muted { color: var(--color-text-muted); }
.mono { font-family: var(--font-mono); font-size: 0.88em; letter-spacing: 0.02em; }
.section-desc {
  max-width: 720px;
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin-bottom: 2.5rem;
}

/* Header & Navigation */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 251, 247, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--color-text-main);
  text-decoration: none;
}

.brand img {
  height: 32px;
  width: auto;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 1.75rem;
}

nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

nav a:hover, nav a[aria-current="page"] {
  color: var(--color-primary);
  text-decoration: none;
}

/* Footer */
footer {
  background: var(--color-text-main);
  color: #f9fafb;
  padding: var(--space-section) 0 3rem;
}

footer h4 {
  color: #fff;
  margin-bottom: 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

footer a {
  color: #cbd5e1;
  display: block;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
}

footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.copyright {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.85rem;
}

/* Components: Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
  text-decoration: none;
  font-size: 1rem;
  white-space: normal;
  max-width: 100%;
}
@media (max-width: 420px) {
  .btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
  }
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: #fff;
  box-shadow: 0 4px 14px rgba(217, 90, 43, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(217, 90, 43, 0.35);
}

.btn-secondary {
  background: transparent;
  border: 1.5px solid var(--color-border);
  color: var(--color-text-main);
}

.btn-secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(217, 90, 43, 0.04);
}

/* Components: Cards */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card:hover {
  border-color: var(--color-primary-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.card-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 1.25rem;
  stroke: var(--color-primary);
  stroke-width: 1.5;
  fill: none;
}

.card-body {
  flex: 1;
}

.tag {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  background: var(--color-accent-soft);
  color: var(--color-primary-dark);
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

/* Components: Table */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
  background: var(--color-surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

th, td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: middle;
}

th {
  background: #f8fafc;
  font-weight: 600;
  color: var(--color-text-main);
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}

td {
  font-size: 0.95rem;
  color: var(--color-text-main);
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafafa; }

/* Components: FAQ */
details {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.85rem;
  overflow: hidden;
  background: var(--color-surface);
  transition: border-color var(--transition-base);
}

details:hover { border-color: var(--color-primary-light); }

summary {
  padding: 1.1rem 1.25rem;
  cursor: pointer;
  font-weight: 500;
  background: #fcfcfd;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--font-mono); font-weight: bold; color: var(--color-text-muted); }
details[open] summary::after { content: "-"; }

details > div {
  padding: 1.25rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-main);
  line-height: 1.6;
}

/* Components: Update Cards */
.update-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.update-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.update-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.update-link {
  margin-top: auto;
  font-weight: 500;
  color: var(--color-primary);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.update-link::after {
  content: "→";
  transition: transform var(--transition-base);
}

.update-link:hover::after { transform: translateX(3px); }

/* Components: Related Links */
.related-list {
  list-style: none;
  display: grid;
  gap: 0.8rem;
}

.related-list li a {
  display: block;
  padding: 0.75rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: background var(--transition-base), border-color var(--transition-base);
}

.related-list li a:hover {
  background: #fafafa;
  border-color: var(--color-primary-light);
}

.related-title {
  display: block;
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.related-desc {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* SVG Animation Utilities */
.svg-container {
  width: 100%;
  height: auto;
  overflow: visible;
}

.contour-path {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  fill: none;
  stroke: var(--color-primary-light);
  stroke-width: 1.5;
  opacity: 0.7;
  animation: contour-flow 8s ease-in-out infinite alternate;
}

.draw-line {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  animation: line-draw 5s ease-in-out infinite alternate;
}

.pulse-dot {
  animation: pulse-glow 3.5s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes contour-flow {
  0% { stroke-dashoffset: 1; opacity: 0.5; }
  50% { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0.5; }
}

@keyframes line-draw {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.4; r: 4px; }
  50% { opacity: 0.9; r: 5px; }
}

@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;
  }
  .contour-path, .draw-line, .pulse-dot {
    animation: none;
    opacity: 1;
  }
}
