:root {
  --bg: #0b0b0f;
  --bg-alt: #121219;
  --card: #18181f;
  --card-hover: #1f1f28;
  --border: #2b2b37;
  --text: #ece9e1;
  --muted: #b4afa3;
  --gold: #d4af37;
  --gold-light: #f3d77a;
  --gold-dark: #a8841f;
  --radius: 14px;
  --max: 1140px;
  --header-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--gold-light);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--gold);
}

h1,
h2,
h3 {
  line-height: 1.25;
  color: #fff;
}

h1 {
  font-size: clamp(1.85rem, 4.6vw, 3.1rem);
  margin: 0.25em 0 0.45em;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin: 0 0 0.7em;
}

h2.ruled {
  display: inline-block;
  padding-bottom: 0.3em;
  border-bottom: 2px solid var(--gold-dark);
}

h3 {
  font-size: 1.15rem;
  color: var(--gold-light);
  margin: 1.4em 0 0.45em;
}

p {
  margin: 0 0 1em;
}

strong {
  color: #fff;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

.narrow {
  max-width: 820px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: #000;
  padding: 8px 16px;
  z-index: 200;
}

.skip-link:focus {
  left: 10px;
}

/* ---------- Header & navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 11, 15, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

.brand img {
  width: 150px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.nav a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
}

.nav a:hover {
  color: var(--gold-light);
  background: rgba(212, 175, 55, 0.08);
}

.nav a[aria-current="page"] {
  color: var(--gold);
  box-shadow: inset 0 -2px 0 var(--gold);
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 12px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.menu-bars,
.menu-bars::before,
.menu-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  position: relative;
}

.menu-bars::before,
.menu-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-bars::before {
  top: -6px;
}

.menu-bars::after {
  top: 6px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  line-height: 1.2;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-light), var(--gold) 50%, var(--gold-dark));
  color: #111;
  box-shadow: 0 6px 22px rgba(212, 175, 55, 0.32);
}

.btn-gold:hover {
  color: #000;
}

.btn-outline {
  border: 2px solid var(--gold);
  color: var(--gold-light);
  background: rgba(0, 0, 0, 0.25);
}

.btn-ghost {
  color: var(--text);
  border: 1px solid var(--border);
  background: var(--card);
}

.btn-ghost:hover {
  color: var(--gold-light);
  border-color: var(--gold-dark);
}

.btn-sm {
  min-height: 40px;
  padding: 8px 18px;
  font-size: 0.92rem;
}

.btn-lg {
  min-height: 56px;
  padding: 15px 32px;
  font-size: 1.08rem;
}

.ext::after {
  content: "\2197";
  font-size: 0.85em;
  opacity: 0.8;
}

.link-arrow {
  font-weight: 700;
  text-decoration: none;
}

.link-arrow::after {
  content: " \2192";
}

/* ---------- Hero ---------- */
.hero {
  padding: 64px 0 56px;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(212, 175, 55, 0.26), transparent 60%),
    linear-gradient(180deg, #14131a, var(--bg));
  border-bottom: 1px solid var(--border);
}

.hero-center {
  text-align: center;
}

.hero-sm {
  padding: 40px 0 40px;
}

.eyebrow {
  display: inline-block;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
  font-size: 0.82rem;
  margin: 0;
}

.lead {
  max-width: 760px;
  font-size: 1.15rem;
  color: var(--muted);
  margin: 0 0 1.5em;
}

.hero-center .lead {
  margin-left: auto;
  margin-right: auto;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-center .cta-row {
  justify-content: center;
}

.cta-note {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 16px 0 0;
}

.badges {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 28px 0 0;
}

.hero-center .badges {
  justify-content: center;
}

.badges li {
  border: 1px solid var(--border);
  background: var(--card);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--text);
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0 0 8px;
  font-size: 0.88rem;
  color: var(--muted);
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
}

/* ---------- Sections ---------- */
.section {
  padding: 56px 0;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-head p {
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
}

.card h3 {
  margin-top: 0;
}

.card p {
  color: var(--muted);
}

.card .card-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
}

.card-feature {
  border-color: var(--gold-dark);
  background:
    radial-gradient(ellipse at top right, rgba(212, 175, 55, 0.16), transparent 60%),
    var(--card);
}

.big-number {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  color: var(--gold-light);
  margin: 0 0 6px;
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #111;
  background: var(--gold);
  border-radius: 6px;
  padding: 2px 8px;
  margin-bottom: 10px;
  align-self: flex-start;
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0 0 1.5em;
}

.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 18px 56px;
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #111;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2em;
}

.check-list li {
  position: relative;
  padding-left: 1.8em;
  margin-bottom: 0.55em;
}

.check-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 800;
}

.callout {
  border: 1px solid var(--gold-dark);
  border-left-width: 4px;
  background: rgba(212, 175, 55, 0.07);
  border-radius: 10px;
  padding: 18px 20px;
  margin: 0 0 1.5em;
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout-warn {
  border-color: #c25a4a;
  background: rgba(194, 90, 74, 0.08);
}

.meta-line {
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0 0 1.2em;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 640px;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

thead th {
  background: linear-gradient(180deg, #2a2412, #1d1a10);
  color: var(--gold-light);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

td strong {
  color: var(--gold-light);
}

.table-compact {
  min-width: 0;
}

@media (max-width: 480px) {
  .table-compact th,
  .table-compact td {
    padding: 10px;
  }

  .table-compact thead th {
    white-space: normal;
  }
}

/* ---------- Article content ---------- */
.content {
  padding-top: 52px;
  padding-bottom: 8px;
}

.content > section {
  margin-bottom: 52px;
}

.content > section > h2 {
  display: inline-block;
  padding-bottom: 0.3em;
  border-bottom: 2px solid var(--gold-dark);
}

.content .grid {
  margin-top: 8px;
}

.page-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.page-nav a {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.9rem;
  text-decoration: none;
}

.page-nav a:hover,
.page-nav a:focus-visible {
  border-color: var(--gold-dark);
}

.cell-sub {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.5;
}

.table-notes {
  margin: 12px 0 0;
  padding-left: 1.2em;
  color: var(--muted);
  font-size: 0.9rem;
}

.table-notes li + li {
  margin-top: 6px;
}

caption {
  caption-side: top;
  text-align: left;
  padding: 12px 14px;
  color: var(--muted);
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.faq h3 {
  color: #fff;
  font-size: 1.05rem;
  margin: 1.3em 0 0.35em;
}

.faq h3 + p {
  color: var(--muted);
}

/* ---------- Content screenshots ---------- */
.midas55-image-block {
  margin: 1.5rem 0 2rem;
  min-width: 0;
}

.midas55-guide-figure {
  margin: 0;
}

.midas55-guide-figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background-color: #111;
}

.midas55-guide-figure figcaption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.midas55-screenshot-link {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.midas55-screenshot-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

/* ---------- FAQ ---------- */
.faq details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  padding: 0 20px;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 15px 0;
  color: #fff;
  list-style-position: outside;
}

.faq details[open] summary {
  color: var(--gold-light);
}

.faq details p {
  color: var(--muted);
}

/* ---------- Blog ---------- */
.post-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 0.5em;
}

.post-cards {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.post-card h2 {
  font-size: 1.25rem;
  margin: 0 0 0.5em;
}

.post-card h2 a {
  color: inherit;
  text-decoration: none;
}

.post-card h2 a:hover {
  color: var(--gold-light);
}

.post-card .link-arrow {
  margin-top: auto;
}

.post-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1em;
}

.post-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.post-list .post-meta {
  display: block;
  margin: 2px 0 0;
}

.post-list p {
  margin: 0.35em 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- CTA band ---------- */
.cta-band {
  text-align: center;
  background:
    radial-gradient(ellipse at center, rgba(212, 175, 55, 0.2), transparent 70%),
    var(--bg-alt);
  border: 1px solid var(--gold-dark);
  border-radius: var(--radius);
  padding: 40px 24px;
}

.cta-band p {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  color: var(--muted);
}

.cta-band .cta-row {
  justify-content: center;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #07070a;
  border-top: 1px solid var(--border);
  padding: 44px 0 24px;
  font-size: 0.93rem;
  color: var(--muted);
}

.footer-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: 2fr 1fr 1fr;
}

.footer-brand img {
  width: 160px;
  margin-bottom: 12px;
}

.footer-title {
  color: #fff;
  font-weight: 700;
  margin-bottom: 8px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 6px;
}

.footer-links a {
  color: var(--text);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--gold-light);
}

.footer-bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.disclaimer {
  margin: 0 0 8px;
}

.age {
  display: inline-block;
  border: 2px solid #e05252;
  color: #e05252;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 3px 6px;
  margin-right: 8px;
}

.copyright {
  margin: 0;
}

/* ---------- Mobile quick-action bar ---------- */
.mobile-cta {
  display: none;
}

.mt-sm {
  margin-top: 14px;
}

.mt {
  margin-top: 24px;
}

.section.pt-0 {
  padding-top: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .menu-toggle {
    display: inline-flex;
  }

  .js .site-nav {
    display: none;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 20px 20px;
    background: #0d0d12;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.5);
  }

  .js .site-nav.is-open {
    display: flex;
  }

  .no-js .site-nav {
    position: static;
    display: flex;
    box-shadow: none;
    border: 0;
    padding: 0 0 12px;
  }

  .no-js .header-inner {
    flex-wrap: wrap;
  }

  .no-js .menu-toggle {
    display: none;
  }

  .nav {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .nav a {
    padding: 12px 10px;
    font-size: 1rem;
  }

  .nav a[aria-current="page"] {
    box-shadow: inset 3px 0 0 var(--gold);
    background: rgba(212, 175, 55, 0.08);
  }

  .nav-cta {
    min-height: 48px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
    padding-bottom: 68px;
  }

  .midas55-image-block {
    margin: 1.25rem 0 1.5rem;
  }

  .midas55-guide-figure img {
    border-radius: 8px;
  }

  .midas55-guide-figure figcaption {
    font-size: 0.8125rem;
  }

  .brand img {
    width: 120px;
  }

  .hero {
    padding: 40px 0 40px;
  }

  .section {
    padding: 44px 0;
  }

  .cta-row .btn {
    flex: 1 1 100%;
  }

  .hero-center .cta-row .btn-split {
    flex: 1 1 calc(50% - 6px);
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .mobile-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 8px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    background: rgba(9, 9, 13, 0.97);
    border-top: 1px solid var(--gold-dark);
  }

  .mobile-cta a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 46px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
  }

  .mobile-cta a.mobile-cta-main {
    border: 0;
    color: #111;
    background: linear-gradient(135deg, var(--gold-light), var(--gold) 50%, var(--gold-dark));
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
