/* Rankomate design system */

:root {
  --g-900: #0a1628;
  --g-800: #122a45;
  --g-700: #1a4a6e;
  --g-600: #216b8a;
  --g-500: #2b8fb0;
  --g-300: #7ec8de;
  --g-100: #d8eef6;
  --g-50: #eef7fb;

  --bg: #ffffff;
  --bg-2: #f4f7fa;
  --surface: #ffffff;
  --ink: #0a1628;
  --ink-2: #475569;
  --ink-3: #94a3b8;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --accent: var(--g-600);
  --accent-2: var(--g-700);
  --accent-soft: var(--g-50);
  --accent-ink: var(--g-800);
  --teal-deep: var(--g-600);
  --teal-deep-hover: var(--g-700);
  --good: var(--g-600);
  --good-soft: var(--g-100);
  --warn: #b45309;
  --warn-soft: #fef3c7;
  --gold: #c9922a;

  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 12px 32px -16px rgba(15,23,42,.16);
  --shadow-hover: 0 1px 2px rgba(15,23,42,.04), 0 24px 48px -20px rgba(15,23,42,.24);
  --shadow-green: none;
  --radius: 10px;
  --radius-sm: 8px;
  --radius-lg: 12px;
  --font-display: "Helvetica World", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font: "Helvetica World", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --max: 1180px;
  --header-h: 72px;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -.03em;
  line-height: 1.2;
  font-weight: 600;
}
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--g-500); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--g-100); color: var(--g-900); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.container { width: min(var(--max), calc(100% - 2.5rem)); margin-inline: auto; }
.container-sm { width: min(720px, calc(100% - 2.5rem)); margin-inline: auto; }
.container-md { width: min(880px, calc(100% - 2.5rem)); margin-inline: auto; }
.page-glow { display: none; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(15, 23, 42, .06);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 700;
  letter-spacing: -.03em;
  font-size: 1.15rem;
  color: var(--ink);
}
.brand-mark {
  display: inline-block;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: url("/assets/img/rankomate-icon.png") center / contain no-repeat;
}
.nav {
  display: flex;
  align-items: center;
  gap: .25rem;
  padding: .3rem;
  border-radius: 999px;
}
.nav a {
  padding: .45rem .85rem;
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: color .15s, background .15s;
}
.nav a:hover { color: var(--ink); }
.nav a.is-active { color: var(--ink); font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: .5rem; }
.header-actions .btn-primary,
.header-actions .btn-call {
  min-height: 42px;
  padding: 0 1rem;
  border-radius: 8px;
  font-size: .88rem;
}
.header-actions .btn-primary:hover { transform: none; }
.btn-call {
  background: #fff;
  color: var(--g-800);
  border: 1px solid var(--g-600);
  gap: .45rem;
}
.btn-call svg { width: 16px; height: 16px; flex: 0 0 auto; }
.btn-call:hover { background: var(--g-50); border-color: var(--g-700); color: var(--g-900); }
.call-short { display: none; }
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.nav-toggle span { width: 16px; height: 1.5px; border-radius: 2px; background: var(--ink); transition: transform .2s var(--ease); }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }
.nav-sheet {
  display: none;
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 40;
  background: #fff;
  padding: 1rem 1.25rem 2rem;
  border-top: 1px solid var(--line);
}
.nav-sheet.is-open { display: block; animation: sheetIn .2s var(--ease); }
@keyframes sheetIn { from { opacity: 0; transform: translateY(-6px); } }
.nav-sheet a:not(.btn) {
  display: block;
  padding: 1rem .25rem;
  border-bottom: 1px solid var(--line);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -.02em;
}
.nav-sheet a.is-active { color: var(--g-700); }
.nav-sheet .btn { margin-top: 1.25rem !important; min-height: 52px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 50px;
  padding: 0 1.3rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font-family: var(--font);
  font-size: .97rem;
  font-weight: 600;
  letter-spacing: -.005em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }
.btn-primary,
.btn-accent {
  background: var(--g-700);
  color: #fff;
}
.btn-primary:hover,
.btn-accent:hover { background: var(--g-800); }
.btn-secondary {
  background: #fff;
  border-color: var(--line-2);
  color: var(--ink);
}
.btn-secondary:hover { border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--bg-2); color: var(--ink); }
.btn-lg { min-height: 56px; padding: 0 1.75rem; font-size: 1.02rem; }
.btn-block { width: 100%; }
.text-link { color: var(--g-700); font-weight: 600; }
.text-link:hover { color: var(--g-800); text-decoration: underline; text-underline-offset: 3px; }

/* Forms */
.field { display: grid; gap: .5rem; }
.field label {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: baseline;
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink);
}
.field label strong {
  color: var(--g-700);
  font-weight: 700;
  white-space: nowrap;
  padding: .1rem .5rem;
  border-radius: 8px;
  background: var(--g-50);
}
.field-hint { font-size: .82rem; color: var(--ink-3); }
.input, .select, .textarea {
  width: 100%;
  min-height: 52px;
  padding: .8rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font-weight: 500;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-2); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--g-500);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, .14);
}
.select {
  appearance: none;
  padding-right: 2.5rem;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 8l4 4 4-4' fill='none' stroke='%2364748b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right .9rem center/18px no-repeat;
}
.textarea { min-height: 110px; resize: vertical; }
.currency { position: relative; }
.currency .prefix {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-3);
  font-weight: 600;
}
.currency .input { padding-left: 2rem; }

.slider {
  width: 100%;
  height: 6px;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 999px;
  background: var(--line);
  accent-color: var(--g-600);
  cursor: pointer;
  margin: .5rem 0;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 6px solid var(--g-600);
  box-shadow: 0 2px 8px rgba(5,150,105,.35);
}
.slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 6px solid var(--g-600);
}
.slider::-moz-range-progress { background: var(--g-500); height: 6px; border-radius: 999px; }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .65rem; }
.choice {
  position: relative;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  text-align: left;
  cursor: pointer;
  font-weight: 600;
  transition: border-color .15s, background .15s, box-shadow .15s, transform .15s;
}
.choice:hover { border-color: var(--line-2); transform: translateY(-1px); }
.choice.is-selected {
  border-color: var(--g-500);
  background: var(--g-50);
  box-shadow: inset 0 0 0 1px var(--g-500), 0 8px 20px -14px rgba(5,150,105,.6);
}
.choice small {
  display: block;
  margin-top: .25rem;
  font-weight: 500;
  color: var(--ink-2);
  font-size: .8rem;
}
.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  padding: .5rem .9rem;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.chip:hover, .chip.is-active {
  border-color: var(--g-500);
  color: var(--g-800);
  background: var(--g-50);
}

/* Shared UI */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}
.card-shadow { box-shadow: var(--shadow); }
.metric span {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: .2rem;
}
.metric strong {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.035em;
}
.disclaimer {
  font-size: .78rem;
  color: var(--ink-2);
  line-height: 1.55;
  padding: .85rem 1rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.disclaimer a { color: var(--g-700); font-weight: 600; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--g-700);
}

.section { padding: 4.5rem 0; }
.section-muted, .section-soft { background: var(--bg-2); }
.section-head { max-width: 38rem; margin-bottom: 2.25rem; }
.section-head h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -.04em;
  margin: .6rem 0 .65rem;
}
.section-head p { color: var(--ink-2); font-size: 1.05rem; }
.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  max-width: none;
  margin-bottom: 2rem;
}
.section-head-row > div { max-width: 36rem; }

.surface-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}
.surface-emphasis { box-shadow: var(--shadow); }
.result-title { font-size: 1.1rem; margin: .35rem 0 .75rem; }
.result-figure {
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -.04em;
  color: var(--g-700);
  margin-bottom: 1rem;
}
.result-metrics { display: grid; gap: 1rem; margin-bottom: 1rem; }
.controls { display: grid; gap: 1.5rem; }

/* Calculators */
.calc-layout {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 1.25rem;
  align-items: start;
}
.calc-results {
  position: sticky;
  top: calc(var(--header-h) + 1.25rem);
  overflow: hidden;
  border: 0;
  color: #fff;
  background: var(--g-900);
}
.calc-results h2 { color: #fff; }
.calc-results .eyebrow { color: var(--g-300); }
.calc-results .metric {
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
}
.calc-results .metric span { color: rgba(255,255,255,.65); }
.calc-results .metric strong { color: #fff; font-size: clamp(1.5rem, 2.6vw, 2rem); }
.calc-results .result-figure { color: #fff; }
.calc-results .breakdown-row { border-color: rgba(255,255,255,.1); }
.calc-results .breakdown-row span { color: rgba(255,255,255,.65); }
.calc-results .field-hint { color: rgba(255,255,255,.6); }
.calc-results .disclaimer {
  color: rgba(255,255,255,.6);
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.08);
}
.calc-results .btn-primary { background: #fff; color: var(--g-800); box-shadow: none; }
.calc-results .btn-primary:hover { background: var(--g-50); }
.calc-results .btn-secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,.25); }
.calc-results .btn-secondary:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.4); }
.calc-results .tag-good { background: rgba(110,231,183,.18); color: var(--g-300); }
.calc-results .scenario-btn { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); color: #fff; }

.home-results {
  background: linear-gradient(160deg, var(--g-800), var(--g-900));
  border-color: transparent;
  color: #fff;
}
.home-results .eyebrow,
.home-results .metric span { color: rgba(255,255,255,.65); }
.home-results .result-figure,
.home-results .metric strong { color: #fff; }
.home-results .disclaimer {
  margin-bottom: 1rem;
  color: rgba(255,255,255,.7);
  background: rgba(255,255,255,.08);
  border-color: transparent;
}
.home-results .btn-primary { background: #fff; color: var(--g-800); }
.home-results .btn-primary:hover { background: var(--g-50); }

/* Legacy helpers */
.home-lead { color: var(--ink-2); max-width: 34rem; margin: 0 0 1.35rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.home-cta {
  padding: 4rem 0;
  background: linear-gradient(135deg, var(--g-700), var(--g-900));
  color: #fff;
}
.home-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; }
.home-cta h2 { margin-bottom: .45rem; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.home-cta p { color: rgba(255,255,255,.8); }
.home-cta .btn-primary { flex: 0 0 auto; background: #fff; color: var(--g-800); }

/* Page hero */
.page-hero {
  position: relative;
  padding: 4rem 0 3rem;
  overflow: hidden;
  background: linear-gradient(180deg, #fff 0%, #f7faf9 100%);
  border-bottom: 1px solid var(--line);
  margin-bottom: 2.5rem;
}
.page-hero::before {
  display: none;
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15,23,42,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 60% 90% at 85% 0%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 90% at 85% 0%, #000 20%, transparent 70%);
  pointer-events: none;
}
.page-hero .container { position: relative; }

.page-hero h1 {
  max-width: 18ch;
  margin: 1.1rem 0 .9rem;
  font-size: clamp(2.1rem, 4.4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.1;
}
.page-hero p { color: var(--ink-2); max-width: 36rem; font-size: 1.1rem; }
.page-hero .hero-actions { margin-top: 1.75rem !important; }
.page-hero + .section { padding-top: 1rem !important; }

/* Cards / tools / guides */
.path-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.path-card {
  display: block;
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.path-card:hover { border-color: var(--g-500); box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.path-card .eyebrow { margin-bottom: 1.25rem; }
.path-card h3 { margin: 0 0 .45rem; font-size: 1.2rem; }
.path-card p { color: var(--ink-2); font-size: .95rem; }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  counter-reset: tool;
}
.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 190px;
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  overflow: hidden;
  counter-increment: tool;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.tool-card::before {
  content: "";
  width: 48px;
  height: 48px;
  margin-bottom: auto;
  border-radius: 8px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 19V11M10 19V6M16 19v-5M21 19H3' fill='none' stroke='%23047857' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center/24px no-repeat,
    var(--g-50);
}
.tool-card:nth-child(6n+2)::before { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 11l8-7 8 7v8a1 1 0 0 1-1 1h-4v-6H9v6H5a1 1 0 0 1-1-1z' fill='none' stroke='%23047857' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E") center/24px no-repeat, var(--g-50); }
.tool-card:nth-child(6n+3)::before { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='5' y='3' width='14' height='18' rx='3' fill='none' stroke='%23047857' stroke-width='1.8'/%3E%3Cpath d='M8 7h8M8 12h2M14 12h2M8 16h2M14 16h2' stroke='%23047857' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center/24px no-repeat, var(--g-50); }
.tool-card:nth-child(6n+4)::before { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 6c5 0 8 12 16 12M15 18h5v-5' fill='none' stroke='%23047857' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/24px no-repeat, var(--g-50); }
.tool-card:nth-child(6n+5)::before { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='8' fill='none' stroke='%23047857' stroke-width='1.8'/%3E%3Cpath d='M12 8v4l3 2' fill='none' stroke='%23047857' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center/24px no-repeat, var(--g-50); }
.tool-card:nth-child(6n)::before { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='8' fill='none' stroke='%23047857' stroke-width='1.8'/%3E%3Cpath d='M9 12h6M12 9v6' stroke='%23047857' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center/24px no-repeat, var(--g-50); }
.tool-card::after {
  content: "";
  position: absolute;
  top: 1.6rem;
  right: 1.6rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M7 13l6-6M8 7h5v5' fill='none' stroke='%230b1220' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat;
  transition: background-color .2s, border-color .2s, transform .2s;
}
.tool-card:hover { border-color: rgba(16,185,129,.5); box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.tool-card:hover::after {
  background-color: var(--g-600);
  border-color: var(--g-600);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M7 13l6-6M8 7h5v5' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  transform: rotate(45deg);
}
.tool-card h3 { margin-top: 1.5rem; font-size: 1.15rem; letter-spacing: -.025em; }
.tool-card p { color: var(--ink-2); font-size: .92rem; margin-top: .3rem; }

.guide-list { display: grid; gap: .75rem; }
.guide-item {
  position: relative;
  display: grid;
  grid-template-columns: 150px 1fr 40px;
  gap: 1.25rem;
  align-items: center;
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.guide-item::after {
  content: "";
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10h10M11 5l5 5-5 5' fill='none' stroke='%230b1220' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat;
  transition: background-color .2s, transform .2s;
}
.guide-item time {
  justify-self: start;
  color: var(--g-700);
  font-size: .8rem;
  font-weight: 600;
}
.guide-item h3 { font-size: 1.12rem; margin-bottom: .2rem; letter-spacing: -.025em; }
.guide-item p { color: var(--ink-2); font-size: .95rem; }
.guide-item:hover { border-color: rgba(16,185,129,.5); box-shadow: var(--shadow); transform: translateY(-2px); }
.guide-item:hover::after {
  background-color: var(--g-600);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10h10M11 5l5 5-5 5' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.how-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.how-steps article { padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); }
.how-steps span { display: block; font-size: .8rem; font-weight: 700; color: var(--g-600); margin-bottom: .5rem; }
.how-steps h3 { font-size: 1rem; margin-bottom: .35rem; }
.how-steps p { font-size: .88rem; color: var(--ink-2); }

.cap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.cap-item { padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.cap-num { display: block; margin-bottom: .55rem; font-size: .8rem; font-weight: 700; color: var(--g-600); }
.cap-item h3 { font-size: 1.05rem; margin-bottom: .35rem; }
.cap-item p { color: var(--ink-2); font-size: .95rem; }

.trust-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.trust-item { padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.trust-item h3 { font-size: 1.05rem; margin-bottom: .35rem; }
.trust-item p { color: var(--ink-2); }

/* Chat */
.chat-shell {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 560px;
  box-shadow: var(--shadow);
}
.chat-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, var(--bg-2));
}
.chat-person { display: flex; gap: .75rem; align-items: center; }
.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: url("/assets/img/rankomate-icon.png") center / cover no-repeat;
  box-shadow: 0 0 0 3px var(--g-50);
}
.chat-person strong { display: block; font-size: .98rem; }
.chat-person span { font-size: .8rem; color: var(--ink-2); }
.chat-online {
  font-size: .78rem;
  font-weight: 700;
  color: var(--g-700);
  display: inline-flex;
  gap: .4rem;
  align-items: center;
  padding: .3rem .65rem;
  border-radius: 999px;
  background: var(--g-50);
}
.chat-online i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--g-500);
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16,185,129,.5); }
  100% { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .8rem;
  background: var(--bg-2);
  min-height: 300px;
}
.msg {
  max-width: min(85%, 480px);
  padding: .85rem 1.05rem;
  border-radius: 12px;
  font-size: .96rem;
  line-height: 1.55;
  white-space: pre-wrap;
}
.msg p { margin: 0 0 .4rem; }
.msg p:last-child { margin: 0; }
.msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.user { align-self: flex-end; background: var(--g-600); color: #fff; border-bottom-right-radius: 6px; }
.msg.typing { color: var(--ink-3); font-style: italic; }
.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  padding: 0 1.25rem 1rem;
  background: var(--bg-2);
}
.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .6rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--line);
}
.chat-form textarea {
  min-height: 50px;
  max-height: 130px;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .8rem 1.1rem;
  outline: none;
}
.chat-form textarea:focus { border-color: var(--g-500); box-shadow: 0 0 0 4px rgba(16,185,129,.14); }

/* Assessment / results */
.readiness { display: grid; grid-template-columns: 200px 1fr; gap: 1.5rem; align-items: center; }
.readiness-panel {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
}
.readiness-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 1rem; }
.readiness-copy h3 { font-size: 1rem; margin-bottom: .4rem; }
.readiness-copy p { color: var(--ink-2); }
.score-ring {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  margin: 0 auto;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--g-500) calc(var(--score, 78) * 1%), var(--g-50) 0);
}
.score-inner {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  text-align: center;
}
.score-inner strong { font-size: 2.2rem; font-weight: 700; letter-spacing: -.04em; }
.score-inner span { font-size: .72rem; color: var(--ink-3); font-weight: 600; }
.tag {
  display: inline-flex;
  align-items: center;
  padding: .25rem .65rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
}
.tag-good { background: var(--g-100); color: var(--g-800); }
.tag-warn { background: var(--warn-soft); color: var(--warn); }
.tag-muted { background: var(--bg-2); color: var(--ink-2); border: 1px solid var(--line); }

.assess-shell { min-height: calc(100svh - var(--header-h)); padding: 3rem 0 5rem; background: var(--bg-2); }
.progress-track {
  height: 6px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--g-500), var(--g-600));
  width: 0;
  transition: width .35s var(--ease);
}
.step-meta { color: var(--ink-2); font-size: .85rem; font-weight: 600; margin-bottom: .65rem; }
.assess-card {
  max-width: 640px;
  margin: 0 auto;
  padding: 2.25rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.assess-card h1 { font-size: clamp(1.6rem, 3.4vw, 2.1rem); font-weight: 700; letter-spacing: -.04em; margin-bottom: .5rem; }
.assess-card > p { color: var(--ink-2); margin-bottom: 1.5rem; }
.assess-nav { display: flex; justify-content: space-between; gap: .75rem; margin-top: 2rem; }

.result-hero { padding: 3rem 0 1.5rem; }
.result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.25rem 0 2rem; }
.panel-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 1.25rem; }
.breakdown-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem 0;
  border-bottom: 1px solid var(--line);
  font-size: .95rem;
}
.breakdown-row span { color: var(--ink-2); }
.breakdown-row strong { font-weight: 700; }
.dim-list { display: grid; gap: .15rem; }
.dim-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .8rem 0;
  border-bottom: 1px solid var(--line);
}

.scenario-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .55rem; margin-top: .75rem; }
.scenario-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius-sm);
  padding: .75rem;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, background .15s;
}
.scenario-btn:hover { border-color: var(--line-2); }
.scenario-btn.is-active { border-color: var(--g-500); background: var(--g-50); }
.scenario-btn strong { display: block; font-size: .95rem; }
.scenario-btn span { font-size: .75rem; color: var(--ink-2); }

.lender-grid { display: grid; gap: .85rem; }
.lender-card { display: grid; gap: .75rem; }
.lender-meta { display: flex; flex-wrap: wrap; gap: .5rem; }
.lead-box { margin-top: 2rem; }

/* Articles */
.article { width: min(740px, calc(100% - 2.5rem)); margin: 0 auto 5rem; }
.article .meta {
  display: inline-flex;
  color: var(--g-700);
  font-size: .85rem;
  font-weight: 600;
}
.article h1 {
  font-size: clamp(2rem, 4.2vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.08;
  margin: 1rem 0 2rem;
}
.article-body { color: var(--ink-2); font-size: 1.07rem; line-height: 1.8; }
.article-body h2 { color: var(--ink); font-size: 1.4rem; font-weight: 600; letter-spacing: -.025em; margin: 2.75rem 0 .85rem; }
.article-body h3 { color: var(--ink); margin: 1.75rem 0 .5rem; }
.article-body p { margin-bottom: 1.1rem; }
.article-body strong { color: var(--ink); }
.article-body ul { display: grid; gap: .6rem; margin: 0 0 1.25rem; }
.article-body ul li { position: relative; padding-left: 1.9rem; }
.article-body ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .3rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--g-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.3l2.6 2.6L14 7.5' fill='none' stroke='%23059669' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/20px no-repeat;
}
.article-body a:not(.btn) { color: var(--g-700); font-weight: 600; text-decoration: underline; text-decoration-color: var(--g-100); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.article-body a:not(.btn):hover { text-decoration-color: var(--g-500); }
.article-body .brs-card {
  border: 0 !important;
  border-radius: var(--radius-lg) !important;
  padding: 1.75rem !important;
  background: linear-gradient(160deg, var(--g-50), #fff) !important;
  box-shadow: inset 0 0 0 1px rgba(16,185,129,.25);
}
.article-body .brs-card h2 { margin-bottom: .4rem; }
.article-body .brs-card label { display: grid; gap: .4rem; font-size: .9rem; font-weight: 600; color: var(--ink); }

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  margin-bottom: .6rem;
  transition: border-color .2s;
}
.faq-item[open] { border-color: rgba(16,185,129,.45); }
.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.05rem 1.25rem;
  color: var(--ink);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -.015em;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  flex: 0 0 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 5v10M5 10h10' stroke='%230b1220' stroke-width='1.7' stroke-linecap='round'/%3E%3C/svg%3E") center/16px no-repeat;
  transition: transform .2s var(--ease), background-color .2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); background-color: var(--g-100); }
.faq-item p { padding: 0 1.25rem 1.1rem; margin: 0; font-size: .98rem; }

/* Footer */
.site-footer {
  padding: 4rem 0 2rem;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: 2rem;
}
.footer-grid h4 {
  font-size: .8rem;
  letter-spacing: 0;
  color: var(--ink);
  margin-bottom: 1rem;
  font-weight: 700;
}
.footer-grid a:not(.brand) {
  display: block;
  color: var(--ink-2);
  font-size: .92rem;
  margin-bottom: .6rem;
  transition: color .15s;
}
.footer-grid a:not(.brand):hover { color: var(--g-700); }
.footer-brand p {
  color: var(--ink-2);
  margin-top: .9rem;
  max-width: 20rem;
  font-size: .95rem;
}
.footer-copy {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: .82rem;
}
.footer-copy a { color: var(--ink-2); }

/* Admin */
.admin-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.admin-table th, .admin-table td {
  text-align: left;
  padding: .8rem .6rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.admin-table th {
  color: var(--ink-2);
  font-weight: 700;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.table-wrap { overflow-x: auto; }

/* AI page */
.ai-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1.25rem;
  align-items: start;
  padding-bottom: 3rem;
}
.context-panel { position: sticky; top: calc(var(--header-h) + 1.25rem); }
.context-panel dl { display: grid; gap: .6rem; margin-top: 1rem; }
.context-panel dt { font-size: .75rem; color: var(--ink-3); font-weight: 600; }
.context-panel dd { margin: 0; font-weight: 600; }

.sticky-cta {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  padding: .75rem 1rem;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}

/* Responsive */
@media (max-width: 980px) {
  .nav a { padding: .45rem .6rem; }
  .calc-layout,
  .path-grid,
  .tool-grid,
  .cap-grid,
  .how-steps,
  .result-grid,
  .stat-grid,
  .panel-grid,
  .ai-layout,
  .trust-grid,
  .readiness,
  .readiness-panel { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
  .calc-layout, .ai-layout { grid-template-columns: 1fr; }
  .calc-results, .context-panel { position: static; }
  .section-head-row { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 1180px) {
  .call-long { display: none; }
  .call-short { display: inline; }
}
@media (max-width: 820px) {
  .nav, .header-actions .hide-mobile { display: none; }
  .nav-toggle { display: inline-flex; }
  .header-actions .btn-call { padding: 0 .75rem; }
}

@media (max-width: 640px) {
  .container, .container-sm, .container-md, .article { width: calc(100% - 2rem); }
  .path-grid,
  .tool-grid,
  .cap-grid,
  .how-steps,
  .result-grid,
  .stat-grid,
  .panel-grid,
  .trust-grid,
  .readiness,
  .readiness-panel,
  .readiness-cols,
  .chat-form,
  .scenario-grid { grid-template-columns: 1fr; }
  .scenario-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.75rem 1rem; }
  .card { padding: 1.35rem; }
  .assess-card { padding: 1.5rem; border-radius: 12px; }
  .tool-card { min-height: 0; }
  .tool-card h3 { margin-top: 1.1rem; }
  .guide-item { grid-template-columns: 1fr; gap: .6rem; padding: 1.25rem; }
  .guide-item::after { position: absolute; top: 1.1rem; right: 1.1rem; width: 34px; height: 34px; }
  .choice-grid { grid-template-columns: 1fr 1fr; }
  .page-hero { padding: 2.75rem 0 2rem; }
  .page-hero h1 { font-size: 2.3rem; }
  .page-hero p { font-size: 1rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .home-cta-inner { flex-direction: column; align-items: flex-start; }
  .home-cta .btn { width: 100%; }
  .section { padding: 3rem 0; }
  .sticky-cta { display: block; }
  body.has-sticky-cta { padding-bottom: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
