:root {
  --bg-page: #f4f5f7;
  --bg-surface: #ffffff;
  --bg-hero: #0b0f17;
  --bg-hero-elevated: #141b29;
  --bg-muted: #eef1f6;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --text-inverse: #f9fafb;
  --border-subtle: #e2e6ee;
  --border-strong: #cbd5e1;
  --accent-primary: #1d4ed8;
  --accent-primary-hover: #1e40af;
  --accent-teal: #0f766e;
  --accent-amber: #d97706;
  --spec-607: #4b56d2;
  --spec-406: #189ab4;
  --spec-345: #3bbe7a;
  --spec-234: #d9822b;
  --spec-134: #d1495b;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-card: 0 2px 10px rgba(15, 23, 42, 0.04);
  --shadow-elevated: 0 12px 32px rgba(15, 23, 42, 0.09);
  --max-width: 1200px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--bg-page);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent-primary);
  color: #ffffff;
  padding: 10px 16px;
  z-index: 1000;
  font-weight: 600;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
  border-radius: var(--radius-sm);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Topbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.brand-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.nav-toggle {
  display: none;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 500;
  padding: 6px 2px;
  white-space: nowrap;
}

.nav-links a[aria-current="page"] {
  color: var(--accent-primary);
  font-weight: 700;
  border-bottom: 2px solid var(--accent-primary);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  list-style: none;
  margin: 0;
  padding: 8px 0;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-elevated);
  z-index: 200;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu li a {
  display: block;
  padding: 7px 14px;
  font-size: 13.5px;
  white-space: nowrap;
}

.nav-dropdown-menu li a:hover {
  background: var(--bg-muted);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  background: #ffffff;
  white-space: nowrap;
}

.lang-switch:hover {
  background: var(--bg-muted);
  text-decoration: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--bg-muted);
}

.btn-ghost-light {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
}

.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* Spectral Ribbon */
.spectral-bar {
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, var(--spec-607), var(--spec-406), var(--spec-345), var(--spec-234), var(--spec-134));
}

/* Hero Section */
.hero-dark {
  background: radial-gradient(circle at 80% 20%, rgba(75, 86, 210, 0.22), transparent 45%),
              radial-gradient(circle at 18% 82%, rgba(24, 154, 180, 0.18), transparent 42%),
              var(--bg-hero);
  color: var(--text-inverse);
  padding: 56px 0 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7dd3fc;
  margin-bottom: 10px;
}

.hero-dark h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.18;
  font-weight: 800;
  color: #ffffff;
}

.hero-slogan {
  font-size: 18px;
  font-weight: 600;
  color: #e2e8f0;
  margin: 0 0 8px;
}

.hero-additional {
  font-size: 15px;
  font-weight: 500;
  color: #93c5fd;
  margin: 0 0 14px;
}

.hero-lead {
  font-size: 15.5px;
  color: #cbd5e1;
  margin: 0 0 24px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.hero-media-card {
  background: var(--bg-hero-elevated);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: var(--shadow-elevated);
}

.hero-media-card img {
  width: 100%;
  border-radius: var(--radius-md);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.media-caption {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 8px 2px 0;
}

.hero-media-card .media-caption {
  color: #94a3b8;
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.kpi-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.kpi-value {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
}

.kpi-label {
  display: block;
  font-size: 13px;
  color: #cbd5e1;
  margin-top: 4px;
}

/* Subpage Header */
.page-banner {
  background: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
  padding: 28px 0 26px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--border-strong);
}

.page-banner h1 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3.2vw, 36px);
  line-height: 1.22;
}

.page-subtitle {
  margin: 0;
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 820px;
}

/* Sections & Cards */
.section {
  padding: 44px 0;
}

.section-white {
  background: #ffffff;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 24px;
}

.section-header h2 {
  margin: 0 0 6px;
  font-size: clamp(22px, 2.5vw, 28px);
}

.section-header p {
  margin: 0;
  color: var(--text-secondary);
  max-width: 720px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-accent {
  height: 4px;
  width: 100%;
  background: var(--accent-primary);
}

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #0f172a;
}

.badge-index {
  display: inline-block;
  align-self: flex-start;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--text-primary);
  margin-bottom: 10px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.3;
}

.card p {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 14.5px;
}

.card-meta-list {
  margin: 0 0 16px;
  padding-left: 18px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.card-footer-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 8px;
}

/* Split layout with inline CTA sidebar */
.content-split {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.85fr);
  gap: 28px;
  align-items: start;
}

.sidebar-sticky {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cta-box {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-top: 4px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-card);
}

.cta-box h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.cta-box p {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--text-secondary);
}

.callout {
  background: #f8fafc;
  border-left: 4px solid var(--accent-teal);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 18px 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.callout-warn {
  border-left-color: var(--accent-amber);
  background: #fffbeb;
  color: #78350f;
}

/* Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: left;
}

th, td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}

th {
  background: #f8fafc;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: none;
}

.swatch-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.filter-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-right: 4px;
}

.filter-btn {
  border: 1px solid var(--border-strong);
  background: #ffffff;
  color: var(--text-primary);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.filter-btn.is-active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
}

.filter-count {
  margin-left: auto;
  font-size: 13px;
  color: var(--text-muted);
}

/* Form */
.form-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: var(--shadow-card);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field.full-width {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.req-star {
  color: #dc2626;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14.5px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text-primary);
}

.form-field textarea {
  min-height: 104px;
  resize: vertical;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  display: none;
}

.form-status.is-visible {
  display: block;
}

.form-status.is-success {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
}

.form-status.is-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.faq-item h2 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--text-primary);
}

.faq-item p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
}

/* Footer */
.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--border-subtle);
  padding: 40px 0 28px;
  margin-top: 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 28px;
}

.footer-title {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.footer-list li + li {
  margin-top: 6px;
}

.footer-bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 980px) {
  .hero-grid,
  .content-split,
  .grid-3,
  .grid-4,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sidebar-sticky {
    position: static;
  }
}

@media (max-width: 780px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
  }
  .main-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 72px;
    background: #ffffff;
    border-bottom: 1px solid var(--border-subtle);
    padding: 16px 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    box-shadow: var(--shadow-elevated);
  }
  .main-nav.is-open {
    display: flex;
  }
  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .nav-dropdown-menu {
    display: block;
    position: static;
    box-shadow: none;
    border: none;
    padding: 4px 0 4px 12px;
    background: transparent;
  }
  .header-actions {
    justify-content: space-between;
  }
  .hero-grid,
  .content-split,
  .grid-3,
  .grid-2,
  .grid-4,
  .form-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}


/* v6 form / news / film card helpers */
.is-hidden {
  display: none !important;
}

.form-preview-note {
  margin: 0 0 18px;
  padding: 10px 12px;
  font-size: 13.5px;
  color: var(--text-secondary);
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.privacy-body p {
  margin: 0 0 14px;
}

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

.news-empty {
  color: var(--text-secondary);
}


/* v7: scroll offset under sticky header; mobile grade table; download notes */
html {
  scroll-padding-top: 88px;
}

.page-banner h1,
.section h2,
.section-header,
#amberomer-grades,
#amberane,
#downloads,
[id] {
  scroll-margin-top: 88px;
}

.hero-lead {
  margin-top: 8px;
}

.kpi-label {
  line-height: 1.4;
}

.table-scroll-hint {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.table-wrap {
  -webkit-overflow-scrolling: touch;
}

.table-wrap table {
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
}

.table-wrap th:first-child,
.table-wrap td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #ffffff;
  box-shadow: 1px 0 0 var(--border-subtle);
}

.table-wrap thead th:first-child {
  z-index: 3;
  background: #f8fafc;
}

@media (min-width: 781px) {
  .table-wrap thead th {
    position: sticky;
    top: 72px;
    z-index: 2;
    background: #f8fafc;
    box-shadow: 0 1px 0 var(--border-subtle);
  }
  .table-wrap thead th:first-child {
    z-index: 4;
  }
}

.grade-request-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 0;
}

.doc-note {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.downloads-disclaimer {
  margin: 0 0 8px;
}

@media (max-width: 780px) {
  .hero-dark {
    padding: 36px 0 32px;
  }
  .hero-dark h1 {
    font-size: clamp(24px, 7vw, 32px);
    margin-bottom: 10px;
  }
  .hero-lead {
    margin-bottom: 0;
  }
  .hero-actions {
    margin-bottom: 16px;
  }
}

.hero-colorant-note {
  font-size: 14px;
  font-weight: 500;
  color: #93c5fd;
  margin: -6px 0 14px;
}
