@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #070b12;
  --panel: #0f1522;
  --panel-alt: #0b1320;
  --panel-soft: #101b2e;
  --panel-highlight: #17233b;
  --ink: #e6edf6;
  --muted: #9fb0c2;
  --muted-soft: rgba(159, 176, 194, 0.65);
  --accent: #7aa2ff;
  --accent-iris: #9d76ff;
  --accent-mint: #5ef4ff;
  --accent-soft: rgba(122, 162, 255, 0.25);
  --accent-soft-strong: rgba(122, 162, 255, 0.4);
  --brand-gold: #f8c86b;
  --brand-gold-glow: rgba(248, 200, 107, 0.38);
  --accent-gradient: linear-gradient(135deg, rgba(122, 162, 255, 0.45), rgba(94, 244, 255, 0.35), rgba(157, 118, 255, 0.5));
  --accent-gradient-strong: linear-gradient(120deg, #6c8bff 0%, #59e0ff 48%, #aa6fff 100%);
  --border-color: rgba(255, 255, 255, 0.08);
  --border: 1px solid var(--border-color);
  --border-strong: 1px solid rgba(255, 255, 255, 0.18);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;
  --gap-sm: 10px;
  --gap: 20px;
  --gap-lg: 28px;
  --pad-sm: 16px;
  --pad: 24px;
  --pad-lg: 32px;
  --ctrl-h: 46px;
  --shadow: 0 20px 48px rgba(4, 12, 32, 0.45);
  --shadow-soft: 0 10px 30px rgba(4, 12, 32, 0.35);
  --shadow-focus: 0 0 0 3px rgba(122, 162, 255, 0.8), 0 0 24px rgba(122, 162, 255, 0.35);
  --shadow-focus-subtle: 0 0 0 3px rgba(94, 244, 255, 0.45);
  --table-stripe: rgba(255, 255, 255, 0.03);
  --table-stripe-strong: rgba(122, 162, 255, 0.08);
  --success-bg: rgba(22, 172, 120, 0.16);
  --success-border: rgba(54, 220, 162, 0.45);
  --danger-bg: rgba(215, 58, 78, 0.18);
  --danger-border: rgba(255, 106, 130, 0.4);
  --warning-bg: rgba(255, 195, 87, 0.16);
  --warning-border: rgba(255, 211, 130, 0.4);
  --transition-duration: 180ms;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  padding-bottom: clamp(48px, 10vw, 80px);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-duration) ease, filter var(--transition-duration) ease;
}

a:hover,
a:focus-visible {
  color: #b1c2ff;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
details > summary:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-color: rgba(122, 162, 255, 0.65);
}

::selection {
  background: rgba(122, 162, 255, 0.35);
  color: var(--ink);
}

header,
main,
footer,
.wrap,
.page-width {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

header {
  padding-block: clamp(28px, 8vw, 40px) clamp(12px, 4vw, 20px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.site-title {
  font-family: 'Cinzel', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-weight: 700;
  color: var(--brand-gold);
  text-shadow: 0 0 24px var(--brand-gold-glow);
  display: inline-block;
}

@supports (-webkit-background-clip: text) {
  .site-title {
    background: linear-gradient(130deg, #fdf2cc 0%, #f8c86b 45%, #f4b54f 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
}

footer {
  margin-block: clamp(28px, 8vw, 52px) clamp(32px, 10vw, 72px);
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.card {
  background: linear-gradient(140deg, rgba(17, 23, 37, 0.9), rgba(12, 18, 30, 0.95));
  border: var(--border);
  border-radius: var(--radius);
  padding: var(--pad);
  box-shadow: var(--shadow);
  transition: transform var(--transition-duration) ease, box-shadow var(--transition-duration) ease;
}

.card.sets {
  padding: 0 var(--pad);
}

.card:hover,
.card:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 28px 60px rgba(6, 16, 40, 0.55);
}

.badge,
.pill,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(122, 162, 255, 0.32), rgba(94, 244, 255, 0.22));
  color: #dbe6ff;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(122, 162, 255, 0.3);
}

.btn,
button,
.button {
  appearance: none;
  -webkit-appearance: none;
  height: var(--ctrl-h);
  padding: 0 clamp(16px, 4vw, 22px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--accent-gradient);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform var(--transition-duration) ease, box-shadow var(--transition-duration) ease, filter var(--transition-duration) ease;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), 0 14px 30px rgba(26, 40, 78, 0.45);
}

.notice,
.note-red {
  margin-block: clamp(16px, 4vw, 22px);
  padding: clamp(14px, 4vw, 22px);
  border-radius: var(--radius);
  border: var(--border);
  background: var(--panel-highlight);
  box-shadow: var(--shadow-soft);
  font-weight: 600;
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
}

.notice::before,
.note-red::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.9;
  pointer-events: none;
}

.notice::before {
  background: linear-gradient(120deg, rgba(122, 162, 255, 0.18), rgba(94, 244, 255, 0.1));
}

.notice.yellow {
  border-color: var(--warning-border);
  color: #fff5d6;
  background: linear-gradient(140deg, rgba(255, 195, 87, 0.12), rgba(255, 215, 120, 0.1));
  box-shadow: 0 24px 50px rgba(34, 18, 0, 0.45);
}

.notice.yellow::before {
  background: linear-gradient(130deg, rgba(255, 195, 87, 0.35), rgba(255, 231, 176, 0.2));
}

.note-red::before {
  background: linear-gradient(130deg, rgba(215, 58, 78, 0.28), rgba(255, 114, 148, 0.22));
}

.notice > *,
.note-red > * {
  position: relative;
  z-index: 1;
}

.notice {
  border-color: rgba(122, 162, 255, 0.45);
  color: #d9e6ff;
}

.note-red {
  border-color: var(--danger-border);
  background: linear-gradient(135deg, rgba(215, 58, 78, 0.32), rgba(255, 106, 130, 0.18));
  color: #ffe2e8;
  box-shadow: 0 24px 38px rgba(38, 4, 18, 0.55);
}

.btn::after,
.button::after {
  content: '›';
  opacity: 0.75;
  font-size: 1.2rem;
  line-height: 1;
  transform: translateY(-1px);
}

.btn-secondary,
.button-secondary {
  background: linear-gradient(120deg, rgba(122, 162, 255, 0.22), rgba(12, 18, 30, 0.95));
  box-shadow: inset 0 0 0 1px rgba(122, 162, 255, 0.25);
}

.btn-secondary::after,
.button-secondary::after {
  display: none;
}

button:hover,
.btn:hover,
.button:hover,
button:focus-visible,
.btn:focus-visible,
.button:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.03);
  box-shadow: 0 18px 44px rgba(30, 48, 88, 0.55);
}

.btn.is-quiet,
.button.is-quiet {
  background: rgba(122, 162, 255, 0.14);
  box-shadow: none;
}

.btn.is-quiet::after,
.button.is-quiet::after {
  display: none;
}

input,
select,
textarea {
  height: var(--ctrl-h);
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--panel-alt);
  color: var(--ink);
  font: inherit;
  width: 100%;
  transition: border-color var(--transition-duration) ease, box-shadow var(--transition-duration) ease, background var(--transition-duration) ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(122, 162, 255, 0.4);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  background: var(--panel-highlight);
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

fieldset {
  border: none;
  margin: 0;
  padding: 0;
}

summary {
  cursor: pointer;
}

summary::-webkit-details-marker {
  display: none;
}

details {
  background: var(--panel-alt);
  border: var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color var(--transition-duration) ease, background var(--transition-duration) ease;
}

details > summary {
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

details[open] > summary {
  background: rgba(122, 162, 255, 0.1);
}

details[open] > summary::after {
  transform: rotate(0deg);
}

details .content {
  padding: 0 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--muted);
}

details .content ul {
  margin: 0;
  padding-left: 20px;
}

details .content li {
  margin-bottom: 6px;
}

.table,
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: transparent;
}

table thead th {
  text-align: left;
  padding: 12px 10px;
  background: var(--panel);
  color: #d9e4f1;
  font-weight: 600;
  letter-spacing: 0.4px;
  position: sticky;
  top: 0;
  z-index: 1;
}

table tbody td,
table tbody th {
  padding: 12px 10px;
  border-top: var(--border);
}

table tbody tr:nth-child(odd) {
  background: var(--table-stripe);
}

table tbody tr:hover {
  background: rgba(122, 162, 255, 0.06);
}

table th:first-child,
table td:first-child {
  text-align: left;
}

table th:not(:first-child),
table td:not(:first-child) {
  text-align: right;
}

.table-note,
.note,
.muted,
.small {
  color: var(--muted);
  font-size: 0.9rem;
}

.section,
.panel,
.block {
  background: var(--panel-alt);
  border: var(--border);
  border-radius: 12px;
  padding: var(--pad);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-title,
.section h2,
.section h3,
.card h2,
.card h3 {
  margin: 0;
  color: #f4f7ff;
  letter-spacing: 0.25px;
}

.section-actions,
.actions-row,
.btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.row-inline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.summary,
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--gap);
  margin-top: 12px;
}

.summary .box,
.metrics-grid .box {
  background: var(--panel-alt);
  border: var(--border);
  border-radius: 12px;
  padding: 16px;
}

.mini {
  font-size: 0.94rem;
}

.mini th,
.mini td {
  border: var(--border);
  padding: 8px 10px;
  text-align: right;
}

.mini th:first-child,
.mini td:first-child {
  text-align: left;
}

.mini .section-row td {
  background: rgba(122, 162, 255, 0.08);
  font-weight: 700;
  color: #cfe0ff;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.alert,
.callout {
  border-radius: 12px;
  padding: 18px 22px;
  border: 1px solid rgba(122, 162, 255, 0.35);
  background: rgba(122, 162, 255, 0.12);
}

.alert.alert--success {
  background: var(--success-bg);
  border-color: var(--success-border);
}

.alert.alert--danger {
  background: var(--danger-bg);
  border-color: var(--danger-border);
}

.alert.alert--warning {
  background: var(--warning-bg);
  border-color: var(--warning-border);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  background: linear-gradient(135deg, rgba(122, 162, 255, 0.08), rgba(11, 15, 20, 0.7)), var(--panel);
  border-radius: var(--radius);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-copy p {
  color: var(--muted);
  font-size: 1.02rem;
  margin: 0;
}

.hero-media img {
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--gap);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 3vw, 18px);
}

.inline {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--gap);
}

.link-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.table-footnote {
  font-size: 0.85rem;
  color: var(--muted);
}

.faq-feedback,
.feedback-card {
  margin-top: 20px;
  padding: 20px 24px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(122, 162, 255, 0.1), rgba(94, 244, 255, 0.12));
  border: 1px dashed rgba(122, 162, 255, 0.45);
  color: var(--ink);
}

.highlight-row {
  background: rgba(122, 162, 255, 0.1);
}

.metric-sparkle {
  position: relative;
  isolation: isolate;
}

.metric-sparkle::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(circle at top right, rgba(122, 162, 255, 0.28), transparent 55%);
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition-duration) ease;
}

.metric-sparkle:hover::after,
.metric-sparkle:focus-within::after {
  opacity: 1;
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    text-align: left;
  }
}

@media (max-width: 600px) {
  .card,
  .section,
  .panel,
  .block {
    padding: 20px;
  }

  header {
    padding-block: 24px 12px;
  }

  .btn,
  button,
  .button {
    width: 100%;
  }
}

@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;
  }
}
