/* =========================================================
   Kuwad Surana & Associates — design system (v1, 2026)
   Classic & authoritative: deep navy, copper accent, ivory.
   ========================================================= */

:root {
    /* Colour */
    --navy-900: #0d1c38;
    --navy-800: #13284f;
    --navy-700: #1c3766;
    --navy-100: #e8edf6;
    --brand:    #1b4f86;   /* close to the ICAI logo blue */
    --brand-600: #143d69;
    --copper:   #a85f3c;
    --copper-600: #8f4f30;
    --copper-100: #f6ebe4;
    --ivory:    #f6f8fb;
    --paper:    #ffffff;
    --ink:      #16202f;
    --muted:    #5a6577;
    --line:     #e3e8ef;

    /* Type */
    --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
    --sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

    /* Shape & depth */
    --radius: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(13, 28, 56, .06);
    --shadow:    0 10px 30px rgba(13, 28, 56, .08);

    --header-h: 76px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.7;
    color: var(--ink);
    background: var(--ivory);
    -webkit-font-smoothing: antialiased;
}
body.nav-open { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--copper); }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 {
    font-family: var(--serif);
    color: var(--navy-900);
    line-height: 1.2;
    margin: 0 0 .5em;
    font-weight: 600;
    letter-spacing: -.01em;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1em; }

section, [id] { scroll-margin-top: calc(var(--header-h) + 16px); }

.container { width: min(1320px, 100% - 48px); margin-inline: auto; }
.muted { color: var(--muted); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 80ch; }

.skip-link {
    position: absolute; left: -999px; top: 8px; z-index: 100;
    background: var(--navy-800); color: #fff; padding: 8px 14px; border-radius: 6px;
}
.skip-link:focus { left: 8px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 22px;
    border-radius: 8px;
    border: 1px solid var(--navy-800);
    font: 600 .95rem/1.2 var(--sans);
    text-decoration: none;
    color: var(--navy-800);
    background: transparent;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { background: var(--navy-800); color: #fff; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.btn-light { border-color: rgba(255,255,255,.5); color: #fff; }
.btn-light:hover { background: #fff; color: var(--navy-900); }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Top bar ---------- */
.topbar { background: var(--navy-900); color: #c9d3e6; font-size: .82rem; }
.topbar-inner { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; }
.topbar a { color: #c9d3e6; text-decoration: none; }
.topbar a:hover { color: #fff; }
.topbar-right { display: flex; gap: 22px; }
.topbar i { margin-right: 4px; opacity: .8; }
.topbar-phones { white-space: nowrap; }
.topbar .sep { margin: 0 8px; opacity: .5; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    /* Solid background: a backdrop-filter here would trap the fixed mobile menu inside the header */
    background: #fff;
    border-bottom: 1px solid transparent;
    transition: box-shadow .2s, border-color .2s;
}
.site-header { border-bottom-color: var(--line); }
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }
.brand img { height: 46px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a:not(.btn) {
    padding: 8px 10px;
    color: var(--ink);
    white-space: nowrap;
    text-decoration: none;
    font-weight: 500;
    font-size: .94rem;
    border-radius: 6px;
}
.site-nav a:not(.btn):hover { color: var(--copper); }
.site-nav a[aria-current="page"] { color: var(--copper); }
.nav-cta { margin-left: 8px; padding: 10px 16px; white-space: nowrap; }

.nav-toggle {
    display: none;
    width: 44px; height: 44px;
    border: 1px solid var(--line); border-radius: 8px;
    background: var(--paper);
    flex-direction: column; justify-content: center; align-items: center; gap: 5px;
    cursor: pointer;
}
.nav-toggle span { width: 20px; height: 2px; background: var(--navy-900); transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Sections ---------- */
.section { padding: clamp(48px, 6vw, 80px) 0; }

/* Full-width white panel (like the original site) so wide screens feel filled */
.panel {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: clamp(24px, 4vw, 48px);
}
.section-alt { background: #eef2f7; border-block: 1px solid var(--line); }  /* tinted band so white cards stand out */
.section-dark { background: var(--navy-900); color: #d5ddeb; }
.section-dark h2, .section-dark h3 { color: #fff; }

.eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font: 600 .78rem/1 var(--sans);
    letter-spacing: .14em; text-transform: uppercase;
    color: var(--copper);
    margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }

.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head > div { flex: 1 1 520px; }
.section-head .lead { margin: 0; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
}

/* ---------- Hero ---------- */
.hero {
    padding: clamp(40px, 6vw, 80px) 0 clamp(48px, 7vw, 88px);
    /* Soft full-width wash, no hard edges */
    background:
        radial-gradient(800px 420px at 12% -10%, rgba(27, 79, 134, .10), transparent 60%),
        radial-gradient(700px 420px at 90% 10%, rgba(168, 95, 60, .07), transparent 60%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 3.8vw, 3rem); }
.hero h1 span { color: var(--copper); }
.hero .lead { margin: 18px 0 30px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 32px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.fact-num { font: 700 1.7rem/1 var(--serif); color: var(--navy-900); }
.fact-label { font-size: .85rem; color: var(--muted); margin-top: 6px; }

.hero-media img {
    width: 100%;
    aspect-ratio: 5 / 4; object-fit: cover; object-position: center top; /* keeps both faces in frame */
    border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
/* Caption card sits below the photo, never on top of it */
.hero-badge {
    margin: 16px auto 0; width: fit-content; max-width: 100%;
    background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
    padding: 12px 18px; box-shadow: var(--shadow-sm);
    display: flex; align-items: center; gap: 12px; font-size: .9rem;
}
.hero-badge i { font-size: 1.5rem; color: var(--copper); }
.hero-badge strong { display: block; color: var(--navy-900); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.values { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.value { padding: 22px; border-left: 3px solid var(--copper); background: var(--ivory); border-radius: 0 var(--radius) var(--radius) 0; }
.value h3 { font-size: 1.05rem; margin-bottom: 6px; }
.value p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ---------- Services ---------- */
.service-card { display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s, border-color .2s; }
.service-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #d6cfc3; }
.icon-box {
    width: 52px; height: 52px; border-radius: 12px;
    display: grid; place-items: center;
    background: var(--copper-100); color: var(--copper);
    font-size: 1.4rem; margin-bottom: 18px;
}
.service-card p { color: var(--muted); font-size: .97rem; }
.service-card ul { list-style: none; padding: 0; margin: 0 0 4px; border-top: 1px solid var(--line); padding-top: 14px; }
.service-card li { position: relative; padding-left: 22px; font-size: .92rem; margin-bottom: 6px; }
.service-card li::before { content: "\F26E"; font-family: "bootstrap-icons"; position: absolute; left: 0; color: var(--copper); }

/* ---------- Approach ---------- */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.step { position: relative; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.18); }
.step::before {
    counter-increment: step; content: "0" counter(step);
    font: 600 .85rem/1 var(--sans); color: #e2a27f; letter-spacing: .1em;
    display: block; margin-bottom: 12px;
}
.step p { color: #b7c2d6; font-size: .95rem; margin: 0; }

/* ---------- Industries ---------- */
.industry {
    display: flex; gap: 14px; align-items: center;
    padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--paper);
}
.industry i { font-size: 1.3rem; color: var(--navy-700); }
.industry strong { display: block; font-weight: 600; color: var(--navy-900); }
.industry span { font-size: .85rem; color: var(--muted); }

/* ---------- Resources ---------- */
.resource { position: relative; text-decoration: none; color: inherit; display: block; }
.resource h3 { margin-top: 4px; }
.resource p { color: var(--muted); font-size: .95rem; margin: 0; }
.tag {
    position: absolute; top: 20px; right: 20px;
    font: 600 .7rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase;
    padding: 6px 9px; border-radius: 999px; background: var(--navy-100); color: var(--navy-700);
}

/* ---------- Team ---------- */
.person { display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: start; }
.person img { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.person-role { color: var(--copper); font-weight: 600; font-size: .9rem; margin-bottom: 12px; }
.person-exp { font-family: var(--sans); font-size: .85rem; font-weight: 500; color: var(--muted); }
.person p { font-size: .95rem; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 16px; }
.chips li { font-size: .8rem; padding: 5px 10px; border-radius: 999px; background: var(--ivory); border: 1px solid var(--line); }
.person-link { font-size: .9rem; font-weight: 600; text-decoration: none; }

/* ---------- Insights ---------- */
.post-card { display: flex; flex-direction: column; }
.post-date { font-size: .82rem; color: var(--copper); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.post-card h3 a { color: var(--navy-900); text-decoration: none; }
.post-card h3 a:hover { color: var(--copper); }
.post-card p { color: var(--muted); font-size: .95rem; }
.post-more { margin-top: auto; font-weight: 600; font-size: .92rem; text-decoration: none; }
.empty { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty i { font-size: 2rem; color: var(--copper); display: block; margin-bottom: 10px; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--navy-800); color: #d5ddeb; border-radius: var(--radius-lg); padding: clamp(32px, 5vw, 56px); display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: 8px; }
.cta-band p { margin: 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; }
.contact-list { list-style: none; padding: 0; margin: 0 0 24px; }
.contact-list li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-list i { color: var(--copper); font-size: 1.15rem; margin-top: 2px; }
.contact-list strong { display: block; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.map { width: 100%; height: 240px; border: 0; border-radius: var(--radius); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: .88rem; font-weight: 600; color: var(--navy-900); }
.field input, .field select, .field textarea {
    font: inherit; font-size: .95rem;
    padding: 11px 13px;
    border: 1px solid #d3d0c8; border-radius: 8px;
    background: var(--paper); color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy-700); box-shadow: 0 0 0 3px var(--navy-100); }
.field textarea { min-height: 130px; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .82rem; color: var(--muted); margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #aab6cc; font-size: .93rem; padding-top: 64px; margin-top: 0; }
.site-footer a { color: #d5ddeb; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 48px; }
.footer-name { font: 600 1.3rem/1.3 var(--serif); color: #fff; }
.footer-tag { color: #e2a27f; font-size: .85rem; margin: 6px 0 14px; }
.footer-head { color: #fff; font-weight: 600; margin-bottom: 14px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.site-footer address { font-style: normal; margin-bottom: 12px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 0; border-top: 1px solid rgba(255,255,255,.1); font-size: .82rem; }

/* ---------- WhatsApp ---------- */
.whatsapp-float {
    position: fixed; right: 20px; bottom: 20px; z-index: 40;
    width: 54px; height: 54px; border-radius: 50%;
    display: grid; place-items: center;
    background: #25d366; color: #fff; font-size: 1.6rem;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
    text-decoration: none;
}
.whatsapp-float:hover { color: #fff; transform: scale(1.05); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (min-width: 1280px) {
    body { font-size: 17px; }
}

@media (max-width: 1140px) {
    .nav-toggle { display: flex; }
    .site-nav {
        position: fixed; inset: var(--nav-top, var(--header-h)) 0 0 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: #fff; padding: 16px 20px 32px;
        overflow-y: auto;
        opacity: 0; transform: translateY(-8px); visibility: hidden;
        transition: opacity .2s ease, transform .2s ease, visibility .2s;
    }
    .site-nav.open { opacity: 1; transform: none; visibility: visible; }
    .site-nav a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 1.05rem; }
    .nav-cta { margin: 20px 0 0; justify-content: center; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
    .hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .topbar-hours { display: none; }
}

@media (max-width: 600px) {
    .container { width: calc(100% - 32px); }
    .topbar-inner > span:first-child { display: none; }
    .topbar-right { width: 100%; justify-content: center; gap: 12px; }
    .topbar-email { display: none; }  /* phones get priority on small screens */
    .grid-4, .values, .steps, .form-grid, .footer-grid { grid-template-columns: 1fr; }
    .person { grid-template-columns: 1fr; }
    .person img { max-width: 220px; }
    .brand img { height: 40px; }
}

/* =========================================================
   Phase 2: inner pages
   ========================================================= */

.narrow { width: min(880px, 100% - 48px); }

/* Page heading band with breadcrumb */
.page-hero {
    padding: clamp(36px, 5vw, 64px) 0 clamp(32px, 4vw, 48px);
    background:
        radial-gradient(800px 360px at 10% -20%, rgba(27, 79, 134, .12), transparent 60%),
        radial-gradient(600px 320px at 95% 0%, rgba(168, 95, 60, .08), transparent 60%);
    border-bottom: 1px solid var(--line);
}
.page-hero h1 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); margin-bottom: .3em; }
.page-hero .lead { margin: 0; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--copper); }
.crumbs i { font-size: .7rem; opacity: .6; }
.crumbs [aria-current] { color: var(--ink); }

/* Make a whole card clickable from the link in its heading */
.service-card, .post-card { position: relative; }
.card-link { color: inherit; text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card-link:focus-visible { outline: none; }
.service-card:focus-within, .post-card:focus-within { outline: 2px solid var(--copper); outline-offset: 3px; }
.service-card h3 a:hover, .post-card h3 a:hover { color: var(--copper); }
.service-card .more { margin-top: auto; padding-top: 14px; font-weight: 600; font-size: .92rem; color: var(--brand); }
.service-card:hover .more { color: var(--copper); }

/* Single service page */
.service-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.service-aside { display: grid; gap: 20px; position: sticky; top: calc(var(--header-h) + 20px); }
.includes { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 28px; margin-top: 8px; }
.include-item { display: flex; gap: 12px; }
.include-item i { color: var(--copper); font-size: 1.25rem; line-height: 1.3; }
.include-item h3 { font-size: 1.05rem; margin-bottom: 4px; }
.include-item p { color: var(--muted); font-size: .95rem; margin: 0; }
.chips-lg li { font-size: .92rem; padding: 8px 14px; background: var(--paper); }
.btns-stack { flex-direction: column; }
.btns-stack .btn { justify-content: center; }
.side-links { list-style: none; padding: 0; margin: 0; }
.side-links li + li { border-top: 1px solid var(--line); }
.side-links a { display: flex; gap: 10px; padding: 10px 0; text-decoration: none; color: var(--ink); font-size: .95rem; }
.side-links a:hover { color: var(--copper); }
.side-links i { color: var(--brand); }

/* About page */
.facts-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fact-box { padding: 22px; border-radius: var(--radius); background: var(--ivory); border: 1px solid var(--line); }
.value-card p { color: var(--muted); font-size: .95rem; margin: 0; }

/* Industries page */
.industry-card { display: flex; gap: 20px; align-items: flex-start; }
.industry-card .icon-box { flex: none; margin: 0; }
.industry-card h3 { margin-bottom: 2px; }
.industry-sub { color: var(--copper); font-weight: 600; font-size: .88rem; margin-bottom: 8px; }
.industry-card p { color: var(--muted); margin: 0; font-size: .96rem; }

/* Insights */
.post-thumb { width: calc(100% + 56px); max-width: none; margin: -28px -28px 18px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.pager { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 40px; }
.article-hero h1 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); }
.article-meta { display: flex; flex-wrap: wrap; gap: 18px; color: var(--muted); font-size: .9rem; }
.article-meta i { color: var(--copper); margin-right: 4px; }
.article-image { width: 100%; border-radius: var(--radius); margin-bottom: 28px; aspect-ratio: 1200 / 630; object-fit: cover; }
.article-body { font-size: 1.05rem; line-height: 1.8; }
.article-body h2 { font-size: 1.6rem; margin-top: 1.6em; }
.article-body h3 { font-size: 1.3rem; margin-top: 1.4em; }
.article-body img { border-radius: var(--radius); margin: 1.2em 0; }
.article-body blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--copper); color: var(--muted); }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .95rem; display: block; overflow-x: auto; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.article-body th { background: var(--ivory); }
.article-body pre { background: var(--ivory); padding: 16px; border-radius: 8px; overflow-x: auto; }
.share { display: flex; align-items: center; gap: 10px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); font-weight: 600; }
.share a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); text-decoration: none; color: var(--navy-700); font-size: 1.1rem; }
.share a:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.article-disclaimer { margin: 20px 0 0; font-size: .85rem; color: var(--muted); }

/* Legal pages */
.prose h2 { font-size: 1.35rem; margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }

/* Thank-you / error / 404 */
.message-panel { text-align: center; padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 56px); }
.message-panel .lead { margin: 0 auto 12px; }
.message-panel .btns { margin-top: 24px; }
.message-icon { width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 50%; display: grid; place-items: center; font-size: 1.9rem; background: var(--navy-100); color: var(--brand); }
.message-icon.ok { background: #e3f4ea; color: #1d7a46; }
.message-icon.warn { background: var(--copper-100); color: var(--copper); }

/* Footer legal links */
.footer-note a { color: #d5ddeb; margin: 0 2px; }

@media (max-width: 1140px) {
    .service-layout { grid-template-columns: 1fr; }
    .service-aside { position: static; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
    .includes, .service-aside { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .narrow { width: calc(100% - 32px); }
    .facts-panel { grid-template-columns: 1fr 1fr; }
    .industry-card { flex-direction: column; gap: 14px; }
}

/* =========================================================
   Phase 3: compliance calendar, calculators
   ========================================================= */

.resource-live { position: relative; transition: transform .2s, box-shadow .2s; }
.resource-live:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.resource .more { display: inline-block; margin-top: 12px; font-weight: 600; font-size: .92rem; color: var(--brand); }

/* Calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.cal-head h2 { margin: 0; text-align: center; }
.cal-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 24px; }
.chip-btn { font: 500 .88rem var(--sans); padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; }
.chip-btn[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.cal-list { display: grid; gap: 12px; }
.cal-day { display: grid; grid-template-columns: 96px 1fr; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.cal-day.past { opacity: .6; }
.cal-day.today { border-color: var(--copper); box-shadow: 0 0 0 2px var(--copper-100); }
.cal-day.soon { border-color: #cdd8ea; }
.cal-date { background: var(--navy-100); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 14px 8px; text-align: center; }
.cal-day.today .cal-date { background: var(--copper); color: #fff; }
.cal-date .d { font: 700 1.9rem/1 var(--serif); color: var(--navy-900); }
.cal-day.today .cal-date .d { color: #fff; }
.cal-date .w { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; margin-top: 4px; }
.cal-date .flag { margin-top: 6px; font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; background: var(--copper); color: #fff; padding: 2px 8px; border-radius: 999px; }
.cal-day.today .cal-date .flag { background: #fff; color: var(--copper); }
.cal-items { list-style: none; margin: 0; padding: 6px 20px; }
.cal-items li { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; }
/* the category filter hides days and entries with the hidden attribute; display: grid/flex above would override it */
.cal-day[hidden], .cal-items li[hidden] { display: none; }
.cal-items li + li { border-top: 1px solid var(--line); }
.cal-items .badge { flex: none; min-width: 84px; text-align: center; font-size: .72rem; font-weight: 600; padding: 4px 8px; border-radius: 999px; background: var(--navy-100); color: var(--navy-700); }
.cal-items .law-gst { background: #e7f0fb; color: #1b4f86; }
.cal-items .law-incometax { background: var(--copper-100); color: var(--copper-600); }
.cal-items .law-tdstcs { background: #efe9f8; color: #5b3d8f; }
.cal-items .law-rocllp { background: #e3f4ea; color: #1d7a46; }
.cal-items .law-pfesi { background: #fdf3dc; color: #8a6114; }
.cal-items .law-labour { background: #fbe9e7; color: #a1381f; }
.cal-items .law-rbifema { background: #e6f4f4; color: #1f6f6f; }
.cal-items .law-sebi { background: #eef0f3; color: #3d4757; }
.cal-items strong { font-weight: 600; color: var(--navy-900); }
.cal-items p { margin: 2px 0 0; font-size: .9rem; color: var(--muted); }
.cal-add { display: inline-block; margin-top: 4px; font-size: .85rem; text-decoration: none; }
.cal-note { margin-top: 24px; font-size: .88rem; color: var(--muted); }
.cal-note i { color: var(--copper); }

/* Calculators */
.calc-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 28px; align-items: start; }
.calc-form h3 { font-size: 1.1rem; margin: 22px 0 12px; }
.calc-form .btn { margin-top: 20px; }
.calc-form select { font: inherit; padding: 11px 13px; border: 1px solid #d3d0c8; border-radius: 8px; background: var(--paper); }
.hint { font-size: .78rem; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: center; margin-top: 16px; font-size: .95rem; }
.calc-result { position: sticky; top: calc(var(--header-h) + 20px); }
.calc-result h2 { font-size: 1.4rem; }
.verdict { background: var(--navy-100); border-radius: var(--radius); padding: 12px 16px; }
.calc-table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 12px 0; }
.calc-table th { text-align: right; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 10px; }
.calc-table td { padding: 10px; border-bottom: 1px solid var(--line); }
.calc-table td:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.calc-table tr.total td { font-weight: 700; color: var(--navy-900); border-bottom: 0; border-top: 2px solid var(--navy-800); }
.calc-table tr.least td { font-weight: 700; color: var(--copper-600); }
.calc-figures { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.calc-figures div { background: var(--ivory); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.calc-figures span { display: block; font-size: .82rem; color: var(--muted); }
.calc-figures strong { font: 700 1.4rem var(--serif); color: var(--navy-900); }
.calc-notes { font-size: .85rem; color: var(--muted); padding-left: 18px; margin: 12px 0 0; }
.hide-sm { display: inline; }

@media (max-width: 960px) {
    .calc-layout { grid-template-columns: minmax(0, 1fr); }
    .calc-result { position: static; }
    .calc-table td:not(:first-child) { white-space: normal; }   /* long text values wrap instead of widening the page */
}
@media (max-width: 600px) {
    .cal-day { grid-template-columns: 64px 1fr; }
    .cal-items { padding: 4px 14px; }
    .cal-items li { flex-direction: column; gap: 6px; }
    .hide-sm { display: none; }
}

/* Phone numbers stay on one line ("+91 97733 96816" never splits) */
a[href^="tel:"] { white-space: nowrap; }

/* ---------- Calculator hub and shared calculator pieces ---------- */
.calc-group + .calc-group { margin-top: 48px; }
.calc-group-title { font-size: 1.35rem; margin: 0 0 18px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.calc-source { font-size: .85rem; color: var(--muted); margin: 32px 0 0; max-width: 90ch; }
.calc-others { margin-top: 48px; }
.calc-others h2 { font-size: 1.2rem; margin-bottom: 14px; }
.calc-others ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 24px; }
.calc-others a { display: flex; gap: 10px; align-items: baseline; font-size: .95rem; text-decoration: none; padding: 6px 0; }
.calc-others a:hover { text-decoration: underline; }
.calc-others i { color: var(--copper); }
.calc-table-wrap { margin-top: 28px; }
.calc-table-wrap h2 { font-size: 1.25rem; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ref-table { font-size: .9rem; min-width: 640px; }
.ref-table th { text-align: left; background: var(--ivory); }
.ref-table td { vertical-align: top; }
.ref-table td:not(:first-child) { white-space: normal; text-align: left; }
.calc-form input[type="date"] { font: inherit; padding: 10px 12px; border: 1px solid #d3d0c8; border-radius: 8px; background: var(--paper); }

/* Segmented radio buttons (mapper, codes) */
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; background: var(--paper); }
.seg label:has(input:checked) { background: var(--brand); border-color: var(--brand); color: #fff; }
.seg label:has(input:focus-visible) { outline: 2px solid var(--copper); outline-offset: 2px; }
.mapper-controls { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: end; margin-bottom: 8px; }
.mapper-search { flex: 1 1 320px; }
.mapper-search input { font-size: 1.05rem; }
.mapper-results { display: grid; gap: 10px; margin-top: 12px; }
.map-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.2fr); gap: 14px; align-items: start; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.map-act { display: block; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }
.map-from strong, .map-to strong { color: var(--navy-900); margin-right: 4px; }
.map-arrow { color: var(--copper); margin-top: 22px; }
.map-to ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.map-to li.secondary { font-size: .85rem; color: var(--muted); }
.map-to li.none { color: var(--copper-600); font-style: italic; }
@media (max-width: 700px) {
    .map-row { grid-template-columns: 1fr; }
    .map-arrow { transform: rotate(90deg); margin: 0; }
}

/* ---------- Automation tools ---------- */
.section-tight { padding-bottom: 0; }
.btn-sm { padding: 9px 14px; font-size: .88rem; }
.tag-free { background: #e7f3ec; color: #1f6b43; border-color: #cfe6d8; }
.tool-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 16px; }
.tool-feature { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: start; padding: 32px; }
.tool-feature h2 { margin: 6px 0 8px; }
.tool-feature-icon { width: 96px; height: 96px; border-radius: 22px; background: var(--navy-100); display: grid; place-items: center; overflow: hidden; flex: none; }
.tool-feature-icon img { width: 100%; height: 100%; object-fit: cover; }
.tool-feature-icon i { font-size: 2.6rem; color: var(--brand); }
.tool-filters { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: end; margin-bottom: 24px; }
.tool-filters .field { min-width: 180px; }
.tool-filters select { font: inherit; padding: 9px 12px; border: 1px solid #d3d0c8; border-radius: 8px; background: var(--paper); }
.tool-filters .help { margin: 0 0 8px auto; }
.tool-card { position: relative; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tool-card[hidden] { display: none; }
.tool-card-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.tool-card-head .tool-tags { margin: 0; justify-content: end; }
.tool-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--navy-100); display: grid; place-items: center; overflow: hidden; flex: none; }
.tool-icon img { width: 100%; height: 100%; object-fit: cover; }
.tool-icon i { font-size: 1.4rem; color: var(--brand); }
.tool-card h3 { margin: 14px 0 2px; }
.tool-cat { font-size: .85rem; margin: 0 0 8px; }
.tool-card p { font-size: .95rem; }
.tool-meta { font-size: .82rem; color: var(--muted); margin-top: auto; }
.tool-card .more { font-weight: 600; font-size: .92rem; color: var(--brand); }
.changelog { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 14px; }
.changelog li { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.changelog-date { font-size: .85rem; color: var(--muted); padding-top: 2px; }
.tool-hero-grid { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
.tool-hero-grid h1 { margin: 4px 0 8px; }
.tool-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 40px; align-items: start; }
.tool-main h2 { font-size: 1.5rem; margin-top: 36px; }
.tool-main h2:first-child { margin-top: 0; }
.feature-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; margin-top: 18px; }
.feature-group h3 { font-size: 1.05rem; margin-bottom: 6px; }
.feature-group ul { padding-left: 18px; margin: 0; font-size: .95rem; color: var(--muted); }
.feature-group li { margin-bottom: 6px; }
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.shots figure { margin: 0; }
.shots img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); display: block; }
.shots figcaption { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.tool-aside { display: grid; gap: 16px; position: sticky; top: calc(var(--header-h) + 20px); }
.tool-aside .h3 { font-size: 1.15rem; margin-bottom: 12px; }
.tool-aside p { font-size: .95rem; margin: 0; }
.dl-options { display: grid; gap: 16px; }
.dl-option .hint { display: block; margin-top: 6px; }
.store-badge img { display: block; height: 52px; width: auto; }
ul.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .95rem; }
ul.plain li { padding-left: 20px; position: relative; }
ul.plain li::before { content: "\F26E"; font-family: "bootstrap-icons"; position: absolute; left: 0; color: var(--copper); }
@media (max-width: 960px) {
    .tool-layout { grid-template-columns: 1fr; }
    .tool-aside { position: static; }
}
@media (max-width: 700px) {
    .tool-feature, .tool-hero-grid { grid-template-columns: 1fr; padding: 22px; }
    .tool-hero-grid { padding: 0; }
    .feature-groups, .shots { grid-template-columns: 1fr; }
    .changelog li { grid-template-columns: 1fr; gap: 4px; }
    .tool-filters .help { margin-left: 0; }
}
/* Tags used inline (tools pages) rather than pinned to a card corner */
.tool-tags .tag, .changelog .tag, .dl-options .tag, .tool-feature .tag { position: static; display: inline-block; }
/* Keep the ICAI logo at full size; tighten the menu on mid-width screens (9 menu items) */
.brand { flex: 0 1 auto; min-width: 260px; }
.brand img { max-width: 100%; object-fit: contain; object-position: left center; }
@media (min-width: 1141px) and (max-width: 1320px) {
    .header-inner { gap: 16px; }
    .site-nav { gap: 0; }
    .site-nav a:not(.btn) { padding: 8px 7px; font-size: .9rem; }
    .nav-cta { margin-left: 6px; padding: 9px 12px; font-size: .88rem; }
}
/* Long drop-down options must not widen forms on phones */
.calc-form, .calc-form .field, .calc-form .form-grid > * { min-width: 0; }
.calc-form select, .calc-form input { width: 100%; max-width: 100%; }
@media (max-width: 600px) { .calc-form .form-grid { grid-template-columns: 1fr; } }

/* Capital gains: value on 31 January 2018 lookup */
.fmv-box { margin-top: 18px; padding-top: 4px; border-top: 1px solid var(--line); }
.fmv-search { margin-bottom: 12px; }
.fmv-results { list-style: none; margin: 6px 0 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); max-height: 320px; overflow-y: auto; }
.fmv-results li + li { border-top: 1px solid var(--line); }
.fmv-results button { display: block; width: 100%; text-align: left; padding: 10px 14px; background: none; border: 0; font: inherit; cursor: pointer; }
.fmv-results button:hover, .fmv-results button:focus-visible { background: rgba(19, 40, 79, .06); }
.fmv-results strong { display: block; font-weight: 600; color: var(--navy-900); }
.fmv-results span { font-size: .85rem; color: var(--muted); }
.fmv-results li.none { padding: 10px 14px; font-size: .9rem; color: var(--muted); }
.fmv-pick { padding: 12px 14px; margin-bottom: 12px; border-radius: var(--radius); background: rgba(19, 40, 79, .05); font-size: .92rem; line-height: 1.5; }
.fmv-pick .muted { color: var(--muted); font-size: .85rem; }
.linklike { background: none; border: 0; padding: 0; color: var(--navy-700, #1e3a8a); text-decoration: underline; cursor: pointer; font: inherit; }
.calc-form input[readonly] { background: rgba(19, 40, 79, .04); }
.fmv-warn { margin: 8px 0 0; padding: 8px 10px; border-left: 3px solid #b7791f; background: #fff8e6; font-size: .88rem; }

/* Insights: filters, cards and update pages */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.insights-filters { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.filter-links { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-links a { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); text-decoration: none; font-size: .9rem; }
.filter-links a:hover { border-color: var(--navy-700); }
.filter-links a[aria-current="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.insights-search { display: flex; gap: 8px; flex: 1 1 320px; max-width: 460px; }
.insights-search input { flex: 1; min-width: 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; }
.filter-status { color: var(--muted); margin: -12px 0 20px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.post-cat { font-size: .76rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--navy-100); color: var(--navy-700); }
.post-pdf { font-size: .76rem; color: var(--muted); }
.post-refs { font-size: .85rem !important; color: var(--navy-700) !important; margin: -4px 0 6px; }
.article-refs { color: var(--muted); font-size: .98rem; margin: -4px 0 14px; }
.article-pdf { margin-top: 18px; }
.article-pdf span { font-weight: 400; opacity: .85; }
.article-summary { font-size: 1.12rem; line-height: 1.7; color: var(--navy-900); padding: 0 0 18px; margin: 0 0 22px; border-bottom: 1px solid var(--line); }
.article-pdf-end { margin-top: 28px; padding: 14px 16px; background: var(--ivory); border-radius: var(--radius); }
.article-pdf-end i { color: #b42318; margin-right: 6px; }
.related-posts { margin-top: 40px; }
.related-posts h2 { font-size: 1.4rem; margin-bottom: 16px; }
@media (max-width: 600px) {
    .insights-search { max-width: none; }
}
.article-body td { vertical-align: top; }
.article-body thead th { background: var(--navy-900); color: #fff; font-weight: 600; border-color: var(--navy-900); }
.article-body tbody tr:nth-child(even) td { background: #f6f8fb; }

/* KSA Assistant (guided chat) */
.ksa-chat-btn { position: fixed; left: 20px; bottom: 20px; z-index: 1001; display: flex; align-items: center; gap: 8px; padding: 12px 18px 12px 14px; border: 0; border-radius: 999px; background: var(--brand); color: #fff; font: 600 .95rem var(--sans); box-shadow: 0 10px 30px rgba(13, 28, 56, .28); cursor: pointer; }
.ksa-chat-btn i { font-size: 1.25rem; }
.ksa-chat-btn:hover { filter: brightness(1.08); }
.ksa-chat-btn:focus-visible { outline: 3px solid var(--copper); outline-offset: 3px; }
.ksa-chat-btn.is-open { background: var(--navy-900); }
.ksa-chat { position: fixed; left: 20px; bottom: 84px; z-index: 1001; width: 380px; max-width: calc(100vw - 40px); height: min(600px, calc(100vh - 120px)); display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 60px rgba(13, 28, 56, .28); overflow: hidden; }
.ksa-chat[hidden] { display: none; }
.ksa-chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; background: var(--navy-900); color: #fff; }
.ksa-chat-head > div { flex: 1; min-width: 0; }
.ksa-chat-head h2 { margin: 0; font: 600 1rem var(--sans); color: #fff; }
.ksa-chat-head p { margin: 2px 0 0; font-size: .74rem; opacity: .8; letter-spacing: .02em; }
.ksa-chat-avatar { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--copper); color: #fff; font: 700 .85rem var(--sans); }
.ksa-chat-icon { width: 34px; height: 34px; flex: none; border: 0; border-radius: 8px; background: transparent; color: #fff; cursor: pointer; font-size: 1rem; }
.ksa-chat-icon:hover, .ksa-chat-icon:focus-visible { background: rgba(255, 255, 255, .14); }
.ksa-chat-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #f6f8fb; overscroll-behavior: contain; }
.ksa-msg { max-width: 92%; padding: 10px 13px; border-radius: 14px; font-size: .9rem; line-height: 1.5; }
.ksa-msg p { margin: 0 0 6px; }
.ksa-msg p:last-child { margin-bottom: 0; }
.ksa-bot { align-self: flex-start; background: var(--paper); border: 1px solid var(--line); border-top-left-radius: 4px; }
.ksa-me { align-self: flex-end; background: var(--brand); color: #fff; border-top-right-radius: 4px; }
.ksa-title { font-weight: 600; color: var(--navy-900); }
.ksa-sub { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-top: 8px !important; }
.ksa-list { list-style: none; margin: 6px 0 2px; padding: 0; display: grid; gap: 6px; }
.ksa-list a { display: block; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); background: #fff; }
.ksa-list a:hover, .ksa-list a:focus-visible { border-color: var(--navy-700); }
.ksa-list strong { display: block; font-weight: 600; color: var(--navy-900); font-size: .88rem; }
.ksa-list span { display: block; font-size: .78rem; color: var(--muted); }
.ksa-links, .ksa-contact, .ksa-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ksa-link { font-weight: 600; font-size: .85rem; text-decoration: none; }
.ksa-chip { padding: 6px 11px; border: 1px solid var(--navy-700); border-radius: 999px; background: #fff; color: var(--navy-700); font: 500 .82rem var(--sans); cursor: pointer; text-align: left; }
.ksa-chip:hover, .ksa-chip:focus-visible { background: var(--navy-100); }
.ksa-chip:disabled { opacity: .45; cursor: default; }
.ksa-chip.is-picked { background: var(--brand); color: #fff; opacity: 1; }
.ksa-cbtn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font: 500 .82rem var(--sans); text-decoration: none; cursor: pointer; }
.ksa-cbtn i { color: var(--navy-700); }
.ksa-cbtn.ksa-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.ksa-cbtn.ksa-primary i { color: #fff; }
.ksa-form { display: grid; gap: 8px; }
.ksa-form label { display: grid; gap: 3px; font-size: .8rem; font-weight: 600; color: var(--navy-900); }
.ksa-form input, .ksa-form textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: 400 .88rem var(--sans); }
.ksa-form .ksa-hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.ksa-form-note { font-size: .75rem; color: var(--muted); }
.ksa-form-err { color: #b42318; font-size: .82rem; }
.ksa-typing { display: flex; gap: 4px; padding: 4px 2px; }
.ksa-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: .4; animation: ksa-dot 1s infinite; }
.ksa-typing span:nth-child(2) { animation-delay: .15s; }
.ksa-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes ksa-dot { 50% { opacity: 1; } }
.ksa-chat-input { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: var(--paper); }
.ksa-chat-input input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: 400 .9rem var(--sans); }
.ksa-chat-input button { width: 42px; flex: none; border: 0; border-radius: 10px; background: var(--brand); color: #fff; cursor: pointer; }
.ksa-chat-privacy { margin: 0; padding: 0 12px 10px; font-size: .7rem; color: var(--muted); background: var(--paper); }
@media (max-width: 600px) {
    .ksa-chat-btn { left: 14px; bottom: 14px; padding: 11px 15px 11px 12px; }
    .ksa-chat { left: 8px; right: 8px; bottom: 8px; width: auto; max-width: none; height: calc(100dvh - 16px); border-radius: 14px; }
}
@media (prefers-reduced-motion: reduce) { .ksa-typing span { animation: none; opacity: .7; } }
@media print { .ksa-chat-btn, .ksa-chat { display: none !important; } }
