/* kolvantage.com: the public website. */
:root {
  --bg: #ffffff; --bg-alt: #f6f7fb; --text: #101828; --text-2: #475467; --muted: #667085; --border: #e4e7ec;
  --card: #ffffff; --accent: #4f46e5; --accent-2: #7c73f0; --accent-soft: #eef0ff; --on-accent: #ffffff;
  --good: #12b76a; --warn: #f79009; --bad: #f04438; --shadow: 0 24px 48px -20px rgba(16, 24, 40, .25);
  --radius: 16px; --wrap: 1160px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0b1020; --bg-alt: #111831; --text: #f2f4f7; --text-2: #c3c9d6; --muted: #98a2b3; --border: #243052; --card: #141d38; --accent: #8b85ff; --accent-2: #a39dff; --accent-soft: #1d2550; --on-accent: #0b1020; --shadow: 0 24px 48px -20px rgba(0, 0, 0, .6); }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Inter, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 750; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 32px); }
.center { text-align: center; }
.small { font-size: .9rem; } .muted { color: var(--muted); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-weight: 650; font-size: .95rem; cursor: pointer; text-decoration: none !important; transition: transform .15s, box-shadow .15s, filter .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -10px rgba(16, 24, 40, .35); }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; color: var(--on-accent); }
.btn-lg { padding: 14px 24px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.badge { display: inline-block; vertical-align: middle; font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 3px 8px; border-radius: 999px; }

/* capacity bar + header */
.capacity { background: var(--text); color: var(--bg); text-align: center; font-size: .88rem; padding: 8px 16px; }
.capacity a { color: inherit; font-weight: 700; text-decoration: underline; }
.top { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid var(--border); }
.top-in { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--text); letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav > a:not(.btn), .drop > summary { color: var(--text-2); font-weight: 600; font-size: .95rem; padding: 8px 12px; border-radius: 10px; cursor: pointer; }
.nav > a:not(.btn):hover, .drop > summary:hover { background: var(--bg-alt); text-decoration: none; color: var(--text); }
.drop { position: relative; }
.drop > summary { list-style: none; }
.drop > summary::-webkit-details-marker { display: none; }
.drop > summary::after { content: ' ▾'; font-size: .8em; }
.drop-panel { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: min(620px, 92vw); display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 10px; background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.drop-panel a { display: grid; padding: 10px 12px; border-radius: 10px; color: var(--text); }
.drop-panel a:hover { background: var(--bg-alt); text-decoration: none; }
.drop-panel a span { font-size: .85rem; color: var(--muted); }
.drop-panel .drop-all { grid-column: 1 / -1; font-weight: 700; color: var(--accent); }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--border); border-radius: 10px; font-size: 1.2rem; padding: 6px 12px; color: var(--text); }
@media (max-width: 900px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 12px 16px 20px; background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); max-height: calc(100vh - 64px); overflow: auto; }
  .nav.open { display: flex; }
  .drop-panel { position: static; transform: none; width: 100%; grid-template-columns: 1fr; box-shadow: none; margin-top: 4px; }
}

/* hero */
.hero { padding: 72px 0 56px; background: radial-gradient(1200px 500px at 80% -10%, var(--accent-soft), transparent 70%); }
.hero-sm { padding: 56px 0 40px; }
.hero-in { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero .lead, .lead { font-size: 1.18rem; color: var(--text-2); max-width: 40em; }
.center .lead { margin-inline: auto; }
.eyebrow { font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; margin-bottom: 12px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 12px; }
.hero-note { font-size: .9rem; color: var(--muted); }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
@media (max-width: 900px) { .hero-in { grid-template-columns: 1fr; gap: 32px; } .hero { padding: 48px 0 40px; } }

.strip { border-block: 1px solid var(--border); background: var(--bg-alt); }
.strip-in { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 22px 0; text-align: center; }
.strip strong { display: block; font-size: 1.35rem; }
.strip span { color: var(--muted); font-size: .9rem; }
@media (max-width: 700px) { .strip-in { grid-template-columns: repeat(2, 1fr); } }

/* sections */
.section { padding: 80px 0; }
.section.alt { background: var(--bg-alt); }
.pt0 { padding-top: 0; }
.section-head { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.section-head p { color: var(--text-2); font-size: 1.08rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.rev > :first-child { order: 0; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 32px; } .section { padding: 56px 0; } }
.checks { list-style: none; padding: 0; margin: 0 0 1.2em; display: grid; gap: 8px; }
.checks li { padding-left: 28px; position: relative; }
.checks li::before { content: ''; position: absolute; left: 0; top: .35em; width: 18px; height: 18px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%234f46e5' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }

/* tool cards */
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 1000px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .tool-grid { grid-template-columns: 1fr; } }
.tool-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; color: var(--text); transition: transform .2s, box-shadow .2s; }
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.tool-card h3 { margin-top: 14px; }
.tool-card p { color: var(--text-2); font-size: .95rem; flex: 1; }
.tool-card .more { font-weight: 700; color: var(--accent); font-size: .92rem; }
.tool-illus { height: 190px; overflow: hidden; border-radius: 12px; pointer-events: none; }
.tool-illus .mock { transform: scale(.82); transform-origin: top left; width: 122%; }
.tool-illus .push-stack { transform: scale(.85); transform-origin: top left; width: 118%; }

.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { counter-increment: s; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; display: grid; gap: 6px; }
.steps li::before { content: counter(s); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-weight: 800; }
.steps span { color: var(--text-2); }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }

.prose h2 { margin-top: 1.6em; font-size: 1.55rem; }
.prose p, .prose li { color: var(--text-2); font-size: 1.05rem; }
.inline-illus { margin: 28px 0; }
.mini-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.mini-grid a { display: grid; gap: 4px; padding: 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); color: var(--text); }
.mini-grid a span { color: var(--muted); font-size: .88rem; }
.mini-grid a:hover { border-color: var(--accent); text-decoration: none; }
@media (max-width: 900px) { .mini-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .mini-grid { grid-template-columns: 1fr; } }

/* FAQ + CTA */
.faq { padding: 72px 0; }
.faq details { border-bottom: 1px solid var(--border); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq details div { color: var(--text-2); margin-top: 10px; }
.cta { padding: 24px 0 88px; }
.cta-in { text-align: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-radius: 24px; padding: 56px 24px; }
.cta-in h2 { color: #fff; } .cta-in p { color: rgba(255, 255, 255, .88); max-width: 40em; margin-inline: auto; }
.cta-in .btn-primary { background: #fff; color: #3b33c7; }
.cta-note { font-size: .88rem; margin-top: 14px; }

/* pricing */
.billing { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); margin-top: 12px; }
.billing button { font: inherit; font-weight: 650; border: 0; background: none; color: var(--text-2); padding: 8px 16px; border-radius: 9px; cursor: pointer; }
.billing button.on { background: var(--accent); color: var(--on-accent); }
.billing em { font-style: normal; font-size: .78rem; opacity: .85; }
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: stretch; }
@media (max-width: 1100px) { .plans { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .plans { grid-template-columns: 1fr; } }
.plan { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 26px 22px; display: flex; flex-direction: column; }
.plan.popular { border: 2px solid var(--accent); box-shadow: var(--shadow); }
.plan-tag { position: absolute; top: -12px; left: 22px; background: var(--accent); color: var(--on-accent); font-size: .75rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.plan h2 { font-size: 1.3rem; margin-bottom: 4px; }
.plan-for { color: var(--muted); font-size: .92rem; min-height: 2.8em; }
.price { margin: 6px 0 0; display: flex; align-items: baseline; gap: 6px; }
.price strong { font-size: 2.4rem; letter-spacing: -0.03em; }
.price span { color: var(--muted); }
.price-note { color: var(--muted); font-size: .85rem; margin-bottom: 16px; }
.plan .btn { margin-bottom: 18px; }
.trial { color: var(--accent); font-weight: 700; font-size: .88rem; margin: -8px 0 14px; }
.trial-none { color: var(--muted); font-weight: 500; }
.plan-wide { margin-top: 18px; display: grid; grid-template-columns: 1.2fr 1.6fr 1fr; gap: 24px; align-items: center; }
.plan-wide .checks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; margin: 0; }
.plan-wide .price { margin: 0 0 12px; }
.plan-wide .btn { margin-bottom: 0; }
@media (max-width: 900px) { .plan-wide { grid-template-columns: 1fr; } .plan-wide .checks { grid-template-columns: 1fr; } }
.plan .checks { font-size: .95rem; }
.capacity-note { text-align: center; color: var(--muted); margin-top: 22px; }
/* compare table (pricing) */
.btn-sm { padding: 6px 12px; font-size: .85rem; border-radius: 9px; }
.cmp-swipe { display: none; color: var(--muted); font-size: .85rem; margin: 0 0 8px; }
.cmp-tools { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 12px; }
.cmp-wrap { background: var(--card); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); }
.cmp { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .95rem; }
.cmp th, .cmp td { padding: 12px 14px; text-align: center; border-bottom: 1px solid var(--border); }
.cmp th[scope=row] { text-align: left; font-weight: 500; color: var(--text); width: 30%; }
.cmp thead th { position: sticky; top: 64px; z-index: 5; background: var(--card); vertical-align: bottom; padding: 18px 10px 14px; border-bottom: 2px solid var(--border); }
.cmp thead th:first-child { border-top-left-radius: 20px; }
.cmp thead th:last-child { border-top-right-radius: 20px; }
.cmp thead th strong { display: block; font-size: 1.05rem; }
.cmp thead th span { display: block; color: var(--muted); font-size: .85rem; font-weight: 500; margin: 2px 0 10px; }
.cmp-corner { text-align: left !important; color: var(--muted); font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.cmp .pop { background: color-mix(in srgb, var(--accent-soft) 45%, var(--card)); }
.cmp thead th.pop { background: var(--accent-soft); }
.cmp-head th { padding: 0; text-align: left; background: var(--bg-alt); }
.cmp-head button { all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 14px; font-weight: 800; font-size: 1.02rem; color: var(--text); cursor: pointer; }
.cmp-head button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.chev { width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; margin-right: 6px; }
.cmp-group.closed .chev { transform: rotate(-45deg); }
.cmp-group.closed tr:not(.cmp-head) { display: none; }
.cmp .yes { color: var(--accent); font-weight: 800; font-size: 1.1rem; }
.cmp .no { color: var(--muted); }
.cmp .soon { display: inline-block; font-size: .72rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.cmp-name { position: relative; display: inline-block; border-bottom: 1px dotted var(--muted); cursor: help; }
.cmp-name::after { content: attr(data-tip); position: absolute; left: 0; top: calc(100% + 8px); z-index: 20; width: max-content; max-width: 300px; padding: 10px 12px; border-radius: 10px; background: var(--text); color: var(--bg); font-size: .85rem; font-weight: 500; line-height: 1.45; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transition: opacity .15s; pointer-events: none; }
.cmp-name:hover::after, .cmp-name:focus::after { opacity: 1; visibility: visible; }
.cmp tbody:last-child tr:last-child > * { border-bottom: 0; }
@media (max-width: 900px) {
  .cmp-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .cmp { min-width: 760px; font-size: .88rem; }
  .cmp thead th { position: static; }
  .cmp th[scope=row] { position: sticky; left: 0; z-index: 2; background: var(--card); width: 170px; min-width: 170px; box-shadow: 1px 0 0 var(--border); }
  .cmp-head th { position: sticky; left: 0; }
  .cmp-head button { width: calc(100vw - 34px); position: sticky; left: 0; }
  .cmp-swipe { display: block; }
  .cmp-name::after { max-width: 220px; }
}

/* waiting list */
.waitlist { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: start; }
@media (max-width: 900px) { .waitlist { grid-template-columns: 1fr; gap: 28px; } }
.wl-form, .wl-done { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 28px; box-shadow: var(--shadow); display: grid; gap: 14px; }
.wl-form label { display: grid; gap: 6px; font-weight: 650; font-size: .93rem; }
.wl-form label b { color: var(--bad); }
.wl-form input, .wl-form select, .wl-form textarea { font: inherit; font-weight: 400; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px; width: 100%; }
.wl-form input:focus, .wl-form select:focus, .wl-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }
.wl-form fieldset { border: 0; padding: 0; margin: 0; }
.wl-form legend { font-weight: 650; font-size: .93rem; margin-bottom: 8px; }
.tool-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
@media (max-width: 520px) { .tool-checks { grid-template-columns: 1fr; } }
.wl-form .check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.wl-form .check input { width: auto; }
.hp { position: absolute !important; left: -9999px; }
.form-msg { margin: 0; font-weight: 600; min-height: 1.4em; }
.form-msg.error { color: var(--bad); }

/* footer */
.foot { border-top: 1px solid var(--border); background: var(--bg-alt); padding: 56px 0 28px; }
.foot-in { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.foot-in nav { display: grid; gap: 8px; align-content: start; }
.foot-in h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.foot-in nav a { color: var(--text-2); }
.foot-brand p { color: var(--muted); max-width: 26em; margin-top: 12px; }
.foot-legal { color: var(--muted); font-size: .85rem; margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.foot-policies { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 800px) { .foot-in { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- illustrations */
.mock { background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; font-size: 13px; }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: #f97066; }
.mock-bar i:nth-child(2) { background: #fdb022; } .mock-bar i:nth-child(3) { background: #32d583; }
.mock-bar span { flex: 1; height: 16px; margin-left: 10px; border-radius: 6px; background: var(--border); max-width: 220px; }
.mock-body { padding: 14px; position: relative; }
.h-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 12px; }
.h-player, .rec, .heat, .sv-page { position: relative; border-radius: 10px; background: var(--bg-alt); padding: 14px; min-height: 210px; overflow: hidden; }
.h-page b, .rec-page b { display: block; height: 14px; width: 55%; border-radius: 6px; background: var(--text); opacity: .75; margin-bottom: 12px; }
.h-page p, .rec-page p { height: 8px; border-radius: 4px; background: var(--border); margin: 0 0 8px; }
.h-page p.s, .rec-page p.s { width: 60%; }
.h-btn { width: 120px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); margin: 14px 0; }
.h-cursor { position: absolute; left: 34%; top: 50%; width: 14px; height: 20px; background: var(--text); clip-path: polygon(0 0, 100% 70%, 55% 70%, 75% 100%, 60% 100%, 42% 72%, 0 100%); animation: cur 5s ease-in-out infinite; }
.h-click { position: absolute; left: 33%; top: 49%; width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--accent); opacity: 0; animation: clk 5s ease-in-out infinite; transform: translate(-40%, -40%); }
@keyframes cur { 0%, 100% { transform: translate(60px, -40px); } 45%, 60% { transform: translate(0, 0); } }
@keyframes clk { 0%, 50% { opacity: 0; transform: translate(-40%, -40%) scale(.4); } 55% { opacity: 1; } 70%, 100% { opacity: 0; transform: translate(-40%, -40%) scale(1.6); } }
@media (prefers-reduced-motion: reduce) { .h-cursor, .h-click { animation: none; } .h-cursor { transform: none; } }
.h-scrub { position: absolute; left: 14px; right: 14px; bottom: 12px; height: 6px; border-radius: 3px; background: var(--border); }
.h-scrub span { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.h-scrub em { position: absolute; top: -3px; width: 4px; height: 12px; border-radius: 2px; background: var(--warn); }
.h-side { display: grid; gap: 10px; align-content: start; }
.h-stat { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: grid; }
.h-stat small { color: var(--muted); } .h-stat strong { font-size: 1.15rem; }
.h-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.h-feed li { display: flex; gap: 8px; align-items: center; }
.h-feed i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.h-feed i.ok { background: var(--good); } .h-feed i.warn { background: var(--bad); }
.rec-controls { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--card); border-top: 1px solid var(--border); }
.rec-controls .h-scrub { position: relative; left: 0; right: 0; bottom: 0; flex: 1; }
.rec-controls .play { color: var(--accent); } .rec-controls .t { color: var(--muted); font-size: 12px; }
.rec-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.rec-list li { display: flex; justify-content: space-between; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; }
.rec-list li.ev { border-color: var(--accent); background: var(--accent-soft); }
.blob { position: absolute; width: var(--s); height: var(--s); border-radius: 50%; transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(255, 196, 0, .75), rgba(255, 196, 0, 0) 70%); mix-blend-mode: multiply; }
.blob.hot { background: radial-gradient(circle, rgba(240, 68, 56, .95), rgba(240, 68, 56, 0) 70%); }
@media (prefers-color-scheme: dark) { .blob { mix-blend-mode: screen; } }
.fold { position: absolute; left: 0; right: 0; top: 70%; border-top: 2px dashed var(--accent); }
.fold span { position: absolute; right: 10px; top: 4px; font-size: 11px; background: var(--accent); color: var(--on-accent); padding: 2px 8px; border-radius: 6px; }
.ab { display: grid; gap: 10px; }
.ab-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px; display: grid; gap: 6px; }
.ab-card.win { border-color: var(--good); background: color-mix(in srgb, var(--good) 8%, transparent); }
.ab-card small { color: var(--muted); } .ab-card strong { font-size: 1.2rem; } .ab-card em { font-style: normal; color: var(--good); font-size: .85rem; }
.ab-bar { height: 10px; border-radius: 5px; background: var(--border); } .ab-bar span { display: block; height: 100%; border-radius: 5px; background: var(--accent); }
.ab-card.win .ab-bar span { background: var(--good); }
.ab-note { margin: 0; color: var(--muted); font-size: 12.5px; }
.sv-box { position: absolute; right: 12px; bottom: 12px; width: 230px; background: var(--card); border-radius: 12px; box-shadow: var(--shadow); padding: 12px; display: grid; gap: 8px; border: 1px solid var(--border); }
.sv-scale { display: grid; grid-template-columns: repeat(11, 1fr); gap: 2px; }
.sv-scale span { text-align: center; font-size: 10.5px; border: 1px solid var(--border); border-radius: 4px; padding: 3px 0; }
.sv-scale span.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.sv-go { justify-self: end; background: var(--accent); color: var(--on-accent); border-radius: 8px; padding: 4px 12px; font-weight: 700; font-size: 12px; }
.ev-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ev-grid strong { font-size: .95rem; }
.ev-chart { display: flex; align-items: flex-end; gap: 6px; height: 120px; margin-top: 12px; padding: 8px; border-radius: 10px; background: var(--bg-alt); }
.ev-chart span { flex: 1; border-radius: 4px 4px 0 0; background: linear-gradient(to top, var(--accent), var(--accent-2)); }
.chat { display: grid; gap: 8px; }
.msg { max-width: 78%; padding: 8px 12px; border-radius: 14px; font-size: 13px; }
.msg.them { background: var(--bg-alt); border-bottom-left-radius: 4px; }
.msg.me { justify-self: end; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-bottom-right-radius: 4px; }
.chat-in { display: flex; justify-content: space-between; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; color: var(--muted); margin-top: 4px; }
.chat-in b { color: var(--accent); }
.jr { display: grid; justify-items: center; gap: 0; }
.jr-node { border: 1px solid var(--border); background: var(--card); border-radius: 10px; padding: 8px 14px; font-weight: 650; font-size: 12.5px; box-shadow: 0 2px 6px rgba(16, 24, 40, .06); }
.jr-node.start { border-color: var(--accent); background: var(--accent-soft); }
.jr-node.wa { border-color: var(--good); }
.jr-line { width: 2px; height: 16px; background: var(--border); }
.jr-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; text-align: center; }
.jr-split small { display: block; color: var(--muted); margin-bottom: 4px; }
.push-stack { display: grid; gap: 10px; max-width: 420px; margin-inline: auto; }
.push { display: grid; gap: 2px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); font-size: 13.5px; }
.push span { color: var(--text-2); }
.push.wa { margin-left: 24px; } .push.mail { margin-left: 48px; }
.pf { display: grid; gap: 10px; }
.pf-head { display: flex; gap: 10px; align-items: center; }
.pf-head small { display: block; color: var(--muted); }
.pf-av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; }
.pf-tot { display: flex; gap: 8px; flex-wrap: wrap; }
.pf-tot span { border: 1px solid var(--border); border-radius: 8px; padding: 4px 10px; font-weight: 650; font-size: 12.5px; }
.pf-tl { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pf-tl li { display: flex; gap: 8px; align-items: center; border-bottom: 1px solid var(--border); padding: 6px 0; }
.pf-tl li small { margin-left: auto; color: var(--muted); }
.fn { display: grid; gap: 10px; }
.fn-row { display: grid; grid-template-columns: 110px 1fr 44px; gap: 10px; align-items: center; font-size: 12.5px; }
.fn-bar { height: 16px; border-radius: 6px; background: var(--bg-alt); }
.fn-bar em { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.fn-row b { text-align: right; }
/* AI agent illustration */
.ai-mock { display: grid; gap: 10px; }
.ai-kb { display: flex; gap: 6px; flex-wrap: wrap; }
.ai-kb span { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.ai-who { justify-self: end; font-size: 11px; font-weight: 700; color: var(--accent); margin-bottom: -4px; }
.ai-src { justify-self: end; font-size: 10.5px; color: var(--muted); margin-top: -4px; }
.ai-sys { justify-self: center; font-size: 11px; color: var(--muted); background: var(--bg-alt); padding: 3px 10px; border-radius: 999px; }

/* documentation (/docs/) */
.docs { display: grid; grid-template-columns: 250px minmax(0, 1fr) 200px; gap: 40px; padding: 32px 0 72px; align-items: start; }
.docs-nav { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; padding-right: 8px; font-size: .92rem; }
.docs-group { margin-top: 18px; }
.docs-group h2 { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 6px; }
.docs-group a { display: block; padding: 5px 10px; border-radius: 8px; color: var(--text-2); }
.docs-group a:hover { background: var(--bg-alt); text-decoration: none; }
.docs-group a[aria-current] { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.docs-search { position: relative; }
.docs-search input { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--text); font: inherit; }
.docs-results { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: min(420px, 90vw); background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; }
.docs-results a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--text); }
.docs-results a span { display: block; font-size: .8rem; color: var(--muted); }
.docs-results a:hover, .docs-results a.on { background: var(--accent-soft); text-decoration: none; }
.docs-results p { margin: 8px 10px; color: var(--muted); }
.docs-body { min-width: 0; max-width: 760px; }
.docs-body h1 { font-size: clamp(1.9rem, 3.6vw, 2.5rem); }
.docs-body h2 { font-size: 1.45rem; margin-top: 2em; scroll-margin-top: 16px; }
.docs-body h3 { font-size: 1.12rem; margin-top: 1.6em; scroll-margin-top: 16px; }
.docs-body .anchor { float: left; margin-left: -1em; width: 1em; color: var(--muted); opacity: 0; text-decoration: none; }
.docs-body h2:hover .anchor, .docs-body h3:hover .anchor { opacity: 1; }
.docs-body ul, .docs-body ol { padding-left: 1.4em; margin: 0 0 1em; }
.docs-body li { margin: .25em 0; }
.docs-body code { font: .88em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 6px; padding: .1em .35em; overflow-wrap: anywhere; }
.docs-crumb { font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.code { position: relative; margin: 0 0 1.2em; }
.code pre { margin: 0; padding: 16px; overflow-x: auto; background: #0f1629; color: #e6e9f2; border-radius: 12px; font-size: .86rem; line-height: 1.55; }
.code pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; overflow-wrap: normal; }
.code .copy { position: absolute; top: 8px; right: 8px; font: 600 .75rem system-ui, sans-serif; padding: 4px 10px; border-radius: 8px; border: 1px solid #2c3a63; background: #1a2442; color: #c3c9d6; cursor: pointer; }
.table { overflow-x: auto; margin: 0 0 1.2em; border: 1px solid var(--border); border-radius: 12px; }
.table table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--border); }
.table th { background: var(--bg-alt); font-weight: 650; }
.table tr:last-child td { border-bottom: 0; }
.callout { margin: 0 0 1.2em; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--border); border-left: 4px solid var(--accent); background: var(--accent-soft); }
.callout-tip { border-left-color: var(--good); }
.callout-important, .callout-warning { border-left-color: var(--warn); }
.docs-pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); }
.docs-pager a { display: flex; flex-direction: column; padding: 12px 16px; border: 1px solid var(--border); border-radius: 12px; font-weight: 650; }
.docs-pager a span { font-size: .78rem; font-weight: 500; color: var(--muted); }
.docs-pager a.next { text-align: right; margin-left: auto; }
.docs-toc { position: sticky; top: 16px; font-size: .85rem; }
.docs-toc h2 { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; }
.docs-toc a { display: block; padding: 3px 0 3px 10px; border-left: 2px solid var(--border); color: var(--text-2); }
.docs-toc a.on { border-left-color: var(--accent); color: var(--accent); }
.docs-menu { display: none; }
.docs-home section { margin-top: 32px; }
.docs-home h2 { margin-top: 0; }
.docs-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.docs-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); color: var(--text); }
.docs-card span { font-size: .86rem; color: var(--muted); }
.docs-card:hover { border-color: var(--accent); text-decoration: none; }
@media (max-width: 1100px) { .docs { grid-template-columns: 230px minmax(0, 1fr); } .docs-toc { display: none; } }
@media (max-width: 800px) {
  .docs { grid-template-columns: 1fr; gap: 16px; padding-top: 16px; }
  .docs-menu { display: inline-flex; justify-self: start; }
  .docs-nav { display: none; position: static; max-height: none; }
  .docs-nav.open { display: block; }
}

/* free tools (/free-tools/) */
.drop-panel.narrow-panel { grid-template-columns: 1fr; width: min(340px, 92vw); }
.btn-small { padding: 6px 12px; font-size: .85rem; border-radius: 10px; }
.free-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.free-cards.big { gap: 20px; }
.free-card { display: grid; gap: 6px; align-content: start; padding: 20px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); transition: transform .2s, box-shadow .2s; }
.free-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.free-card strong { font-size: 1.15rem; }
.free-card span { color: var(--text-2); }
.free-card em { font-style: normal; font-weight: 700; color: var(--accent); }
@media (max-width: 700px) { .free-cards { grid-template-columns: 1fr; } }
.tool-steps { padding-left: 1.3em; color: var(--text-2); }
.tool-steps li { margin-bottom: .6em; font-size: 1.05rem; }

/* The free tools' boxes: shared by kolvantage.com (appended to site.css by the site build) and the dashboard (free-tool.html). */
.tool { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.tool-cols { display: grid; grid-template-columns: 1fr 76px 1fr; gap: 12px; align-items: stretch; }
.tool-cols.two { grid-template-columns: 1fr 1fr; }
.tool-pane { display: grid; grid-template-rows: auto 1fr auto; gap: 8px; min-width: 0; }
.tool-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tool-head label { font-weight: 700; font-size: 1.05rem; color: var(--accent); }
.tool-count { font-size: .85rem; color: var(--muted); }
.tool textarea { width: 100%; min-height: 300px; resize: vertical; font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.tool textarea:focus, .tool select:focus, .tool input[type=text]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tool-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tool-mid { display: flex; flex-direction: column; gap: 10px; justify-content: center; align-items: stretch; }
.tool-mid .btn { padding: 12px 8px; font-size: 1.2rem; }
.tool-mid .btn[data-act=clear] { font-size: .85rem; }
.tool-note { min-height: 1.4em; margin: 12px 0 0; color: var(--text-2); font-size: .92rem; }
.tool-options { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; margin: 8px 0 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; }
.tool-options legend { padding: 0 6px; font-weight: 700; font-size: .9rem; color: var(--muted); }
.tool-options label, .tool-bar label { display: inline-flex; align-items: center; gap: 8px; font-size: .95rem; color: var(--text-2); }
.tool select, .tool input[type=text] { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 7px 10px; }
.tool input[type=text] { width: 7em; }
.tool-bar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-top: 16px; }
.tool-result { margin-top: 20px; }
.diff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.diff-side { min-width: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--bg); }
.diff-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: .92rem; }
.diff-head.del strong { color: var(--bad); } .diff-head.add strong { color: var(--good); }
.diff-lines { color: var(--muted); }
.diff-col { max-height: 520px; overflow: auto; font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.diff-row { display: grid; grid-template-columns: 3.2em 1fr; min-width: max-content; width: 100%; }
.diff-n { text-align: right; padding: 0 10px 0 4px; color: var(--muted); user-select: none; background: color-mix(in srgb, var(--bg-alt) 70%, transparent); }
.diff-t { white-space: pre; padding: 0 12px; }
.diff-row.del, .diff-row.change.l { background: color-mix(in srgb, var(--bad) 12%, transparent); }
.diff-row.add, .diff-row.change.r { background: color-mix(in srgb, var(--good) 14%, transparent); }
.diff-row.empty { background: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--muted) 12%, transparent) 6px 7px); }
.diff-row.change.l mark { background: color-mix(in srgb, var(--bad) 38%, transparent); color: inherit; border-radius: 3px; }
.diff-row.change.r mark { background: color-mix(in srgb, var(--good) 40%, transparent); color: inherit; border-radius: 3px; }
.diff-same { padding: 16px; text-align: center; font-weight: 650; color: var(--good); background: color-mix(in srgb, var(--good) 10%, transparent); border-radius: 12px; }
@media (max-width: 800px) {
  .tool-cols, .tool-cols.two, .diff-grid { grid-template-columns: 1fr; }
  .tool-mid { flex-direction: row; justify-content: center; }
  .tool-mid .btn { flex: 1; }
  .tool textarea { min-height: 200px; }
}

/* remove duplicates */
.dup-modes { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 8px; }
.dup-modes label { cursor: pointer; }
.dup-modes input { position: absolute; opacity: 0; pointer-events: none; }
.dup-modes span { display: inline-block; padding: 10px 18px; border: 1px solid var(--border); border-radius: 999px; font-weight: 650; background: var(--card); color: var(--text-2); }
.dup-modes input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.dup-modes input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.dup-head { margin-top: 16px; }
.dup-result { margin-top: 8px; max-height: 480px; overflow: auto; }
.dup-result textarea { width: 100%; }
.dup-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.dup-table th, .dup-table td { text-align: left; padding: 7px 12px; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.dup-table .num { text-align: right; width: 90px; font-variant-numeric: tabular-nums; }
.dup-table tr.dup td { font-weight: 650; background: color-mix(in srgb, var(--accent) 8%, transparent); }
.dup-list { margin: 0; padding: 0; list-style-position: inside; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92rem; }
.dup-list li { display: flex; gap: 10px; justify-content: space-between; padding: 3px 10px; border-radius: 6px; }
.dup-list li::marker { color: var(--muted); }
.dup-list .dup-t { white-space: pre-wrap; overflow-wrap: anywhere; flex: 1; }
.dup-list .dup-n { font-weight: 700; font-size: .8rem; opacity: .75; }
.dup-c0 { background: #fde68a; color: #422006; } .dup-c1 { background: #bfdbfe; color: #172554; } .dup-c2 { background: #fbcfe8; color: #500724; }
.dup-c3 { background: #bbf7d0; color: #052e16; } .dup-c4 { background: #fed7aa; color: #431407; } .dup-c5 { background: #ddd6fe; color: #2e1065; }
.dup-c6 { background: #a5f3fc; color: #083344; } .dup-c7 { background: #fecaca; color: #450a0a; } .dup-c8 { background: #d9f99d; color: #1a2e05; } .dup-c9 { background: #e5e7eb; color: #111827; }
[data-for][hidden] { display: none !important; }

/* html editor */
.html-views { display: none; gap: 8px; margin-bottom: 12px; }
.html-views button { flex: 1; padding: 10px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text-2); font: inherit; font-weight: 650; cursor: pointer; }
.html-views button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.html-code textarea { min-height: 520px; white-space: pre; overflow: auto; tab-size: 2; }
.html-preview { grid-template-rows: auto 1fr; }
.html-title { font-weight: 700; font-size: 1.05rem; color: var(--accent); }
.html-devices { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.html-devices .btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.html-frame { min-height: 520px; background: repeating-conic-gradient(var(--border) 0 25%, transparent 0 50%) 0 0 / 16px 16px; border: 1px solid var(--border); border-radius: 12px; overflow: auto; display: flex; justify-content: center; }
.html-tools { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.html-tools[hidden], .html-frame iframe[hidden] { display: none; }
.html-tools .btn { min-width: 40px; min-height: 40px; }
@media (min-width: 900px) { .html-tools .btn { min-width: 32px; min-height: 30px; } }
.html-title { display: inline-flex; gap: 6px; }
@media (max-width: 899px) { .html-title .btn, .html-devices .btn { min-height: 40px; } }
.html-title .btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.html-frame iframe { width: 100%; max-width: 100%; height: 100%; min-height: 520px; border: 0; background: #fff; }
@media (max-width: 800px) {
  .html-views { display: flex; }
  .tool[data-view=code] .html-preview, .tool[data-view=preview] .html-code { display: none; }
  .html-code textarea, .html-frame, .html-frame iframe { min-height: 420px; }
}

/* date calculator */
.dc-start label { display: block; font-weight: 700; margin-bottom: 6px; }
.dc-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.dc-row input[type=date], .dc-num input { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font: inherit; background: var(--surface, #fff); color: var(--text); }
.dc-dir { margin: 14px 0 8px; }
.dc-amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 6px 0 14px; }
.dc-num span { display: block; font-size: .9rem; color: var(--muted); margin-bottom: 4px; }
.dc-num input { width: 100%; text-align: center; font-size: 1.1rem; }
.dc-result { margin-top: 14px; padding: 20px; border: 1px solid var(--border); border-radius: 14px; background: linear-gradient(135deg, var(--accent-soft, #eef0ff), transparent 70%); }
.dc-label { display: block; color: var(--muted); font-size: .95rem; margin-bottom: 6px; }
.dc-date { display: block; font-size: clamp(1.4rem, 4.5vw, 2rem); line-height: 1.2; letter-spacing: -.01em; margin-bottom: 14px; }
.dc-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 14px; }
.dc-facts dt { color: var(--muted); }
.dc-facts dd { margin: 0; font-weight: 600; }
@media (max-width: 600px) { .dc-amounts { grid-template-columns: repeat(2, 1fr); } }

/* markdown editor */
.md-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; }
.md-sep { width: 1px; height: 22px; background: var(--border); margin: 0 4px; }
.md-views { display: none; }
.md-write textarea { min-height: 520px; tab-size: 2; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.md-read { grid-template-rows: auto 1fr; }
.md-preview { min-height: 520px; max-height: 640px; overflow: auto; padding: 14px 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); color: var(--text); line-height: 1.6; overflow-wrap: anywhere; }
.md-preview > :first-child { margin-top: 0; } .md-preview > :last-child { margin-bottom: 0; }
.md-preview h1, .md-preview h2, .md-preview h3, .md-preview h4 { margin: 1.3em 0 .5em; line-height: 1.25; letter-spacing: 0; }
.md-preview h1 { font-size: 1.7rem; padding-bottom: .3em; border-bottom: 1px solid var(--border); }
.md-preview h2 { font-size: 1.35rem; padding-bottom: .25em; border-bottom: 1px solid var(--border); }
.md-preview h3 { font-size: 1.12rem; } .md-preview h4, .md-preview h5, .md-preview h6 { font-size: 1rem; }
.md-preview p, .md-preview ul, .md-preview ol, .md-preview blockquote, .md-preview pre, .md-preview table { margin: 0 0 1em; }
.md-preview ul, .md-preview ol { padding-left: 1.6em; } .md-preview li > ul, .md-preview li > ol { margin: .25em 0; }
.md-preview li.task { list-style: none; margin-left: -1.4em; } .md-preview li.task input { margin-right: .4em; } .md-preview li.task > p { display: inline; margin: 0; } .md-preview li > p:first-child { margin-top: 0; } .md-preview li > p:last-child { margin-bottom: 0; }
.md-preview code { background: color-mix(in srgb, var(--muted) 16%, transparent); padding: .12em .35em; border-radius: 5px; font: .9em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.md-preview pre { padding: 12px 14px; border-radius: 10px; background: color-mix(in srgb, var(--muted) 12%, var(--bg)); border: 1px solid var(--border); overflow: auto; }
.md-preview pre code { background: none; padding: 0; font-size: .88em; }
.md-preview blockquote { padding: 0 1em; color: var(--text-2); border-left: 4px solid var(--border); }
.md-preview table { border-collapse: collapse; display: block; overflow: auto; max-width: 100%; }
.md-preview th, .md-preview td { border: 1px solid var(--border); padding: 6px 12px; } .md-preview th { background: color-mix(in srgb, var(--muted) 10%, transparent); }
.md-preview hr { border: 0; border-top: 1px solid var(--border); margin: 1.4em 0; }
.md-preview img { max-width: 100%; height: auto; } .md-preview a { color: var(--accent); }
.md-actions { margin-top: 14px; } .md-open { cursor: pointer; }
.md-hide { margin-left: auto; }
.tool[data-preview=off] .md-read { display: none; }
.tool[data-preview=off] .md-cols { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 800px) {
  .md-hide { display: none; }
  .tool[data-preview=off] .md-read { display: block; } /* (a phone has the Write and Preview tabs) */
  .md-views { display: flex; }
  .tool[data-view=write] .md-read, .tool[data-view=preview] .md-write { display: none; }
  .md-write textarea, .md-preview { min-height: 420px; }
}

/* keyboard layout converter */
.kb-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 14px; }
.kb-field { display: grid; gap: 4px; font-size: 13.5px; color: var(--text-2); }
.kb-field select { min-width: 220px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--card, var(--bg)); color: var(--text); font: inherit; font-size: 15px; }
.kb-swap { min-height: 40px; font-size: 18px; line-height: 1; }
[data-tool=keyboard] textarea { min-height: 260px; font-size: 16px; line-height: 1.5; unicode-bidi: plaintext; }

/* percentage calculator */
.pc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.pc-card { border: 1px solid var(--border); border-radius: 14px; background: var(--card, var(--bg)); padding: 16px 18px 14px; display: grid; gap: 10px; align-content: start; }
.pc-card h3 { margin: 0 0 2px; font-size: 1.05rem; color: var(--accent, #4f46e5); }
.pc-row { display: grid; grid-template-columns: minmax(96px, auto) 1fr; align-items: center; gap: 10px; font-size: 15px; color: var(--text-2); }
.pc-row input[type=text], .pc-row select { width: 100%; box-sizing: border-box; padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; font: inherit; font-size: 16px; background: var(--surface, #fff); color: var(--text); }
.pc-row select { width: auto; padding: 4px 6px; font-size: 14px; }
.pc-field { display: flex; align-items: stretch; }
.pc-field input[type=text] { border-radius: 10px 0 0 10px; }
.pc-field i { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--border); border-left: 0; border-radius: 0 10px 10px 0; background: var(--grid, #eef0f5); color: var(--muted); font-style: normal; }
.pc-actions { display: flex; gap: 8px; }
.pc-result { margin: 4px 0 0; padding-top: 10px; border-top: 1px dashed var(--border); font-size: 15px; color: var(--text-2); min-height: 1.6em; }
.pc-result strong { font-size: 1.25rem; color: var(--text); overflow-wrap: anywhere; }
.pc-result.bad strong { font-size: 14px; font-weight: 600; color: #b42318; }

/* time zone converter */
.tz-from { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.tz-field { display: grid; gap: 4px; font-size: 13.5px; color: var(--text-2); }
.tz-zone { flex: 1 1 320px; min-width: 260px; }
.tz-zone > div, .tz-left { min-width: 0; }
.tz-field input[type=date], .tz-field input[type=time] { padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; font: inherit; font-size: 16px; background: var(--surface, #fff); color: var(--text); min-height: 42px; box-sizing: border-box; }
.tz-now { min-height: 42px; }
.tz-h12 { display: block; margin: 12px 0 4px; font-size: 14px; color: var(--text-2); }
.tz-to-title { margin: 18px 0 8px; font-size: 1.05rem; }
.tz-combo { position: relative; }
.tool .tz-combo input[type=text] { width: 100%; box-sizing: border-box; padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; font: inherit; font-size: 16px; background: var(--surface, #fff); color: var(--text); min-height: 42px; }
.tz-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); max-height: 300px; overflow: auto; margin: 0; padding: 4px; list-style: none; background: var(--surface, #fff); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 28px rgba(0, 0, 0, .16); }
.tz-list[hidden] { display: none; }
.tz-opt { padding: 7px 10px; border-radius: 8px; cursor: pointer; display: block; overflow-wrap: anywhere; }
.tz-opt:hover, .tz-opt.on { background: var(--grid, #eef0f5); }
.tz-none { padding: 8px 10px; }
.tz-results { display: grid; gap: 10px; margin-bottom: 12px; }
.tz-row { display: grid; grid-template-columns: minmax(220px, 1.3fr) minmax(160px, 1fr) auto auto; gap: 8px 16px; align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--card, var(--bg)); }
.tz-mid { display: grid; gap: 2px; }
.tz-clock { font-size: 1.7rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tz-day { font-size: 13.5px; color: var(--text-2); }
.tz-tags { display: grid; gap: 4px; justify-items: start; }
.tz-off { font-weight: 700; font-size: 14px; }
.tz-badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--grid, #eef0f5); color: var(--text-2); }
.tz-badge.dst { background: #fdf0cf; color: #7a4a05; }
.tz-actions { display: flex; gap: 6px; }
.tz-sub { grid-column: 1 / -1; margin: 0; }
@media (max-width: 760px) { .tz-row { grid-template-columns: 1fr auto; } .tz-left { grid-column: 1 / -1; } .tz-actions { grid-column: 1 / -1; } }
