/* =====================================================================
   Mwangi Muchiri & Associates — public + portal stylesheet
   SKY GLASS THEME: pale-blue base, white cards, navy headings,
   steel-blue buttons + cyan highlights. Same futuristic structure:
   Space Grotesk display type, Nunito Sans body, inline SVG icons,
   HD hero slideshow, colour-coded calendar & diary.
===================================================================== */
@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("/assets/fonts/nunito-sans.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito Sans";
  font-style: italic;
  font-weight: 200 1000;
  font-display: swap;
  src: url("/assets/fonts/nunito-sans-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/space-grotesk.woff2") format("woff2");
}

:root {
  --bg: #dfe7ee;
  --bg-2: #d5e0eb;
  --panel: #ffffff;
  --panel-2: #f4f8fd;
  --line: #aebfcc;
  --line-soft: #cfd9e3;
  --cyan: #164e80;
  --cyan-2: #2b6cb0;
  --violet: #6d5bd0;
  --ink: #14273c;
  --text: #223649;
  --muted: #5c7186;
  --ok: #15803d;
  --ok-bg: #e5f6ec;
  --warn: #b45309;
  --warn-bg: #fdf3dd;
  --bad: #c02b3a;
  --bad-bg: #fdecee;
  --info: #0369a1;
  --info-bg: #e3f3fc;
  --grad: linear-gradient(120deg, #163e66, #2b6cb0);
  --glass: rgba(255, 255, 255, .86);
  --glass-line: rgba(22, 62, 102, .22);
  --radius: 14px;
  --shadow: 0 8px 26px rgba(16, 42, 66, .12);
  --glow: 0 0 0 1px rgba(29, 111, 184, .12), 0 6px 22px rgba(14, 165, 233, .14);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Nunito Sans", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 480px at 88% -8%, rgba(14, 165, 233, .1), transparent 60%),
    radial-gradient(700px 420px at -8% 28%, rgba(29, 111, 184, .07), transparent 60%),
    radial-gradient(700px 480px at 108% 82%, rgba(109, 91, 208, .06), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
::selection { background: #b9e0fa; color: var(--ink); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: #b6cbe0; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #93b2d1; }

h1, h2, h3, h4 {
  font-family: "Space Grotesk", "Nunito Sans", system-ui, sans-serif;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.16;
  letter-spacing: -.01em;
  margin: 0 0 14px;
}
h1 { font-size: clamp(34px, 5vw, 58px); }
h2 { font-size: clamp(26px, 3.4vw, 38px); }
h3 { font-size: clamp(19px, 2vw, 23px); }
h4 { font-size: 19px; }
p { margin: 0 0 14px; }
a { color: var(--cyan); text-decoration: none; }
a:hover { color: #05598a; }
img { max-width: 100%; }
code { background: var(--panel-2); border: 1px solid var(--line-soft); padding: 1px 7px; border-radius: 6px; color: var(--cyan); font-weight: 700; font-size: .92em; }
.ic { flex-shrink: 0; vertical-align: -3px; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 22px; }
.muted { color: var(--muted); font-weight: 400; }
.mono { font-family: Consolas, Menlo, monospace; font-size: 13.5px; }
.hidden { display: none !important; }

/* ---------- kicker ---------- */
.kicker {
  display: inline-flex; align-items: center; gap: 9px;
  letter-spacing: .3em; font-size: 11.5px; font-weight: 800;
  color: #8fc9f2; text-transform: uppercase; margin-bottom: 14px;
  font-family: "Space Grotesk", sans-serif;
}
.kicker-dot { width: 7px; height: 7px; border-radius: 50%; background: #8fc9f2; box-shadow: 0 0 0 4px rgba(127, 216, 255, .18); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 700; font-size: 13px; cursor: pointer; transition: .2s;
  text-align: center; font-family: "Space Grotesk", "Nunito Sans", sans-serif;
  letter-spacing: .1em; text-transform: uppercase; line-height: 1.4;
  white-space: nowrap;
}
.btn-primary, .btn-bronze, .btn-blue {
  background: var(--grad); color: #fff;
  box-shadow: 0 4px 16px rgba(22, 62, 102, .32);
}
.btn-primary:hover, .btn-bronze:hover, .btn-blue:hover { filter: brightness(1.12); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 22px rgba(22, 62, 102, .42); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #1d3a5f; color: #fff; }
.btn-outline { border-color: #94b4d4; color: var(--ink); background: transparent; }
.btn-outline:hover { background: rgba(29, 111, 184, .08); color: var(--ink); }
.btn-glass { background: rgba(255, 255, 255, .75); border-color: var(--glass-line); color: var(--ink); backdrop-filter: blur(8px); }
.btn-glass:hover { border-color: var(--accent, #1d6fb8); color: #1d6fb8; box-shadow: var(--glow); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); box-shadow: var(--glow); }
.btn-ghost-dark { background: transparent; border-color: #94b4d4; color: #1d6fb8; }
.btn-ghost-dark:hover { background: var(--info-bg); color: #1d6fb8; }
.btn-danger { background: #fff; border-color: #f0b6bd; color: var(--bad); }
.btn-danger:hover { background: var(--bad-bg); color: var(--bad); border-color: var(--bad); }
.btn-light { background: var(--ink); color: #fff; }
.btn-light:hover { background: #1d3a5f; color: #fff; }
.btn-lg { padding: 16px 32px; font-size: 13.5px; border-radius: 12px; }
.btn-sm { padding: 7px 13px; font-size: 11px; border-radius: 8px; }
.btn-block { display: flex; width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-soft);
}
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 78px; }
.brand img { height: 54px; width: auto; display: block; }
.main-nav { display: flex; align-items: center; gap: 26px; font-weight: 600; font-size: 14.5px; font-family: "Space Grotesk", sans-serif; letter-spacing: .04em; }
.main-nav > a, .nav-drop > a { color: var(--text); padding: 12px 0; border-bottom: 2px solid transparent; transition: .2s; }
.main-nav > a:hover, .nav-drop > a:hover { color: #1d6fb8; border-bottom-color: rgba(29, 111, 184, .45); }
.main-nav > a.on, .nav-drop.on > a { color: #1d6fb8; border-bottom-color: #1d6fb8; }
.nav-drop { position: relative; }
.nav-drop .caret { font-size: 10px; }
.drop-menu {
  display: none; position: absolute; top: 100%; left: -14px; min-width: 340px;
  background: #fff; border: 1px solid var(--line-soft); border-radius: 12px;
  box-shadow: var(--shadow); padding: 8px 0;
}
.nav-drop:hover .drop-menu, .nav-drop:focus-within .drop-menu { display: block; }
.drop-menu a { display: block; padding: 10px 20px; color: var(--text); font-weight: 600; font-size: 14px; text-transform: none; letter-spacing: 0; }
.drop-menu a:hover { background: var(--info-bg); color: var(--cyan); }
.nav-cta { margin-left: 8px; }
.nav-toggle { display: none; background: #fff; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); font-size: 19px; padding: 5px 13px; cursor: pointer; }
.nav-close { display: none; }

/* ---------- hero slideshow ---------- */
.hero-show { position: relative; min-height: min(92vh, 860px); display: flex; align-items: center; overflow: hidden; border-bottom: 1px solid var(--line-soft); background: var(--bg-2); }
.hero-slides { position: absolute; inset: 0; }
.hero-slides .slide {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.05); transition: opacity 1.8s ease;
}
.hero-slides .slide.on { opacity: 1; animation: kenburns 9s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.06); } to { transform: scale(1.15); } }
.hero-veil {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(9, 19, 33, .94) 16%, rgba(9, 19, 33, .74) 46%, rgba(9, 19, 33, .38) 100%),
              linear-gradient(180deg, rgba(9, 19, 33, .28), transparent 32%, rgba(16, 34, 54, .92) 97%);
}
.hero-grid {
  position: absolute; inset: 0; opacity: .6; pointer-events: none;
  background-image: linear-gradient(rgba(29, 111, 184, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(29, 111, 184, .07) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(720px 480px at 28% 55%, #000 30%, transparent 78%);
  mask-image: radial-gradient(720px 480px at 28% 55%, #000 30%, transparent 78%);
}
.hero-in { position: relative; z-index: 2; display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; padding-top: 96px; padding-bottom: 120px; width: 100%; }
.hero h1 { color: #fff; margin-bottom: 20px; letter-spacing: -.015em; text-wrap: balance; }
.hero h1 em { font-style: normal; background: linear-gradient(120deg, #6db6ef, #9ad6ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: #ccd9e6; font-size: 18px; max-width: 560px; }
.hero-cta { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero-side { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.glass {
  background: var(--glass); border: 1px solid var(--glass-line); border-radius: var(--radius);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.hero-badge { display: flex; gap: 14px; align-items: center; padding: 18px 22px; box-shadow: var(--shadow); background: rgba(10, 20, 36, .55); border: 1px solid rgba(125, 211, 252, .28); }
.hero-badge strong { font-size: 40px; font-weight: 300; line-height: 1; font-family: "Space Grotesk", sans-serif; background: linear-gradient(120deg, #6db6ef, #9ad6ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-badge span { font-size: 13px; line-height: 1.4; color: #cfe2f5; }
.hero-portal { display: flex; gap: 14px; padding: 16px 20px; align-items: flex-start; background: rgba(10, 20, 36, .6); border: 1px solid rgba(125, 211, 252, .28); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.hero-portal .hp-ico { color: #1d6fb8; background: var(--info-bg); border: 1px solid var(--glass-line); border-radius: 10px; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; }
.hero-portal strong { display: block; color: #fff; font-size: 14px; font-family: "Space Grotesk", sans-serif; margin-bottom: 2px; }
.hero-portal span { font-size: 12.5px; color: #b9c9dc; line-height: 1.5; display: block; }
.hero-ui { position: absolute; z-index: 3; left: 0; right: 0; bottom: 26px; display: flex; align-items: center; justify-content: center; gap: 22px; }
.h-arrow {
  background: rgba(255, 255, 255, .85); border: 1px solid var(--line); color: var(--text);
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px); transition: .2s;
}
.h-arrow:hover { color: #1d6fb8; border-color: #1d6fb8; box-shadow: var(--glow); }
.h-arrow.flip { transform: scaleX(-1); }
.h-dots { display: flex; gap: 9px; }
.h-dot { width: 26px; height: 4px; border-radius: 4px; border: none; background: rgba(29, 111, 184, .22); cursor: pointer; transition: .3s; padding: 0; }
.h-dot.on { background: #1d6fb8; }

/* ---------- stats strip ---------- */
.stats-strip { margin-top: -54px; position: relative; z-index: 5; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; text-align: center;
  background: rgba(255, 255, 255, .92); border: 1px solid var(--glass-line); border-radius: 18px;
  backdrop-filter: blur(16px); padding: 26px 18px; box-shadow: var(--shadow);
}
.stat strong { display: block; font-size: clamp(30px, 3.6vw, 48px); font-weight: 300; font-family: "Space Grotesk", sans-serif; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-family: "Space Grotesk", sans-serif; }

/* ---------- sections ---------- */
.section { padding: 88px 0; }
.section-tint { background: var(--bg-2); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.center-head { text-align: center; max-width: 740px; margin: 0 auto 48px; }
.center-head p { color: var(--muted); }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.welcome-media { position: relative; }
.welcome-media img { border-radius: var(--radius); width: 100%; height: 360px; object-fit: cover; box-shadow: var(--shadow); border: 1px solid var(--line-soft); }
.welcome-media .overlay-img { position: absolute; right: -18px; bottom: -34px; width: 55%; height: 200px; border: 6px solid #fff; border-radius: 10px; }
.fp-card {
  position: absolute; left: 16px; bottom: 16px;
  background: rgba(255, 255, 255, .92); border: 1px solid var(--glass-line);
  border-left: 3px solid #1d6fb8; border-radius: 10px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: 12px 18px; box-shadow: var(--shadow);
}
.fp-card strong { display: block; color: var(--ink); font-family: "Space Grotesk", sans-serif; font-size: 16px; line-height: 1.25; }
.fp-card span { display: block; color: var(--muted); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; font-family: "Space Grotesk", sans-serif; }
.fp-photo img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line-soft); box-shadow: var(--shadow); }
.ticks { list-style: none; padding: 0; margin: 20px 0 28px; }
.ticks li { padding: 8px 0 8px 2px; position: relative; display: flex; gap: 12px; align-items: baseline; color: var(--text); }
.ticks .ic { color: #1d6fb8; transform: translateY(2px); }
.mini-card { background: #fff; border: 1px solid var(--line-soft); border-top: 2px solid #1d6fb8; border-radius: var(--radius); padding: 28px; }
.mini-card h3 { font-size: 20px; }

/* manifesto */
.manifesto { background: #fff; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); padding: 46px 0; }
.manifesto-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
.manifesto-grid div { display: flex; flex-direction: column; gap: 4px; }
.manifesto strong { font-family: "Space Grotesk", sans-serif; font-size: 25px; color: var(--ink); border-left: 2px solid #1d6fb8; padding-left: 14px; }
.manifesto span { color: var(--muted); font-size: 14px; padding-left: 16px; }

/* ---------- practice / insight cards ---------- */
.pa-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pa-card { padding: 26px 22px; display: flex; flex-direction: column; gap: 10px; color: var(--text); position: relative; overflow: hidden; transition: .25s; }
.pa-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--grad); opacity: 0; transition: .25s; }
.pa-card:hover { transform: translateY(-4px); border-color: rgba(29, 111, 184, .4); box-shadow: var(--shadow), var(--glow); }
.pa-card:hover::before { opacity: 1; }
.pa-num { font-family: "Space Grotesk", sans-serif; font-size: 19px; color: var(--cyan); font-weight: 700; letter-spacing: .1em; opacity: .9; }
.pa-card h3 { font-size: 19px; margin: 0; min-height: 48px; }
.pa-card p { font-size: 13.5px; color: var(--muted); margin: 0; flex: 1; }
.more { color: #1d6fb8; font-weight: 700; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 6px; font-family: "Space Grotesk", sans-serif; }
.side-list { background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 22px; align-self: start; }
.side-list a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--text); font-weight: 600; font-size: 14px; border-left: 2px solid transparent; }
.side-list a.on, .side-list a:hover { background: var(--info-bg); color: var(--cyan); border-left-color: var(--cyan); }

.whyus-media img { border-radius: var(--radius); height: 430px; width: 100%; object-fit: cover; box-shadow: var(--shadow); border: 1px solid var(--line-soft); }
.whyus-media.scan { position: relative; overflow: hidden; border-radius: var(--radius); }
.whyus-media.scan::after { content: ""; position: absolute; left: 0; right: 0; top: -30%; height: 26%; background: linear-gradient(180deg, transparent, rgba(14, 165, 233, .14), transparent); animation: scanmove 6.5s linear infinite; }
@keyframes scanmove { to { top: 110%; } }
.insights-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.insights-grid.wide { max-width: 920px; margin: 0 auto; }
.insight-card { padding: 26px; display: flex; flex-direction: column; gap: 8px; color: var(--text); transition: .25s; }
.insight-card:hover { transform: translateY(-4px); border-color: rgba(29, 111, 184, .4); box-shadow: var(--shadow), var(--glow); }
.insight-date { color: var(--muted); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
.insight-tag { align-self: flex-start; color: var(--cyan); font-weight: 800; font-size: 11.5px; text-transform: uppercase; letter-spacing: .14em; }
.insight-card h3 { font-size: 20px; margin: 0; }
.insight-card p { font-size: 14.5px; color: var(--muted); flex: 1; }

/* ---------- CTA band ---------- */
.cta-band { padding: 74px 0; border-top: 1px solid var(--line-soft); background: radial-gradient(600px 300px at 50% 0%, rgba(14, 165, 233, .12), transparent 70%), var(--bg-2); }
.cta-in { display: flex; justify-content: space-between; align-items: center; gap: 26px; flex-wrap: wrap; }
.cta-in h2 { color: var(--ink); margin-bottom: 4px; }
.cta-in p { margin: 0; color: var(--muted); }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- footer ---------- */
.site-footer { background: #dde9f5; color: var(--text); padding: 64px 0 0; font-size: 14.5px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.4fr .8fr 1.2fr 1.3fr; gap: 36px; padding-bottom: 42px; }
.footer-logo { height: 48px; width: auto; margin-bottom: 14px; }
.site-footer h4 { color: var(--ink); font-size: 12.5px; margin-bottom: 16px; text-transform: uppercase; letter-spacing: .2em; font-family: "Space Grotesk", sans-serif; font-weight: 700; }
.site-footer a { display: block; color: var(--text); padding: 4px 0; }
.site-footer a:hover { color: #1d6fb8; }
.footer-contact { line-height: 1.75; }
.footer-portal-link { margin-top: 8px; color: #1d6fb8 !important; font-weight: 700; }
.socials { display: flex; gap: 10px; margin-top: 14px; }
.socials a { display: inline-flex; width: 38px; height: 38px; border-radius: 10px; background: #fff; border: 1px solid var(--line); align-items: center; justify-content: center; color: var(--text); }
.socials a:hover { border-color: #1d6fb8; color: #1d6fb8; box-shadow: var(--glow); }
.footer-bottom { border-top: 1px solid var(--line); padding: 18px 0; font-size: 13px; text-align: center; }
.whatsapp-float { position: fixed; right: 20px; bottom: 20px; width: 54px; height: 54px; border-radius: 50%; background: #1fae54; color: #fff; font-size: 25px; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 30px rgba(31, 174, 84, .35); z-index: 60; }

/* ---------- page hero (inner pages) ---------- */
.page-hero { background: linear-gradient(180deg, #fff, var(--bg)); color: var(--ink); padding: 58px 0; border-bottom: 1px solid var(--line-soft); }
.page-hero h1 { color: var(--ink); margin-bottom: 6px; }
.page-hero p { color: var(--cyan); margin: 0; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; }
.page-hero p a { color: var(--cyan); }

/* ---------- forms ---------- */
.contact-cols { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: start; }
.contact-row { display: flex; gap: 14px; margin-bottom: 20px; align-items: flex-start; }
.contact-row .ci { font-size: 20px; background: var(--info-bg); border: 1px solid var(--glass-line); border-left: 2px solid #1d6fb8; width: 48px; height: 48px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #1d6fb8; }
.card { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); margin-bottom: 22px; }
.inner-card { box-shadow: none; background: var(--panel-2); }
.form-card label, .card label { display: block; font-weight: 800; font-size: 11px; margin: 14px 0 6px; color: var(--ink); letter-spacing: .14em; text-transform: uppercase; font-family: "Space Grotesk", sans-serif; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=file], select, textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px;
  font-family: inherit; font-size: 15px; background: #fff; color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
input::placeholder, textarea::placeholder { color: #8ba3bb; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #1d6fb8; box-shadow: 0 0 0 3px rgba(29, 111, 184, .14); }
select { appearance: none; background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364788e' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
input[type=file] { padding: 9px; }
input[type=checkbox] { accent-color: #1d6fb8; }
textarea { resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row.three { grid-template-columns: repeat(3, 1fr); }
.form-row.four { grid-template-columns: repeat(4, 1fr); }
.form-card.narrow { max-width: 660px; }
.prose { max-width: 800px; }
.prose h3 { margin-top: 26px; }

/* ---------- alerts / badges / chips ---------- */
.alert { padding: 13px 18px; border-radius: 10px; margin: 14px 0; font-size: 14.5px; border: 1px solid transparent; display: flex; gap: 9px; align-items: baseline; flex-wrap: wrap; }
.alert a { text-decoration: underline; }
.alert-ok { background: var(--ok-bg); color: var(--ok); border-color: #b8e4c9; }
.alert-warn { background: var(--warn-bg); color: var(--warn); border-color: #f2ddb0; }
.alert-bad { background: var(--bad-bg); color: var(--bad); border-color: #f3c4ca; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px; border-radius: 7px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; font-family: "Space Grotesk", sans-serif; }
.badge-ok { background: var(--ok-bg); color: var(--ok); border: 1px solid #b8e4c9; }
.badge-warn { background: var(--warn-bg); color: var(--warn); border: 1px solid #f2ddb0; }
.badge-bad { background: var(--bad-bg); color: var(--bad); border: 1px solid #f3c4ca; }
.badge-info { background: var(--info-bg); color: var(--info); border: 1px solid #bde2f5; }
.badge-type { background: #efeafd; color: #5b48b8; border: 1px solid #ddd2f7; }
.badge-muted { background: var(--panel-2); color: var(--muted); border: 1px solid var(--line-soft); }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--panel-2); border: 1px solid var(--line-soft); color: var(--text); padding: 3px 11px; border-radius: 8px; font-size: 12.5px; font-weight: 700; }
.chip-gold { background: var(--warn-bg); border-color: #f2ddb0; color: var(--warn); }
.chip-glow { background: var(--info-bg); border-color: #bde2f5; color: var(--info); }
.text-warn { color: var(--warn) !important; font-weight: 800; }

/* ---------- auth ---------- */
.auth-wrap { min-height: 76vh; display: flex; align-items: center; justify-content: center; padding: 60px 20px; }
.auth-card { width: 100%; max-width: 450px; background: #fff; border: 1px solid var(--line-soft); border-top: 3px solid transparent; border-image: var(--grad) 1; border-radius: var(--radius); padding: 40px 38px; box-shadow: var(--shadow); }
.auth-card.wide { max-width: 740px; }
.auth-card.center { text-align: center; }
.auth-logo { height: 54px; width: auto; display: block; margin: 0 auto 20px; }
.auth-card h1 { font-size: 29px; text-align: center; }
.auth-card .muted { text-align: center; font-size: 14px; }
.auth-alt { text-align: center; font-size: 14px; margin-top: 16px; }
.auth-back { display: block; text-align: center; margin-top: 18px; font-size: 13.5px; color: var(--muted); }
.status-ico { font-size: 44px; text-align: center; margin-bottom: 8px; }
.auth-hint { background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 10px; padding: 12px 16px; font-size: 13px; margin-top: 18px; }
.steps { display: flex; align-items: center; gap: 8px; margin: 24px 0; }
.step { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; color: var(--muted); flex-shrink: 0; text-transform: uppercase; letter-spacing: .08em; font-family: "Space Grotesk", sans-serif; }
.step span { width: 30px; height: 30px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--line-soft); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.step.done { color: #1d6fb8; }
.step.done span { background: var(--info-bg); border-color: #1d6fb8; color: #1d6fb8; }
.step-line { flex: 1; height: 1px; background: var(--line-soft); }
.wizard-nav { display: flex; justify-content: space-between; margin-top: 18px; }

/* ---------- portal layout ---------- */
.portal-body { background: var(--bg); }
.portal-shell { display: flex; min-height: 100vh; }
.portal-side {
  width: 258px; background: #fff; color: var(--text); flex-shrink: 0;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  border-right: 1px solid var(--line-soft);
}
.side-brand { padding: 18px 20px 10px; display: flex; justify-content: space-between; align-items: center; }
.side-brand img { height: 44px; width: auto; }
.side-close { display: none; background: none; border: none; color: var(--ink); font-size: 18px; cursor: pointer; }
.side-user { display: flex; gap: 12px; align-items: center; padding: 12px 20px 18px; border-bottom: 1px solid var(--line-soft); }
.avatar { width: 42px; height: 42px; border-radius: 11px; background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; flex-shrink: 0; }
.side-user strong { display: block; color: var(--ink); font-size: 14.5px; line-height: 1.2; }
.side-user .muted { color: var(--muted); font-size: 12px; }
.side-nav { padding: 12px 12px 26px; flex: 1; }
.side-nav h5 { margin: 16px 10px 6px; font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: #7d92a8; font-family: "Space Grotesk", sans-serif; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; color: var(--text); font-weight: 600; font-size: 14px; margin: 2px 0; transition: .15s; border-left: 2px solid transparent; }
.side-nav a .ic { color: #7d92a8; transition: .15s; }
.side-nav a:hover { background: var(--panel-2); color: var(--ink); }
.side-nav a:hover .ic { color: #1d6fb8; }
.side-nav a.on { background: linear-gradient(90deg, rgba(14, 165, 233, .12), rgba(14, 165, 233, .02)); color: #0a6aa8; border-left-color: #1d6fb8; }
.side-nav a.on .ic { color: #1d6fb8; }
.side-nav .navpill { background: var(--bad); color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 8px; margin-left: 4px; }
.side-sep { border-top: 1px solid var(--line-soft); margin: 14px 10px; }
.portal-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.portal-top { background: rgba(255, 255, 255, .92); border-bottom: 1px solid var(--line-soft); padding: 12px 26px; display: flex; align-items: center; justify-content: space-between; gap: 14px; position: sticky; top: 0; z-index: 40; backdrop-filter: blur(14px); }
.top-title { font-family: "Space Grotesk", sans-serif; font-size: 21px; font-weight: 600; color: var(--ink); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.portal-content { flex: 1; }
.wrap-pad { padding: 28px; max-width: 1300px; }
.portal-foot { padding: 16px 28px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line-soft); background: #fff; }
.portal-top .nav-toggle { display: none; color: var(--ink); border-color: var(--line); }

/* ---------- portal components ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h2 { margin-bottom: 4px; display: flex; align-items: center; gap: 10px; }
.page-head h2 .ic { color: #1d6fb8; }
.page-head .muted { margin: 0; }
.backlink { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; color: var(--muted); font-weight: 700; font-size: 13.5px; }
.backlink:hover { color: #1d6fb8; }
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat-cards.three { grid-template-columns: repeat(3, 1fr); }
.scard { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 16px; display: flex; gap: 13px; align-items: center; position: relative; overflow: hidden; }
.scard::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--grad); opacity: .6; }
.sc-ico { font-size: 24px; background: var(--info-bg); border: 1px solid #bde2f5; color: #1d6fb8; width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.scard strong { display: block; font-size: 20px; color: var(--ink); line-height: 1.15; font-family: "Space Grotesk", sans-serif; }
.scard span { color: var(--muted); font-size: 12.5px; }
.scard em { color: var(--warn); font-size: 12px; font-style: normal; font-weight: 700; }
.cols-2-1 { display: grid; grid-template-columns: 1.8fr 1fr; gap: 20px; align-items: start; }
.card-head-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.card-head-row h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.card-head-row h3 .ic { color: #1d6fb8; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); padding: 9px 10px; border-bottom: 1px solid var(--line); font-family: "Space Grotesk", sans-serif; }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; color: var(--text); }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(14, 165, 233, .05); }
.row-upcoming td { background: var(--warn-bg) !important; }
.kv { width: 100%; border-collapse: collapse; font-size: 14.5px; margin-bottom: 12px; }
.kv th { text-align: left; color: var(--muted); font-weight: 600; width: 38%; padding: 7px 8px; vertical-align: top; }
.kv td { padding: 7px 8px; color: var(--text); }
.prewrap { white-space: pre-wrap; }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--line-soft); color: var(--text); }
.list-row:last-child { border-bottom: none; }
.list-row .more { white-space: nowrap; }
.empty-state { text-align: center; padding: 44px 26px; color: var(--muted); }
.empty-state h3 { color: var(--ink); }
.quick-btns { display: flex; flex-direction: column; gap: 9px; }
.quick-btns .btn { width: 100%; justify-content: flex-start; }
.filter-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.filter { padding: 7px 16px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-weight: 700; font-size: 13px; color: var(--muted); cursor: pointer; }
.filter.on, .filter:hover { border-color: #1d6fb8; color: #1d6fb8; }
.search-form { display: flex; gap: 8px; margin-left: auto; }
.search-form input { width: 230px; }
.search-form.standalone { margin: 0 0 16px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 10px 15px; font-weight: 700; font-size: 12.5px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-transform: uppercase; letter-spacing: .08em; font-family: "Space Grotesk", sans-serif; }
.tabs a.on { color: #1d6fb8; border-bottom-color: #1d6fb8; }
.tabs a:hover { color: var(--ink); }
.tabpill { background: var(--info-bg); color: var(--info); border-radius: 99px; font-size: 10.5px; padding: 1px 7px; }

/* case cards */
.case-card { border-left: 3px solid #1d6fb8; }
.case-ref { color: #1d6fb8; font-weight: 800; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-family: "Space Grotesk", sans-serif; }
.case-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.case-head h3 { margin: 2px 0 8px; }
.case-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.case-snip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 10px; padding: 14px 18px; margin-top: 14px; }
.case-snip .lbl { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 800; font-family: "Space Grotesk", sans-serif; }
.case-snip strong { font-size: 15.5px; color: var(--ink); }
.latest-update { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 12px; }
.latest-update .lbl { font-size: 12px; color: var(--muted); font-weight: 700; }
.latest-update p { margin: 4px 0 0; color: var(--text); }
.fee-mini { display: flex; gap: 18px; }
.fee-mini span { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 800; }
.fee-mini strong { font-size: 19px; color: var(--ink); }
.next-date { border-left: 3px solid var(--violet); }
.date-big { font-family: "Space Grotesk", sans-serif; font-size: 34px; font-weight: 600; color: #6d5bd0; line-height: 1.1; }
.update-item { background: #fff; border: 1px solid var(--line-soft); border-left: 3px solid #0ea5e9; border-radius: 10px; padding: 16px 20px; margin-bottom: 14px; }
.update-item.internal { border-left-color: var(--bad); }
.update-head { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.update-head .muted { font-size: 13px; }
.update-item p { margin: 0; }
.term-card { border-left: 3px solid var(--bad); }
.term-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.approval-card { border-left: 3px solid #1d6fb8; }
.approval-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.approval-head h3 { margin: 0 0 6px; }

/* notes & diary entries */
.note-item { border: 1px solid var(--line-soft); background: var(--panel-2); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.note-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.note-ico { color: #1d6fb8; background: var(--info-bg); border-radius: 8px; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.note-body { font-size: 14px; color: var(--text); }
.note-when { font-size: 12px; margin-left: auto; white-space: nowrap; }
.attach-row { display: inline-flex; gap: 8px; align-items: center; }
.attach-row select { width: auto; min-width: 200px; max-width: 300px; padding: 7px 30px 7px 10px; font-size: 13px; }

/* activities (case view) — colour-coded by type */
.act-item { display: flex; gap: 13px; align-items: flex-start; border: 1px solid var(--line-soft); background: var(--panel-2); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.act-ico { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--info-bg); color: #1d6fb8; border: 1px solid #bde2f5; }
.act-main { flex: 1; min-width: 0; }
.act-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.act-top strong { color: var(--ink); }
.act-notes { font-size: 14px; color: var(--text); border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 6px; }
.act-when { font-size: 12px; display: flex; gap: 6px; align-items: center; margin-top: 6px; color: var(--muted); }

/* shared colour code: activities, calendar, diary */
.t-hearing      { --t: #b45309; --tbg: #fdf3dd; --tbd: #f0d9a8; }
.t-mention      { --t: #b45309; --tbg: #fdf3dd; --tbd: #f0d9a8; }
.t-court-appearance { --t: #6d28d9; --tbg: #f1eafd; --tbd: #ddccf7; }
.t-client-meeting   { --t: #15803d; --tbg: #e5f6ec; --tbd: #b8e4c9; }
.t-office-meeting   { --t: #0e7490; --tbg: #e0f4f8; --tbd: #b3e2ec; }
.t-phone-call       { --t: #1d4ed8; --tbg: #e6edfd; --tbd: #c3d3f9; }
.t-site-visit       { --t: #c2410c; --tbg: #fdeee3; --tbd: #f6d4bb; }
.t-filing           { --t: #0369a1; --tbg: #e3f3fc; --tbd: #b9ddef; }
.t-correspondence   { --t: #4f46e5; --tbg: #eceafd; --tbd: #d4cef7; }
.t-research         { --t: #be185d; --tbg: #fce9f2; --tbd: #f5c4dc; }
.t-appointment      { --t: #1d6fb8; --tbg: #e3eefb; --tbd: #bed7f2; }
.t-other            { --t: #475569; --tbg: #edf1f6; --tbd: #d5dde7; }

.act-hearing, .act-mention { background: var(--tbg); }
.act-court-appearance { background: #f1eafd; }
.act-client-meeting, .act-office-meeting { background: #e5f6ec; }
.act-phone-call { background: #e6edfd; }
.act-site-visit { background: #fdeee3; }
.act-filing, .act-correspondence { background: #e3f3fc; }
.act-ico.t-hearing, .act-ico.t-mention { color: var(--t); }
.act-ico.t-court-appearance { color: #6d28d9; }
.act-ico.t-client-meeting { color: #15803d; }
.act-ico.t-office-meeting { color: #0e7490; }
.act-ico.t-phone-call { color: #1d4ed8; }
.act-ico.t-site-visit { color: #c2410c; }
.act-ico.t-filing, .act-ico.t-correspondence { color: #0369a1; }
.act-ico.t-research { color: #be185d; }
.act-ico.t-appointment { color: #1d6fb8; }
.act-ico.t-other { color: #475569; }

/* urgent tasks panel — banded, hourglasses, countdown rings */
.urgent-summary { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 6px 0 10px; }
.cal-band { margin-bottom: 6px; }
.cal-band-head { display: flex; align-items: center; gap: 9px; margin: 16px 0 10px; }
.cal-band-head strong { font-family: "Space Grotesk", sans-serif; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.cal-band-overdue .cal-band-head strong { color: var(--bad); }
.cal-band-critical .cal-band-head strong { color: var(--warn); }
.cal-band-week .cal-band-head strong { color: #1d6fb8; }
.cal-band-upcoming .cal-band-head strong { color: var(--muted); }
.cal-band-line { flex: 1; height: 1px; background: var(--line-soft); }
.hg { display: inline-flex; color: var(--muted); animation: hgflip 4s ease-in-out infinite; transform-origin: 50% 50%; }
.cal-band-overdue .hg { color: var(--bad); }
.cal-band-critical .hg { color: var(--warn); }
@keyframes hgflip { 0%, 38% { transform: rotate(0deg); } 46%, 88% { transform: rotate(180deg); } 96%, 100% { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hg { animation: none; } }

.urgent-item { display: flex; gap: 14px; border: 1px solid var(--line-soft); border-left-width: 3px; border-radius: 12px; padding: 12px 16px; margin-bottom: 12px; background: var(--panel-2); }
.urgent-item.urgent-overdue { border-left-color: var(--bad); background: var(--bad-bg); }
.urgent-item.urgent-soon { border-left-color: var(--warn); }
/* countdown ring */
.ring { position: relative; width: 52px; height: 52px; flex-shrink: 0; align-self: flex-start; }
.ring svg { width: 52px; height: 52px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--line-soft); stroke-width: 4.5; }
.ring-fg { fill: none; stroke-width: 4.5; stroke-linecap: round; transition: stroke-dasharray .6s ease; }
.ring b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: "Space Grotesk", sans-serif; font-size: 12px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
.ring-overdue .ring-fg { stroke: var(--bad); animation: ringpulse 1.5s ease-in-out infinite; }
.ring-overdue b { color: var(--bad); font-size: 16px; }
.ring-critical .ring-fg { stroke: var(--warn); }
.ring-critical b { color: var(--warn); }
.ring-week .ring-fg { stroke: #1d6fb8; }
.ring-upcoming .ring-fg { stroke: #7fb3dc; }
@keyframes ringpulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .ring-overdue .ring-fg { animation: none; } }

.urgent-main { flex: 1; min-width: 0; }
.urgent-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 3px; }
.urgent-top strong { color: var(--ink); }
.urgent-case { font-size: 12.5px; margin-bottom: 6px; display: flex; gap: 5px; align-items: baseline; flex-wrap: wrap; }
.urgent-what { font-size: 13.5px; color: var(--text); background: rgba(29, 111, 184, .05); border: 1px dashed var(--line-soft); border-radius: 8px; padding: 7px 10px; }
.urgent-what-lbl { font-weight: 800; color: var(--ink); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; display: block; font-family: "Space Grotesk", sans-serif; margin-bottom: 2px; }
.urgent-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* ---------- dashboard cinematic hero ---------- */
.dash-hero {
  position: relative; border-radius: 18px; overflow: hidden; min-height: 320px;
  display: flex; align-items: flex-end; box-shadow: var(--shadow);
  border: 1px solid var(--line-soft); margin-bottom: 24px; background: var(--ink);
}
.dash-slides { position: absolute; inset: 0; }
.dash-slides .slide {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.06); transition: opacity 1.8s ease;
}
.dash-slides .slide.on { opacity: 1; animation: kenburns 12s ease-out forwards; }
.dash-veil {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(7, 15, 28, .94) 14%, rgba(7, 15, 28, .66) 52%, rgba(7, 15, 28, .32)),
              linear-gradient(180deg, rgba(7, 15, 28, .30), transparent 35%, rgba(7, 15, 28, .88));
}
.dash-grid {
  position: absolute; inset: 0; opacity: .55; pointer-events: none;
  background-image: linear-gradient(rgba(125, 216, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(125, 216, 255, .07) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(620px 300px at 20% 78%, #000 25%, transparent 76%);
  mask-image: radial-gradient(620px 300px at 20% 78%, #000 25%, transparent 76%);
}
.dash-hero-in {
  position: relative; z-index: 2; width: 100%; padding: 30px 32px;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap;
}
.dash-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.dash-kicker { letter-spacing: .3em; font-size: 10.5px; font-weight: 800; color: #7fd8ff; text-transform: uppercase; font-family: "Space Grotesk", sans-serif; }
.dash-greet { font-family: "Space Grotesk", "Nunito Sans", sans-serif; font-size: clamp(24px, 3vw, 38px); color: #fff; font-weight: 600; line-height: 1.12; margin: 0; letter-spacing: -.01em; }
.dash-sub { color: #b9c9dc; font-size: 13.5px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.dash-dot { color: #7fd8ff; }
.dash-clock { font-family: "Space Grotesk", sans-serif; letter-spacing: .08em; color: #9db8d4; }
.dash-chips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.dash-chip {
  display: inline-flex; gap: 8px; align-items: center;
  background: rgba(10, 20, 36, .58); border: 1px solid rgba(125, 211, 252, .28);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: #cfe2f5; border-radius: 10px; padding: 8px 14px; font-size: 13px;
}
.dash-chip strong { color: #fff; font-family: "Space Grotesk", sans-serif; font-size: 14px; }
.dash-chip .ic { color: #7fd8ff; }
.dash-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* hero reel — featured upcoming matters */
.dash-reel-wrap { display: flex; flex-direction: column; gap: 8px; width: min(400px, 100%); flex-shrink: 0; }
.dash-reel-label { display: inline-flex; align-items: center; gap: 7px; font-family: "Space Grotesk", sans-serif; font-size: 10.5px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: #7fd8ff; }
.dash-reel { display: grid; min-height: 128px; }
.reel-card {
  grid-area: 1 / 1; display: flex; gap: 12px; align-items: center;
  background: rgba(10, 20, 36, .66); border: 1px solid rgba(125, 211, 252, .32);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-radius: 14px; padding: 14px 16px;
  opacity: 0; transform: translateY(10px) scale(.98); transition: .55s ease; pointer-events: none;
  box-shadow: 0 10px 30px rgba(4, 10, 22, .45);
}
.reel-card.on { opacity: 1; transform: none; pointer-events: auto; }
.reel-card .ring { width: 56px; height: 56px; }
.reel-card .ring svg { width: 56px; height: 56px; }
.reel-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.reel-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.reel-time { font-family: "Space Grotesk", sans-serif; font-size: 12px; color: #9db8d4; letter-spacing: .06em; }
.reel-main strong { color: #fff; font-size: 15px; font-family: "Space Grotesk", sans-serif; line-height: 1.25; }
.reel-case { font-size: 12px; color: #9db8d4; }
.reel-case a { color: #7fd8ff; }
.reel-what { font-size: 12px; color: #b9c9dc; border-top: 1px dashed rgba(125, 211, 252, .25); padding-top: 4px; margin-top: 2px; }
.reel-empty { gap: 14px; }
.reel-empty-ico { width: 48px; height: 48px; border-radius: 50%; background: rgba(61, 220, 151, .15); color: #3ddc97; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.reel-empty strong { color: #fff; font-family: "Space Grotesk", sans-serif; }

/* ---------- inner-page cinematic banners ---------- */
.page-hero { position: relative; overflow: hidden; }
.ph-slides { position: absolute; inset: 0; background: var(--ink); }
.ph-slides .slide {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.05); transition: opacity 1.6s ease;
}
.ph-slides .slide.on { opacity: 1; animation: kenburns 13s ease-out forwards; }
.ph-veil {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(8, 17, 30, .93) 18%, rgba(8, 17, 30, .68) 55%, rgba(8, 17, 30, .38));
}
.page-hero.ph-cine { color: #fff; padding: 74px 0; }
.page-hero.ph-cine .wrap { position: relative; z-index: 2; }
.page-hero.ph-cine h1 { color: #fff; }
.page-hero.ph-cine p, .page-hero.ph-cine p a { color: #8fd8ff; }

/* ---------- our clients ---------- */
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.testimonial-card { background: #fff; border: 1px solid var(--line-soft); border-top: 2px solid #163e66; border-radius: var(--radius); padding: 24px; position: relative; }
.t-quote { font-family: "Space Grotesk", sans-serif; font-size: 44px; color: #163e66; opacity: .35; line-height: .6; display: block; }
.testimonial-card p { font-size: 14.5px; color: var(--text); }
.t-who { border-top: 1px solid var(--line-soft); padding-top: 10px; }
.t-who strong { display: block; color: var(--ink); font-family: "Space Grotesk", sans-serif; font-size: 14px; }
.t-who span { display: block; color: var(--muted); font-size: 12px; }
.pa-photo { margin-bottom: 16px; }
.pa-photo img { width: 100%; border-radius: 12px; border: 1px solid var(--line-soft); box-shadow: var(--shadow); aspect-ratio: 16 / 9; object-fit: cover; }
.welcome-media.fp-media img { height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: top center; }

/* ---------- insights videos ---------- */
.video-embed { position: relative; cursor: pointer; overflow: hidden; border-radius: 14px; border: 1px solid var(--line-soft); background: var(--ink); }
.video-feature { display: grid; grid-template-columns: 1.25fr 1fr; min-height: 340px; margin-bottom: 30px; box-shadow: var(--shadow); }
.video-feature > img, .video-feature iframe { width: 100%; height: 100%; object-fit: cover; grid-area: 1 / 1; }
.video-feature .ve-meta { grid-area: 1 / 1; position: relative; z-index: 2; align-self: end; padding: 22px 26px; background: linear-gradient(180deg, transparent, rgba(9, 19, 33, .92) 40%); color: #fff; }
.video-feature .ve-meta h3 { color: #fff; font-size: 24px; margin: 8px 0 6px; }
.video-feature .ve-meta p { color: #c9d6e4; font-size: 14px; margin: 0; }
.ve-play { position: absolute; z-index: 3; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 74px; height: 52px; border-radius: 12px; background: rgba(22, 62, 102, .88); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 24px rgba(4, 12, 24, .5); transition: .2s; pointer-events: none; }
.video-embed:hover .ve-play { background: #ac0000; transform: translate(-50%, -50%) scale(1.08); }
.video-feature > img { transition: .5s; }
.video-embed:hover > img { transform: scale(1.03); }
.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 8px; }
.video-card { background: #fff; border: 1px solid var(--line-soft); border-radius: 14px; padding: 14px; transition: .2s; }
.video-card:hover { border-color: #163e66; box-shadow: var(--shadow); }
.vc-thumb { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 9; margin-bottom: 10px; }
.vc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vc-thumb .ve-play { width: 48px; height: 34px; border-radius: 8px; }
.video-card h4 { color: var(--ink); font-size: 15.5px; margin: 4px 0 4px; }
.video-embed.playing { aspect-ratio: 16 / 9; }

/* chat */
.client-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.client-card { background: #fff; border: 1px solid var(--line-soft); border-top: 2px solid #163e66; border-radius: var(--radius); padding: 26px 24px; display: flex; flex-direction: column; gap: 10px; transition: .25s; }
.client-card:hover { transform: translateY(-4px); box-shadow: var(--shadow), var(--glow); }
.client-logo { height: 96px; display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--line-soft); border-radius: 10px; padding: 12px; margin-bottom: 4px; }
.client-logo img { max-height: 84px; max-width: 100%; width: auto; object-fit: contain; }
.client-card h3 { font-size: 19px; margin: 2px 0 0; }
.client-tag { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #163e66; font-family: "Space Grotesk", sans-serif; margin: 0 0 4px; }
.client-card > p { font-size: 14px; color: var(--text); flex: 1; margin: 0; }
.client-card .btn { align-self: flex-start; }
.logo-type { font-family: "Space Grotesk", sans-serif; font-size: 30px; font-weight: 700; letter-spacing: .18em; color: #163e66; line-height: 1; display: block; text-align: center; }
.logo-type-sub { display: block; font-size: 12px; font-weight: 400; letter-spacing: .32em; color: var(--muted); margin-top: 4px; }

/* chat */
.chat-card .chat-thread { max-height: 430px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 6px 2px 16px; }
.chat-bubble { max-width: 78%; padding: 10px 15px; border-radius: 12px; font-size: 14.5px; }
.chat-bubble.mine { align-self: flex-end; background: linear-gradient(120deg, #e3f0fc, #eaf6fe); border: 1px solid #c7e0f5; color: var(--ink); border-bottom-right-radius: 3px; }
.chat-bubble.theirs { align-self: flex-start; background: var(--panel-2); border: 1px solid var(--line-soft); border-bottom-left-radius: 3px; }
.chat-bubble.mine .chat-meta { color: #1d6fb8; }
.chat-meta { font-size: 11.5px; color: var(--muted); margin-bottom: 3px; font-weight: 700; }
.chat-bubble p { margin: 0; }
.pay-note { background: var(--panel-2); border: 1px dashed var(--line); border-radius: 10px; padding: 12px 16px; font-size: 14px; margin-top: 14px; }
.upload-box { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; background: var(--panel-2); border: 1px dashed var(--line); border-radius: 10px; padding: 14px; margin: 12px 0 18px; }
.upload-box input[type=file] { width: auto; }
.upload-box input[type=text] { flex: 1; min-width: 180px; width: auto; }
.fee-item-row { display: grid; grid-template-columns: 1fr 160px; gap: 10px; margin-bottom: 8px; }
.pay-form { margin: 10px 0 22px; }
.gen-pick { background: var(--panel-2); }
.align-end { display: flex; align-items: flex-end; }
.enquiry { border-bottom: 1px solid var(--line-soft); padding: 16px 4px; }
.enquiry:last-child { border-bottom: none; }
.enquiry.done { opacity: .62; }
.cheat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cheat-grid.single { grid-template-columns: 1fr; }
.cheat { background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 8px; padding: 7px 10px; font-size: 12.5px; cursor: pointer; }
.cheat code { color: var(--cyan); font-weight: 700; }
.cheat span { color: var(--muted); margin-left: 6px; }

/* ---------- calendar ---------- */
.cal-legend { display: flex; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 16px; }
.cal-key { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 700; }
.cal-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.cal-dot.cal-t-hearing, .cal-dot.cal-t-mention { background: #e8b45a; }
.cal-dot.cal-t-court-appearance { background: #a78bfa; }
.cal-dot.cal-t-client-meeting { background: #4ade80; }
.cal-dot.cal-t-office-meeting { background: #38bdf8; }
.cal-dot.cal-t-phone-call { background: #818cf8; }
.cal-dot.cal-t-site-visit { background: #fb923c; }
.cal-dot.cal-t-filing { background: #38a3e0; }
.cal-dot.cal-t-correspondence { background: #818cf8; }
.cal-dot.cal-t-research { background: #f472b6; }
.cal-dot.cal-t-appointment { background: #1d6fb8; }
.cal-dot.cal-t-other { background: #94a3b8; }

.cal-card { padding: 18px; }
.cal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.cal-head strong { font-family: "Space Grotesk", sans-serif; font-size: 19px; color: var(--ink); flex: 1; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow span { text-align: center; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 800; font-family: "Space Grotesk", sans-serif; padding: 4px 0; }
.cal-cell {
  min-height: 86px; border: 1px solid var(--line-soft); border-radius: 10px; background: #fff;
  padding: 6px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 3px;
  font-family: inherit; transition: .15s; position: relative;
}
.cal-cell:hover { border-color: #1d6fb8; box-shadow: var(--glow); }
.cal-cell.cal-blank { background: transparent; border-color: transparent; cursor: default; }
.cal-cell.cal-today { border-color: #0ea5e9; box-shadow: 0 0 0 2px rgba(14, 165, 233, .18); }
.cal-cell.cal-sel { background: var(--info-bg); border-color: #1d6fb8; }
.cal-cell .cal-d { font-size: 12.5px; font-weight: 800; color: var(--ink); font-family: "Space Grotesk", sans-serif; }
.cal-ev { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.cal-more { font-size: 10px; color: var(--muted); font-weight: 700; }
/* per-type chip colours */
.cal-ev.cal-t-hearing, .cal-ev.cal-t-mention { background: #fdf3dd; border-left: 3px solid #e8b45a; }
.cal-ev.cal-t-court-appearance { background: #f1eafd; border-left: 3px solid #a78bfa; }
.cal-ev.cal-t-client-meeting { background: #e5f6ec; border-left: 3px solid #4ade80; }
.cal-ev.cal-t-office-meeting { background: #e0f4f8; border-left: 3px solid #38bdf8; }
.cal-ev.cal-t-phone-call { background: #e6edfd; border-left: 3px solid #818cf8; }
.cal-ev.cal-t-site-visit { background: #fdeee3; border-left: 3px solid #fb923c; }
.cal-ev.cal-t-filing { background: #e3f3fc; border-left: 3px solid #38a3e0; }
.cal-ev.cal-t-correspondence { background: #eceafd; border-left: 3px solid #818cf8; }
.cal-ev.cal-t-research { background: #fce9f2; border-left: 3px solid #f472b6; }
.cal-ev.cal-t-appointment { background: #e3eefb; border-left: 3px solid #1d6fb8; }
.cal-ev.cal-t-other { background: #edf1f6; border-left: 3px solid #94a3b8; }

.cal-day-list { display: flex; flex-direction: column; gap: 10px; }
.cal-entry { border: 1px solid var(--line-soft); border-left-width: 3px; border-radius: 10px; padding: 10px 12px; background: #fff; }
.cal-entry.cal-bd-hearing, .cal-entry.cal-bd-mention { border-left-color: #e8b45a; }
.cal-entry.cal-bd-court-appearance { border-left-color: #a78bfa; }
.cal-entry.cal-bd-client-meeting { border-left-color: #4ade80; }
.cal-entry.cal-bd-office-meeting { border-left-color: #38bdf8; }
.cal-entry.cal-bd-phone-call { border-left-color: #818cf8; }
.cal-entry.cal-bd-site-visit { border-left-color: #fb923c; }
.cal-entry.cal-bd-filing { border-left-color: #38a3e0; }
.cal-entry.cal-bd-correspondence { border-left-color: #818cf8; }
.cal-entry.cal-bd-research { border-left-color: #f472b6; }
.cal-entry.cal-bd-appointment { border-left-color: #1d6fb8; }
.cal-entry.cal-bd-other { border-left-color: #94a3b8; }
.cal-entry-top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.cal-entry strong { color: var(--ink); font-size: 14px; }
.cal-notes { font-size: 13px; color: var(--text); border-top: 1px dashed var(--line-soft); margin-top: 6px; padding-top: 6px; }
.cal-entry-actions { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.badge.cal-bg-hearing, .badge.cal-bg-mention { background: var(--warn-bg); color: var(--warn); border: 1px solid #f0d9a8; }
.badge.cal-bg-court-appearance { background: #f1eafd; color: #6d28d9; border: 1px solid #ddccf7; }
.badge.cal-bg-client-meeting { background: var(--ok-bg); color: var(--ok); border: 1px solid #b8e4c9; }
.badge.cal-bg-office-meeting { background: #e0f4f8; color: #0e7490; border: 1px solid #b3e2ec; }
.badge.cal-bg-phone-call { background: #e6edfd; color: #1d4ed8; border: 1px solid #c3d3f9; }
.badge.cal-bg-site-visit { background: #fdeee3; color: #c2410c; border: 1px solid #f6d4bb; }
.badge.cal-bg-filing { background: var(--info-bg); color: var(--info); border: 1px solid #b9ddef; }
.badge.cal-bg-correspondence { background: #eceafd; color: #4f46e5; border: 1px solid #d4cef7; }
.badge.cal-bg-research { background: #fce9f2; color: #be185d; border: 1px solid #f5c4dc; }
.badge.cal-bg-appointment { background: #e3eefb; color: #1d6fb8; border: 1px solid #bed7f2; }
.badge.cal-bg-other { background: #edf1f6; color: #475569; border: 1px solid #d5dde7; }

/* ---------- diary ---------- */
.diary-day { display: grid; grid-template-columns: 74px 1fr; gap: 16px; margin-bottom: 22px; }
.diary-date { text-align: center; background: #fff; border: 1px solid var(--line-soft); border-radius: 12px; padding: 10px 4px; height: fit-content; box-shadow: var(--shadow); }
.diary-date strong { display: block; font-family: "Space Grotesk", sans-serif; font-size: 24px; color: var(--ink); line-height: 1.1; }
.diary-dow { display: block; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.diary-mon { display: block; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.diary-entries { display: flex; flex-direction: column; gap: 10px; }
.diary-entry { border: 1px solid var(--line-soft); border-left-width: 3px; border-radius: 12px; padding: 12px 16px; background: #fff; }
.diary-entry.cal-bd-hearing, .diary-entry.cal-bd-mention { border-left-color: #e8b45a; }
.diary-entry.cal-bd-court-appearance { border-left-color: #a78bfa; }
.diary-entry.cal-bd-client-meeting { border-left-color: #4ade80; }
.diary-entry.cal-bd-office-meeting { border-left-color: #38bdf8; }
.diary-entry.cal-bd-phone-call { border-left-color: #818cf8; }
.diary-entry.cal-bd-site-visit { border-left-color: #fb923c; }
.diary-entry.cal-bd-filing { border-left-color: #38a3e0; }
.diary-entry.cal-bd-correspondence { border-left-color: #818cf8; }
.diary-entry.cal-bd-research { border-left-color: #f472b6; }
.diary-entry.cal-bd-appointment { border-left-color: #1d6fb8; }
.diary-entry.cal-bd-other { border-left-color: #94a3b8; }
.diary-entry-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.diary-entry-top strong { color: var(--ink); flex: 1; min-width: 160px; }
.diary-notes-form { margin-top: 8px; }
.diary-notes-form textarea { font-size: 13.5px; }

/* print documents stay light (docgen has its own styles) */

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .pa-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-cards, .stat-cards.three { grid-template-columns: repeat(2, 1fr); }
  .cols-2-1, .cols-2, .contact-cols { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-in { grid-template-columns: 1fr; padding-top: 72px; padding-bottom: 110px; gap: 30px; }
  .hero-side { flex-direction: row; flex-wrap: wrap; }
  .manifesto-grid { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .wrap-pad { padding: 16px; }
  .section { padding: 60px 0; }
  /* mobile nav: right slide-in drawer */
  .site-header { z-index: 85; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav-toggle { display: block; }
  .main-nav {
    display: flex; position: fixed; top: 0; right: 0; bottom: 0; z-index: 90;
    width: min(320px, 88vw); background: #fff; flex-direction: column; align-items: stretch;
    padding: 74px 20px 26px; gap: 2px; border-left: 1px solid var(--line-soft);
    box-shadow: -18px 0 50px rgba(19, 44, 71, .18);
    transform: translateX(105%); transition: transform .28s ease;
    overflow-y: auto; visibility: hidden;
  }
  body.nav-open .main-nav { transform: none; visibility: visible; }
  body.nav-open::before { content: ""; position: fixed; inset: 0; z-index: 80; background: rgba(19, 44, 71, .45); }
  body.nav-open { overflow: hidden; }
  .main-nav .nav-close {
    display: flex; position: absolute; top: 14px; right: 14px; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line);
    background: var(--panel-2); color: var(--ink); font-size: 16px; cursor: pointer;
  }
  .main-nav > a, .nav-drop > a { border-bottom: none; padding: 13px 6px; font-size: 16px; color: var(--ink); border-radius: 8px; }
  .main-nav > a:hover, .nav-drop > a:hover { background: var(--info-bg); }
  .drop-menu { position: static; display: block; box-shadow: none; padding-left: 14px; min-width: 0; background: transparent; border: none; }
  .nav-cta { margin: 12px 0 0; }
  /* hero */
  .hero-show { min-height: 88vh; }
  .hero-veil { background: linear-gradient(180deg, rgba(9, 19, 33, .84), rgba(9, 19, 33, .74) 55%, rgba(16, 34, 54, .96)); }
  .hero-grid { opacity: .3; }
  .hero-side { flex-direction: column; }
  .hero-ui { bottom: 16px; gap: 12px; }
  .h-arrow { display: none; }
  /* dashboard hero on phone */
  .dash-hero { min-height: 0; }
  .dash-hero-in { flex-direction: column; align-items: stretch; padding: 22px 18px; }
  .dash-greet { font-size: 23px; }
  .dash-clock { display: none; }
  .dash-chips { gap: 8px; }
  .dash-chip { padding: 7px 11px; font-size: 12px; }
  .dash-reel-wrap { width: 100%; }
  .reel-card { padding: 12px; }
  .reel-main strong { font-size: 14px; }
  /* grids */
  .pa-grid, .insights-grid, .cols-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 18px 8px; padding: 20px 12px; }
  .stats-strip { margin-top: -40px; }
  .case-snip { grid-template-columns: 1fr 1fr; }
  .form-row, .form-row.three, .form-row.four { grid-template-columns: 1fr; }
  .cta-in { flex-direction: column; align-items: flex-start; }
  .center-head { margin-bottom: 34px; }
  /* tables scroll instead of scatter */
  .table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .kv th { width: 42%; }
  .attach-row { display: flex; width: 100%; }
  .attach-row select { flex: 1; min-width: 0; max-width: none; }
  .note-when { margin-left: 0; width: 100%; }
  /* calendar on phone */
  .cal-cell { min-height: 56px; padding: 4px; }
  .cal-ev { display: none; }
  .cal-cell .cal-d { font-size: 11.5px; }
  .cal-cell.has-ev::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #1d6fb8; position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%); }
  .diary-day { grid-template-columns: 56px 1fr; gap: 10px; }
  .diary-date strong { font-size: 19px; }
  /* portal */
  .portal-shell { display: block; }
  .portal-side { position: fixed; z-index: 100; left: -290px; transition: .25s; height: 100vh; }
  body.side-open .portal-side { left: 0; box-shadow: 0 0 60px rgba(19, 44, 71, .3); }
  body.side-open::before { content: ""; position: fixed; inset: 0; z-index: 90; background: rgba(19, 44, 71, .45); }
  body.side-open { overflow: hidden; }
  .side-close { display: flex; }
  .portal-top { padding: 10px 14px; }
  .portal-top .nav-toggle { display: block; }
  .top-title { font-size: 17px; }
  .top-actions .btn-ghost { display: none; }
  .portal-foot { padding: 12px 16px; text-align: center; }
  .page-head { flex-direction: column; }
  .search-form { margin-left: 0; width: 100%; }
  .search-form input { flex: 1; width: auto; }
  input, select, textarea { font-size: 16px; }
  .btn { font-size: 12px; }
  .btn-lg { padding: 14px 24px; font-size: 12.5px; }
  .stat-cards, .stat-cards.three { grid-template-columns: 1fr 1fr; gap: 10px; }
  .scard { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; }
  .chat-bubble { max-width: 92%; }
  .fee-item-row { grid-template-columns: 1fr; }
  h1 { font-size: 34px; }
  .hero-badge strong { font-size: 32px; }
}
@media (max-width: 480px) {
  .stat-cards, .stat-cards.three { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

.why-photo img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line-soft); box-shadow: var(--shadow); aspect-ratio: 4 / 3; object-fit: cover; }
