/* Tally Care — design system v3: "corporate white + royal blue + coral". Sharp radii, navy ink, Sora/Inter.
   Layered on top of Tailwind utilities. Public pages have <body class="tc">. */

:root {
  --bg: #ffffff;
  --bg-2: #f5f7fb;
  --surface: #ffffff;
  --line: #e6e9f2;
  --line-2: #d5dbe8;
  --ink: #0b1530;
  --muted: #4a5571;
  --dim: #7c86a2;
  --brand-50: #eef3ff;
  --brand-100: #dbe5ff;
  --brand-200: #bccdff;
  --brand-500: #3a5cf5;
  --brand-600: #2442e0;
  --brand-700: #1c33b8;
  --brand-800: #1b2d91;
  --brand-900: #1b2a72;
  --brand-950: #0d1538;
  --accent-300: #ffc2ad;
  --accent-400: #ff8f6b;
  --accent-500: #ff6b45;
  --accent-600: #e5502a;
  --coral: #ff6b45;
  --radius: 14px;
}

html { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.scrollbar-none { scrollbar-width: none; }
.scrollbar-none::-webkit-scrollbar { display: none; }
h1, h2, h3, h4, .section-title, .font-display { font-family: Sora, Inter, ui-sans-serif, system-ui, sans-serif; }
h1, h2 { letter-spacing: -.03em; }

/* ---------- Canvas ---------- */
body.tc { background: var(--bg); color: var(--muted); }
body.tc ::selection { background: var(--brand-600); color: #fff; }
.tc-aurora { display: none; }
.tc-grid {
  background-image: linear-gradient(rgba(11, 21, 48, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(11, 21, 48, .05) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%); mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
.tc .shadow-soft { box-shadow: 0 1px 2px rgba(11, 21, 48, .05), 0 10px 30px -14px rgba(11, 21, 48, .18); }
.bg-alt { background: var(--bg-2); }

/* ---------- Header: utility strip + full-width white bar ---------- */
.topbar { background: var(--ink); color: #b9c3e3; font-size: .78rem; }
.topbar a:hover { color: #fff; }
.site-head { background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: box-shadow .3s; }
#site-header.is-scrolled .site-head { box-shadow: 0 10px 30px -18px rgba(11, 21, 48, .35); }
.nav-link {
  position: relative; display: inline-flex; align-items: center; gap: .25rem; height: 76px; padding: 0 .85rem; font-size: .9rem; font-weight: 600; color: var(--muted);
  white-space: nowrap; transition: color .2s;
}
.nav-link::after { content: ""; position: absolute; left: .85rem; right: .85rem; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand-600); transform: scaleX(0); transition: transform .25s ease; }
@media (min-width: 1024px) and (max-width: 1279px) { .nav-link { padding: 0 .55rem; font-size: .85rem; } .nav-link::after { left: .55rem; right: .55rem; } }
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after { transform: scaleX(.4); }
.nav-link.is-active { color: var(--brand-700); }
.nav-link.is-active::after { transform: scaleX(1); }
.nav-tool { display: inline-flex; align-items: center; gap: .4rem; padding: .55rem .75rem; border-radius: 10px; font-size: .86rem; font-weight: 600; color: var(--muted); transition: background-color .2s, color .2s; }
.nav-tool:hover { background: var(--bg-2); color: var(--ink); }
.mobile-link { display: block; padding: .85rem 1rem; border-radius: 10px; font-weight: 600; color: var(--ink); transition: background-color .2s; }
.mobile-link:hover { background: var(--bg-2); }
.mobile-link.is-active { background: var(--brand-50); color: var(--brand-700); }

/* Dropdowns: clean panel anchored under the bar */
.dropdown-panel {
  visibility: hidden; opacity: 0; pointer-events: none;
  transform: translate(-50%, 6px); transform-origin: top center;
  transition: opacity .18s ease, transform .22s ease, visibility 0s linear .22s;
}
.dropdown.is-open .dropdown-panel, .no-js .dropdown:hover .dropdown-panel, .no-js .dropdown:focus-within .dropdown-panel {
  visibility: visible; opacity: 1; pointer-events: auto; transform: translate(-50%, 0);
  transition: opacity .18s ease, transform .22s ease, visibility 0s;
}
.dropdown.is-open .dropdown-chevron { transform: rotate(180deg); }
.dropdown.is-open > .nav-link { color: var(--ink); }
.dropdown.is-open > .nav-link::after { transform: scaleX(1); }
.dropdown-surface { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 30px 70px -28px rgba(11, 21, 48, .38); }
.mega-item { display: flex; gap: .85rem; align-items: flex-start; padding: .8rem .85rem; border-radius: 12px; transition: background-color .18s; }
.mega-item:hover, .mega-item:focus-visible, .mega-item.is-current { outline: none; background: var(--bg-2); }
.mega-icon { width: 2.5rem; height: 2.5rem; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--brand-600); transition: background-color .18s, color .18s, border-color .18s; }
.mega-item:hover .mega-icon, .mega-item.is-current .mega-icon { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.mega-title { display: flex; align-items: center; gap: .4rem; font-weight: 700; font-size: .9rem; color: var(--ink); }
.mega-title svg { opacity: 0; transform: translateX(-4px); transition: opacity .18s, transform .18s; color: var(--brand-600); }
.mega-item:hover .mega-title svg { opacity: 1; transform: none; }
.mega-desc { display: block; margin-top: .15rem; font-size: .8rem; line-height: 1.4; color: var(--dim); }
.mega-side { border-radius: 12px; background: var(--ink); color: #b9c3e3; padding: 1.25rem; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.mega-side::after { content: ""; position: absolute; width: 180px; height: 180px; right: -70px; top: -70px; border-radius: 999px; background: radial-gradient(circle, rgba(58, 92, 245, .6), transparent 70%); pointer-events: none; }
.mega-label { font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); padding: .35rem .85rem .5rem; }
.dd-badge { white-space: nowrap; border-radius: 6px; padding: .15rem .4rem; font-size: .62rem; font-weight: 700; background: #fff0eb; color: #b23a17; }
.nav-scrim { position: fixed; inset: 0; z-index: 40; background: rgba(11, 21, 48, .18); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
body.dropdown-open .nav-scrim { opacity: 1; pointer-events: auto; }

.login-panel { visibility: hidden; opacity: 0; pointer-events: none; transform: translateY(6px); transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s; }
[data-login].is-open .login-panel { visibility: visible; opacity: 1; pointer-events: auto; transform: none; transition: opacity .2s ease, transform .2s ease, visibility 0s; }
[data-login].is-open [data-login-toggle] { color: var(--ink); background: var(--bg-2); }

.accordion-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.mobile-accordion.is-open .accordion-body { grid-template-rows: 1fr; }
.mobile-accordion.is-open .accordion-chevron { transform: rotate(180deg); }
.mobile-accordion.is-open > .mobile-link { color: var(--brand-700); }
.m-sub { margin: .1rem .5rem .5rem 1rem; padding-left: .75rem; border-left: 2px solid var(--brand-100); display: grid; grid-template-columns: minmax(0, 1fr); gap: .1rem; }
.m-sub-item { display: flex; align-items: center; gap: .7rem; padding: .55rem .6rem; border-radius: 10px; transition: background-color .2s; }
.m-sub-item:hover, .m-sub-item.is-current { background: var(--bg-2); }
.m-sub-icon { width: 2.1rem; height: 2.1rem; flex-shrink: 0; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--line); color: var(--brand-600); background: #fff; }
.mobile-panel { transform: translateX(104%); transition: transform .32s cubic-bezier(.2,.8,.2,1); }
#mobile-menu.is-open .mobile-panel { transform: none; }

/* ---------- Buttons: squared-off, solid ---------- */
.btn-primary, .btn-accent, .btn-outline, .btn-ghost-light, .btn-white, .btn-dark {
  display: inline-flex; align-items: center; gap: .55rem; padding: .78rem 1.3rem; border-radius: 10px;
  font-weight: 600; font-size: .92rem; line-height: 1.2; white-space: nowrap;
  transition: transform .15s, box-shadow .2s, background .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--brand-600); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 8px 18px -10px rgba(36, 66, 224, .9); }
.btn-primary:hover { background: var(--brand-700); }
.btn-accent { background: var(--accent-500); color: #fff; box-shadow: 0 8px 18px -10px rgba(229, 80, 42, .9); }
.btn-accent:hover { background: var(--accent-600); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #18244a; }
.btn-outline { border: 1px solid var(--line-2); color: var(--ink); background: #fff; }
.btn-outline:hover { border-color: var(--ink); }
.btn-ghost-light { border: 1px solid rgba(255,255,255,.3); color: #fff; }
.btn-ghost-light:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.6); }
.btn-white { background: #fff; color: var(--ink); }
.btn-white:hover { background: var(--brand-50); }
:is(.btn-primary, .btn-accent, .btn-outline, .btn-ghost-light, .btn-white, .btn-dark):focus-visible, .nav-link:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }
.btn-shine { position: relative; }

/* ---------- Type helpers ---------- */
.word-rotator { position: relative; display: inline-block; white-space: nowrap; vertical-align: bottom; transition: width .5s cubic-bezier(.4, 0, .2, 1); }
.word-rotator-text { display: inline-block; transition: transform .4s ease, opacity .4s ease; }
.word-rotator-text.is-leaving { transform: translateY(-45%); opacity: 0; }
.word-rotator-text.is-entering { transform: translateY(45%); opacity: 0; transition: none; }
.text-gradient { background: linear-gradient(100deg, #2442e0 0%, #5b80ff 55%, #ff6b45 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.marker { color: var(--brand-600); }
.eyebrow { display: inline-flex; align-items: center; gap: .6rem; font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--brand-600); }
.eyebrow::before { content: ""; width: 1.6rem; height: 2px; background: var(--accent-500); }
.eyebrow.is-light { color: #9fb2ff; }
.section-title { font-size: clamp(1.85rem, 3.1vw, 2.65rem); line-height: 1.12; font-weight: 700; letter-spacing: -.03em; color: var(--ink); }
.section-lead { font-size: 1.07rem; line-height: 1.7; color: var(--muted); }
.bg-dots { background-image: radial-gradient(rgba(11, 21, 48, .12) 1px, transparent 1px); background-size: 22px 22px; }

/* ---------- Surfaces ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .25s, box-shadow .25s, transform .25s; }
.card-hover:hover { border-color: var(--brand-200); box-shadow: 0 22px 44px -26px rgba(11, 21, 48, .35); transform: translateY(-3px); }
.glass { background: rgba(255,255,255,.85); border: 1px solid var(--line); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 16px 36px -20px rgba(11, 21, 48, .3); }
.glow-border { position: relative; isolation: isolate; }

/* Tiles */
.bento { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--radius); transition: transform .3s ease, border-color .3s, box-shadow .3s; }
.bento:hover { transform: translateY(-4px); border-color: var(--brand-200); box-shadow: 0 26px 50px -30px rgba(11, 21, 48, .4); }
.bento-icon { width: 2.9rem; height: 2.9rem; display: grid; place-items: center; border-radius: 11px; color: #fff; transition: transform .3s ease; }
.tone-vio { background: var(--brand-600); }
.tone-coral { background: var(--accent-500); }
.tone-mint { background: #0ea5a4; }
.tone-sun { background: #7c5cff; }

/* Keyword marquee */
.marquee { -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 1rem; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Horizontal add-on rail */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: min(320px, 82vw); gap: 1.25rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: .5rem .25rem 1.25rem; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.rail > * { scroll-snap-align: start; }

/* Timeline */
.timeline-step { position: relative; padding-left: 4.25rem; }
.timeline-step::before { content: ""; position: absolute; left: 1.45rem; top: 3.4rem; bottom: -1.75rem; width: 2px; background: repeating-linear-gradient(var(--brand-200) 0 6px, transparent 6px 12px); }
.timeline-step:last-child::before { display: none; }
.timeline-dot { position: absolute; left: 0; top: 0; width: 3rem; height: 3rem; border-radius: 1rem; display: grid; place-items: center; font-weight: 800; color: var(--ink); background: var(--accent-400); box-shadow: 0 0 0 6px rgba(255, 143, 107, .2); }

/* ---------- TDL IDE mock-up (home, stays dark) ---------- */
.js [data-tdl-code].is-typing .tdl-line:not(.is-shown) { display: none; }
.js [data-tdl-code].is-typing .tdl-line.is-shown { animation: tdl-type-in .25s ease; }
@keyframes tdl-type-in { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.tdl-caret { animation: tdl-blink 1s steps(1) infinite; }
@keyframes tdl-blink { 50% { opacity: 0; } }
[data-tdl-status].is-busy .tdl-status-dot { background: var(--accent-300); animation: tdl-blink .6s steps(1) infinite; }
[data-tdl-status].is-ok .tdl-status-dot { background: #34d399; }
.tdl-file { display: flex; align-items: center; gap: .5rem; padding: .3rem 1rem; color: #98a5cc; transition: background-color .3s, color .3s; }
.tdl-file-dot { width: .375rem; height: .375rem; border-radius: 999px; background: #3f4b78; flex-shrink: 0; transition: background-color .3s; }
.tdl-file-ok { margin-left: auto; color: #34d399; font-weight: 700; opacity: 0; transition: opacity .3s; }
.tdl-file.is-active { background: rgba(58, 92, 245, .22); color: #fff; }
.tdl-file.is-active .tdl-file-dot { background: var(--accent-400); }
.tdl-file.is-built .tdl-file-ok { opacity: 1; }
.tdl-file.is-built:not(.is-active) .tdl-file-dot { background: #34d399; }

/* ---------- Inner-page hero ---------- */
.hero-frame { position: relative; border-radius: 18px; overflow: hidden; background: #fff; border: 1px solid var(--line); box-shadow: 0 30px 60px -36px rgba(11, 21, 48, .45); }
.hero-frame img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 100% center; }
@keyframes hero-art-in { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: none; } }
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: right center; animation: hero-art-in 1s ease-out both; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13, 21, 56, .94) 0%, rgba(13, 21, 56, .78) 35%, rgba(13, 21, 56, .15) 62%, rgba(13, 21, 56, 0) 78%); }
.hero-shade.is-strong { background: linear-gradient(90deg, rgba(13, 21, 56, .95) 0%, rgba(13, 21, 56, .8) 45%, rgba(13, 21, 56, .4) 100%); }
@media (max-width: 767px) { .hero-photo { opacity: .35; } .hero-shade, .hero-shade.is-strong { background: linear-gradient(180deg, rgba(13, 21, 56, .7), rgba(13, 21, 56, .9)); } }
.home-art { filter: drop-shadow(0 30px 40px rgba(11, 21, 48, .14)); }

/* ---------- Services page ---------- */
.svc-tile { transition: transform .3s cubic-bezier(.2,.8,.2,1), background-color .3s, box-shadow .3s; }
.svc-tile:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -24px rgba(0, 0, 0, .6); }
.svc-tile-glass { background: rgba(13, 21, 56, .72); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.15); }
.svc-tile-glass:hover { background: rgba(36, 66, 224, .8); }
.svc-tab { position: relative; width: 100%; display: flex; align-items: center; gap: .85rem; padding: .85rem; border-radius: 1.1rem; color: var(--ink); transition: background-color .25s, color .25s, box-shadow .25s; }
.svc-tab:hover { background: #f2f4fa; }
.svc-tab-icon { width: 2.6rem; height: 2.6rem; flex-shrink: 0; display: grid; place-items: center; border-radius: .9rem; background: var(--brand-50); color: var(--brand-600); transition: background-color .25s, color .25s, transform .25s; }
.svc-tab-sub { color: var(--dim); }
.svc-tab-arrow { color: var(--line-2); opacity: 0; transform: translateX(-4px); transition: all .25s; }
.svc-tab:hover .svc-tab-arrow { opacity: 1; transform: none; }
.svc-tab.is-active { background: var(--brand-800); color: #fff; box-shadow: 0 14px 28px -14px rgba(27, 45, 145, .8); }
.svc-tab.is-active .svc-tab-icon { background: var(--accent-400); color: var(--ink); transform: rotate(-6deg); }
.svc-tab.is-active .svc-tab-sub { color: #bccdff; }
.svc-tab.is-active .svc-tab-arrow { opacity: 1; transform: none; color: var(--accent-400); }
@media (min-width: 1024px) {
  .js [data-svc-tabs] .svc-panel:not(.is-active) { display: none; }
  .js [data-svc-tabs] .svc-panel.is-active { animation: svc-in .45s cubic-bezier(.2,.8,.2,1); }
}
@keyframes svc-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.svc-point { transition: background-color .25s, box-shadow .25s, transform .25s; }
.svc-point:hover { background: #fff; box-shadow: 0 0 0 1px var(--brand-200), 0 12px 24px -16px rgba(36, 66, 224, .4); transform: translateY(-2px); }

.service-card { position: relative; overflow: hidden; isolation: isolate; transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s, border-color .3s; }
.service-card:hover { transform: translateY(-6px); border-color: var(--brand-200); }
.service-icon { transition: transform .35s; }
.service-card:hover .service-icon { transform: rotate(-8deg) scale(1.1); }
.service-watermark { display: none; }
.contact-card { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.contact-card:hover { transform: translateY(-4px); border-color: var(--brand-200); box-shadow: 0 22px 40px -18px rgba(36, 66, 224, .35); }
.contact-card.is-wa:hover { border-color: #6ee7b7; }
.contact-icon { transition: background-color .25s ease, color .25s ease, transform .25s ease; }
.contact-card:hover .contact-icon { background: var(--brand-600); color: #fff; transform: scale(1.08) rotate(-4deg); }
.contact-card.is-wa:hover .contact-icon { background: #10b981; color: #fff; }
.feature-card { transition: transform .25s ease, box-shadow .25s ease; }
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 0 0 1.5px var(--brand-200), 0 24px 44px -22px rgba(36, 66, 224, .4); }

/* ---------- CTA band + footer ---------- */
.cta-band { background: linear-gradient(120deg, #1b2a72 0%, #2442e0 60%, #3a5cf5 100%); }
.cta-lines { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.06) 0 1px, transparent 1px 22px); -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%); mask-image: linear-gradient(90deg, transparent, #000 60%); }
.site-footer { background: var(--bg-2); color: var(--muted); border-top: 1px solid var(--line); }
.footer-h { color: var(--ink); font-weight: 700; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-list { display: grid; gap: .65rem; font-size: .92rem; }
.footer-list a { transition: color .2s; }
.footer-list a:hover { color: var(--brand-700); }
.social-btn { width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border-radius: 10px; background: #fff; border: 1px solid var(--line); color: var(--ink); transition: background .2s, color .2s, border-color .2s; }
.social-btn:hover { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.footer-watermark { display: none; }

/* ---------- Forms ---------- */
.field-label { display: block; font-size: .85rem; font-weight: 600; color: #334155; margin-bottom: .4rem; }
.field { width: 100%; border: 1.5px solid #e2e8f0; background: #fff; border-radius: .9rem; padding: .75rem .95rem; font-size: .95rem; color: #0f172a; transition: border-color .2s, box-shadow .2s; }
.field::placeholder { color: #94a3b8; }
.field:focus { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 4px rgba(58, 92, 245, .15); }
.field.is-invalid { border-color: #ef4444; }
.field-error { margin-top: .35rem; font-size: .8rem; color: #dc2626; }
.tc .field-label { color: var(--ink); }
.tc .field { border-color: var(--line-2); background: #ffffff; color: var(--ink); }
.tc .field:focus { background: #fff; }
.field-date { cursor: pointer; padding-right: 2.75rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232442e0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9rem center; background-size: 1.15rem; }

body .flatpickr-calendar { width: 320px; padding: .75rem; border-radius: 1.1rem; font-family: inherit; border: 1px solid var(--line); box-shadow: 0 24px 48px -16px rgba(11, 21, 48, .3); }
body .flatpickr-calendar.arrowTop::before, body .flatpickr-calendar.arrowTop::after, body .flatpickr-calendar.arrowBottom::before, body .flatpickr-calendar.arrowBottom::after { display: none; }
body .flatpickr-calendar.open { margin-top: .4rem; }
body .flatpickr-months { align-items: center; margin-bottom: .5rem; }
body .flatpickr-months .flatpickr-month { height: 2.5rem; color: var(--ink); }
body .flatpickr-current-month { font-size: 1rem; font-weight: 700; padding-top: .55rem; }
body .flatpickr-months .flatpickr-prev-month, body .flatpickr-months .flatpickr-next-month { top: .75rem; width: 2.25rem; height: 2.25rem; padding: .65rem; border-radius: .7rem; }
body .flatpickr-months .flatpickr-prev-month { left: .75rem; }
body .flatpickr-months .flatpickr-next-month { right: .75rem; }
body .flatpickr-months .flatpickr-prev-month:hover, body .flatpickr-months .flatpickr-next-month:hover { background: var(--brand-50); }
body span.flatpickr-weekday { color: var(--dim); font-weight: 700; font-size: .72rem; text-transform: uppercase; }
body .flatpickr-innerContainer, body .flatpickr-rContainer, body .flatpickr-days, body .dayContainer { width: 100%; min-width: 0; max-width: none; }
body .flatpickr-day { max-width: none; height: 2.4rem; line-height: 2.4rem; margin: 1px 0; border-radius: .7rem; border: 0; font-weight: 600; color: var(--ink); }
body .flatpickr-day:hover, body .flatpickr-day:focus { background: var(--brand-50); color: var(--brand-700); }
body .flatpickr-day.today { box-shadow: inset 0 0 0 1.5px var(--brand-600); }
body .flatpickr-day.selected, body .flatpickr-day.selected:hover, body .flatpickr-day.selected:focus { background: var(--brand-600); color: #fff; }
body .flatpickr-day.prevMonthDay, body .flatpickr-day.nextMonthDay { color: #c5cbdb; }

/* ---------- Add-ons: sort / category menu ---------- */
[data-sortdd].is-enhanced > select, [data-sortdd].is-enhanced > .sortdd-native-chevron { display: none; }
.sortdd-btn { display: inline-flex; align-items: center; gap: .55rem; height: 100%; min-height: 2.75rem; max-width: 16rem; padding: .55rem .8rem .55rem .7rem; border-radius: 9px; border: 1.5px solid var(--line-2); background: #fff; font-size: .875rem; font-weight: 600; color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.sortdd-btn:hover { border-color: var(--brand-200); }
.sortdd-btn[aria-expanded="true"], .sortdd-btn:focus-visible { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 4px rgba(58, 92, 245, .15); }
.sortdd-btn-icon { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 9px; background: var(--brand-50); color: var(--brand-700); flex-shrink: 0; }
.sortdd-btn.is-filtered .sortdd-btn-icon { background: var(--accent-400); color: var(--ink); }
.sortdd-btn-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sortdd-btn-chev { color: var(--dim); transition: transform .2s; flex-shrink: 0; }
.sortdd-btn[aria-expanded="true"] .sortdd-btn-chev { transform: rotate(180deg); color: var(--brand-600); }
.sortdd-panel { position: absolute; right: 0; top: calc(100% + .5rem); z-index: 40; width: min(19rem, calc(100vw - 2rem)); padding: .5rem; border-radius: 1.1rem; background: #fff; border: 1px solid var(--line); box-shadow: 0 24px 48px -16px rgba(11, 21, 48, .3); animation: sortdd-in .16s ease-out; }
@keyframes sortdd-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.sortdd-head { padding: .55rem .6rem .3rem; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.sortdd-head:not(:first-child) { margin-top: .35rem; border-top: 1px solid var(--line); padding-top: .75rem; }
.sortdd-list.is-scroll { max-height: 15.5rem; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.sortdd-opt { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .55rem .6rem; border-radius: .7rem; font-size: .875rem; font-weight: 600; color: var(--muted); text-align: left; transition: background-color .15s, color .15s; }
.sortdd-opt:hover, .sortdd-opt:focus-visible { outline: none; background: #f2f4fa; color: var(--ink); }
.sortdd-opt-icon { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: .55rem; background: #f2f4fa; color: var(--dim); flex-shrink: 0; }
.sortdd-dot { width: .5rem; height: .5rem; margin: 0 .2rem 0 .35rem; border-radius: 999px; background: var(--line-2); flex-shrink: 0; }
.sortdd-opt-text { flex: 1; min-width: 0; }
.sortdd-count { padding: .1rem .45rem; border-radius: 999px; background: #f2f4fa; font-size: .72rem; font-weight: 700; color: var(--dim); }
.sortdd-tick { width: 1rem; color: var(--brand-600); opacity: 0; flex-shrink: 0; }
.sortdd-opt.is-active { background: var(--brand-50); color: var(--brand-800); }
.sortdd-opt.is-active .sortdd-opt-icon { background: var(--brand-600); color: #fff; }
.sortdd-opt.is-active .sortdd-dot { background: var(--brand-600); }
.sortdd-opt.is-active .sortdd-count { background: #fff; color: var(--brand-700); }
.sortdd-opt.is-active .sortdd-tick { opacity: 1; }

/* ---------- Add-on store tiles ---------- */
.addon { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.addon-thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.addon-play { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; background: rgba(11, 21, 48, .85); color: #fff; font-size: 12px; font-weight: 600; transition: background-color .2s; }
.addon-thumb:hover .addon-play { background: var(--brand-600); }
.addon-compat { display: flex; align-items: center; gap: .35rem; white-space: nowrap; overflow: hidden; color: #059669; font-size: .74rem; line-height: 1.3; font-weight: 500; }
[data-addon] { position: relative; transition: border-color .25s, box-shadow .25s, transform .25s, background-color .3s; }
[data-addon] [data-price-value], [data-addon] [data-buy] { transition: color .25s, background .25s; }
[data-addon]:hover, .js [data-addon].reveal.is-visible:hover { transform: translateY(-4px); border-color: var(--brand-200); box-shadow: 0 26px 50px -30px rgba(11, 21, 48, .45); }
[data-addon]:hover img { transform: scale(1.04); }
/* Multi-user licence selected: the whole card turns gold */
[data-addon]::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(165deg, #fdeeb8 0%, #fff6d6 45%, #fffcf0 100%); opacity: 0; transition: opacity .3s; }
[data-addon] > * { position: relative; z-index: 1; }
[data-addon].is-multi::before { opacity: 1; }
[data-addon].is-multi, .js [data-addon].reveal.is-visible.is-multi, .js [data-addon].reveal.is-visible.is-multi:hover { border-color: #d4a017; box-shadow: 0 0 0 1px #d4a017, 0 26px 50px -30px rgba(180, 130, 10, .65); }
[data-addon].is-multi .addon-thumb { border-bottom-color: #f0d27a; }
[data-addon].is-multi .addon-thumb::after { content: "★ Multi-user licence"; position: absolute; top: 12px; right: 12px; z-index: 2; padding: 4px 9px; border-radius: 7px; background: linear-gradient(135deg, #f7d774, #d4a017); color: #4a3200; font-size: 11px; font-weight: 800; letter-spacing: .01em; box-shadow: 0 8px 18px -8px rgba(180, 130, 10, .9); animation: multi-in .3s cubic-bezier(.2, .8, .2, 1); }
[data-addon].is-multi .border-slate-100 { border-color: #f0dfa8; }
[data-addon].is-multi .price-toggle { background: #fff; border-color: #ecd38a; }
@keyframes multi-in { from { opacity: 0; transform: translateY(-6px) scale(.9); } }
[data-addon].is-multi [data-price-value] { color: #a16207; }
.price-toggle { background: #f1f3f9; border: 1px solid var(--line); border-radius: 9px; }
.price-toggle button { padding: .32rem .7rem; border-radius: 7px; font-size: .74rem; font-weight: 700; color: var(--dim); transition: all .2s; }
.price-toggle button.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(11, 21, 48, .18); }
[data-addon].is-multi .price-toggle button.is-active { background: linear-gradient(135deg, #f2c94c, #d4a017); color: #3d2a00; }
.thumb-pop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; pointer-events: none; background: rgba(11, 21, 48, .45); opacity: 0; transition: opacity .25s ease; }
.thumb-pop.is-open { opacity: 1; }
.thumb-pop figure { width: min(58vw, 800px); margin: 0; transform: scale(.92); transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.thumb-pop.is-open figure { transform: scale(1); }
.thumb-pop img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 1.5rem; border: 5px solid #fff; background: #f4f7ff; box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .5); }
.thumb-pop figcaption { margin: .9rem auto 0; width: fit-content; max-width: 100%; padding: .55rem 1.2rem; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 700; text-align: center; }

/* Popups */
#addon-modal.flex .am-panel, #terms-modal.flex .tm-panel { animation: am-in .22s cubic-bezier(.2, .8, .2, 1); }
.tm-body { scrollbar-width: thin; }
.tm-body.prose-page h2 { font-size: 1.05rem; margin: 1.4rem 0 .4rem; }
.tm-body.prose-page h2:first-child { margin-top: 0; }
@keyframes am-in { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.am-plan { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem .8rem; border-radius: 1rem; border: 1.5px solid var(--line-2); background: #fff; text-align: left; transition: border-color .2s, background-color .2s, box-shadow .2s; }
.am-plan:hover { border-color: var(--brand-200); }
.am-plan-name { display: block; font-size: .72rem; line-height: 1.2; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); }
.am-plan-sub { display: block; font-size: .7rem; line-height: 1.2; color: #9aa3ba; }
.am-plan-price { font-size: 1.05rem; font-weight: 800; color: var(--ink); white-space: nowrap; }
.am-plan.is-active { border-color: var(--brand-600); background: var(--brand-50); box-shadow: 0 0 0 3px rgba(58, 92, 245, .12); }
.am-plan.is-active .am-plan-name { color: var(--brand-700); }
.am-plan.is-gold.is-active { border-color: #ff6b45; background: #fffbeb; box-shadow: 0 0 0 3px rgba(255, 107, 69, .15); }
.am-plan.is-gold.is-active .am-plan-name, .am-plan.is-gold.is-active .am-plan-price { color: #b45309; }
#addon-modal.is-gold #am-buy { background: var(--brand-700); color: #fff; }
#addon-modal.is-gold #am-compat { background: #fff0eb; color: #b23a17; }

/* "Tally Customization" compact dropdown */
.cm-item { display: flex; align-items: center; gap: .9rem; padding: .9rem; border-radius: 1.2rem; background: #fff; border: 1px solid var(--line); transition: border-color .2s, box-shadow .2s, transform .2s; }
.cm-item:hover, .cm-item:focus-visible { outline: none; border-color: var(--brand-200); transform: translateY(-1px); box-shadow: 0 14px 28px -16px rgba(36, 66, 224, .45); }
.cm-icon { width: 3rem; height: 3rem; flex-shrink: 0; display: grid; place-items: center; border-radius: 1rem; background: linear-gradient(135deg, #4d72ff, #1c33b8); color: #fff; transition: transform .2s; }
.cm-item:hover .cm-icon { transform: scale(1.06) rotate(-4deg); }
.cm-count { padding: .05rem .45rem; border-radius: 999px; font-size: .68rem; font-weight: 800; background: var(--brand-50); color: var(--brand-700); }
.cm-arrow { width: 2rem; height: 2rem; flex-shrink: 0; display: grid; place-items: center; border-radius: 999px; background: #f1f3f9; color: var(--dim); transition: background-color .2s, color .2s, transform .2s; }
.cm-item:hover .cm-arrow { background: var(--brand-600); color: #fff; transform: translateX(2px); }
.cm-item.is-gold .cm-icon { background: linear-gradient(135deg, #ffb197, #ff6b45); color: var(--ink); }
.cm-item.is-gold .cm-count { background: #fff0eb; color: #b23a17; }

/* Tally Course page */
.course-icon { width: 3rem; height: 3rem; display: grid; place-items: center; border-radius: 1rem; background: linear-gradient(135deg, #4d72ff, #1c33b8); color: #fff; }
.course-level { padding: .2rem .6rem; border-radius: 999px; background: var(--brand-50); color: var(--brand-700); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.course-card.is-gold .course-icon { background: linear-gradient(135deg, #ffb197, #ff6b45); color: var(--ink); }
.course-card.is-gold .course-level { background: #fff0eb; color: #b23a17; }
.quote-card { box-shadow: 0 30px 60px -28px rgba(11, 21, 48, .4); }
.quote-head { background: radial-gradient(120% 140% at 100% 0%, #3a5cf5 0%, #0d1538 65%); }
.course-offer { background: linear-gradient(120deg, #ffd3c4 0%, #ff8f6b 55%, #ff6b45 100%); box-shadow: 0 24px 50px -24px rgba(229, 80, 42, .6); }
.course-offer::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 999px; background: rgba(255, 255, 255, .3); pointer-events: none; }
.course-offer-icon { width: 3.5rem; height: 3.5rem; display: grid; place-items: center; border-radius: 1rem; background: var(--brand-950); color: var(--accent-400); }

/* TallyPrime page: edition cards */
.edition-icon { width: 3rem; height: 3rem; display: grid; place-items: center; border-radius: 1rem; background: var(--brand-50); color: var(--brand-600); transition: background .2s, color .2s, transform .2s; }
.edition-card { transition: transform .25s, box-shadow .25s, border-color .25s; }
.edition-card:hover { transform: translateY(-4px); border-color: var(--brand-200); box-shadow: 0 26px 50px -26px rgba(36, 66, 224, .45); }
.edition-card:hover .edition-icon { background: var(--brand-600); color: #fff; transform: scale(1.05); }
.edition-card.is-featured { border-color: var(--brand-600); box-shadow: 0 0 0 4px var(--brand-50), 0 26px 50px -26px rgba(36, 66, 224, .5); }
.edition-card.is-featured .edition-icon { background: var(--brand-600); color: #fff; }
.edition-price { padding: .9rem 1rem; border-radius: 1rem; background: #f7f8fc; border: 1px solid var(--line); }
.edition-card.is-featured .edition-price { background: var(--brand-50); border-color: var(--brand-100); }

a[href^="tel:"], .tel-num { word-spacing: .3em; }

/* Filters + pagination */
.chip { display: inline-flex; align-items: center; gap: .4rem; flex-shrink: 0; padding: .5rem .95rem; border-radius: 9px; font-size: .84rem; font-weight: 600; border: 1.5px solid var(--line-2); color: var(--muted); background: #fff; transition: all .2s; white-space: nowrap; }
.chip:hover { border-color: var(--brand-200); color: var(--brand-700); background: var(--brand-50); }
.chip.is-active { background: var(--brand-800); border-color: var(--brand-800); color: #fff; }
.chip-count { min-width: 1.35rem; padding: 0 .35rem; border-radius: 999px; text-align: center; font-size: .72rem; line-height: 1.35rem; background: #f1f3f9; color: var(--dim); }
.chip.is-active .chip-count { background: rgba(255,255,255,.2); color: #fff; }
.page-btn { min-width: 2.6rem; height: 2.6rem; padding: 0 .8rem; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; border-radius: 9px; border: 1.5px solid var(--line-2); background: #fff; font-size: .9rem; font-weight: 700; color: var(--muted); transition: all .2s; }
.page-btn:hover:not(:disabled):not(.is-active) { border-color: var(--brand-200); color: var(--brand-700); background: var(--brand-50); }
.page-btn.is-active { background: var(--brand-800); border-color: var(--brand-800); color: #fff; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }
.page-nav { font-weight: 600; }

/* FAQ */
details summary::-webkit-details-marker { display: none; }
details[open] .faq-icon { transform: rotate(45deg); background: var(--accent-400); color: var(--ink); border-color: transparent; }
details[open] { border-color: var(--brand-200); }

/* Legal pages */
.prose-page h2 { font-size: 1.3rem; font-weight: 700; color: var(--ink); margin: 2rem 0 .6rem; }
.prose-page p, .prose-page li { line-height: 1.8; }
.prose-page ul { list-style: disc; padding-left: 1.25rem; margin: .6rem 0; }
.tc .prose-page a { color: var(--brand-700); }

/* Motion */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.wa-pulse::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: #25D366; z-index: -1; animation: wa-pulse 2.4s infinite; }
@keyframes wa-pulse { 0% { transform: scale(1); opacity: .5; } 80%, 100% { transform: scale(1.5); opacity: 0; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.animate-float { animation: float 6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .marquee-track, .animate-float, .btn-shine::after { animation: none; } }

/* ---------- Home (v3) ---------- */
/* Product mock-up */
.dash { position: relative; border-radius: 16px; background: #fff; border: 1px solid var(--line); box-shadow: 0 50px 90px -40px rgba(11, 21, 48, .45), 0 0 0 8px rgba(255,255,255,.7); overflow: hidden; font-size: 12px; }
.dash-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--ink); }
.dash-bar span { width: 9px; height: 9px; border-radius: 99px; background: #3f4b78; }
.dash-bar span:first-child { background: #ff6b45; }
.dash-bar p { margin-left: 10px; color: #b9c3e3; font-weight: 600; font-size: 11.5px; }
.dash-body { display: grid; grid-template-columns: 132px 1fr; min-height: 360px; }
.dash-side { background: #f5f7fb; border-right: 1px solid var(--line); padding: 14px 10px; display: flex; flex-direction: column; gap: 3px; }
.dash-side-h { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); padding: 0 8px 6px; }
.dash-side span { padding: 6px 8px; border-radius: 7px; color: var(--muted); font-weight: 500; }
.dash-side span.is-on { background: var(--brand-600); color: #fff; font-weight: 600; }
.dash-main { padding: 14px; display: grid; gap: 12px; align-content: start; }
.dash-kpi { border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: grid; gap: 2px; }
.dash-kpi span { color: var(--dim); font-size: 10.5px; }
.dash-kpi b { font-family: Sora, sans-serif; font-size: 16px; color: var(--ink); }
.dash-kpi em { font-style: normal; font-size: 10.5px; font-weight: 600; color: var(--brand-600); }
.dash-kpi em.is-good { color: #059669; }
.dash-kpi em.is-warn { color: var(--accent-600); }
.dash-chart { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px 12px; }
.dash-chart p { font-weight: 600; color: var(--ink); font-size: 11.5px; }
.dash-bars { margin-top: 10px; height: 92px; display: flex; align-items: flex-end; gap: 6px; border-bottom: 1px solid var(--line); }
.dash-bars i { flex: 1; height: var(--h); border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--brand-500), var(--brand-600)); transform-origin: bottom; animation: dash-grow 1.1s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--d); }
.dash-bars i:last-child { background: linear-gradient(180deg, #ff8f6b, #ff6b45); }
@keyframes dash-grow { from { transform: scaleY(.08); } }
.dash-list { display: grid; gap: 6px; }
.dash-list > div { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; background: #f8f9fc; color: var(--muted); }
.dash-list b { color: var(--ink); font-weight: 700; }
.dash-list em { font-style: normal; font-size: 10.5px; font-weight: 600; color: #059669; background: #e7f8f1; border-radius: 6px; padding: 2px 6px; }
.dash-tag { font-size: 10px; font-weight: 700; color: var(--brand-700); background: var(--brand-50); border-radius: 6px; padding: 2px 6px; }
.dash-toast { position: absolute; left: -28px; bottom: 34px; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); box-shadow: 0 24px 44px -20px rgba(11, 21, 48, .4); font-size: 12px; color: var(--muted); line-height: 1.45; animation: dash-in .7s 1.2s cubic-bezier(.2,.8,.2,1) both, float 6s 2s ease-in-out infinite; }
.dash-toast > span { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: #059669; color: #fff; flex-shrink: 0; }
.dash-toast b { color: var(--ink); }
.dash-chip { position: absolute; right: -14px; top: -16px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; background: var(--ink); color: #c7d2f0; font-size: 12px; box-shadow: 0 18px 34px -16px rgba(11, 21, 48, .6); animation: dash-in .7s .8s cubic-bezier(.2,.8,.2,1) both; }
.dash-chip svg { color: var(--accent-400); }
.dash-chip b { color: #fff; }
@keyframes dash-in { from { opacity: 0; transform: translateY(14px); } }
@media (max-width: 639px) { .dash-body { grid-template-columns: 1fr; } .dash-side { display: none; } .dash-toast { left: 8px; bottom: -22px; } .dash-chip { right: 8px; } }

/* Solutions tabs */
.sol-tabs { display: flex; flex-direction: column; gap: 4px; }
.sol-tab { display: flex; align-items: center; gap: 12px; width: 100%; padding: 15px 16px; border-radius: 12px; border: 1px solid transparent; font-weight: 600; color: var(--muted); transition: background-color .2s, color .2s, border-color .2s; }
.sol-tab:hover { background: var(--bg-2); color: var(--ink); }
.sol-tab.is-on { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: 0 14px 30px -20px rgba(11, 21, 48, .35); }
.sol-num { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--dim); }
.sol-tab.is-on .sol-num { color: var(--accent-600); }
.sol-chev { opacity: 0; transition: opacity .2s; }
.sol-tab.is-on .sol-chev { opacity: 1; color: var(--brand-600); }
.sol-panels { border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; }
.sol-panel { display: none; }
.sol-panel.is-on { display: grid; grid-template-columns: 1.15fr .85fr; min-height: 440px; animation: svc-in .4s ease; }
.sol-art { background: linear-gradient(160deg, var(--brand-50), #fff); border-left: 1px solid var(--line); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.sol-art img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
@media (max-width: 1023px) { .sol-tabs { flex-direction: row; overflow-x: auto; scrollbar-width: none; } .sol-tab { width: auto; flex-shrink: 0; } .sol-chev { display: none; } }
@media (max-width: 767px) { .sol-panel.is-on { grid-template-columns: 1fr; } .sol-art { display: none; } }

/* Industries */
.ind-card { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); transition: border-color .2s, box-shadow .2s; }
.ind-card:hover { border-color: var(--brand-200); box-shadow: 0 14px 30px -22px rgba(11, 21, 48, .4); }
/* small illustration in place of the icon */
.ind-art { width: 80px; height: 52px; flex-shrink: 0; overflow: hidden; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); }
.ind-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s cubic-bezier(.2, .8, .2, 1); }
.ind-card:hover .ind-art img { transform: scale(1.08); }
.ind-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: var(--brand-50); color: var(--brand-600); }

/* Add-on store table */
.store { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #fff; }
.store-head, .store-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 14px 20px; }
@media (min-width: 640px) { .store-head, .store-row { grid-template-columns: minmax(0, 1fr) 120px 90px; } }
@media (min-width: 768px) { .store-head, .store-row { grid-template-columns: minmax(0, 1fr) 190px 120px 90px; } }
@media (min-width: 1024px) { .store-head, .store-row { grid-template-columns: minmax(0, 1fr) 210px 120px 120px 90px; } }
.store-head { background: var(--bg-2); font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); padding-top: 11px; padding-bottom: 11px; }
.store-row { border-top: 1px solid var(--line); transition: background-color .2s; }
.store-row:hover { background: #fafbff; }
.store-foot { display: flex; align-items: center; gap: 8px; padding: 13px 20px; border-top: 1px solid var(--line); background: var(--bg-2); font-size: 13px; }

/* Plans */
.plan { position: relative; display: flex; flex-direction: column; padding: 30px; border-radius: 16px; background: #fff; border: 1px solid var(--line); color: var(--ink); }
.plan-sub { color: var(--dim); }
.plan-tick { color: var(--brand-600); }
.plan ul { color: var(--muted); }
.plan > a { margin-top: auto; }
.plan > ul { margin-bottom: 2rem; }
.plan.is-hot { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 40px 70px -40px rgba(11, 21, 48, .7); }
.plan.is-hot .plan-sub, .plan.is-hot ul { color: #b9c3e3; }
.plan.is-hot .plan-tick { color: var(--accent-400); }
.plan-flag { position: absolute; top: 20px; right: 20px; border-radius: 6px; padding: 4px 8px; font-size: 11px; font-weight: 700; background: var(--accent-500); color: #fff; }

/* Process flow */
.flow { position: relative; display: grid; gap: 14px; }
.flow-step { position: relative; padding: 22px 24px 22px 128px; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.flow-when { position: absolute; left: 24px; top: 24px; width: 80px; font-family: "IBM Plex Mono", monospace; font-size: 12px; font-weight: 600; color: var(--brand-600); }
.flow-step:last-child { background: var(--brand-50); border-color: var(--brand-100); }
@media (max-width: 639px) { .flow-step { padding: 50px 20px 20px; } .flow-when { left: 20px; top: 20px; } }

/* FAQ (two columns of rules) */
.qa { border-bottom: 1px solid var(--line); }
.qa summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; cursor: pointer; list-style: none; font-weight: 600; color: var(--ink); font-size: 16px; }
.qa summary::-webkit-details-marker { display: none; }
.qa-ico { width: 30px; height: 30px; flex-shrink: 0; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); transition: transform .25s, background-color .2s, color .2s; }
.qa[open] .qa-ico { transform: rotate(180deg); background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.qa p { padding: 0 44px 20px 0; color: var(--muted); line-height: 1.7; }
@media (prefers-reduced-motion: reduce) { .dash-bars i, .dash-toast, .dash-chip { animation: none; } }

/* Inner pages (v3) */
.idx-link { display: inline-flex; align-items: center; gap: .45rem; flex-shrink: 0; padding: 15px 12px; font-size: .86rem; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; transition: color .2s, border-color .2s; }
.idx-link:hover { color: var(--ink); border-color: var(--brand-600); }
/* Edition comparison table */
.cmp { width: 100%; min-width: 760px; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #fff; font-size: .92rem; }
.cmp th, .cmp td { padding: 14px 18px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; color: var(--muted); }
.cmp tbody tr:last-child th, .cmp tbody tr:last-child td { border-bottom: 0; }
.cmp thead th { position: relative; padding-top: 26px; padding-bottom: 20px; background: var(--bg-2); vertical-align: top; }
.cmp thead th:first-child { vertical-align: bottom; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.cmp tbody th { font-weight: 600; color: var(--ink); }
.cmp .is-pick { background: var(--brand-50); }
.cmp thead .is-pick { background: #e3eaff; box-shadow: inset 0 3px 0 var(--brand-600); }
.cmp-flag { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); white-space: nowrap; border-radius: 6px; padding: 2px 8px; font-size: 10.5px; font-weight: 700; background: var(--brand-600); color: #fff; }
.cmp-yes { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: #e7f8f1; color: #059669; }

/* ---------- Mobile ---------- */
/* Safety net: nothing may make the page wider than the screen (clip keeps sticky headers working) */
html, body { overflow-x: clip; }

/* Comparison tables */
.cmp-fit { min-width: 560px; }
@media (max-width: 639px) {
  .cmp-fit { min-width: 0; font-size: .85rem; }
  .cmp-fit th, .cmp-fit td { padding: 12px 10px; }
}

/* TallyPrime edition cards (phones) */
.ed-card { position: relative; padding: 22px 20px 20px; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
.ed-card.is-pick { border-color: var(--brand-600); background: linear-gradient(180deg, var(--brand-50), #fff 45%); box-shadow: 0 0 0 3px rgba(36, 66, 224, .1), 0 26px 44px -30px rgba(11, 21, 48, .55); }
.ed-flag { position: absolute; top: -11px; right: 18px; border-radius: 7px; padding: 3px 9px; font-size: 11px; font-weight: 700; background: var(--accent-500); color: #fff; box-shadow: 0 8px 16px -8px rgba(229, 80, 42, .8); }
.ed-specs { margin-top: 16px; border-top: 1px solid var(--line); }
.ed-specs > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: .9rem; }
.ed-specs dt { color: var(--muted); }
.ed-specs dd { font-weight: 600; color: var(--ink); text-align: right; }
.ed-specs .is-no dt { color: var(--dim); }

/* App-style tab bar (phones) */
.m-dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px);
  border-top: 1px solid rgba(11, 21, 48, .08); box-shadow: 0 -10px 30px -12px rgba(11, 21, 48, .18); border-radius: 20px 20px 0 0;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .25s; animation: dock-in .55s .3s cubic-bezier(.2, .8, .2, 1) backwards; }
.m-tab, .m-fab { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; min-height: 54px; color: #6b7593; -webkit-tap-highlight-color: transparent; text-decoration: none; }
.m-tab-ic { display: grid; place-items: center; width: 52px; height: 30px; border-radius: 99px; transition: background-color .25s, color .25s, transform .2s; }
.m-tab-lb { font-size: 11px; font-weight: 600; line-height: 1.1; letter-spacing: .01em; white-space: nowrap; }
.m-tab:active .m-tab-ic { transform: scale(.88); }
.m-tab.is-on { color: var(--brand-700); }
.m-tab.is-on .m-tab-ic { background: var(--brand-50); color: var(--brand-600); }
.m-tab.is-on .m-tab-lb { font-weight: 700; }
.m-tab.is-wa .m-tab-ic { color: #16a34a; }
/* Raised centre button */
.m-fab { position: relative; color: var(--ink); }
.m-fab-btn { display: grid; place-items: center; width: 56px; height: 56px; margin-top: -30px; margin-bottom: 1px; border-radius: 50%; color: #fff;
  background: linear-gradient(145deg, var(--accent-400), var(--accent-600)); border: 4px solid #fff;
  box-shadow: 0 12px 24px -8px rgba(229, 80, 42, .75), 0 0 0 1px rgba(11, 21, 48, .05); transition: transform .2s; }
.m-fab-btn::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--accent-400); opacity: 0; animation: fab-ping 2.8s 1.5s ease-out infinite; pointer-events: none; }
.m-fab-btn { position: relative; }
.m-fab:active .m-fab-btn { transform: scale(.92); }
.m-fab .m-tab-lb { font-weight: 700; color: var(--accent-600); }
.m-fab.is-on .m-fab-btn { background: linear-gradient(145deg, var(--brand-500), var(--brand-700)); box-shadow: 0 12px 24px -8px rgba(36, 66, 224, .7), 0 0 0 1px rgba(11, 21, 48, .05); }
.m-fab.is-on .m-fab-btn::after { border-color: var(--brand-500); }
.m-fab.is-on .m-tab-lb { color: var(--brand-700); }
button.m-tab { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
body.kb-open .m-dock, body.dock-hide .m-dock { transform: translateY(110%); opacity: 0; pointer-events: none; }
body.dock-hide #to-top { transform: translateY(70px); }
@keyframes dock-in { from { transform: translateY(110%); } }
@keyframes fab-ping { 0% { opacity: .7; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.35); } }

@media (max-width: 767px) {
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  #to-top { bottom: calc(96px + env(safe-area-inset-bottom)) !important; right: 14px !important; }
}

@media (max-width: 639px) {
  /* Tighter vertical rhythm */
  section.py-20 { padding-top: 3.5rem; padding-bottom: 3.5rem; }
  section.py-16 { padding-top: 3rem; padding-bottom: 3rem; }
  section.py-28 { padding-top: 4rem; padding-bottom: 4rem; }

  /* Comfortable tap targets (≥ 40px) */
  .footer-list { gap: 0; }
  .footer-list a { display: block; padding: .55rem 0; }
  .footer-list-company { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.5rem; }
  .social-btn { width: 2.75rem; height: 2.75rem; }
  .price-toggle button { padding: .55rem .85rem; font-size: .8rem; }
  .store-row .btn-primary { padding-top: .7rem !important; padding-bottom: .7rem !important; }

  /* 16px inputs: iPhone does not zoom in when a field is tapped */
  .field { font-size: 16px; }

  /* Home: product mock-up notifications sit below the card instead of on top of it */
  .dash-toast { position: relative; left: auto; bottom: auto; margin-top: 12px; }
  .dash-chip { display: none; }

  /* Home: solution tabs scroll edge to edge and snap */
  .sol-tabs { margin: 0 -16px; padding: 0 16px 4px; scroll-snap-type: x proximity; scroll-padding: 0 16px; }
  .sol-tab { scroll-snap-align: start; }

  /* Contact: compact cards (icon left, details right) */
  section .-mt-32 { margin-top: -2.5rem; gap: .75rem; }
  .contact-card { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 14px; align-items: center; padding: 16px 18px !important; }
  .contact-card > .contact-icon { grid-row: 1 / span 3; }
  .contact-card > *:not(.contact-icon) { grid-column: 2; margin-top: 0 !important; }
  .contact-card a[href^="mailto:"] { font-size: .95rem; word-break: normal; }
}

@media (max-width: 479px) {
  div:has(> .ind-card) { grid-template-columns: minmax(0, 1fr) !important; }
}

@media (max-width: 379px) {
  .tc h1 { font-size: 2.1rem !important; }
}

@media (prefers-reduced-motion: reduce) { .m-dock, .m-fab-btn::after { animation: none; } }
