:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --surface-alt: #f3f1ec;
  --text: #1c1b19;
  --muted: #5a5751;
  --border: #e3dfd6;
  --accent: #c83e0b;
  --accent-dark: #9f2f07;
  --accent-soft: #fdf0eb;
  --ok-bg: #eef7f0;
  --ok-text: #1e5b2e;
  --warn-bg: #fef7e6;
  --warn-text: #7a4b00;
  --radius: 10px;
  --max-w: 1040px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--accent-dark);
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.15rem;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 0.85rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-size: 0.94rem;
}

.main-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.25rem 0;
  font-weight: 500;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--text);
}

.disclosure-bar {
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--muted);
  padding: 0.42rem 0;
}

/* Main */
main {
  padding: 2rem 0 3.5rem;
}

.hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  margin-bottom: 2rem;
}

.hero h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.65rem, 3.2vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 0 0 0.9rem;
  color: var(--muted);
  max-width: 68ch;
}

.hero p:last-child {
  margin-bottom: 0;
}

h1, h2, h3 {
  line-height: 1.28;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.35rem;
  margin: 2rem 0 0.85rem;
}

h3 {
  font-size: 1.1rem;
  margin: 1.25rem 0 0.5rem;
}

/* Status banner */
.notice {
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin: 1.25rem 0;
  border: 1px solid var(--border);
  background: var(--surface);
}

.notice-pending {
  background: var(--warn-bg);
  border-color: #ecd69b;
  color: var(--warn-text);
}

.notice-pending strong {
  color: #573500;
}

/* Cards & Grids */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.card h3 a {
  color: var(--text);
  text-decoration: none;
}

.card h3 a:hover {
  color: var(--accent);
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  font-size: 0.84rem;
  color: var(--muted);
}

.pill {
  display: inline-block;
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--surface-alt);
  color: var(--text);
}

.pill-accent {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.pill-ok {
  background: var(--ok-bg);
  color: var(--ok-text);
}

/* Product detail */
.breadcrumb {
  font-size: 0.86rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--muted);
}

.product-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.product-header h1 {
  margin: 0.4rem 0 0.65rem;
  font-size: clamp(1.5rem, 3vw, 2.05rem);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
  margin: 1.25rem 0;
}

.metric-box {
  background: var(--surface-alt);
  border-radius: 8px;
  padding: 0.85rem 1rem;
}

.metric-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.metric-value {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 1.15rem;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.68rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.96rem;
}

.btn:hover {
  background: var(--accent-dark);
  color: #fff;
}

.btn-secondary {
  background: var(--surface-alt);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
  color: var(--text);
}

.detail-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.15rem;
}

.detail-section h2 {
  margin-top: 0;
  font-size: 1.18rem;
}

.prose {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 78ch;
}

.prose h1 {
  margin-top: 0;
}

.prose ul, .prose ol {
  padding-left: 1.35rem;
}

.prose li + li {
  margin-top: 0.35rem;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.92rem;
}

.prose th, .prose td {
  border: 1px solid var(--border);
  padding: 0.55rem 0.7rem;
  text-align: left;
}

.prose th {
  background: var(--surface-alt);
}

.legacy-banner {
  background: var(--surface-alt);
  border-left: 4px solid var(--accent);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 1.75rem 0 2.25rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.15rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text);
  text-decoration: underline;
}

@media (max-width: 640px) {
  .hero, .product-header, .detail-section, .prose {
    padding: 1.15rem 1rem;
  }
  .header-inner {
    padding: 0.7rem 0;
  }
}
