/* Utilia Quest V3 — playful, fast, accessible utility & official-service interface */
:root {
  color-scheme: light;
  --bg: #f4f7ff;
  --bg-2: #eef1ff;
  --surface: #ffffff;
  --surface-2: #f8f9ff;
  --surface-3: #eef2ff;
  --ink: #11182f;
  --muted: #66708b;
  --line: #dfe5f4;
  --line-strong: #c9d2e8;
  --primary: #6d4aff;
  --primary-2: #8b5cf6;
  --primary-dark: #4d2bd6;
  --aqua: #12c8b1;
  --aqua-dark: #098b7d;
  --yellow: #ffca3a;
  --pink: #ff5ca8;
  --orange: #ff8a4c;
  --blue: #3e8bff;
  --green: #2cb67d;
  --danger: #df3b61;
  --shadow-sm: 0 8px 24px rgba(46, 42, 105, .08);
  --shadow: 0 18px 50px rgba(46, 42, 105, .13);
  --shadow-lg: 0 30px 90px rgba(46, 42, 105, .20);
  --lift: 0 7px 0 rgba(34, 27, 82, .12);
  --radius-sm: 14px;
  --radius: 22px;
  --radius-lg: 32px;
  --radius-xl: 42px;
  --header-h: 78px;
  --max: 1240px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1022;
  --bg-2: #11162e;
  --surface: #171c37;
  --surface-2: #1d2343;
  --surface-3: #242b50;
  --ink: #f7f7ff;
  --muted: #a9b2cf;
  --line: #30385f;
  --line-strong: #455079;
  --primary: #9b7cff;
  --primary-2: #7a5cff;
  --primary-dark: #c4b4ff;
  --aqua: #2de0c8;
  --aqua-dark: #7cf2e3;
  --yellow: #ffd75a;
  --pink: #ff77b9;
  --orange: #ff9c65;
  --blue: #68a5ff;
  --green: #4dd99b;
  --danger: #ff6b88;
  --shadow-sm: 0 10px 28px rgba(0,0,0,.24);
  --shadow: 0 20px 58px rgba(0,0,0,.35);
  --shadow-lg: 0 35px 100px rgba(0,0,0,.45);
  --lift: 0 7px 0 rgba(0,0,0,.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 22px); }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(109,74,255,.12), transparent 25rem),
    radial-gradient(circle at 93% 18%, rgba(18,200,177,.11), transparent 27rem),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  font-family: Inter, ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .42;
  z-index: -1;
  background-image:
    radial-gradient(circle at center, rgba(109,74,255,.22) 1px, transparent 1.5px),
    radial-gradient(circle at center, rgba(18,200,177,.20) 1px, transparent 1.5px);
  background-size: 31px 31px, 47px 47px;
  background-position: 0 0, 13px 17px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}
body.drawer-open, body.search-opened, body.menu-open { overflow: hidden; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img, svg { max-width: 100%; }
p { margin: 0 0 1rem; color: var(--muted); }
h1, h2, h3, h4 { margin: 0; line-height: 1.08; letter-spacing: -.03em; }
h1 { font-size: clamp(2.25rem, 5.2vw, 5.1rem); }
h2 { font-size: clamp(1.75rem, 3.3vw, 3.1rem); }
h3 { font-size: 1.18rem; }
strong, b { font-weight: 800; }
.container { width: min(calc(100% - 36px), var(--max)); margin-inline: auto; }
.narrow { width: min(calc(100% - 36px), 850px); }
.section { padding: 78px 0; position: relative; }
.section-soft { background: color-mix(in srgb, var(--surface) 68%, transparent); border-block: 1px solid var(--line); }
.section-dark { background: #171633; color: #fff; overflow: hidden; }
html[data-theme="dark"] .section-dark { background: #090c1d; }
.section-dark::before { content:""; position:absolute; inset:-40%; background: radial-gradient(circle, rgba(109,74,255,.28), transparent 45%); }
.section-dark > * { position: relative; }
.section-heading { display:flex; align-items:end; justify-content:space-between; gap:24px; margin-bottom:32px; }
.section-heading p { max-width: 720px; margin:.75rem 0 0; font-size:1.02rem; }
.section-heading.light h2, .section-heading.light p { color:#fff; }
.section-kicker, .eyebrow, .mini-kicker, .drawer-kicker {
  display:inline-flex; align-items:center; gap:8px; width:max-content;
  color:var(--primary); font-size:.73rem; font-weight:900; letter-spacing:.115em; text-transform:uppercase;
}
.section-kicker::before, .eyebrow::before { content:""; width:9px; height:9px; border-radius:3px; background:var(--yellow); box-shadow:0 0 0 4px rgba(255,202,58,.17); }
.text-link { color:var(--primary); font-weight:850; white-space:nowrap; }
.text-link:hover { text-decoration:underline; }
.sr-only { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }
.skip-link { position:fixed; top:10px; left:10px; transform:translateY(-150%); z-index:9999; padding:12px 16px; border-radius:12px; background:var(--ink); color:var(--surface); font-weight:800; }
.skip-link:focus { transform:none; }

/* Header / game HUD */
.site-header {
  position: sticky; top: 0; z-index: 80;
  min-height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  backdrop-filter: blur(18px) saturate(150%);
}
.header-inner { min-height:var(--header-h); display:flex; align-items:center; gap:28px; }
.brand { display:inline-flex; align-items:center; gap:11px; flex:none; }
.brand-mark {
  width:44px; height:44px; display:grid; place-items:center; border-radius:15px;
  color:#fff; font-size:1.05rem; font-weight:1000; letter-spacing:-.05em;
  background: linear-gradient(145deg, var(--primary), #8d64ff 62%, #b99dff);
  border: 2px solid rgba(255,255,255,.65); box-shadow: 0 5px 0 #4c32ba, 0 10px 24px rgba(109,74,255,.25);
  transform: rotate(-3deg);
}
.brand-mark::after { content:"•"; font-size:1.45rem; margin-left:2px; opacity:.9; }
.brand-copy { display:grid; line-height:1; gap:4px; }
.brand-copy strong { font-size:1.18rem; letter-spacing:-.04em; }
.brand-copy small { font-size:.58rem; font-weight:900; letter-spacing:.18em; color:var(--muted); }
.desktop-nav { margin-left:auto; display:flex; align-items:center; gap:6px; padding:5px; border:1px solid var(--line); border-radius:17px; background:color-mix(in srgb,var(--surface) 76%,transparent); box-shadow:var(--shadow-sm); }
.desktop-nav a { padding:9px 13px; border-radius:12px; color:var(--muted); font-size:.86rem; font-weight:780; transition:.18s ease; }
.desktop-nav a:hover { color:var(--ink); background:var(--surface-3); transform:translateY(-1px); }
.header-actions { display:flex; align-items:center; gap:8px; }
.icon-button, .language-pill {
  min-height:42px; border:1px solid var(--line); border-radius:14px; background:var(--surface); color:var(--ink);
  display:inline-flex; align-items:center; justify-content:center; gap:7px; padding:0 12px; cursor:pointer; font-weight:850; box-shadow:0 3px 0 color-mix(in srgb,var(--line) 70%,transparent); transition:.18s ease;
}
.icon-button:hover, .language-pill:hover { transform:translateY(-2px); box-shadow:0 5px 0 color-mix(in srgb,var(--line-strong) 75%,transparent); border-color:var(--line-strong); }
.icon-button:active, .language-pill:active { transform:translateY(1px); box-shadow:none; }
.search-open { padding-inline:14px; }
.search-button-label { font-size:.82rem; }
.menu-toggle { display:none; }
.mobile-menu { position:fixed; inset:var(--header-h) 0 auto; z-index:79; padding:12px 0 20px; background:var(--surface); border-bottom:1px solid var(--line); box-shadow:var(--shadow); }
.mobile-menu-inner { display:grid; gap:7px; }
.mobile-menu a { padding:13px 15px; border-radius:14px; background:var(--surface-2); font-weight:800; }

/* buttons */
.button {
  min-height:48px; border:0; border-radius:16px; padding:0 20px; display:inline-flex; align-items:center; justify-content:center; gap:9px;
  font-weight:900; letter-spacing:-.01em; cursor:pointer; transition:transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.button:hover { transform:translateY(-3px); filter:saturate(1.08); }
.button:active { transform:translateY(2px); box-shadow:none!important; }
.button.primary, .button.quest-primary {
  color:#fff; background:linear-gradient(135deg,var(--primary),#8e63ff); border:1px solid rgba(255,255,255,.24);
  box-shadow:0 6px 0 #4d31ba, 0 13px 27px rgba(109,74,255,.22);
}
.button.secondary, .button.quest-secondary { color:var(--ink); background:var(--surface); border:1px solid var(--line); box-shadow:0 5px 0 var(--line); }
.button.ghost { color:var(--primary); background:var(--surface-3); border:1px solid var(--line); box-shadow:none; }
.button.small { min-height:40px; padding:0 14px; border-radius:13px; font-size:.82rem; box-shadow:0 4px 0 color-mix(in srgb,var(--line-strong) 75%,transparent); }
.button.quest-primary.small { box-shadow:0 4px 0 #4d31ba; }
.button.full { width:100%; }
.hero-actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:24px; }

/* Search modal */
.search-panel { position:fixed; inset:0; z-index:200; }
.search-panel-backdrop, .quest-backdrop { position:absolute; inset:0; background:rgba(9,11,28,.58); backdrop-filter:blur(8px); }
.search-dialog {
  position:relative; width:min(calc(100% - 28px),760px); max-height:min(720px,calc(100vh - 60px)); overflow:hidden;
  margin:30px auto; border:1px solid var(--line-strong); border-radius:28px; background:var(--surface); box-shadow:var(--shadow-lg); animation:pop-in .22s ease both;
}
.search-dialog::before { content:"BUSCADOR RÁPIDO / QUICK FIND"; display:block; padding:15px 20px 5px; color:var(--primary); font-size:.65rem; letter-spacing:.13em; font-weight:900; }
.search-dialog-head { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:10px; padding:10px 14px 14px; border-bottom:1px solid var(--line); }
.search-dialog-head > span { font-size:1.55rem; color:var(--primary); }
.search-dialog input { border:0; outline:0; background:transparent; color:var(--ink); font-size:1.12rem; font-weight:750; min-width:0; }
.global-search-results { padding:10px; max-height:calc(100vh - 185px); overflow:auto; }
.search-result-meta { padding:7px 12px; color:var(--muted); font-size:.72rem; font-weight:800; text-transform:uppercase; letter-spacing:.08em; }
.search-result-item { display:grid; grid-template-columns:46px 1fr auto; align-items:center; gap:12px; padding:11px; border-radius:17px; transition:.17s ease; }
.search-result-item:hover { background:var(--surface-3); transform:translateX(3px); }
.search-result-item .mini-icon { width:44px; height:44px; display:grid; place-items:center; border-radius:14px; background:rgba(109,74,255,.12); color:var(--primary); font-weight:900; }
.search-result-item.search-procedure .mini-icon { background:rgba(18,200,177,.13); color:var(--aqua-dark); }
.search-result-item > span:nth-child(2) { min-width:0; display:grid; gap:2px; }
.search-result-item strong { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.search-result-item small { color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.search-result-item b { color:var(--primary); }
.search-empty { padding:30px 18px; color:var(--muted); text-align:center; }

/* New home: playful mission hub */
.quest-home { padding:40px 0 0; }
.quest-hero { position:relative; overflow:hidden; padding:28px 0 70px; }
.quest-hero::before { content:""; position:absolute; width:420px; height:420px; border-radius:50%; right:-180px; top:-160px; background:rgba(255,202,58,.18); filter:blur(2px); }
.quest-hero::after { content:""; position:absolute; width:360px; height:360px; border-radius:50%; left:-190px; bottom:-180px; background:rgba(18,200,177,.14); }
.quest-hero-grid { display:grid; grid-template-columns:minmax(0,1.18fr) minmax(340px,.82fr); gap:44px; align-items:center; position:relative; }
.hero-badge { display:inline-flex; align-items:center; gap:10px; padding:9px 13px; border:1px solid rgba(109,74,255,.22); border-radius:999px; background:rgba(109,74,255,.08); color:var(--primary); font-size:.75rem; font-weight:900; letter-spacing:.07em; text-transform:uppercase; }
.hero-badge i { width:10px; height:10px; border-radius:50%; background:var(--aqua); box-shadow:0 0 0 5px rgba(18,200,177,.15); animation:pulse 1.8s infinite; }
.quest-hero h1 { max-width:820px; margin:18px 0 16px; }
.quest-hero h1 .gradient-word { color:transparent; background:linear-gradient(110deg,var(--primary),var(--pink),var(--orange)); -webkit-background-clip:text; background-clip:text; }
.quest-hero-copy > p { max-width:720px; font-size:1.14rem; }
.quest-search { position:relative; display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:10px; margin-top:26px; padding:8px; border:2px solid var(--line-strong); border-radius:23px; background:var(--surface); box-shadow:0 9px 0 rgba(45,38,103,.10), var(--shadow); }
.quest-search:focus-within { border-color:var(--primary); box-shadow:0 9px 0 rgba(109,74,255,.18), 0 20px 60px rgba(109,74,255,.16); }
.quest-search > span { width:48px; height:48px; display:grid; place-items:center; border-radius:15px; background:var(--surface-3); color:var(--primary); font-size:1.35rem; }
.quest-search input { min-width:0; border:0; outline:0; color:var(--ink); background:transparent; font-size:1.03rem; font-weight:730; }
.quest-search .button { min-height:48px; }
.quest-search-results { position:absolute; z-index:35; left:0; right:0; top:calc(100% + 12px); padding:10px; border:1px solid var(--line-strong); border-radius:22px; background:var(--surface); box-shadow:var(--shadow-lg); max-height:430px; overflow:auto; }
.search-hints { display:flex; flex-wrap:wrap; gap:8px; margin-top:17px; }
.search-hints button, .search-hints a { border:1px solid var(--line); background:color-mix(in srgb,var(--surface) 75%,transparent); color:var(--muted); border-radius:999px; padding:8px 12px; font-size:.78rem; font-weight:780; cursor:pointer; transition:.16s ease; }
.search-hints button:hover, .search-hints a:hover { color:var(--primary); border-color:var(--primary); transform:translateY(-2px); }
.hero-stat-row { display:flex; flex-wrap:wrap; gap:13px; margin-top:24px; }
.hero-stat { display:flex; align-items:center; gap:9px; color:var(--muted); font-size:.82rem; font-weight:750; }
.hero-stat > span { width:30px; height:30px; display:grid; place-items:center; border-radius:10px; background:var(--surface); border:1px solid var(--line); box-shadow:0 3px 0 var(--line); }

/* CSS mascot / dashboard */
.guide-zone { min-height:465px; position:relative; display:grid; place-items:center; }
.guide-zone::before { content:""; position:absolute; width:370px; height:370px; border-radius:44% 56% 58% 42%; background:linear-gradient(145deg,rgba(109,74,255,.15),rgba(18,200,177,.16)); animation:blob 9s ease-in-out infinite; }
.guide-card { position:relative; width:min(100%,390px); padding:22px; border:1px solid var(--line-strong); border-radius:34px; background:color-mix(in srgb,var(--surface) 88%,transparent); box-shadow:var(--shadow-lg), 0 8px 0 rgba(45,38,103,.10); backdrop-filter:blur(12px); transform:rotate(1.5deg); }
.guide-card::after { content:""; position:absolute; width:64px; height:19px; left:28px; bottom:-19px; background:var(--surface); clip-path:polygon(0 0,100% 0,25% 100%); }
.bot { width:136px; height:130px; margin:4px auto 18px; position:relative; }
.bot-antenna { position:absolute; width:7px; height:28px; left:65px; top:0; border-radius:6px; background:var(--primary); }
.bot-antenna::before { content:""; position:absolute; width:19px; height:19px; left:-6px; top:-9px; border-radius:50%; background:var(--yellow); border:3px solid var(--surface); box-shadow:0 0 0 2px var(--primary); }
.bot-head { position:absolute; inset:25px 7px 4px; border-radius:34px; background:linear-gradient(145deg,#fff,#e7e7ff); border:4px solid #24224f; box-shadow:0 8px 0 #c6c3ee; }
html[data-theme="dark"] .bot-head { background:linear-gradient(145deg,#31385d,#1e2444); border-color:#d8d4ff; box-shadow:0 8px 0 #080b1b; }
.bot-screen { position:absolute; inset:20px 16px 27px; border-radius:22px; background:#25214d; display:flex; align-items:center; justify-content:space-evenly; }
.bot-eye { width:18px; height:25px; border-radius:50%; background:var(--aqua); box-shadow:0 0 16px rgba(45,224,200,.75); animation:blink 4s infinite; }
.bot-smile { position:absolute; width:38px; height:16px; left:45px; bottom:14px; border:4px solid var(--pink); border-top:0; border-radius:0 0 30px 30px; }
.bot-ear { position:absolute; width:18px; height:44px; top:56px; border-radius:9px; background:var(--yellow); border:3px solid #24224f; }
.bot-ear.left { left:0; } .bot-ear.right { right:0; }
.guide-message { text-align:center; }
.guide-message strong { display:block; font-size:1.28rem; }
.guide-message p { margin:.5rem 0 0; font-size:.91rem; }
.xp-widget { margin-top:20px; padding:14px; border-radius:19px; background:var(--surface-2); border:1px solid var(--line); }
.xp-widget-head { display:flex; justify-content:space-between; align-items:center; gap:10px; font-size:.76rem; font-weight:850; }
.xp-widget-head span:first-child { color:var(--primary); }
.xp-track { height:12px; margin-top:9px; background:var(--line); border-radius:999px; overflow:hidden; box-shadow:inset 0 2px 3px rgba(0,0,0,.1); }
.xp-track::after { content:""; display:block; width:var(--xp,0%); height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--aqua),var(--primary),var(--pink)); transition:width .5s ease; }
.floating-token { position:absolute; display:grid; place-items:center; width:58px; height:58px; border-radius:20px; background:var(--surface); border:1px solid var(--line); box-shadow:var(--shadow); font-size:1.55rem; animation:float 5s ease-in-out infinite; }
.floating-token.t1 { left:2%; top:18%; transform:rotate(-8deg); }
.floating-token.t2 { right:0; top:8%; animation-delay:-1.8s; transform:rotate(8deg); }
.floating-token.t3 { right:4%; bottom:8%; animation-delay:-3.3s; transform:rotate(-5deg); }

/* Home path selection */
.quest-section { padding:68px 0; }
.quest-section-head { display:flex; align-items:end; justify-content:space-between; gap:24px; margin-bottom:27px; }
.quest-section-head > div > p { margin:.7rem 0 0; }
.quest-step-title { display:flex; align-items:center; gap:12px; margin-bottom:9px; }
.quest-step-title > span { width:39px; height:39px; display:grid; place-items:center; border-radius:13px; background:var(--yellow); color:#2b2100; border:2px solid #fff; box-shadow:0 4px 0 #d8a61f; font-weight:1000; transform:rotate(-4deg); }
.quick-path-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; }
.path-card { position:relative; min-height:270px; padding:29px; border-radius:31px; overflow:hidden; display:grid; grid-template-columns:1fr auto; align-items:end; gap:22px; border:2px solid rgba(255,255,255,.62); box-shadow:0 9px 0 rgba(36,31,81,.12),var(--shadow); transition:.2s ease; }
.path-card:hover { transform:translateY(-7px) rotate(-.4deg); box-shadow:0 14px 0 rgba(36,31,81,.13),var(--shadow-lg); }
.path-card.service-path { background:linear-gradient(135deg,#6548ed,#9a6dff); color:#fff; }
.path-card.tool-path { background:linear-gradient(135deg,#0bbfa9,#37dec9); color:#082e2a; }
.path-card::before { content:""; position:absolute; width:250px; height:250px; border-radius:50%; right:-90px; top:-100px; background:rgba(255,255,255,.14); }
.path-card::after { content:""; position:absolute; inset:auto 0 0; height:45%; background:linear-gradient(to top,rgba(0,0,0,.09),transparent); }
.path-card > * { position:relative; z-index:1; }
.path-card small { display:inline-flex; padding:7px 10px; border-radius:999px; background:rgba(255,255,255,.18); font-weight:850; font-size:.72rem; letter-spacing:.05em; text-transform:uppercase; }
.path-card h3 { font-size:clamp(1.7rem,3vw,2.65rem); margin:13px 0 9px; }
.path-card p { color:inherit; opacity:.83; max-width:470px; }
.path-card .path-arrow { width:70px; height:70px; display:grid; place-items:center; border-radius:24px; background:rgba(255,255,255,.92); color:#33266e; font-size:2rem; font-weight:900; box-shadow:0 6px 0 rgba(30,24,66,.18); }
.path-card .path-illustration { position:absolute; right:18px; top:20px; font-size:5.7rem; opacity:.22; transform:rotate(8deg); }

/* mission cards */
.mission-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
.home-mission-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
.mission-card {
  position:relative; min-width:0; display:flex; flex-direction:column; padding:19px; border:1px solid var(--line); border-radius:24px; background:var(--surface);
  box-shadow:0 6px 0 color-mix(in srgb,var(--line) 78%,transparent),var(--shadow-sm); transition:.18s ease;
}
.mission-card:hover { transform:translateY(-6px); border-color:color-mix(in srgb,var(--primary) 44%,var(--line)); box-shadow:0 10px 0 color-mix(in srgb,var(--primary) 17%,var(--line)),var(--shadow); }
.mission-card.featured-mission::before { content:"★"; position:absolute; right:-6px; top:-8px; width:31px; height:31px; display:grid; place-items:center; border-radius:11px; background:var(--yellow); color:#4b3600; border:2px solid var(--surface); transform:rotate(11deg); z-index:2; }
.mission-card-top { display:flex; justify-content:space-between; align-items:start; gap:12px; }
.mission-icon { width:54px; height:54px; display:grid; place-items:center; border-radius:18px; background:linear-gradient(145deg,rgba(109,74,255,.13),rgba(255,92,168,.09)); border:1px solid rgba(109,74,255,.18); font-size:1.65rem; }
.route-save-button { width:40px; height:40px; border:1px solid var(--line); border-radius:14px; background:var(--surface-2); color:var(--muted); cursor:pointer; font-size:1.15rem; transition:.16s ease; }
.route-save-button:hover { transform:scale(1.08) rotate(5deg); color:var(--primary); }
.route-save-button.active { background:#fff6cc; color:#e2a900; border-color:#f4d46b; }
html[data-theme="dark"] .route-save-button.active { background:#4a3c16; }
.mission-badges { display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin-top:15px; }
.mission-country, .mission-mode { display:inline-flex; align-items:center; gap:5px; padding:5px 8px; border-radius:999px; background:var(--surface-3); color:var(--muted); font-size:.67rem; font-weight:850; }
.mission-mode { color:var(--aqua-dark); background:rgba(18,200,177,.10); }
.mission-mode::first-letter { color:var(--aqua); }
.mission-card h3 { margin:12px 0 8px; font-size:1.13rem; }
.mission-card > p { font-size:.86rem; margin-bottom:15px; flex:1; }
.mission-agency { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:9px; padding:10px; border:1px dashed var(--line-strong); border-radius:15px; background:var(--surface-2); }
.mission-agency > span:first-child { width:30px; height:30px; display:grid; place-items:center; border-radius:10px; background:var(--surface); }
.mission-agency p { margin:0; }
.mission-agency small, .mission-agency strong { display:block; line-height:1.15; }
.mission-agency small { color:var(--muted); font-size:.62rem; font-weight:750; }
.mission-agency strong { margin-top:2px; font-size:.77rem; }
.mission-agency b { width:23px; height:23px; display:grid; place-items:center; border-radius:50%; background:rgba(44,182,125,.15); color:var(--green); font-size:.72rem; }
.mission-card-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:13px; }
.compact-mission .mission-agency { display:none; }
.compact-mission { min-height:315px; }
.compact-mission .mission-card-actions { margin-top:auto; }

/* generic existing tool cards redesigned */
.tools-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
.tool-card { position:relative; min-width:0; border:1px solid var(--line); border-radius:24px; background:var(--surface); box-shadow:0 6px 0 color-mix(in srgb,var(--line) 82%,transparent),var(--shadow-sm); transition:.18s ease; overflow:visible; }
.tool-card:hover { transform:translateY(-6px) rotate(-.2deg); border-color:rgba(109,74,255,.35); box-shadow:0 10px 0 rgba(109,74,255,.13),var(--shadow); }
.tool-card-link { min-height:205px; padding:20px; display:grid; grid-template-columns:auto 1fr auto; align-items:start; gap:14px; }
.tool-card .tool-icon, .category-icon { width:52px; height:52px; display:grid; place-items:center; border-radius:18px; background:linear-gradient(145deg,rgba(109,74,255,.14),rgba(18,200,177,.12)); color:var(--primary); border:1px solid rgba(109,74,255,.15); font-weight:950; font-size:1.08rem; }
.tool-card-body { min-width:0; }
.tool-card-body small { color:var(--primary); font-size:.68rem; font-weight:900; text-transform:uppercase; letter-spacing:.06em; }
.tool-card h3 { margin:7px 0 7px; font-size:1.1rem; }
.tool-card p { margin:0; font-size:.84rem; }
.card-arrow { align-self:center; width:31px; height:31px; display:grid; place-items:center; border-radius:11px; background:var(--surface-3); color:var(--primary); }
.favorite-button { position:absolute; right:13px; top:13px; z-index:3; width:38px; height:38px; border:1px solid var(--line); border-radius:13px; background:var(--surface); color:var(--muted); cursor:pointer; font-size:1.05rem; box-shadow:0 3px 0 var(--line); }
.favorite-button.active { color:#e9aa00; background:#fff8d9; border-color:#f2d26e; }
html[data-theme="dark"] .favorite-button.active { background:#4b3d18; }
.favorite-button.large { position:static; width:46px; height:46px; flex:none; }
.category-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.category-card { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:17px; padding:20px; border:1px solid var(--line); border-radius:22px; background:var(--surface); box-shadow:0 5px 0 var(--line),var(--shadow-sm); transition:.18s ease; }
.category-card:hover { transform:translateX(6px); border-color:rgba(109,74,255,.4); }
.category-card > span:nth-child(2) { min-width:0; }
.category-card strong { display:block; }
.category-card small { color:var(--primary); font-size:.72rem; font-weight:850; }
.category-card p { margin:.4rem 0 0; font-size:.82rem; }
.category-card > span:last-child { color:var(--primary); font-size:1.35rem; }

/* Procedures explorer */
.quest-procedures-page main { padding-bottom:80px; }
.quest-procedures-hero { padding:45px 0 42px; }
.quest-procedures-hero .hero-panel { position:relative; overflow:hidden; padding:38px; border:1px solid rgba(255,255,255,.3); border-radius:36px; color:#fff; background:linear-gradient(125deg,#4d35cf,#7750ef 55%,#a56cff); box-shadow:0 10px 0 #3926a0,var(--shadow-lg); }
.quest-procedures-hero .hero-panel::before { content:""; position:absolute; width:400px; height:400px; right:-110px; top:-220px; border-radius:50%; background:rgba(255,255,255,.12); }
.quest-procedures-hero .hero-panel::after { content:"🧭"; position:absolute; right:42px; bottom:-28px; font-size:9rem; opacity:.16; transform:rotate(10deg); }
.quest-procedures-hero .breadcrumbs { color:rgba(255,255,255,.75); }
.quest-procedures-hero h1 { font-size:clamp(2.4rem,5vw,4.5rem); max-width:850px; margin:18px 0 12px; }
.quest-procedures-hero p { max-width:750px; color:rgba(255,255,255,.82); font-size:1.05rem; }
.hero-proof-row { display:flex; flex-wrap:wrap; gap:10px; margin-top:22px; }
.hero-proof-row span { padding:8px 11px; border:1px solid rgba(255,255,255,.24); border-radius:999px; background:rgba(255,255,255,.12); font-size:.76rem; font-weight:850; }
.explorer-shell { display:grid; grid-template-columns:290px minmax(0,1fr); gap:24px; align-items:start; }
.filter-stage { position:sticky; top:calc(var(--header-h) + 18px); padding:18px; border:1px solid var(--line); border-radius:26px; background:var(--surface); box-shadow:0 7px 0 var(--line),var(--shadow); }
.filter-stage h2 { font-size:1.18rem; }
.filter-stage > p { font-size:.83rem; margin:.5rem 0 18px; }
.filter-label { display:block; margin:17px 0 8px; color:var(--muted); font-size:.7rem; font-weight:900; text-transform:uppercase; letter-spacing:.08em; }
.world-pills, .category-quest-pills { display:grid; gap:7px; }
.world-pill, .category-quest-pill { width:100%; border:1px solid transparent; border-radius:15px; background:transparent; color:var(--ink); padding:8px 9px; display:grid; grid-template-columns:30px 1fr auto; align-items:center; gap:8px; text-align:left; cursor:pointer; transition:.16s ease; }
.world-pill:hover, .category-quest-pill:hover { background:var(--surface-3); }
.world-pill.active, .category-quest-pill.active { border-color:rgba(109,74,255,.28); background:rgba(109,74,255,.10); color:var(--primary); box-shadow:inset 4px 0 0 var(--primary); }
.world-pill > span, .category-quest-pill > span { font-size:1.15rem; text-align:center; }
.world-pill strong, .category-quest-pill strong { font-size:.79rem; }
.world-pill small, .category-quest-pill small { min-width:23px; height:23px; display:grid; place-items:center; border-radius:8px; background:var(--surface); color:var(--muted); font-size:.65rem; }
.category-quest-pills { max-height:350px; overflow:auto; padding-right:3px; }
.filter-reset { width:100%; margin-top:15px; min-height:40px; border:1px dashed var(--line-strong); border-radius:13px; background:var(--surface-2); color:var(--muted); cursor:pointer; font-weight:800; }
.explorer-main { min-width:0; }
.mission-search-box { position:sticky; top:calc(var(--header-h) + 18px); z-index:15; display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:11px; padding:10px 12px; border:2px solid var(--line-strong); border-radius:20px; background:color-mix(in srgb,var(--surface) 94%,transparent); box-shadow:var(--shadow); backdrop-filter:blur(14px); }
.mission-search-box:focus-within { border-color:var(--primary); }
.mission-search-box > span { width:42px; height:42px; display:grid; place-items:center; border-radius:13px; background:var(--surface-3); color:var(--primary); font-size:1.25rem; }
.mission-search-box input { border:0; outline:0; background:transparent; color:var(--ink); min-width:0; font-weight:760; }
.mission-search-box b { padding:7px 10px; border-radius:10px; background:rgba(18,200,177,.12); color:var(--aqua-dark); font-size:.69rem; }
.mission-results-head { display:flex; align-items:center; justify-content:space-between; gap:15px; margin:24px 0 16px; }
.mission-results-head h2 { font-size:1.35rem; }
.mission-results-head span { color:var(--muted); font-size:.79rem; font-weight:800; }
.procedure-mission-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
.empty-missions { padding:55px 20px; border:2px dashed var(--line-strong); border-radius:25px; text-align:center; background:var(--surface-2); }
.empty-missions span { display:block; font-size:3rem; }
.empty-missions h3 { margin:10px 0 7px; }

/* Drawers */
.quest-overlay { position:fixed; inset:0; z-index:300; }
.quest-drawer { position:absolute; right:0; top:0; bottom:0; width:min(100%,620px); overflow:auto; padding:24px; border-left:1px solid var(--line-strong); background:var(--surface); box-shadow:-25px 0 70px rgba(9,11,28,.22); animation:slide-in .24s ease both; }
.drawer-top { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; padding-bottom:20px; border-bottom:1px solid var(--line); }
.drawer-top h2 { font-size:clamp(1.8rem,4vw,2.7rem); margin:6px 0 8px; }
.drawer-top p { margin:0; }
.drawer-close { flex:none; width:43px; height:43px; border:1px solid var(--line); border-radius:15px; background:var(--surface-2); color:var(--ink); cursor:pointer; font-size:1.45rem; box-shadow:0 3px 0 var(--line); }
.drawer-title-stack { display:flex; gap:15px; min-width:0; }
.drawer-title-stack > div:last-child { min-width:0; }
.detail-icon { flex:none; width:65px; height:65px; display:grid; place-items:center; border-radius:21px; background:linear-gradient(145deg,rgba(109,74,255,.16),rgba(18,200,177,.15)); border:1px solid rgba(109,74,255,.18); font-size:2rem; }
.procedure-drawer-top .mission-badges { margin-top:0; }
.procedure-drawer-top h2 { font-size:clamp(1.7rem,4vw,2.5rem); }
.official-destination-card { display:flex; align-items:center; justify-content:space-between; gap:15px; margin:20px 0; padding:16px; border:1px solid rgba(44,182,125,.28); border-radius:19px; background:rgba(44,182,125,.09); }
.official-destination-card > div { display:flex; align-items:center; gap:11px; }
.official-destination-card > div > span { width:40px; height:40px; display:grid; place-items:center; border-radius:14px; background:var(--green); color:#fff; font-weight:900; box-shadow:0 4px 0 #168e5a; }
.official-destination-card p { margin:0; }
.official-destination-card small, .official-destination-card strong, .official-destination-card em { display:block; }
.official-destination-card small { color:var(--muted); font-size:.67rem; text-transform:uppercase; letter-spacing:.06em; font-weight:850; }
.official-destination-card strong { color:var(--ink); }
.official-destination-card em { color:var(--green); font-size:.7rem; font-style:normal; font-weight:800; }
.official-destination-card > b { font-size:2rem; }
.detail-section { margin-top:22px; }
.detail-section h3 { margin-bottom:12px; }
.detail-checklist { display:grid; gap:9px; }
.detail-checklist label { display:grid; grid-template-columns:auto 1fr; align-items:start; gap:11px; padding:12px; border:1px solid var(--line); border-radius:15px; background:var(--surface-2); cursor:pointer; }
.detail-checklist input { width:21px; height:21px; accent-color:var(--primary); }
.detail-checklist input:checked + span { text-decoration:line-through; color:var(--muted); }
.route-steps { list-style:none; margin:0; padding:0; display:grid; gap:10px; }
.route-steps li { display:grid; grid-template-columns:36px 1fr; align-items:start; gap:11px; }
.route-steps li > span { width:34px; height:34px; display:grid; place-items:center; border-radius:12px; background:var(--primary); color:#fff; font-weight:900; box-shadow:0 4px 0 #4d31ba; }
.route-steps p { margin:5px 0 0; }
.official-safety-note { display:flex; align-items:flex-start; gap:12px; margin-top:22px; padding:14px; border-radius:17px; background:#fff8d9; border:1px solid #efd06b; color:#4b3c08; }
html[data-theme="dark"] .official-safety-note { background:#3d3418; color:#fff0aa; border-color:#68571d; }
.official-safety-note > span { font-size:1.35rem; }
.official-safety-note p { margin:0; color:inherit; }
.official-safety-note strong, .official-safety-note small { display:block; }
.official-safety-note small { margin-top:3px; opacity:.78; }
.drawer-actions { display:grid; gap:10px; margin-top:23px; }
.drawer-actions .button { width:100%; }
.verified-date { text-align:center; font-size:.72rem; margin:17px 0 0; }

/* Route drawer */
.route-drawer { width:min(100%,660px); }
.route-content { padding-top:18px; }
.route-summary { padding:16px; border:1px solid var(--line); border-radius:18px; background:var(--surface-2); display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:14px; }
.route-summary > div:first-child strong, .route-summary > div:first-child span { display:block; }
.route-summary > div:first-child strong { font-size:1.3rem; color:var(--primary); }
.route-summary > div:first-child span { color:var(--muted); font-size:.68rem; }
.route-summary-bar { height:12px; border-radius:999px; background:var(--line); overflow:hidden; }
.route-summary-bar span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--aqua),var(--primary)); }
.route-summary button { border:0; background:transparent; color:var(--danger); font-size:.72rem; font-weight:850; cursor:pointer; }
.route-stack { display:grid; gap:13px; margin-top:15px; }
.route-item { display:grid; grid-template-columns:auto 1fr; gap:12px; padding:15px; border:1px solid var(--line); border-radius:19px; background:var(--surface); box-shadow:0 4px 0 var(--line); }
.route-item.completed { opacity:.72; background:var(--surface-2); }
.route-order { width:38px; height:38px; display:grid; place-items:center; border-radius:13px; background:var(--yellow); color:#3f3100; font-weight:950; box-shadow:0 4px 0 #d6a818; }
.route-item.completed .route-order { background:var(--green); color:#fff; box-shadow:0 4px 0 #188d5b; }
.route-item-main { min-width:0; }
.route-item-meta { display:flex; justify-content:space-between; gap:10px; color:var(--muted); font-size:.69rem; }
.route-item h3 { margin:6px 0 10px; }
.route-progress { display:grid; grid-template-columns:1fr auto; align-items:center; gap:8px; }
.route-progress > span { height:9px; border-radius:999px; background:var(--line); overflow:hidden; }
.route-progress b { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--aqua),var(--primary)); }
.route-progress small { color:var(--muted); font-weight:850; }
.route-item-actions { display:flex; flex-wrap:wrap; gap:7px; margin-top:11px; }
.route-item-actions button, .route-item-actions a { border:1px solid var(--line); border-radius:10px; background:var(--surface-2); color:var(--ink); padding:6px 9px; font-size:.69rem; font-weight:820; cursor:pointer; }
.route-item-actions a { color:var(--primary); }
.route-item-actions .danger-link { margin-left:auto; color:var(--danger); }
.empty-route { min-height:420px; display:grid; place-items:center; align-content:center; text-align:center; }
.empty-route > div { font-size:4.2rem; }
.empty-route h3 { margin:12px 0 18px; }

/* Existing heroes/pages */
.page-hero, .category-hero, .legal-hero, .tool-page-hero { padding:45px 0 34px; }
.page-hero .container, .category-hero .container, .legal-hero .container, .tool-page-hero .container { position:relative; }
.breadcrumbs { display:flex; align-items:center; flex-wrap:wrap; gap:7px; margin-bottom:20px; color:var(--muted); font-size:.76rem; font-weight:720; }
.breadcrumbs a:hover { color:var(--primary); }
.page-hero h1, .category-hero h1, .legal-hero h1 { margin:14px 0 12px; font-size:clamp(2.35rem,5vw,4.5rem); }
.page-hero p, .category-hero p, .legal-hero p { max-width:760px; font-size:1.05rem; }
.tool-page-hero { background:linear-gradient(180deg,rgba(109,74,255,.08),transparent); border-bottom:1px solid var(--line); }
.tool-title-row { display:grid; grid-template-columns:auto 1fr; align-items:start; gap:20px; }
.tool-title-row .hero-icon { width:76px; height:76px; display:grid; place-items:center; border-radius:25px; background:linear-gradient(145deg,var(--primary),#9f78ff); color:#fff; font-size:1.35rem; font-weight:950; border:2px solid rgba(255,255,255,.7); box-shadow:0 7px 0 #4d31ba,var(--shadow); transform:rotate(-3deg); }
.tool-title-row h1 { margin:11px 0 10px; font-size:clamp(2.1rem,4.7vw,4rem); }
.tool-title-row p { max-width:800px; font-size:1rem; }
.tool-meta { display:flex; flex-wrap:wrap; gap:8px; margin-top:15px; }
.tool-meta span { padding:7px 10px; border:1px solid var(--line); border-radius:999px; background:var(--surface); color:var(--muted); font-size:.72rem; font-weight:800; box-shadow:0 3px 0 var(--line); }

/* Tool pages and calculators */
.tool-section { padding-top:34px; }
.tool-layout { display:grid; grid-template-columns:minmax(0,1fr) 310px; gap:24px; align-items:start; }
.tool-main { min-width:0; display:grid; gap:20px; }
.calculator-card, .content-card, .sidebar-card, .faq-card, .legal-content, .contact-demo {
  border:1px solid var(--line); border-radius:25px; background:var(--surface); box-shadow:0 6px 0 var(--line),var(--shadow-sm);
}
.calculator-card { overflow:hidden; }
.calculator-card-head { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:20px 22px; border-bottom:1px solid var(--line); background:linear-gradient(135deg,rgba(109,74,255,.08),rgba(18,200,177,.06)); }
.calculator-card-head small { color:var(--primary); font-weight:900; letter-spacing:.09em; font-size:.65rem; }
.calculator-card-head h2 { margin-top:4px; font-size:1.42rem; }
.calculator-root { padding:22px; min-height:230px; }
.calculator-loading { min-height:180px; display:grid; place-items:center; color:var(--muted); }
.calc-form { display:grid; gap:18px; }
.form-grid { display:grid; gap:14px; }
.form-grid.two { grid-template-columns:repeat(2,minmax(0,1fr)); }
.form-grid.three { grid-template-columns:repeat(3,minmax(0,1fr)); }
label { min-width:0; }
.calc-form label, .assistant-form label, .contact-demo label { display:grid; gap:7px; }
.calc-form label > span, .assistant-form label > span, .contact-demo label > span { color:var(--ink); font-size:.78rem; font-weight:850; }
input, select, textarea {
  width:100%; min-height:48px; padding:11px 13px; border:1.5px solid var(--line-strong); border-radius:14px; outline:0; background:var(--surface-2); color:var(--ink); transition:.16s ease;
}
textarea { min-height:120px; resize:vertical; }
input:focus, select:focus, textarea:focus { border-color:var(--primary); background:var(--surface); box-shadow:0 0 0 4px rgba(109,74,255,.11); }
input[type="checkbox"], input[type="radio"] { width:auto; min-height:0; padding:0; }
.input-with-unit { display:grid; grid-template-columns:1fr auto; align-items:center; border:1.5px solid var(--line-strong); border-radius:14px; background:var(--surface-2); overflow:hidden; }
.input-with-unit input { border:0; border-radius:0; background:transparent; }
.input-with-unit span { padding:0 13px; color:var(--muted); font-weight:800; }
.calc-actions { display:flex; flex-wrap:wrap; gap:10px; }
.checkbox-row, .checkbox-label { display:flex!important; align-items:center; gap:9px!important; padding:10px 12px; border:1px solid var(--line); border-radius:13px; background:var(--surface-2); cursor:pointer; }
.checkbox-row input, .checkbox-label input { width:20px; height:20px; accent-color:var(--primary); }
.field-hint { color:var(--muted); font-size:.72rem; }
.calc-result { margin-top:18px; padding:20px; border:1px solid rgba(18,200,177,.28); border-radius:19px; background:linear-gradient(135deg,rgba(18,200,177,.11),rgba(109,74,255,.08)); }
.calc-result:empty { display:none; }
.result-label, .result-subtitle { color:var(--muted); font-size:.75rem; font-weight:800; }
.result-primary { display:block; margin:4px 0; color:var(--primary); font-size:clamp(2rem,6vw,3.5rem); line-height:1; letter-spacing:-.05em; }
.result-message { margin:.4rem 0 0; color:var(--ink); }
.result-stat { display:inline-grid; gap:2px; min-width:140px; margin:10px 8px 0 0; padding:12px; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
.calc-error, .error-message { padding:12px; border:1px solid rgba(223,59,97,.35); border-radius:13px; background:rgba(223,59,97,.08); color:var(--danger); font-weight:750; }
.content-card { padding:25px; }
.content-card h2 { margin-bottom:13px; font-size:1.55rem; }
.content-card h3 { margin:22px 0 9px; }
.content-card p:last-child { margin-bottom:0; }
.formula-box { margin:18px 0; padding:16px; border-left:5px solid var(--primary); border-radius:0 17px 17px 0; background:var(--surface-3); }
.formula-box span, .formula-box strong { display:block; }
.formula-box span { color:var(--primary); font-size:.7rem; font-weight:900; text-transform:uppercase; letter-spacing:.06em; }
.formula-box strong { margin-top:5px; }
.check-list { list-style:none; padding:0; margin:12px 0 0; display:grid; gap:8px; }
.check-list li { position:relative; padding-left:29px; color:var(--muted); }
.check-list li::before { content:"✓"; position:absolute; left:0; top:0; width:20px; height:20px; display:grid; place-items:center; border-radius:7px; background:rgba(44,182,125,.14); color:var(--green); font-size:.73rem; font-weight:900; }
.faq-card details { border-top:1px solid var(--line); }
.faq-card details:first-of-type { margin-top:15px; }
.faq-card summary { list-style:none; display:flex; align-items:center; justify-content:space-between; gap:15px; padding:16px 0; cursor:pointer; font-weight:850; }
.faq-card summary::-webkit-details-marker { display:none; }
.faq-card summary span { width:29px; height:29px; display:grid; place-items:center; border-radius:10px; background:var(--surface-3); color:var(--primary); }
.faq-card details[open] summary span { transform:rotate(45deg); }
.faq-card details p { padding:0 0 16px; margin:0; }
.tool-sidebar { position:sticky; top:calc(var(--header-h) + 18px); display:grid; gap:16px; }
.sidebar-card { padding:18px; }
.sidebar-card h2 { font-size:1.12rem; margin-bottom:11px; }
.sidebar-card > a:not(.button) { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:9px; padding:9px; border-radius:13px; }
.sidebar-card > a:not(.button):hover { background:var(--surface-3); }
.mini-icon { width:34px; height:34px; display:grid; place-items:center; border-radius:11px; background:var(--surface-3); color:var(--primary); font-weight:850; }
.official-card { background:linear-gradient(145deg,rgba(109,74,255,.12),rgba(18,200,177,.1)); }
.official-card p { font-size:.84rem; }
.ad-placeholder { min-height:170px; display:grid; place-items:center; align-content:center; text-align:center; padding:18px; border:2px dashed var(--line-strong); border-radius:22px; background:var(--surface-2); color:var(--muted); }
.ad-placeholder span { font-weight:850; }
.ad-placeholder small { max-width:230px; margin-top:5px; }
.health-notice, .notice, .warning, .live-notice { padding:14px; border-radius:15px; background:#fff8d9; border:1px solid #efd06b; color:#4b3c08; }
html[data-theme="dark"] .health-notice, html[data-theme="dark"] .notice, html[data-theme="dark"] .warning, html[data-theme="dark"] .live-notice { background:#3d3418; color:#fff0aa; border-color:#68571d; }

/* Password generator */
.password-generator-form { display:grid; gap:18px; }
.password-display { padding:17px; border:1px solid rgba(109,74,255,.28); border-radius:19px; background:linear-gradient(145deg,rgba(109,74,255,.09),rgba(18,200,177,.08)); }
.password-display-head { display:flex; justify-content:space-between; gap:12px; color:var(--muted); font-size:.72rem; font-weight:850; }
.password-value-row { display:grid; grid-template-columns:1fr auto; align-items:center; gap:10px; margin-top:9px; }
.output-textarea { min-height:76px; font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-size:1.08rem; font-weight:800; word-break:break-all; resize:none; }
.password-copy-button { width:48px; height:48px; border:0; border-radius:15px; background:var(--primary); color:#fff; cursor:pointer; font-size:1.1rem; box-shadow:0 5px 0 #4d31ba; }
.password-settings-grid { display:grid; grid-template-columns:180px 1fr; gap:16px; }
.password-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.password-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
.password-stats > div { padding:11px; border:1px solid var(--line); border-radius:14px; background:var(--surface-2); }
.password-stats span, .password-stats strong { display:block; }
.password-stats span { color:var(--muted); font-size:.67rem; }
.password-strength-track { height:10px; margin-top:8px; background:var(--line); border-radius:999px; overflow:hidden; }
.password-strength-track > span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--danger),var(--yellow),var(--green)); }
.password-privacy-note { display:flex; align-items:flex-start; gap:8px; padding:11px; border-radius:13px; background:rgba(44,182,125,.1); color:var(--green); font-size:.75rem; }
.range-row { display:grid; grid-template-columns:1fr auto; align-items:center; gap:10px; }
.range-row input[type="range"] { padding:0; border:0; background:transparent; accent-color:var(--primary); }
.range-value { min-width:44px; padding:7px; border-radius:10px; background:var(--surface-3); text-align:center; font-weight:850; }

/* Catalog / old procedures / legal */
.tool-controls, .directory-controls { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:20px; }
.catalog-search { flex:1; display:grid; grid-template-columns:auto 1fr; align-items:center; gap:9px; padding:0 12px; border:1.5px solid var(--line-strong); border-radius:16px; background:var(--surface); }
.catalog-search input { border:0; background:transparent; }
.filter-row { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:22px; }
.filter-chip { border:1px solid var(--line); border-radius:999px; background:var(--surface); color:var(--muted); padding:8px 12px; cursor:pointer; font-size:.76rem; font-weight:800; }
.filter-chip.active { background:var(--primary); color:#fff; border-color:var(--primary); box-shadow:0 4px 0 #4d31ba; }
.catalog-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
.empty-state { text-align:center; padding:35px; color:var(--muted); }
.legal-content { padding:30px; }
.legal-content h2 { margin:28px 0 10px; font-size:1.5rem; }
.legal-content h2:first-child { margin-top:0; }
.legal-content ul { color:var(--muted); }
.last-updated { display:inline-flex; padding:7px 10px; border-radius:10px; background:var(--surface-3); color:var(--muted); font-size:.74rem; }
.contact-demo { padding:25px; }
.error-page { min-height:100vh; display:grid; place-items:center; text-align:center; padding:25px; }
.error-page .brand-mark { margin:auto; }

/* Legacy old home components kept styled */
.home-hero { padding:65px 0; }
.hero-grid { display:grid; grid-template-columns:1.1fr .9fr; gap:40px; align-items:center; }
.hero-copy h1 { margin:16px 0; }
.hero-copy > p { font-size:1.08rem; }
.hero-search { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:10px; margin-top:22px; padding:8px; border:1.5px solid var(--line-strong); border-radius:19px; background:var(--surface); box-shadow:var(--shadow); position:relative; }
.hero-search input { border:0; background:transparent; }
.hero-search button { min-height:44px; border:0; border-radius:13px; padding:0 16px; background:var(--primary); color:#fff; font-weight:850; }
.hero-search-results { position:absolute; z-index:20; left:0; right:0; top:calc(100% + 8px); padding:8px; background:var(--surface); border:1px solid var(--line); border-radius:18px; box-shadow:var(--shadow); }
.trust-row { display:flex; flex-wrap:wrap; gap:12px; margin-top:18px; color:var(--muted); font-size:.78rem; font-weight:800; }
.hero-dashboard, .official-banner, .procedure-assistant, .safety-panel { border:1px solid var(--line); border-radius:28px; background:var(--surface); box-shadow:0 7px 0 var(--line),var(--shadow); padding:24px; }
.dashboard-browser-bar, .dashboard-top, .dashboard-calc, .dashboard-grid, .dashboard-privacy { margin-bottom:12px; }
.dashboard-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
.dashboard-grid a { padding:12px; border-radius:14px; background:var(--surface-3); }
.dashboard-grid span, .dashboard-grid strong, .dashboard-grid small { display:block; }
.official-banner { display:flex; align-items:center; justify-content:space-between; gap:24px; background:linear-gradient(135deg,rgba(109,74,255,.12),rgba(18,200,177,.12)); }
.country-stack { display:flex; flex-wrap:wrap; justify-content:end; gap:8px; }
.country-stack span { width:47px; height:47px; display:grid; place-items:center; border-radius:15px; background:var(--surface); border:1px solid var(--line); box-shadow:0 4px 0 var(--line); }
.value-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.value-grid article { padding:21px; border:1px solid rgba(255,255,255,.15); border-radius:22px; background:rgba(255,255,255,.07); }
.value-grid article > span { color:var(--yellow); font-weight:900; }
.value-grid h3 { margin:10px 0 7px; color:#fff; }
.value-grid p { color:rgba(255,255,255,.7); }

/* Footer */
.site-footer { margin-top:60px; padding:52px 0 18px; background:#11132a; color:#fff; border-top:1px solid rgba(255,255,255,.08); }
.footer-grid { display:grid; grid-template-columns:1.4fr repeat(3,1fr); gap:30px; }
.footer-grid p { color:rgba(255,255,255,.58); max-width:330px; }
.footer-grid h2 { margin-bottom:12px; font-size:.78rem; color:rgba(255,255,255,.55); text-transform:uppercase; letter-spacing:.1em; }
.footer-grid > div:not(:first-child) { display:grid; align-content:start; gap:9px; }
.footer-grid a, .footer-link { width:max-content; border:0; padding:0; background:transparent; color:rgba(255,255,255,.76); cursor:pointer; font-size:.84rem; }
.footer-grid a:hover, .footer-link:hover { color:#fff; }
.footer-brand .brand-copy small { color:rgba(255,255,255,.5); }
.footer-bottom { display:flex; justify-content:space-between; gap:20px; margin-top:38px; padding-top:18px; border-top:1px solid rgba(255,255,255,.1); color:rgba(255,255,255,.48); font-size:.72rem; }

/* Toast / dialogs */
.toast { position:fixed; z-index:500; left:50%; bottom:26px; transform:translate(-50%,30px); opacity:0; pointer-events:none; padding:12px 17px; border-radius:14px; background:var(--ink); color:var(--surface); box-shadow:var(--shadow-lg); font-weight:800; transition:.22s ease; }
.toast.show { opacity:1; transform:translate(-50%,0); }
.privacy-dialog { position:fixed; inset:0; z-index:400; display:grid; place-items:center; padding:20px; background:rgba(9,11,28,.58); backdrop-filter:blur(8px); }
.privacy-dialog-card { width:min(100%,520px); padding:27px; border:1px solid var(--line); border-radius:26px; background:var(--surface); box-shadow:var(--shadow-lg); text-align:center; }
.dialog-orb { font-size:3rem; }
.privacy-dialog-card h2 { margin:10px 0; }

/* Mobile dock */
.mobile-game-dock { display:none; }

/* animation */
@keyframes pop-in { from { opacity:0; transform:translateY(-10px) scale(.98); } to { opacity:1; transform:none; } }
@keyframes slide-in { from { transform:translateX(100%); } to { transform:none; } }
@keyframes pulse { 50% { transform:scale(.78); opacity:.65; } }
@keyframes float { 50% { transform:translateY(-13px) rotate(4deg); } }
@keyframes blob { 0%,100% { border-radius:44% 56% 58% 42%; transform:rotate(0); } 50% { border-radius:58% 42% 40% 60%; transform:rotate(8deg); } }
@keyframes blink { 0%,46%,50%,100% { transform:scaleY(1); } 48% { transform:scaleY(.08); } }

/* responsive */
@media (max-width: 1080px) {
  .desktop-nav { display:none; }
  .header-actions { margin-left:auto; }
  .menu-toggle { display:inline-flex; }
  .quest-hero-grid { grid-template-columns:1fr minmax(300px,.65fr); gap:24px; }
  .home-mission-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .procedure-mission-grid, .tools-grid, .catalog-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tool-layout { grid-template-columns:minmax(0,1fr) 280px; }
  .explorer-shell { grid-template-columns:245px minmax(0,1fr); }
}

@media (max-width: 820px) {
  :root { --header-h: 68px; }
  body { padding-bottom:78px; }
  .container, .narrow { width:min(calc(100% - 24px),var(--max)); }
  .section, .quest-section { padding:52px 0; }
  .header-inner { min-height:var(--header-h); gap:12px; }
  .brand-mark { width:39px; height:39px; border-radius:13px; }
  .brand-copy small { display:none; }
  .search-button-label { display:none; }
  .language-pill { padding:0 10px; }
  .menu-toggle { display:none; }
  .mobile-menu { display:none!important; }
  .quest-hero { padding-top:18px; }
  .quest-hero-grid, .hero-grid { grid-template-columns:1fr; }
  .quest-hero-copy { text-align:center; }
  .quest-hero-copy > p { margin-inline:auto; }
  .hero-badge { margin-inline:auto; }
  .search-hints, .hero-stat-row { justify-content:center; }
  .guide-zone { min-height:400px; }
  .quick-path-grid { grid-template-columns:1fr; }
  .path-card { min-height:230px; }
  .quest-section-head, .section-heading { align-items:flex-start; flex-direction:column; }
  .mission-grid, .procedure-mission-grid, .tools-grid, .catalog-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tool-layout { grid-template-columns:1fr; }
  .tool-sidebar { position:static; }
  .explorer-shell { grid-template-columns:1fr; }
  .filter-stage { position:static; }
  .world-pills { display:flex; overflow:auto; padding-bottom:7px; scroll-snap-type:x mandatory; }
  .world-pill { min-width:142px; scroll-snap-align:start; }
  .category-quest-pills { display:flex; max-height:none; overflow:auto; padding-bottom:7px; }
  .category-quest-pill { min-width:190px; }
  .mission-search-box { top:calc(var(--header-h) + 8px); }
  .tool-title-row { grid-template-columns:1fr; }
  .tool-title-row .hero-icon { width:64px; height:64px; }
  .footer-grid { grid-template-columns:repeat(2,1fr); }
  .mobile-game-dock {
    position:fixed; z-index:150; left:10px; right:10px; bottom:10px; height:64px; display:grid; grid-template-columns:repeat(4,1fr); align-items:center;
    padding:6px; border:1px solid var(--line-strong); border-radius:21px; background:color-mix(in srgb,var(--surface) 92%,transparent); box-shadow:var(--shadow-lg); backdrop-filter:blur(18px);
  }
  .mobile-game-dock a { position:relative; height:52px; display:grid; place-items:center; align-content:center; gap:1px; border-radius:16px; color:var(--muted); }
  .mobile-game-dock a.active { background:rgba(109,74,255,.12); color:var(--primary); }
  .mobile-game-dock a > span { font-size:1.16rem; line-height:1; }
  .mobile-game-dock small { font-size:.58rem; font-weight:850; }
  .mobile-game-dock b { position:absolute; right:9px; top:4px; min-width:18px; height:18px; display:grid; place-items:center; border-radius:7px; background:var(--pink); color:#fff; font-size:.55rem; }
  .toast { bottom:88px; }
  .quest-drawer { width:100%; padding:18px 15px 92px; }
}

@media (max-width: 600px) {
  h1 { font-size:clamp(2.1rem,11vw,3.35rem); }
  h2 { font-size:clamp(1.65rem,8vw,2.35rem); }
  .site-header .theme-toggle { display:none; }
  .quest-search { grid-template-columns:auto 1fr; border-radius:20px; }
  .quest-search .button { grid-column:1/-1; width:100%; }
  .quest-search > span { width:42px; height:42px; }
  .guide-zone { min-height:380px; }
  .guide-card { padding:18px; }
  .floating-token { width:48px; height:48px; border-radius:16px; font-size:1.25rem; }
  .quick-path-grid { gap:15px; }
  .path-card { min-height:245px; padding:23px; grid-template-columns:1fr; }
  .path-card .path-arrow { width:55px; height:55px; border-radius:18px; }
  .home-mission-grid, .mission-grid, .procedure-mission-grid, .tools-grid, .catalog-grid, .category-grid { grid-template-columns:1fr; }
  .mission-card, .tool-card { border-radius:21px; }
  .compact-mission { min-height:auto; }
  .tool-card-link { min-height:180px; }
  .mission-card-actions { grid-template-columns:1fr; }
  .quest-procedures-hero .hero-panel { padding:25px 20px; border-radius:27px; }
  .quest-procedures-hero .hero-panel::after { font-size:6rem; right:10px; }
  .mission-search-box { grid-template-columns:auto 1fr; }
  .mission-search-box b { display:none; }
  .filter-stage { padding:14px; border-radius:21px; }
  .form-grid.two, .form-grid.three { grid-template-columns:1fr; }
  .password-settings-grid { grid-template-columns:1fr; }
  .password-options, .password-stats { grid-template-columns:1fr; }
  .calculator-root, .content-card { padding:18px; }
  .tool-page-hero { padding-top:28px; }
  .tool-title-row h1 { font-size:2.25rem; }
  .footer-grid { grid-template-columns:1fr; }
  .footer-bottom { flex-direction:column; }
  .official-banner { align-items:flex-start; flex-direction:column; }
  .country-stack { justify-content:flex-start; }
  .value-grid { grid-template-columns:1fr; }
  .search-dialog { margin:12px auto; max-height:calc(100vh - 24px); border-radius:22px; }
  .search-result-item { grid-template-columns:42px 1fr auto; }
  .search-result-item small { max-width:210px; }
  .drawer-title-stack { flex-direction:column; }
  .drawer-top h2 { font-size:1.9rem; }
  .route-summary { grid-template-columns:1fr; }
  .route-item { grid-template-columns:1fr; }
  .route-order { width:34px; height:34px; }
  .route-item-actions .danger-link { margin-left:0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration:.01ms!important; animation-iteration-count:1!important; scroll-behavior:auto!important; transition-duration:.01ms!important; }
}

/* Header XP HUD injected by app.js */
.header-xp-pill {
  position:relative; min-width:118px; height:47px; display:grid; grid-template-columns:auto 1fr; align-items:center; gap:8px;
  padding:5px 24px 8px 8px; border:1px solid var(--line); border-radius:16px; background:var(--surface); color:var(--ink); cursor:pointer;
  box-shadow:0 4px 0 var(--line); overflow:hidden;
}
.header-xp-icon { width:31px; height:31px; display:grid; place-items:center; border-radius:10px; background:rgba(109,74,255,.12); }
.header-xp-copy { display:grid; text-align:left; line-height:1.03; }
.header-xp-copy small { color:var(--muted); font-size:.56rem; font-weight:800; text-transform:uppercase; }
.header-xp-copy strong { font-size:.72rem; }
.header-xp-pill > i { position:absolute; left:0; right:0; bottom:0; height:4px; background:var(--line); }
.header-xp-pill > i::after { content:""; display:block; width:var(--xp,0%); height:100%; background:linear-gradient(90deg,var(--aqua),var(--primary),var(--pink)); transition:width .4s ease; }
.header-xp-pill > em { position:absolute; right:5px; top:5px; min-width:17px; height:17px; display:grid; place-items:center; border-radius:6px; background:var(--pink); color:#fff; font-size:.52rem; font-style:normal; font-weight:900; }
.header-xp-pill:hover { transform:translateY(-2px); box-shadow:0 6px 0 var(--line); }
@media (max-width: 600px) { .header-xp-pill { min-width:45px; width:45px; padding:5px; grid-template-columns:1fr; } .header-xp-copy { display:none; } .header-xp-icon { width:33px; height:33px; } }

/* progressive mission loading */
.mission-load-more-wrap { display:flex; justify-content:center; padding:28px 0 4px; }
.mission-load-more-wrap[hidden] { display:none !important; }
.mission-load-more { min-width:min(100%,310px); }

/* Utilia Quest V3 final mobile flow and hero contrast */
.quest-procedures-hero .hero-badge {
  color:#fff;
  background:rgba(255,255,255,.14);
  border-color:rgba(255,255,255,.26);
}
.quest-procedures-hero .hero-badge i { box-shadow:0 0 0 5px rgba(18,200,177,.22); }

@media (max-width: 820px) {
  .explorer-shell { display:flex; flex-direction:column; }
  .explorer-main { display:contents; }
  .mission-search-box { order:1; width:100%; }
  .filter-stage { order:2; width:100%; }
  .mission-results-head { order:3; width:100%; }
  .procedure-mission-grid { order:4; width:100%; }
  .mission-load-more-wrap { order:5; width:100%; }
  .empty-missions { order:6; width:100%; }
}

/* Password mission interface polish */
.password-display { padding:20px; }
.password-value-row code {
  min-width:0;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:color-mix(in srgb,var(--surface) 80%,transparent);
  color:var(--ink);
  font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
  font-size:clamp(.92rem,1.35vw,1.08rem);
  font-weight:780;
  line-height:1.45;
  overflow-wrap:anywhere;
}
.password-copy-button {
  width:auto;
  min-width:112px;
  padding:0 17px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-size:.82rem;
  font-weight:900;
}
.password-length-field {
  align-content:start;
  padding:15px;
  border:1px solid var(--line);
  border-radius:18px;
  background:var(--surface-2);
}
.password-options {
  min-width:0;
  margin:0;
  padding:12px 14px 14px;
  border:1px solid var(--line);
  border-radius:18px;
  background:var(--surface-2);
}
.password-options legend {
  padding:0 7px;
  color:var(--ink);
  font-size:.78rem;
  font-weight:900;
}
.password-option-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(145px,1fr));
  gap:9px;
}
.password-option-grid .checkbox-label {
  min-height:48px;
  margin:0;
  padding:10px 12px;
  border-color:var(--line-strong);
  background:var(--surface);
}
.password-option-grid .checkbox-label:hover {
  border-color:var(--primary);
  transform:translateY(-1px);
}
.password-generator-form .calc-actions .button.primary { min-width:190px; }

@media (max-width: 600px) {
  .password-value-row { grid-template-columns:1fr; }
  .password-copy-button { width:100%; }
  .password-option-grid { grid-template-columns:1fr; }
}

/* ======================================================================
   UTILIA V4 — GAME DASHBOARD
   Dark, fast, structured interface inspired by modern mission hubs.
   ====================================================================== */

html[data-theme="dark"] {
  --bg: #020714;
  --bg-2: #030b1c;
  --surface: #071329;
  --surface-2: #091a35;
  --surface-3: #0d2142;
  --ink: #f7f9ff;
  --muted: #a4b2ca;
  --line: #17345b;
  --line-strong: #245187;
  --primary: #9d52ff;
  --primary-2: #7038ff;
  --primary-dark: #c79cff;
  --aqua: #23e7d1;
  --aqua-dark: #6ff9ea;
  --yellow: #ffc832;
  --pink: #ff5fa8;
  --orange: #ff8a2c;
  --blue: #2ea9ff;
  --green: #33d98a;
  --danger: #ff6783;
  --shadow-sm: 0 10px 28px rgba(0, 0, 0, .22);
  --shadow: 0 20px 60px rgba(0, 0, 0, .38);
  --shadow-lg: 0 36px 110px rgba(0, 0, 0, .55);
  --header-h: 76px;
  --max: 1520px;
}

html[data-theme="light"] {
  --bg: #edf3ff;
  --bg-2: #e7efff;
  --surface: #ffffff;
  --surface-2: #f4f7ff;
  --surface-3: #e9efff;
  --ink: #101a32;
  --muted: #5f6d89;
  --line: #cedaf0;
  --line-strong: #aebfde;
  --primary: #7439e8;
  --primary-2: #5f2bd3;
  --primary-dark: #4b1eb1;
  --aqua: #00a997;
  --aqua-dark: #047a70;
  --yellow: #da9f00;
  --pink: #e93f8d;
  --orange: #e96c12;
  --blue: #0879d8;
  --green: #168d56;
}

body {
  background:
    radial-gradient(circle at 50% -20%, rgba(72, 59, 255, .18), transparent 38rem),
    radial-gradient(circle at 100% 20%, rgba(0, 195, 255, .08), transparent 34rem),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  font-family: Inter, Manrope, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

html[data-theme="dark"] body::before {
  opacity: .23;
  background-image:
    linear-gradient(rgba(74, 127, 198, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 127, 198, .06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, #000, transparent 82%);
}

body::-webkit-scrollbar,
*::-webkit-scrollbar { width: 10px; height: 10px; }
body::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb { background: #244876; border: 2px solid transparent; background-clip: padding-box; border-radius: 999px; }
body::-webkit-scrollbar-track,
*::-webkit-scrollbar-track { background: transparent; }

.header-wide,
.dashboard-wide { width: min(calc(100% - 24px), 1600px); margin-inline: auto; }

/* Header V4 */
.site-header.v4-header,
.site-header {
  min-height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 93%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  box-shadow: 0 12px 36px rgba(0,0,0,.13);
  backdrop-filter: blur(18px) saturate(145%);
}
.header-inner { min-height: var(--header-h); gap: 22px; }
.v4-brand,
.site-header .brand { min-width: 285px; gap: 12px; }
.site-header .brand-mark {
  width: 46px; height: 46px; border-radius: 13px;
  background: linear-gradient(145deg, #bd6eff 0%, #7b38ff 52%, #3948eb 100%);
  border: 1px solid rgba(255,255,255,.44);
  box-shadow: 0 0 0 4px rgba(129,70,255,.08), 0 10px 28px rgba(82,38,218,.35);
  transform: none;
  font-size: 0;
  position: relative;
}
.site-header .brand-mark::before {
  content: "U"; color: #fff; font-size: 1.25rem; line-height: 1; font-weight: 950;
  position: absolute; inset: 0; display: grid; place-items: center;
  text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 3px;
}
.site-header .brand-mark::after { content: none; }
.site-header .brand-copy { display: flex; align-items: baseline; gap: 18px; }
.site-header .brand-copy strong { font-size: 1.82rem; color: var(--ink); letter-spacing: -.055em; }
.site-header .brand-copy small {
  max-width: 160px; color: var(--muted); font-size: .76rem; font-weight: 650; letter-spacing: 0; text-transform: none; white-space: nowrap;
}
.desktop-nav.v4-nav,
.desktop-nav {
  margin-left: auto; padding: 0; gap: 30px; border: 0; border-radius: 0; background: transparent; box-shadow: none;
}
.desktop-nav a {
  position: relative; padding: 26px 0 23px; border-radius: 0; color: color-mix(in srgb,var(--muted) 88%,transparent);
  font-size: .79rem; font-weight: 850; letter-spacing: .01em;
}
.desktop-nav a:hover { color: var(--ink); background: transparent; transform: none; }
.desktop-nav a.active::after,
.desktop-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 50%; bottom: 12px; width: 46px; height: 3px; transform: translateX(-50%);
  border-radius: 99px; background: linear-gradient(90deg,#8748ff,#d45dff); box-shadow: 0 0 12px rgba(170,76,255,.72);
}
.v4-header-actions,
.header-actions { margin-left: auto; gap: 11px; }
.icon-button,
.language-pill {
  min-height: 42px; border-radius: 13px; border-color: var(--line); background: color-mix(in srgb,var(--surface) 82%,transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 7px 20px rgba(0,0,0,.13);
}
.icon-button:hover,
.language-pill:hover { transform: none; border-color: var(--line-strong); box-shadow: 0 0 0 3px rgba(95,158,255,.07); }
.v4-header-search,
.site-header .search-open {
  min-width: 205px; justify-content: flex-start; color: var(--muted); font-weight: 650; padding: 0 12px;
}
.v4-header-search .search-button-label,
.site-header .search-open .search-button-label { flex: 1; text-align: left; }
.v4-header-search kbd {
  padding: 2px 6px; border: 1px solid var(--line); border-radius: 7px; color: #70819f; font-size: .58rem; background: rgba(255,255,255,.02);
}
.header-xp-pill {
  position: relative; min-width: 115px; height: 48px; padding: 5px 12px 5px 41px; border: 1px solid var(--line); border-radius: 13px;
  background: color-mix(in srgb,var(--surface) 88%,transparent); color: var(--ink); cursor: pointer; text-align: left;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.header-xp-icon { position: absolute; left: 10px; top: 8px; font-size: 1.25rem; }
.header-xp-copy { display: grid; line-height: 1.1; }
.header-xp-copy small { color: #c982ff; font-size: .61rem; font-weight: 800; text-transform: uppercase; }
.header-xp-copy strong { margin-top: 3px; font-size: .74rem; }
.header-xp-pill > i { position: absolute; left: 10px; right: 10px; bottom: 4px; height: 2px; border-radius: 99px; background: linear-gradient(90deg,#a55aff var(--xp,0%),#203652 var(--xp,0%)); }
.header-xp-pill > em {
  position: absolute; right: -6px; top: -7px; min-width: 20px; height: 20px; display: grid; place-items: center; border-radius: 999px;
  background: #ffbf31; color: #071022; font-size: .62rem; font-weight: 900; font-style: normal; border: 2px solid var(--bg);
}

/* Search command palette */
.search-panel-backdrop { background: rgba(1,5,16,.76); }
.search-dialog {
  margin-top: 72px; border-radius: 22px; border-color: #28548a;
  background: linear-gradient(180deg,#08162e,#061126); box-shadow: 0 36px 120px rgba(0,0,0,.68), 0 0 0 1px rgba(90,152,255,.08);
}
.search-dialog::before { color: #bd76ff; }
.search-dialog-head input { color: #fff; }
.search-result-item:hover { background: #0c2445; }
.search-result-item .mini-icon { background: rgba(142,82,255,.18); color: #c998ff; }

/* Home dashboard */
.utilia-v4-home { min-height: 100vh; }
.v4-dashboard { padding: 14px 0 24px; }
.dashboard-grid {
  display: grid; grid-template-columns: 224px minmax(0,1fr) 440px; gap: 16px; align-items: start;
}
.dashboard-sidebar,
.dashboard-right { display: grid; gap: 12px; min-width: 0; }
.dashboard-main { display: grid; gap: 14px; min-width: 0; }
.side-panel,
.uli-panel,
.popular-panel,
.v4-hero-panel,
.v4-stat-strip,
.v4-paths-panel,
.v4-achievements {
  border: 1px solid var(--line-strong); border-radius: 18px;
  background: linear-gradient(180deg, rgba(7,20,43,.95), rgba(4,14,31,.96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025), 0 12px 38px rgba(0,0,0,.18);
}
.side-panel { padding: 17px 13px; }
.side-panel h2 { margin: 0 0 13px; color: #e7eeff; font-size: .72rem; letter-spacing: .045em; text-align: center; }
.progress-panel { padding: 17px 15px 15px; }
.level-ring {
  --xp: 0%; position: relative; width: 103px; height: 103px; margin: 0 auto 12px; border-radius: 50%;
  background: conic-gradient(#2ba8ff 0 var(--xp), #7044ff var(--xp) calc(var(--xp) + 5%), #152d51 calc(var(--xp) + 5%) 100%);
  box-shadow: 0 0 28px rgba(66,105,255,.28);
  display: grid; place-items: center;
}
.level-ring::before { content:""; position:absolute; inset: 9px; border-radius: 50%; background: linear-gradient(145deg,#0e2040,#07142c); border: 1px solid #31527c; }
.level-ring > div { position: relative; display: grid; place-items: center; line-height: 1; }
.level-ring strong { font-size: 2.05rem; }
.level-ring span { margin-top: 6px; color: #bec9df; font-size: .7rem; font-weight: 700; }
.side-xp > strong { display:block; margin-bottom: 8px; color:#eaf0ff; font-size: .78rem; text-align:center; }
.side-xp-track { height: 5px; border-radius: 99px; background:#142b4c; overflow:hidden; }
.side-xp-track i { display:block; width:var(--xp,0%); height:100%; border-radius:inherit; background:linear-gradient(90deg,#7551ff,#2ea8ff); box-shadow:0 0 10px rgba(84,127,255,.7); }
.side-xp small { display:flex; justify-content:space-between; margin-top:9px; color:#8fa0bc; font-size:.63rem; }
.side-xp small b { color:#aab7cf; }
.daily-missions-button {
  min-height: 44px; display: grid; grid-template-columns: 29px 1fr auto auto; align-items:center; gap:7px; padding: 0 12px;
  border: 1px solid #7c2cbd; border-radius: 13px; color: #ffca38; background: linear-gradient(90deg,rgba(91,21,140,.7),rgba(33,10,77,.84));
  cursor:pointer; box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.daily-missions-button span { font-size:1rem; }.daily-missions-button strong { font-size:.68rem; letter-spacing:.01em; }.daily-missions-button b { color:#cf9bff; font-size:.61rem; }.daily-missions-button i { color:#ffc52f; font-style:normal; font-size:1.1rem; }
.category-panel { padding-bottom: 11px; }
.category-panel h2 { text-align:left; padding:0 5px; color:#93a3c1; }
.category-panel nav { display:grid; gap:6px; }
.category-panel a {
  min-height: 41px; display:grid; grid-template-columns:35px 1fr auto; align-items:center; gap:7px; padding: 4px 8px;
  border:1px solid transparent; border-radius:10px; background:#0b1b35; transition:.17s ease;
}
.category-panel a:hover { border-color:#2c5b91; background:#0d2444; transform:translateX(2px); }
.cat-icon { width:28px; height:28px; display:grid; place-items:center; border-radius:8px; font-size:.82rem; border:1px solid rgba(255,255,255,.08); }
.cat-identity{background:#0d5c52;color:#7dfff0}.cat-travel{background:#5b1748;color:#ff8ec9}.cat-tax{background:#5f4c13;color:#ffe068}.cat-work{background:#5a3014;color:#ffb05e}.cat-health{background:#0b5261;color:#76eaff}.cat-driving{background:#064f87;color:#63c4ff}.cat-property{background:#422275;color:#c68cff}.cat-immigration{background:#1c5b48;color:#78f2bd}.cat-other{background:#273854;color:#b5c6df}
.category-panel a strong { font-size:.74rem; color:#eef3ff; }.category-panel a b { color:#5b7394; font-size:1rem; }
.ask-uli {
  min-height: 63px; display:grid; grid-template-columns:36px 1fr auto; align-items:center; gap:8px; padding:8px 10px;
  border:1px solid var(--line); border-radius:14px; color:var(--ink); background:linear-gradient(135deg,#0a1a35,#08142a); cursor:pointer; text-align:left;
}
.mini-uli { width:34px; height:34px; display:grid; place-items:center; border-radius:11px; background:linear-gradient(145deg,#b768ff,#5437e6); color:#fff; font-weight:900; }
.ask-uli small,.ask-uli strong { display:block; }.ask-uli small { color:#8fa0bd; font-size:.58rem; }.ask-uli strong { margin-top:3px; font-size:.72rem; }.ask-uli b { color:#7db9ff; }

.v4-hero-panel { position:relative; min-height:420px; overflow:hidden; }
.hero-space-art { position:absolute; inset:0; background:url('/herramientas/assets/img/v4/space-hero.svg') center/cover no-repeat; opacity:.95; }
.v4-hero-panel::after { content:""; position:absolute; inset:0; background:linear-gradient(90deg,rgba(2,11,31,.18),rgba(2,11,31,.24) 55%,rgba(2,11,31,.08)); pointer-events:none; }
.hero-content { position:relative; z-index:2; max-width:760px; padding:24px 28px 18px; }
.v4-eyebrow { display:inline-flex; align-items:center; gap:7px; padding:7px 11px; border:1px solid #394d9f; border-radius:999px; color:#d5a3ff; background:rgba(62,35,138,.42); font-size:.65rem; font-weight:900; letter-spacing:.02em; }
.v4-hero-panel h1 { margin:15px 0 13px; font-size:clamp(2.7rem,4.2vw,4.75rem); line-height:.96; color:#fff; letter-spacing:-.045em; text-shadow:0 3px 22px rgba(0,0,0,.28); }
.v4-hero-panel h1 span { color:transparent; background:linear-gradient(90deg,#1bc8ff,#c353ff 56%,#ff68a6); -webkit-background-clip:text; background-clip:text; }
.v4-hero-panel p { max-width:670px; margin-bottom:16px; color:#d5deed; font-size:.96rem; line-height:1.62; }
.v4-main-search {
  position:relative; display:grid; grid-template-columns:50px minmax(0,1fr) auto; align-items:center; min-height:62px; padding:6px;
  border:2px solid rgba(163,124,255,.72); border-radius:23px; background:#fff; box-shadow:0 0 0 5px rgba(112,67,255,.11),0 14px 38px rgba(0,0,0,.28),0 0 24px rgba(121,77,255,.28);
}
.v4-main-search .search-lens { width:42px; height:42px; display:grid; place-items:center; border-radius:50%; color:#6f38e2; background:#f2f1ff; font-size:1.35rem; }
.v4-main-search input { min-height:46px; border:0; box-shadow:none; background:transparent; color:#273351; font-size:.9rem; font-weight:650; }
.v4-main-search input::placeholder { color:#8f9ab8; }
.v4-main-search input:focus { border:0; box-shadow:none; background:transparent; }
.v4-main-search > button {
  min-width:180px; height:50px; border:0; border-radius:14px; color:#fff; background:linear-gradient(135deg,#8448ff,#a039e8);
  font-size:.78rem; font-weight:900; cursor:pointer; box-shadow:0 8px 20px rgba(103,45,226,.37);
}
.v4-main-search > button i { margin-left:12px; font-size:1.2rem; font-style:normal; }
.v4-main-search .quest-search-results { top:calc(100% + 10px); border-color:#365c8e; background:#06152d; }
.v4-hints { display:flex; flex-wrap:wrap; gap:8px; margin-top:15px; }
.v4-hints button { min-height:32px; padding:0 11px; border:1px solid #234a7a; border-radius:999px; background:rgba(5,20,46,.84); color:#e8eefb; font-size:.65rem; font-weight:730; cursor:pointer; }
.v4-hints button:hover { border-color:#6c69d9; background:#102c53; }.v4-hints button span { margin-right:5px; }

.v4-stat-strip { min-height:92px; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); align-items:center; padding:12px 18px; }
.v4-stat-strip article { display:flex; align-items:center; gap:12px; min-width:0; padding:5px 12px; border-right:1px solid #17365d; }
.v4-stat-strip article:last-child { border-right:0; }
.stat-icon { width:43px; height:43px; flex:none; display:grid; place-items:center; border-radius:12px; font-size:1.15rem; font-weight:900; border:1px solid currentColor; }
.stat-icon.purple{color:#a974ff;background:rgba(92,49,203,.22)}.stat-icon.green{color:#4fe391;background:rgba(27,143,88,.18)}.stat-icon.blue{color:#59a8ff;background:rgba(33,92,191,.2)}.stat-icon.orange{color:#ff8e2f;background:rgba(159,68,11,.2)}
.v4-stat-strip strong,.v4-stat-strip small { display:block; }.v4-stat-strip strong { color:#f5f8ff; font-size:.98rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }.v4-stat-strip small { margin-top:3px; color:#99a9c2; font-size:.67rem; }

.v4-paths-panel { padding:17px; }
.panel-heading { display:flex; align-items:center; justify-content:space-between; gap:15px; margin-bottom:13px; }
.panel-heading > div { display:flex; align-items:center; gap:10px; }.panel-heading > div > span { font-size:1.35rem; }.panel-heading h2 { color:#7eb8ff; font-size:1.12rem; letter-spacing:.01em; }.panel-heading p { margin:3px 0 0; color:#c2ccdd; font-size:.69rem; }
.panel-heading > a { min-height:36px; display:inline-flex; align-items:center; gap:10px; padding:0 13px; border:1px solid #1e416d; border-radius:10px; color:#c27bff; background:#081b37; font-size:.67rem; font-weight:800; }
.v4-path-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.v4-path-card { position:relative; min-height:181px; overflow:hidden; border:1px solid; border-radius:15px; transition:.18s ease; }
.v4-path-card:hover { transform:translateY(-3px); filter:saturate(1.12); }
.path-purple { border-color:#6f2fd7; background:radial-gradient(circle at 80% 20%,rgba(141,73,255,.32),transparent 45%),linear-gradient(135deg,#29105f,#160738); }
.path-teal { border-color:#0a8f86; background:radial-gradient(circle at 85% 20%,rgba(0,223,197,.25),transparent 45%),linear-gradient(135deg,#063e3d,#032521); }
.path-copy { position:relative; z-index:2; width:62%; padding:16px; }
.path-square { width:38px; height:38px; display:grid; place-items:center; margin-bottom:8px; border-radius:10px; color:#fff; font-size:1.1rem; background:rgba(128,72,255,.75); border:1px solid rgba(255,255,255,.22); }
.path-teal .path-square { background:rgba(0,173,154,.72); }
.path-copy small { color:#dc7dff; font-size:.72rem; font-weight:900; }.path-teal .path-copy small{color:#35dfd1}.path-copy p { margin:7px 0 14px; color:#e0e6f2; font-size:.69rem; line-height:1.45; }.path-copy strong { display:inline-flex; align-items:center; gap:14px; padding:9px 13px; border-radius:10px; color:#fff; background:linear-gradient(135deg,#914dff,#732bea); font-size:.67rem; }.path-teal .path-copy strong{background:linear-gradient(135deg,#0eb8a6,#08796f)}
.v4-path-card img { position:absolute; right:-2px; bottom:-7px; width:52%; max-height:178px; object-fit:contain; }

.v4-achievements { min-height:73px; display:grid; grid-template-columns:230px repeat(4,minmax(135px,1fr)) 230px; align-items:center; overflow:hidden; }
.ach-title { display:flex; align-items:center; gap:10px; height:100%; padding:0 17px; color:#ffc82d; border-right:1px solid #16385f; background:linear-gradient(90deg,#0b1c38,#07152c); }.ach-title span{font-size:1.25rem}.ach-title strong{font-size:.72rem}
.v4-achievements article { min-width:0; display:flex; align-items:center; gap:9px; padding:8px 11px; opacity:.52; }.v4-achievements article.unlocked{opacity:1}.v4-achievements article > span{width:38px;height:38px;display:grid;place-items:center;flex:none;border-radius:50%;background:linear-gradient(145deg,#674e2b,#251d12);border:2px solid #b07b27;font-size:1rem}.v4-achievements article strong,.v4-achievements article small{display:block}.v4-achievements article strong{font-size:.66rem;color:#f0f4ff}.v4-achievements article small{margin-top:2px;color:#8797b1;font-size:.54rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ach-cta { height:100%; display:flex; align-items:center; justify-content:space-between; padding:0 13px; color:#fff; background:linear-gradient(110deg,#09417c,#07579d); border-left:1px solid #1c6fae; }.ach-cta strong,.ach-cta small{display:block}.ach-cta strong{font-size:.8rem}.ach-cta small{margin-top:3px;font-size:.56rem;color:#b5d8ff}.ach-cta > span{font-size:2rem}

/* Right rail */
.uli-panel { padding:11px 13px 14px; text-align:center; }
.uli-art { height:185px; overflow:hidden; border:1px solid #176098; border-radius:17px; background:radial-gradient(circle at 50% 35%,rgba(52,116,255,.25),transparent 55%),#06152d; }
.uli-art img { width:100%; height:100%; object-fit:cover; object-position:center 34%; }
.uli-panel > h2 { margin:10px 0 5px; font-size:1.5rem; color:#fff; }.uli-panel > p { max-width:340px; margin:0 auto 11px; color:#c2ccdc; font-size:.75rem; line-height:1.5; }
.right-xp { padding:10px 13px; border:1px solid #284b9a; border-radius:13px; background:linear-gradient(135deg,rgba(25,54,116,.38),rgba(43,23,90,.35)); text-align:left; }
.right-xp > div:first-child { display:flex; justify-content:space-between; gap:12px; color:#fff; font-size:.7rem; }.right-xp > div:first-child strong { color:#c279ff; }.right-xp > div:last-child { height:5px; margin-top:9px; border-radius:99px; background:#203553; overflow:hidden; }.right-xp i { display:block; width:var(--xp,0%); height:100%; border-radius:99px; background:linear-gradient(90deg,#b25aff,#4aa8ff); }
.trust-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; margin-top:10px; }
.trust-grid article { min-height:92px; display:grid; place-items:center; align-content:center; gap:4px; padding:7px 5px; border:1px solid #173c65; border-radius:12px; background:#071a34; }.trust-grid span{width:35px;height:35px;display:grid;place-items:center;border-radius:50%;font-size:1rem}.trust-purple{color:#a45eff;background:rgba(100,46,192,.25)}.trust-teal{color:#33e2d3;background:rgba(0,137,125,.23)}.trust-violet{color:#b46fff;background:rgba(104,39,165,.23)}.trust-grid strong{font-size:.68rem}.trust-grid small{color:#a3b0c5;font-size:.56rem;line-height:1.35}
.popular-panel { overflow:hidden; }
.popular-panel h2 { margin:0; padding:14px 16px 10px; color:#62c5ff; font-size:.69rem; letter-spacing:.03em; }
.popular-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; padding:0 13px 10px; }
.popular-grid a { min-height:95px; display:grid; place-items:center; align-content:center; gap:7px; border:1px solid; border-radius:12px; transition:.18s ease; }.popular-grid a:hover{transform:translateY(-3px)}.popular-grid span{width:44px;height:44px;display:grid;place-items:center;border-radius:12px;font-size:1.35rem;font-weight:900;border:1px solid currentColor}.popular-grid strong{font-size:.65rem;color:#f5f8ff;text-align:center}.pop-green{color:#46e878;border-color:#0c6c3f!important;background:linear-gradient(145deg,#0b4c31,#062a1e)}.pop-blue{color:#55b9ff;border-color:#095c94!important;background:linear-gradient(145deg,#0a3d67,#062640)}.pop-orange{color:#ff9d3e;border-color:#8e4c0f!important;background:linear-gradient(145deg,#522b0b,#2b1808)}.pop-purple{color:#a76cff;border-color:#67309b!important;background:linear-gradient(145deg,#381556,#220e39)}.pop-teal{color:#3ee8dc;border-color:#0d716b!important;background:linear-gradient(145deg,#0a4542,#062a29)}.pop-pink{color:#ff6ca5;border-color:#913052!important;background:linear-gradient(145deg,#55162f,#300c1d)}
.popular-all { min-height:43px; display:flex; align-items:center; justify-content:center; gap:15px; border-top:1px solid #173a63; color:#bf72ff; background:#081a35; font-size:.69rem; font-weight:800; }

/* Daily missions modal */
.daily-modal { position:fixed; inset:0; z-index:420; display:grid; place-items:center; padding:18px; background:rgba(0,4,14,.76); backdrop-filter:blur(12px); }
.daily-card { width:min(100%,520px); border:1px solid #4b3d9a; border-radius:22px; overflow:hidden; background:linear-gradient(180deg,#0b1c3b,#061128); box-shadow:0 35px 100px rgba(0,0,0,.65); }
.daily-card-head { display:flex; align-items:center; justify-content:space-between; padding:18px 20px; border-bottom:1px solid #223d67; background:linear-gradient(90deg,rgba(97,46,196,.25),rgba(4,28,57,.5)); }.daily-card-head h2{font-size:1.25rem}.daily-card-head button{width:36px;height:36px;border:1px solid #31517c;border-radius:10px;background:#0b1d38;color:#fff;cursor:pointer}
.daily-card-body { display:grid; gap:10px; padding:16px; }.daily-task{display:grid;grid-template-columns:44px 1fr auto;align-items:center;gap:11px;padding:12px;border:1px solid #1d3e69;border-radius:14px;background:#081a34}.daily-task.done{border-color:#157a60;background:rgba(8,71,55,.42)}.daily-task>span{width:40px;height:40px;display:grid;place-items:center;border-radius:11px;background:#142b53;font-size:1.25rem}.daily-task strong,.daily-task small{display:block}.daily-task strong{font-size:.82rem}.daily-task small{margin-top:3px;color:#91a2bd;font-size:.65rem}.daily-task b{color:#ffca38;font-size:.72rem}.daily-task.done b{color:#50e49a}

/* Footer V4 */
.v4-footer,
.site-footer { margin-top:24px; border-top:1px solid var(--line); background:#030a18; }
.v4-footer .brand-copy small,
.site-footer .brand-copy small { max-width:none; }

/* Catalog, category, procedure and individual tool pages */
body:not(.utilia-v4-home) main { position:relative; }
body:not(.utilia-v4-home) .container { width:min(calc(100% - 32px),1420px); }
.page-hero,.category-hero,.legal-hero,.tool-page-hero,.quest-procedures-hero { padding:28px 0 22px; }
.tool-page-hero { border-bottom:0; background:transparent; }
.tool-page-hero .container,
.page-hero .container,
.category-hero .container,
.quest-procedures-hero .hero-panel {
  border:1px solid var(--line-strong); border-radius:20px; background:radial-gradient(circle at 100% 0,rgba(121,55,255,.2),transparent 34%),linear-gradient(135deg,#081b3c,#051226 60%,#07152e); box-shadow:var(--shadow-sm);
}
.tool-page-hero .container,
.page-hero .container,
.category-hero .container { padding:24px; }
.tool-title-row .hero-icon { transform:none; border-radius:17px; box-shadow:0 0 28px rgba(110,67,255,.3); }
.tool-title-row h1 { font-size:clamp(2rem,4vw,3.45rem); }
.tool-meta span { border-color:#244b79; background:#0a1d3b; box-shadow:none; }
.tool-layout { grid-template-columns:minmax(0,1fr) 320px; }
.calculator-card,.content-card,.sidebar-card,.faq-card,.legal-content,.contact-demo { border-color:var(--line-strong); border-radius:18px; background:linear-gradient(180deg,#081a35,#061329); box-shadow:0 13px 38px rgba(0,0,0,.2); }
.calculator-card-head { background:linear-gradient(90deg,rgba(119,58,255,.18),rgba(16,174,159,.08)); }
.calculator-root { background:radial-gradient(circle at 100% 0,rgba(39,104,191,.08),transparent 22rem); }
input,select,textarea { border-color:#254a76; background:#07172e; }
input:focus,select:focus,textarea:focus { background:#091d39; box-shadow:0 0 0 4px rgba(112,75,255,.12); }
.checkbox-row,.checkbox-label { border-color:#254a76; background:#081a35; }
.calc-result { border-color:#167b72; background:linear-gradient(135deg,rgba(10,109,99,.23),rgba(93,52,188,.16)); }
.result-stat { border-color:#254a76; background:#07182f; }
.formula-box { background:#0b2040; }
.sidebar-card > a:not(.button):hover { background:#0c2445; }
.ad-placeholder { display:none!important; }
.tool-sidebar { top:calc(var(--header-h) + 14px); }
.site-footer { color:var(--ink); }
.section-soft { background:rgba(7,18,39,.6); }
.tools-grid { gap:14px; }
.tool-card { border-color:#1d416c; border-radius:17px; background:linear-gradient(180deg,#091c38,#06142a); box-shadow:0 10px 28px rgba(0,0,0,.18); overflow:hidden; }
.tool-card::before { content:""; position:absolute; inset:0 0 auto; height:2px; background:linear-gradient(90deg,#8850ff,#2ac5ff); opacity:.6; }
.tool-card:hover { transform:translateY(-4px); border-color:#3b6b9e; box-shadow:0 14px 38px rgba(0,0,0,.3),0 0 0 1px rgba(123,86,255,.12); }
.tool-card-link { min-height:180px; }
.tool-card .tool-icon,.category-icon { border-radius:14px; background:linear-gradient(145deg,rgba(119,72,255,.26),rgba(16,160,148,.16)); border-color:#335a87; }
.category-card { border-color:#1d416c; background:#081a35; box-shadow:none; }
.category-card:hover { transform:translateX(3px); }

/* Procedure explorer V4 */
.quest-procedures-hero .hero-panel { padding:30px; color:#fff; background:radial-gradient(circle at 90% 20%,rgba(127,58,255,.32),transparent 33%),url('/herramientas/assets/img/v4/space-hero.svg') center/cover no-repeat; border-color:#285a92; box-shadow:var(--shadow); }
.quest-procedures-hero .hero-panel::before,.quest-procedures-hero .hero-panel::after { display:none; }
.quest-procedures-hero h1 { font-size:clamp(2.3rem,4.6vw,4.1rem); }
.explorer-shell { grid-template-columns:250px minmax(0,1fr); }
.filter-stage { border-color:#1f4776; border-radius:18px; background:linear-gradient(180deg,#081b38,#06142a); box-shadow:0 14px 40px rgba(0,0,0,.22); }
.world-pill,.category-quest-pill { border-radius:10px; }
.world-pill:hover,.category-quest-pill:hover { background:#0c2548; }
.world-pill.active,.category-quest-pill.active { border-color:#5254b4; background:rgba(105,67,232,.17); }
.mission-search-box { border-color:#285586; border-radius:16px; background:rgba(6,20,42,.95); }
.mission-card { border-color:#1d4675; border-radius:17px; background:linear-gradient(180deg,#091d3a,#06152c); box-shadow:0 10px 30px rgba(0,0,0,.2); }
.mission-card:hover { border-color:#3a78b6; transform:translateY(-4px); }
.mission-agency { border-color:#29517e; background:#07182f; }
.route-save-button { background:#0a1d39; }
.procedure-mission-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }

/* Bottom mobile game dock */
.mobile-game-dock { border-top:1px solid #234a77; background:rgba(3,10,24,.96); box-shadow:0 -12px 40px rgba(0,0,0,.35); }
.mobile-game-dock a.active { color:#b26fff; }

/* Light theme tuning */
html[data-theme="light"] .side-panel,
html[data-theme="light"] .uli-panel,
html[data-theme="light"] .popular-panel,
html[data-theme="light"] .v4-stat-strip,
html[data-theme="light"] .v4-paths-panel,
html[data-theme="light"] .v4-achievements,
html[data-theme="light"] .tool-card,
html[data-theme="light"] .calculator-card,
html[data-theme="light"] .content-card,
html[data-theme="light"] .sidebar-card,
html[data-theme="light"] .faq-card { background:linear-gradient(180deg,#fff,#f5f8ff); color:var(--ink); }
html[data-theme="light"] .category-panel a,
html[data-theme="light"] .ask-uli,
html[data-theme="light"] .trust-grid article,
html[data-theme="light"] .right-xp { background:#edf3ff; }
html[data-theme="light"] .category-panel a strong,
html[data-theme="light"] .v4-stat-strip strong,
html[data-theme="light"] .panel-heading p,
html[data-theme="light"] .uli-panel > h2 { color:var(--ink); }
html[data-theme="light"] .v4-stat-strip small,
html[data-theme="light"] .uli-panel > p { color:var(--muted); }

/* Responsive */
@media (max-width: 1460px) {
  .dashboard-grid { grid-template-columns: 210px minmax(0,1fr) 365px; }
  .v4-brand,.site-header .brand { min-width:235px; }
  .site-header .brand-copy small { display:none; }
  .desktop-nav { gap:20px; }
  .v4-header-search,.site-header .search-open { min-width:170px; }
  .v4-achievements { grid-template-columns:190px repeat(4,minmax(120px,1fr)) 190px; }
}
@media (max-width: 1240px) {
  .dashboard-grid { grid-template-columns: 205px minmax(0,1fr); }
  .dashboard-right { display:none; }
  .v4-achievements { grid-template-columns:175px repeat(4,minmax(120px,1fr)); }
  .ach-cta { display:none; }
  .v4-brand,.site-header .brand { min-width:auto; }
  .desktop-nav { gap:16px; }
  .header-xp-pill { display:none; }
  .procedure-mission-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 980px) {
  .header-wide { width:min(calc(100% - 20px),1600px); }
  .desktop-nav { display:none; }
  .menu-toggle { display:inline-flex; }
  .site-header .brand-copy small { display:block; }
  .v4-header-search,.site-header .search-open { min-width:44px; width:44px; padding:0; justify-content:center; }
  .site-header .search-open .search-button-label,.v4-header-search kbd { display:none; }
  .dashboard-grid { grid-template-columns:1fr; }
  .dashboard-sidebar { display:none; }
  .v4-dashboard { padding-top:10px; }
  .v4-hero-panel { min-height:400px; }
  .v4-achievements { grid-template-columns:150px repeat(4,minmax(116px,1fr)); overflow:auto; }
  .explorer-shell { grid-template-columns:1fr; }
  .filter-stage { position:relative; top:auto; }
  .world-pills { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .category-quest-pills { grid-template-columns:repeat(4,minmax(0,1fr)); max-height:none; }
  .world-pill,.category-quest-pill { grid-template-columns:30px 1fr; }.world-pill small,.category-quest-pill small{display:none}
  .mission-search-box { top:calc(var(--header-h) + 8px); }
  .tool-layout { grid-template-columns:1fr; }.tool-sidebar{position:relative;top:auto;grid-template-columns:repeat(2,minmax(0,1fr))}.official-card{grid-column:span 2}
}
@media (max-width: 760px) {
  body { padding-bottom:72px; }
  .site-header .brand-copy strong { font-size:1.45rem; }
  .site-header .brand-copy small { display:none; }
  .site-header .brand-mark { width:40px;height:40px; }
  .language-pill { min-width:42px; padding:0 9px; font-size:.7rem; }
  .theme-toggle { display:none!important; }
  .dashboard-wide { width:min(calc(100% - 18px),1600px); }
  .v4-hero-panel { min-height:445px; border-radius:16px; }
  .hero-space-art { background-position:62% center; opacity:.62; }
  .v4-hero-panel::after { background:linear-gradient(180deg,rgba(2,10,28,.1),rgba(2,10,28,.75)); }
  .hero-content { padding:18px 16px; }
  .v4-eyebrow { font-size:.58rem; }
  .v4-hero-panel h1 { margin-top:13px; font-size:2.7rem; }
  .v4-hero-panel p { font-size:.82rem; }
  .v4-main-search { grid-template-columns:42px minmax(0,1fr); min-height:58px; border-radius:18px; }
  .v4-main-search > button { grid-column:1/-1; width:100%; min-width:0; height:44px; }
  .v4-hints { flex-wrap:nowrap; overflow-x:auto; padding-bottom:3px; scrollbar-width:none; }.v4-hints::-webkit-scrollbar{display:none}.v4-hints button{flex:none}
  .v4-stat-strip { grid-template-columns:repeat(2,1fr); padding:9px; }.v4-stat-strip article{min-height:67px;border-right:0;border-bottom:1px solid #17365d}.v4-stat-strip article:nth-last-child(-n+2){border-bottom:0}.stat-icon{width:38px;height:38px}.v4-stat-strip strong{font-size:.8rem}
  .panel-heading { align-items:flex-start; }.panel-heading > a{display:none}.v4-path-grid{grid-template-columns:1fr}.v4-path-card{min-height:165px}.path-copy{width:65%}
  .v4-achievements { grid-template-columns:145px repeat(4,165px); border-radius:15px; }.ach-title{position:sticky;left:0;z-index:2;background:#07162f}
  .procedure-mission-grid { grid-template-columns:1fr; }
  .world-pills,.category-quest-pills { display:flex; overflow:auto; padding-bottom:4px; }.world-pill,.category-quest-pill{flex:0 0 auto;width:auto;min-width:135px}
  .tool-sidebar { grid-template-columns:1fr; }.official-card{grid-column:auto}
  .tools-grid { grid-template-columns:1fr; }
  .tool-card-link { min-height:150px; }
  .tool-title-row { grid-template-columns:1fr; }.tool-title-row .hero-icon{width:58px;height:58px}
  .site-footer { display:none; }
}
@media (max-width: 420px) {
  .v4-hero-panel h1 { font-size:2.35rem; }
  .v4-stat-strip article { padding:4px 7px; gap:8px; }.stat-icon{width:34px;height:34px}.v4-stat-strip small{font-size:.58rem}
  .v4-path-card img { width:48%; opacity:.9; }.path-copy{width:70%;padding:13px}.path-copy p{font-size:.64rem}
}
.site-header .container.header-inner { width:min(calc(100% - 24px),1600px); }
/* V4 polish fixes */
.side-xp [data-xp-value],
.side-xp [data-next-xp],
.right-xp [data-xp-value],
.right-xp [data-next-xp] { display:inline!important; width:auto!important; }
.right-xp > div:first-child > b { display:inline-block!important; width:auto!important; white-space:nowrap; }
.side-xp > strong { white-space:nowrap; }
.uli-art img { object-fit:contain; object-position:center; transform:scale(1.08); }
.v4-achievements { grid-template-columns:170px repeat(4,minmax(0,1fr)); }
.v4-achievements .ach-cta { display:none; }
.v4-hints { justify-content:flex-start; }
@media (max-width:1460px){.v4-achievements{grid-template-columns:160px repeat(4,minmax(0,1fr));}}
@media (max-width:1240px){.v4-achievements{grid-template-columns:155px repeat(4,minmax(0,1fr));}}
@media (max-width:760px){.v4-achievements{grid-template-columns:145px repeat(4,165px);}}
