/* Ublora design system v7 — loaded after style.css (which keeps the tool-internals). No !important wars:
   new components use ub-* classes; legacy tool classes are refined with equal-or-higher specificity. */

:root {
  color-scheme: light;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #1e293b;
  --ink: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --accent: #4f46e5;
  --accent-dark: #4338ca;
  --accent-soft: #eef2ff;
  --brand-2: #7c3aed;
  --brand-3: #0ea5e9;
  --grad: linear-gradient(135deg, #4338ca 0%, #7c3aed 55%, #2563eb 100%);
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 6px 20px rgba(15, 23, 42, .06);
  --shadow-lg: 0 2px 4px rgba(15, 23, 42, .06), 0 18px 40px rgba(30, 41, 99, .14);
  --radius: 18px;
  --radius-sm: 12px;
  --header-h: 68px;
}
html { font-size: 16.5px; scroll-padding-top: calc(var(--header-h) + 12px); }
body { background: var(--bg); color: var(--text); font-feature-settings: "cv11", "ss01"; }
a { color: var(--accent-dark); }
a:hover { color: #312e81; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.ub-icon { width: 1.25em; height: 1.25em; flex: none; display: inline-block; vertical-align: middle; }
.ub-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ============ Header ============ */
.ub-header { position: sticky; top: 0; z-index: 60; background: rgba(255, 255, 255, .88); -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--border); }
.ub-bar { display: flex; align-items: center; gap: 14px; min-height: var(--header-h); max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.ub-header .logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.35rem; letter-spacing: -.04em; color: var(--ink); text-decoration: none; white-space: nowrap; flex: none; }
.ub-header .logo:hover { color: var(--ink); }
.ub-header .logo svg { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 6px 16px rgba(79, 70, 229, .28); }
.ub-nav { display: flex; align-items: center; gap: 4px; flex: 1; justify-content: flex-end; min-width: 0; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
/* Menu links: dark text on white by default, clear contrasting states on hover / focus / current category */
.nav-list a, .nav-dd > summary { display: inline-flex; align-items: center; gap: 6px; padding: 9px 13px; border-radius: 999px; font-weight: 600; font-size: .95rem; line-height: 1.2; color: #1e293b; background: transparent; text-decoration: none; cursor: pointer; border: 0; list-style: none; transition: background .15s, color .15s; }
.nav-dd > summary::-webkit-details-marker { display: none; }
.nav-list a:hover, .nav-dd > summary:hover, .nav-dd[open] > summary { background: #eef2ff; color: #3730a3; }
.nav-list a[aria-current="page"], .nav-list a[aria-current="true"], .nav-list a.is-active, .nav-dd > summary.is-active { background: #4f46e5; color: #ffffff; }
.nav-list a[aria-current="page"]:hover, .nav-list a[aria-current="true"]:hover, .nav-list a.is-active:hover, .nav-dd > summary.is-active:hover, .nav-dd[open] > summary.is-active { background: #4338ca; color: #ffffff; }
.nav-list a:focus-visible, .nav-dd > summary:focus-visible { outline: 3px solid #4f46e5; outline-offset: 2px; }
.nav-list a .ub-icon { width: 1.1em; height: 1.1em; opacity: .85; }
.nav-dd { position: relative; }
.nav-dd > summary .chev { width: .9em; height: .9em; transition: transform .15s; }
.nav-dd[open] > summary .chev { transform: rotate(180deg); }
.nav-dd-panel { position: absolute; top: calc(100% + 8px); inset-inline-start: 0; min-width: 250px; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 8px; box-shadow: var(--shadow-lg); display: grid; gap: 2px; }
.nav-dd-panel a { border-radius: 10px; width: 100%; justify-content: flex-start; padding: 10px 12px; }
.lang-switch { border: 1.5px solid #c7d2fe !important; color: #3730a3 !important; background: #fff; }
.lang-switch:hover { background: #eef2ff !important; border-color: #818cf8 !important; color: #312e81 !important; }
.ub-search-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 12px; border: 1.5px solid var(--border); border-radius: 999px; background: #fff; color: #334155; font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; transition: border-color .15s, box-shadow .15s, color .15s; }
.ub-search-btn:hover { border-color: #818cf8; color: #3730a3; box-shadow: 0 0 0 4px #eef2ff; }
.ub-search-btn kbd { font: inherit; font-size: .74rem; padding: 1px 6px; border: 1px solid var(--border); border-radius: 6px; background: #f1f5f9; color: #475569; }
.menu-btn { display: none; width: 44px; height: 44px; margin-inline-start: 4px; border: 1.5px solid var(--border); border-radius: 12px; background: #fff; color: #0f172a; cursor: pointer; place-items: center; font-size: 0; }
.menu-btn svg { width: 22px; height: 22px; }
.menu-btn[aria-expanded="true"] { background: #4f46e5; border-color: #4f46e5; color: #fff; }

@media (max-width: 960px) {
  :root { --header-h: 60px; }
  .ub-bar { padding: 0 14px; gap: 8px; }
  .menu-btn { display: inline-grid; }
  .ub-nav { flex: none; margin-inline-start: auto; }
  .ub-search-btn span, .ub-search-btn kbd { display: none; }
  .ub-search-btn { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .nav-list { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px; background: #fff; padding: 12px 14px 18px; border-bottom: 1px solid var(--border); box-shadow: 0 24px 40px rgba(15, 23, 42, .14); max-height: calc(100vh - var(--header-h)); max-height: calc(100dvh - var(--header-h)); overflow-y: auto; }
  .nav-list.open { display: flex; }
  .nav-list a, .nav-dd > summary { display: flex; border-radius: 12px; padding: 13px 14px; font-size: 1.02rem; width: 100%; }
  .nav-dd { width: 100%; }
  .nav-dd-panel { position: static; box-shadow: none; border: 0; padding: 2px 0 6px 12px; min-width: 0; }
  .nav-list .lang-switch { margin-top: 8px; justify-content: center; }
  .ub-menu-group { font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #64748b; padding: 10px 14px 4px; }
}
@media (min-width: 961px) { .ub-menu-group { display: none; } }

/* ============ Search dialog ============ */
.ub-dialog { border: 0; padding: 0; width: min(640px, calc(100vw - 24px)); max-height: min(560px, 82vh); border-radius: 20px; box-shadow: 0 30px 80px rgba(15, 23, 42, .35); background: #fff; color: var(--text); margin-top: 9vh; overflow: hidden; }
.ub-dialog::backdrop { background: rgba(15, 23, 42, .5); backdrop-filter: blur(3px); }
.ub-dialog form { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.ub-dialog form .ub-icon { color: #4f46e5; width: 22px; height: 22px; }
.ub-dialog input[type="search"] { flex: 1; border: 0; outline: none; font: inherit; font-size: 1.1rem; min-height: 40px; padding: 0; background: transparent; color: #0f172a; box-shadow: none; }
.ub-dialog input[type="search"]:focus { box-shadow: none; }
.ub-dialog .ub-close { border: 0; background: #f1f5f9; color: #334155; border-radius: 10px; width: 36px; height: 36px; cursor: pointer; display: grid; place-items: center; }
.ub-dialog .ub-close:hover { background: #e0e7ff; color: #3730a3; }
.ub-results { list-style: none; margin: 0; padding: 8px; overflow-y: auto; max-height: min(430px, 60vh); }
.ub-results a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: #0f172a; text-decoration: none; }
.ub-results a:hover, .ub-results a[aria-selected="true"] { background: #eef2ff; color: #312e81; }
.ub-results .t { font-weight: 700; display: block; line-height: 1.25; }
.ub-results .d { font-size: .85rem; color: #475569; display: block; line-height: 1.35; }
.ub-results .ub-tile { width: 36px; height: 36px; border-radius: 11px; }
.ub-dialog-foot { padding: 10px 16px; border-top: 1px solid var(--border); font-size: .8rem; color: #64748b; background: #f8fafc; }
.ub-dialog-empty { padding: 26px 18px; text-align: center; color: #475569; }

/* ============ Icon tiles (category-coloured) ============ */
.ub-tile { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; flex: none; color: var(--cat, var(--accent-dark)); background: var(--cat-soft, var(--accent-soft)); border: 1px solid color-mix(in srgb, var(--cat, #4f46e5) 18%, #fff); }
.ub-tile svg { width: 24px; height: 24px; }
body.cat-pdf, [data-cat="pdf"] { --cat: #be123c; --cat-soft: #fff1f2; }
body.cat-image, [data-cat="image"] { --cat: #047857; --cat-soft: #ecfdf5; }
body.cat-text, [data-cat="text"] { --cat: #1d4ed8; --cat-soft: #eff6ff; }
body.cat-finance, [data-cat="finance"] { --cat: #0f766e; --cat-soft: #f0fdfa; }
body.cat-math, [data-cat="math"] { --cat: #c2410c; --cat-soft: #fff7ed; }
body.cat-datetime, [data-cat="datetime"] { --cat: #0369a1; --cat-soft: #f0f9ff; }
body.cat-business, [data-cat="business"] { --cat: #a21caf; --cat-soft: #fdf4ff; }
body.cat-health, [data-cat="health"] { --cat: #4d7c0f; --cat-soft: #f7fee7; }
body.cat-everyday, [data-cat="everyday"] { --cat: #6d28d9; --cat-soft: #f5f3ff; }

/* ============ Home hero (cover) ============ */
.ub-hero { position: relative; overflow: hidden; background:
  radial-gradient(60% 80% at 8% 0%, rgba(99, 102, 241, .16), transparent 60%),
  radial-gradient(50% 70% at 100% 10%, rgba(14, 165, 233, .15), transparent 60%),
  radial-gradient(40% 60% at 70% 100%, rgba(236, 72, 153, .10), transparent 60%),
  linear-gradient(180deg, #ffffff, #f5f7ff); border-bottom: 1px solid var(--border); }
.ub-hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(79, 70, 229, .10) 1px, transparent 1.4px); background-size: 22px 22px; mask-image: linear-gradient(180deg, #000 0%, transparent 85%); -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%); pointer-events: none; }
.ub-hero-in { position: relative; max-width: 1240px; margin: 0 auto; padding: clamp(40px, 6vw, 84px) 20px clamp(36px, 5vw, 64px); display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.ub-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 999px; background: #fff; border: 1px solid #c7d2fe; color: #3730a3; font-weight: 700; font-size: .85rem; box-shadow: 0 4px 14px rgba(79, 70, 229, .10); }
.ub-badge i { width: 8px; height: 8px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 4px rgba(16, 185, 129, .18); margin-inline-start: 4px; }
.ub-hero h1 { font-size: clamp(2.3rem, 5.4vw, 4.1rem); line-height: 1.04; letter-spacing: -.055em; font-weight: 850; color: var(--ink); margin: 18px 0 16px; }
.ub-hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.ub-sub { font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: #334155; max-width: 620px; line-height: 1.7; margin: 0 0 24px; }
.ub-hero .search-box { position: relative; max-width: 620px; }
.ub-hero .search-box .ub-icon { position: absolute; inset-inline-start: 18px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; color: #4f46e5; pointer-events: none; }
.ub-hero .search-box input { width: 100%; min-height: 60px; padding: 0 20px 0 52px; border-radius: 18px; border: 1.5px solid #c7d2fe; background: #fff; font-size: 1.05rem; color: #0f172a; box-shadow: 0 14px 38px rgba(67, 56, 202, .14); }
[dir="rtl"] .ub-hero .search-box input { padding: 0 52px 0 20px; }
.ub-hero .search-box input:focus { border-color: #4f46e5; box-shadow: 0 0 0 4px rgba(79, 70, 229, .18), 0 14px 38px rgba(67, 56, 202, .14); }
.ub-hero .filters-label { margin: 22px 0 8px; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #475569; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-btn { font: inherit; font-weight: 650; font-size: .92rem; padding: 8px 15px; border-radius: 999px; border: 1.5px solid #cbd5e1; background: #fff; color: #1e293b; cursor: pointer; transition: background .15s, color .15s, border-color .15s; min-height: 38px; }
.filter-btn:hover { background: #eef2ff; border-color: #818cf8; color: #3730a3; }
.filter-btn[aria-pressed="true"] { background: #4f46e5; border-color: #4f46e5; color: #fff; }
.filter-btn[aria-pressed="true"]:hover { background: #4338ca; color: #fff; }
.ub-trust { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 22px 0 0; padding: 0; color: #334155; font-weight: 600; font-size: .93rem; }
.ub-trust li { display: inline-flex; align-items: center; gap: 7px; }
.ub-trust svg { width: 18px; height: 18px; color: #059669; }
/* decorative "tool deck" — pure illustration, hidden from assistive tech */
.ub-deck { position: relative; height: 380px; }
.ub-deck .c { position: absolute; background: #fff; border: 1px solid #e0e7ff; border-radius: 20px; box-shadow: 0 24px 50px rgba(49, 46, 129, .16); padding: 16px 18px; }
.ub-deck .c b { display: block; font-size: .95rem; color: #0f172a; letter-spacing: -.01em; }
.ub-deck .c small { color: #64748b; font-size: .8rem; }
.ub-deck .row { display: flex; align-items: center; gap: 12px; }
.ub-deck .c1 { inset-inline-start: 4%; top: 2%; width: 66%; transform: rotate(-3deg); }
.ub-deck .c2 { inset-inline-end: 0; top: 30%; width: 60%; transform: rotate(2.5deg); z-index: 2; }
.ub-deck .c3 { inset-inline-start: 10%; bottom: 0; width: 58%; transform: rotate(-1.5deg); z-index: 3; }
.ub-deck .bar { height: 9px; border-radius: 99px; background: #e0e7ff; overflow: hidden; margin-top: 12px; }
.ub-deck .bar i { display: block; height: 100%; width: 72%; border-radius: 99px; background: var(--grad); }
.ub-deck .big { font-size: 1.9rem; font-weight: 850; letter-spacing: -.04em; color: #3730a3; line-height: 1.1; margin-top: 8px; }
.ub-deck .qrmini { width: 54px; height: 54px; border-radius: 10px; background: #0f172a; color: #fff; display: grid; place-items: center; }
.ub-deck .qrmini svg { width: 34px; height: 34px; }
@media (max-width: 960px) { .ub-hero-in { grid-template-columns: 1fr; } .ub-deck { display: none; } }

/* ============ Sections ============ */
.ub-wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.ub-sec { padding: clamp(34px, 5vw, 60px) 0 0; }
.ub-sec-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.ub-sec-head h2 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); font-weight: 800; letter-spacing: -.04em; color: var(--ink); margin: 0; }
.ub-sec-head p { margin: 6px 0 0; color: var(--muted); max-width: 620px; }
.ub-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.ub-grid.pop { margin-top: 0; }
.ub-card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 18px; background: #fff; border: 1px solid var(--border); border-radius: 18px; color: var(--text); text-decoration: none; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; min-width: 0; }
.ub-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #a5b4fc; color: var(--text); }
.ub-card h3 { margin: 0; font-size: 1.04rem; font-weight: 750; letter-spacing: -.02em; color: var(--ink); line-height: 1.25; }
.ub-card p { margin: 0; font-size: .9rem; color: var(--muted); line-height: 1.5; }
.ub-card .go { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .88rem; color: var(--cat, #4338ca); }
.ub-card .go svg { width: 16px; height: 16px; transition: transform .15s; }
[dir="rtl"] .ub-card .go svg { transform: scaleX(-1); }
.ub-card:hover .go svg { transform: translateX(3px); }
[dir="rtl"] .ub-card:hover .go svg { transform: scaleX(-1) translateX(3px); }
.ub-card[hidden] { display: none; }
.ub-card .rk { position: absolute; top: 12px; inset-inline-end: 12px; font-size: .72rem; font-weight: 800; color: #4338ca; background: #eef2ff; border-radius: 99px; padding: 2px 9px; }
/* category tiles */
.ub-cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ub-cat { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: #fff; border: 1px solid var(--border); border-radius: 18px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s, border-color .18s; }
.ub-cat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--cat) 45%, #fff); color: var(--text); }
.ub-cat b { display: block; color: var(--ink); font-size: 1.04rem; letter-spacing: -.02em; }
.ub-cat small { color: var(--muted); font-size: .85rem; line-height: 1.4; display: block; }
.ub-cat .n { margin-inline-start: auto; font-size: .78rem; font-weight: 800; color: var(--cat); background: var(--cat-soft); border-radius: 99px; padding: 3px 10px; white-space: nowrap; }
/* all tools catalogue by category */
.cat-section { margin-top: 34px; }
.cat-section:first-child { margin-top: 0; }
.cat-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.cat-head h3, .cat-head h2 { margin: 0; font-size: 1.3rem; letter-spacing: -.03em; color: var(--ink); }
.cat-head .cat-blurb { margin: 2px 0 0; color: var(--muted); font-size: .93rem; }
.cat-head a.all { margin-inline-start: auto; font-weight: 700; font-size: .9rem; color: var(--cat); white-space: nowrap; }
.empty-state { text-align: center; color: var(--muted); padding: 44px 10px; background: #fff; border: 2px dashed var(--border); border-radius: var(--radius); margin-top: 28px; }
/* why / faq */
.ub-why { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ub-why div { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); }
.ub-why .ub-tile { margin-bottom: 14px; --cat: #4338ca; --cat-soft: #eef2ff; }
.ub-why h3 { margin: 0 0 6px; font-size: 1.1rem; color: var(--ink); letter-spacing: -.02em; }
.ub-why p { margin: 0; color: var(--muted); font-size: .95rem; }
.ub-faq { max-width: 860px; }
.ub-faq details { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 4px 18px; margin-bottom: 10px; box-shadow: var(--shadow); }
.ub-faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.ub-faq summary::-webkit-details-marker { display: none; }
.ub-faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: #4f46e5; font-weight: 500; }
.ub-faq details[open] summary::after { content: "–"; }
.ub-faq details p { margin: 0 0 16px; color: var(--muted); }
@media (max-width: 1080px) { .ub-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ub-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .ub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ub-card { padding: 14px; gap: 9px; border-radius: 16px; }
  .ub-card p { display: none; }
  .ub-grid.all .ub-card p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .ub-card .ub-tile { width: 40px; height: 40px; border-radius: 12px; }
  .ub-card h3 { font-size: .96rem; }
  .ub-card .go { display: none; }
  .ub-cats { grid-template-columns: 1fr; }
  .ub-why { grid-template-columns: 1fr; }
}
@media (max-width: 520px) { .ub-grid.all { grid-template-columns: 1fr; } .ub-grid.all .ub-card { flex-direction: row; align-items: center; } .ub-grid.all .ub-card p { -webkit-line-clamp: 1; } }

/* ============ Tool pages ============ */
.tool-hero { background: linear-gradient(180deg, var(--cat-soft, #eef2ff) 0%, rgba(248, 250, 252, 0) 100%); padding-bottom: 6px; border-bottom: 0; }
.tool-hero .container { max-width: 980px; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .88rem; color: #475569; padding: 18px 0 0; }
.breadcrumb a { color: #334155; text-decoration: none; font-weight: 600; padding: 2px 4px; border-radius: 6px; }
.breadcrumb a:hover { color: #3730a3; background: #eef2ff; }
.breadcrumb [aria-current] { color: #0f172a; font-weight: 700; }
.breadcrumb .sep { color: #94a3b8; }
.page-head { padding: 18px 0 10px; }
.page-head.has-icon { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; align-items: start; }
.page-head.has-icon .ub-tile { width: 64px; height: 64px; border-radius: 20px; grid-row: 1 / span 3; background: #fff; box-shadow: var(--shadow); }
.page-head.has-icon .ub-tile svg { width: 32px; height: 32px; }
.page-head h1 { font-size: clamp(1.8rem, 4.2vw, 2.7rem); font-weight: 850; letter-spacing: -.045em; color: var(--ink); margin: 0; }
.page-head p { color: #334155; font-size: 1.08rem; max-width: 760px; margin: 0; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; padding: 0; }
.chips li { background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 5px 14px; font-size: .86rem; font-weight: 650; color: #1e293b; }
.chips li::before { content: "\2713"; color: #059669; margin-inline-end: 7px; font-weight: 800; }
@media (max-width: 640px) { .page-head.has-icon { grid-template-columns: 1fr; } .page-head.has-icon .ub-tile { grid-row: auto; width: 52px; height: 52px; border-radius: 16px; } }
.page-grid { max-width: 940px; }
.tool-card { position: relative; background: #fff; border: 1px solid var(--border); border-top: 0; border-radius: 22px; box-shadow: var(--shadow-lg); padding: clamp(18px, 3vw, 30px); margin: 18px 0 28px; overflow: hidden; }
.tool-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: linear-gradient(90deg, var(--cat, #4f46e5), color-mix(in srgb, var(--cat, #4f46e5) 40%, #7c3aed)); }
.field > label, .field-label, legend { color: #1e293b; font-weight: 650; font-size: .9rem; }
textarea, input[type="text"], input[type="number"], input[type="date"], input[type="time"], select { border: 1.5px solid #cbd5e1; border-radius: 12px; background: #fff; color: #0f172a; min-height: 46px; }
textarea:hover, input:hover, select:hover { border-color: #94a3b8; }
textarea:focus, input:focus, select:focus { border-color: #4f46e5; box-shadow: 0 0 0 4px rgba(79, 70, 229, .16); }
.btn { border: 1.5px solid #cbd5e1; border-radius: 12px; min-height: 44px; font-weight: 650; color: #1e293b; background: #fff; }
.btn:hover { border-color: #818cf8; color: #3730a3; background: #eef2ff; }
.btn.primary { background: linear-gradient(135deg, #4f46e5, #6d28d9); border-color: #4f46e5; color: #fff; box-shadow: 0 8px 20px rgba(79, 70, 229, .28); }
.btn.primary:hover { background: linear-gradient(135deg, #4338ca, #5b21b6); border-color: #4338ca; color: #fff; box-shadow: 0 10px 26px rgba(79, 70, 229, .36); }
.calc-actions { margin-top: 10px; }
.calc-msg { background: #f1f5f9; color: #334155; border-radius: 12px; padding: 12px 16px; }
.calc-out { margin-top: 18px; }
.calc-result, .stat { background: linear-gradient(180deg, #f5f7ff, #eef2ff); border: 1px solid #c7d2fe; border-radius: 14px; }
.calc-result { color: #312e81; }
.stat .num { color: #3730a3; }
.result-box { border-color: #a7f3d0; border-left-color: #10b981; background: #f0fdf9; border-radius: 14px; }
.dropzone { border-color: #a5b4fc; background: linear-gradient(180deg, #fbfbff, #f1f3ff); border-radius: 18px; }
.dropzone:hover, .dropzone.dragover { border-color: #4f46e5; background: #eef2ff; box-shadow: 0 0 0 4px rgba(79, 70, 229, .12); }
.file-item { border-radius: 14px; }
.content { border-radius: 20px; padding: clamp(20px, 3vw, 32px); box-shadow: var(--shadow); }
.content h2 { letter-spacing: -.03em; color: var(--ink); }
.content details { border-top: 1px solid var(--border); }
.content summary { color: #0f172a; }
.content summary:hover, .content details[open] > summary { color: #3730a3; }
.related { margin-bottom: 34px; }
.related h2 { font-size: 1.4rem; letter-spacing: -.03em; color: var(--ink); }
.related .ub-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .related .ub-grid { grid-template-columns: 1fr; } .related .ub-card { flex-direction: row; align-items: center; } .related .ub-card p { display: block; } }
.ub-popbar { margin: 0 0 40px; }
.ub-popbar h2 { font-size: 1.15rem; margin: 0 0 12px; color: var(--ink); }
.ub-chiprow { display: flex; flex-wrap: wrap; gap: 8px; }
.ub-chiprow a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: 999px; background: #fff; border: 1.5px solid var(--border); color: #1e293b; text-decoration: none; font-weight: 650; font-size: .9rem; }
.ub-chiprow a:hover { background: #eef2ff; border-color: #818cf8; color: #3730a3; }
.ub-chiprow svg { width: 18px; height: 18px; color: var(--cat); }

/* ============ Category hub pages ============ */
.ub-hub-hero { background: linear-gradient(180deg, var(--cat-soft) 0%, rgba(248, 250, 252, 0) 100%); }
.ub-hub-hero .ub-wrap { padding-bottom: 8px; }
.ub-hub-intro { max-width: 820px; color: #334155; font-size: 1.05rem; }
.ub-hub-intro p { margin: 0 0 12px; }
.ub-hub-list { margin: 14px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 22px; max-width: 820px; }
.ub-hub-list li { display: flex; gap: 10px; align-items: baseline; color: #334155; }
.ub-hub-list li::before { content: "\2713"; color: #059669; font-weight: 800; }
@media (max-width: 640px) { .ub-hub-list { grid-template-columns: 1fr; } }

/* ============ Footer ============ */
.ub-footer { margin-top: clamp(48px, 7vw, 90px); background: #0f172a; color: #cbd5e1; padding: 52px 0 26px; }
.ub-footer .ub-wrap { display: block; }
.ub-foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 34px 28px; }
.ub-foot-brand .logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 1.3rem; letter-spacing: -.04em; text-decoration: none; }
.ub-foot-brand .logo svg { width: 34px; height: 34px; border-radius: 10px; }
.ub-foot-brand p { margin: 14px 0 0; max-width: 340px; font-size: .93rem; color: #94a3b8; }
.ub-footer h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .09em; color: #fff; margin: 0 0 12px; }
.ub-footer ul { list-style: none; margin: 0; padding: 0; }
.ub-footer li { margin-bottom: 7px; }
.ub-footer a { color: #cbd5e1; text-decoration: none; font-size: .93rem; }
.ub-footer a:hover { color: #fff; text-decoration: underline; }
.ub-footer a:focus-visible { outline-color: #a5b4fc; }
.ub-foot-bottom { border-top: 1px solid #1e293b; margin-top: 34px; padding-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; color: #94a3b8; font-size: .88rem; }
@media (max-width: 900px) { .ub-foot-grid { grid-template-columns: 1fr 1fr; } .ub-foot-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .ub-foot-grid { grid-template-columns: 1fr; } }

/* ============ Small screens: compact forms, no horizontal overflow ============ */
@media (max-width: 640px) {
  .container, .ub-wrap { padding-inline: 14px; }
  .tool-card { border-radius: 18px; padding: 16px; margin: 12px 0 22px; }
  input[type="text"], input[type="number"], input[type="date"], input[type="time"], select, textarea { font-size: 16px; }
  .calc-grid { grid-template-columns: 1fr 1fr; gap: 0 10px; }
  .calc-grid .field.wide { grid-column: 1 / -1; }
  .btn-group .btn { flex: 1 1 auto; }
  .table-wrap, .content table { overflow-x: auto; display: block; }
  .stats.stats-6 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 380px) { .calc-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto; transition: none !important; animation: none !important; } }

/* hero combobox dropdown */
.ub-pop { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 30; background: #fff; border: 1px solid #c7d2fe; border-radius: 18px; box-shadow: 0 24px 60px rgba(30, 27, 75, .22); max-height: 420px; }
.ub-pop[hidden], .ub-results[hidden] { display: none; }
.ub-dlg-top input { flex: 1; border: 0; outline: none; font: inherit; font-size: 1.1rem; min-height: 40px; padding: 0; background: transparent; color: #0f172a; box-shadow: none; min-width: 0; }
.ub-dlg-top input:focus { box-shadow: none; }
.ub-dlg-top .ub-icon { color: #4f46e5; width: 22px; height: 22px; flex: none; }
.ub-dlg-top .ub-close { border: 0; background: #f1f5f9; color: #334155; border-radius: 10px; width: 36px; height: 36px; cursor: pointer; display: grid; place-items: center; flex: none; }
.ub-dlg-top .ub-close svg { width: 18px; height: 18px; }
.ub-dlg-top .ub-close:hover { background: #e0e7ff; color: #3730a3; }
.menu-btn svg, .ub-search-btn svg { stroke: currentColor; }
.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
