/* kindly.css: the Kindly design system. Shared by the suite page and all nine tools.
   Each page sets --c1, --c2 (gradient), --brand (text-safe ink) and --soft on <body>. */

@font-face { font-family: "Bricolage"; src: url("/_shared/fonts/bricolage.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/_shared/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --c1: #a78bfa; --c2: #7c3aed; --brand: #6d28d9; --soft: #f5f3ff;
  --bg: #ffffff;
  --paper: #fbfaf8;
  --ink: #16141f;
  --ink-2: #4a4858;
  --muted: #6e6b7b;
  --line: #ecebf0;
  --line-2: #dedce6;
  --field: #f7f6f9;
  --ok: #047857; --warn: #b45309; --bad: #be123c;
  --r-sm: 10px; --r: 14px; --r-lg: 22px; --r-xl: 30px;
  --shadow-1: 0 1px 2px rgba(22, 20, 31, .05), 0 2px 8px rgba(22, 20, 31, .04);
  --shadow-2: 0 2px 4px rgba(22, 20, 31, .04), 0 12px 32px rgba(22, 20, 31, .08);
  --shadow-3: 0 24px 64px rgba(22, 20, 31, .14);
  --grad: linear-gradient(135deg, var(--c1), var(--c2));
  --display: "Bricolage", ui-sans-serif, system-ui, sans-serif;
  --body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --wrap: 1120px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; overflow-wrap: break-word; }
main p, main li, main td, main h1, main h2, main h3, main summary, main label { overflow-wrap: anywhere; }
img, svg { max-width: 100%; }
a { color: var(--brand); }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.08; letter-spacing: -0.02em; margin: 0; font-weight: 700; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--c2) 55%, white); outline-offset: 2px; border-radius: 8px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; z-index: 100; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .82); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 14px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 700 20px/1 var(--display); letter-spacing: -0.02em; }
.brand svg { width: 26px; height: 26px; }
.crumb { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; padding-left: 14px; border-left: 1px solid var(--line-2); }
.crumb svg { width: 24px; height: 24px; }
.topbar .spacer { flex: 1; }
.apps-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; cursor: pointer; font-weight: 600; font-size: 14px; transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.apps-btn:hover { box-shadow: var(--shadow-1); }
.apps-btn svg { width: 18px; height: 18px; }
.apps-pop { position: absolute; right: 20px; top: 58px; width: min(420px, calc(100vw - 24px)); background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-3); padding: 14px; display: none; transform-origin: top right; }
.apps-pop.open { display: block; animation: pop .22s var(--ease); }
.apps-pop h2 { font: 600 13px/1 var(--body); color: var(--muted); letter-spacing: .02em; margin: 6px 8px 12px; }
.apps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.apps-grid a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px 10px; border-radius: var(--r); text-decoration: none; color: var(--ink); font-weight: 600; font-size: 14px; text-align: center; transition: background .15s; }
.apps-grid a small { font-weight: 450; font-size: 12px; color: var(--muted); line-height: 1.25; }
.apps-grid a:hover, .apps-grid a[aria-current="page"] { background: var(--paper); }
.apps-grid svg { width: 44px; height: 44px; transition: transform .25s var(--ease); }
.apps-grid a:hover svg { transform: translateY(-2px) scale(1.04); }
.apps-pop .all { display: block; text-align: center; margin-top: 8px; padding: 10px; border-radius: var(--r); font-weight: 600; font-size: 14px; text-decoration: none; color: var(--ink); background: var(--paper); }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- hero (tool) ---------- */
.hero { position: relative; padding: 56px 0 28px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 620px; height: 620px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--c1) 30%, transparent), transparent 70%); pointer-events: none; z-index: -1; }
.hero .wrap { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
.hero .icon svg { width: 96px; height: 96px; filter: drop-shadow(0 14px 24px color-mix(in srgb, var(--c2) 35%, transparent)); animation: float 6s ease-in-out infinite; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--brand); margin-bottom: 10px; }
.hero h1 { font-size: clamp(36px, 6vw, 64px); }
.hero h1 .grad { background: linear-gradient(120deg, var(--c2), var(--brand)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lede { margin-top: 14px; font-size: clamp(17px, 2vw, 19px); color: var(--ink-2); max-width: 640px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--soft); color: var(--brand); font-size: 13px; font-weight: 600; }
.pill svg { width: 14px; height: 14px; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-6px) rotate(-2deg); } }

/* ---------- steps: the big 1, 2, 3 ---------- */
.app { padding: 8px 0 40px; }
.step { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 20px; padding: 26px 0; border-top: 1px solid var(--line); }
.step:first-child { border-top: 0; }
.step-n { font: 800 56px/0.9 var(--display); background: linear-gradient(120deg, var(--c2), var(--brand)); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: -0.04em; user-select: none; }
.step-h { font-size: clamp(22px, 3vw, 28px); margin-bottom: 4px; }
.step-sub { color: var(--muted); margin-bottom: 18px; }
.step.dim { opacity: .45; }
.step.dim .step-n { background: var(--line-2); -webkit-background-clip: text; background-clip: text; }

/* ---------- how-to strip (dashboard tools) ---------- */
.howto { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 8px 0 28px; }
.howto > div { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: var(--r-lg); background: var(--soft); }
.howto .step-n { font-size: 48px; flex: none; }
.howto b { display: block; font: 700 17px/1.25 var(--display); }
.howto span { font-size: 14px; color: var(--ink-2); line-height: 1.4; }
@media (max-width: 760px) { .howto { grid-template-columns: 1fr; gap: 8px; } .howto > div { padding: 12px 16px; } .howto .step-n { font-size: 36px; width: 30px; } }

/* ---------- dialogs ---------- */
.dlg { border: 0; border-radius: var(--r-xl); padding: 26px; width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: var(--shadow-3); color: var(--ink); }
.dlg::backdrop { background: rgba(22, 20, 31, .42); backdrop-filter: blur(4px); }
.dlg[open] { animation: pop .22s var(--ease); }
.dlg h2 { font-size: 26px; margin-bottom: 16px; }
.dlg .dlg-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.dlg .x { position: absolute; top: 14px; right: 14px; }

/* ---------- cards & surfaces ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-1); }
.card.soft { background: var(--soft); border-color: transparent; box-shadow: none; }
.card.paper { background: var(--paper); border-color: transparent; box-shadow: none; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stack > * + * { margin-top: 14px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- form controls ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span, .label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field small { color: var(--muted); font-size: 13px; }
.input, .field input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: var(--r); border: 1.5px solid var(--line-2); background: #fff; font-size: 16px; transition: border-color .15s, box-shadow .15s; appearance: none; -webkit-appearance: none;
}
.field textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 7.5l5 5 5-5' fill='none' stroke='%236e6b7b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; }
.input:hover, .field input:hover, .field select:hover, .field textarea:hover { border-color: #cfccd9; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--c2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c2) 16%, transparent); }
.field input[type="range"] { accent-color: var(--c2); width: 100%; height: 28px; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.check input { width: 20px; height: 20px; accent-color: var(--c2); }

/* chunky choice tiles (radio groups) */
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; pointer-events: none; margin: 0; }
.choice label, .choice > span { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; border-radius: var(--r); border: 1.5px solid var(--line-2); background: #fff; cursor: pointer; font-weight: 600; transition: border-color .15s, background .15s, transform .15s var(--ease); min-height: 84px; }
.choice label svg, .choice > span svg { width: 22px; height: 22px; color: var(--brand); }
.choice:hover label, .choice:hover > span { border-color: #cfccd9; transform: translateY(-1px); }
.choice input:checked + label, .choice input:checked + span { border-color: var(--c2); background: var(--soft); color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c2) 14%, transparent); }
.choice input:focus-visible + label, .choice input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--c2) 55%, white); outline-offset: 2px; }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--field); gap: 2px; flex-wrap: wrap; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; pointer-events: none; margin: 0; }
.seg span { display: inline-block; padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--ink-2); cursor: pointer; transition: background .15s, color .15s; }
.seg input:checked + span { background: #fff; color: var(--ink); box-shadow: var(--shadow-1); }
.seg input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--c2) 55%, white); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0; cursor: pointer; font-weight: 650; font-size: 16px; text-decoration: none; transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--c2) 30%, transparent); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px color-mix(in srgb, var(--c2) 38%, transparent); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line-2); }
.btn-ghost:hover { border-color: #cfccd9; background: var(--paper); }
.btn-soft { background: var(--soft); color: var(--brand); }
.btn-soft:hover { background: color-mix(in srgb, var(--soft) 70%, var(--c1) 30%); }
.btn-quiet { background: transparent; color: var(--ink-2); min-height: 40px; padding: 0 12px; }
.btn-quiet:hover { background: var(--field); }
.btn-danger { background: transparent; color: var(--bad); min-height: 40px; padding: 0 12px; }
.btn-danger:hover { background: #fff1f2; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 17px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 12px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--field); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }

/* ---------- notices & stats ---------- */
.note { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r); background: var(--field); color: var(--ink-2); font-size: 14px; }
.note.warn { background: #fffbeb; color: #92400e; }
.note.bad { background: #fff1f2; color: #9f1239; }
.note.ok { background: #ecfdf5; color: #065f46; }
.note svg { flex: none; width: 18px; height: 18px; margin-top: 2px; }
.big { font: 800 clamp(40px, 7vw, 64px)/1 var(--display); letter-spacing: -0.03em; }
.big.grad { background: linear-gradient(120deg, var(--c2), var(--brand)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat { padding: 18px; border-radius: var(--r-lg); background: var(--paper); }
.stat b { display: block; font: 750 28px/1.1 var(--display); letter-spacing: -0.02em; }
.stat span { font-size: 13px; color: var(--muted); }
.tag { white-space: nowrap; flex: none; overflow-wrap: normal !important; display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; background: var(--field); color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.tag.brand { background: var(--soft); color: var(--brand); }
.empty { text-align: center; padding: 34px 20px; color: var(--muted); border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); }
table.t { width: 100%; border-collapse: collapse; font-size: 15px; }
table.t th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); }
table.t td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t td.r, table.t th.r { text-align: right; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow-3); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s var(--ease); z-index: 90; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- save strip ---------- */
.savebar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px 18px; border-radius: var(--r-lg); background: var(--paper); margin-top: 8px; }
.savebar p { flex: 1 1 260px; font-size: 14px; color: var(--ink-2); }
.savebar svg.lock { width: 18px; height: 18px; color: var(--brand); vertical-align: -3px; margin-right: 6px; }

/* ---------- marketing sections ---------- */
.section { padding: 64px 0; }
.section.tint { background: var(--paper); }
.section h2 { font-size: clamp(28px, 4vw, 42px); margin-bottom: 12px; }
.section .lede { color: var(--ink-2); font-size: 18px; max-width: 640px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.feature { padding: 24px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); }
.feature .fi { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--soft); color: var(--brand); margin-bottom: 14px; }
.feature .fi svg { width: 22px; height: 22px; }
.feature h3 { font-size: 20px; margin-bottom: 6px; }
.feature p { color: var(--ink-2); font-size: 15px; }
.faq { margin-top: 28px; display: grid; gap: 10px; max-width: 820px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 0 18px; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 0; font-weight: 650; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 24px/1 var(--body); color: var(--muted); transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 16px; color: var(--ink-2); }
.more-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 28px; }
.tool-card { --c1: #a78bfa; --c2: #7c3aed; position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; overflow: hidden; }
.tool-card::after { content: ""; position: absolute; inset: auto -30% -60% auto; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--c1) 26%, transparent), transparent); opacity: 0; transition: opacity .3s; }
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: transparent; }
.tool-card:hover::after { opacity: 1; }
.tool-card svg { flex: none; width: 48px; height: 48px; position: relative; z-index: 1; }
.tool-card b { display: block; font: 700 19px/1.2 var(--display); letter-spacing: -0.01em; position: relative; z-index: 1; }
.tool-card span { display: block; color: var(--muted); font-size: 14px; line-height: 1.35; margin-top: 3px; position: relative; z-index: 1; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 44px 0 36px; font-size: 14px; color: var(--muted); }
.foot .wrap { display: grid; grid-template-columns: 1.3fr 2fr; gap: 32px; }
.foot .brand { font-size: 18px; margin-bottom: 10px; }
.foot nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 16px; }
.foot nav a { color: var(--ink-2); text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.foot nav a:hover { color: var(--ink); }
.foot nav svg { width: 18px; height: 18px; }
.foot .fine { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 20px; border-top: 1px solid var(--line); }
.foot a { color: var(--ink-2); }

/* entrance motion */
.rise { animation: rise .7s var(--ease) both; }
.rise.d1 { animation-delay: .06s; } .rise.d2 { animation-delay: .12s; } .rise.d3 { animation-delay: .18s; }
@keyframes rise { from { opacity: .01; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.js-reveal .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js-reveal .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .features, .grid-3 { grid-template-columns: 1fr 1fr; }
  .more-grid { grid-template-columns: 1fr 1fr; }
  .foot .wrap { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .topbar .wrap { height: 58px; gap: 10px; }
  .crumb { padding-left: 10px; }
  .brand-word { display: none; }
  .apps-btn .lbl { display: none; }
  .apps-btn { padding: 0 11px; }
  .apps-pop { right: 12px; top: 54px; }
  .hero { padding: 32px 0 12px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 16px; }
  .hero .icon svg { width: 72px; height: 72px; }
  .step { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 22px 0; }
  .step-n { font-size: 44px; }
  .grid-2, .grid-3, .features { grid-template-columns: 1fr; }
  .more-grid { grid-template-columns: 1fr; }
  .foot nav { grid-template-columns: 1fr 1fr; }
  .section { padding: 48px 0; }
  .card { padding: 18px; }
  .btn-lg { width: 100%; }
}

@media print {
  .topbar, .foot, .hero, .section, .savebar, .no-print { display: none !important; }
  body { background: #fff; }
}
