/* Jue Wei Lim & Co. — site styles
   Palette per website brief: navy, off-white, restrained deep-green/teal accent.
   Layout: soft rounded panels on a cool grey ground, floating pill navigation.
   Logo keeps the nameplate sage (#819C88). */

:root {
  --ground: #D8DCE1;      /* page background */
  --panel: #E8EBEE;       /* default panel */
  --white: #F4F5F6;       /* off-white, softer than pure white */
  --navy: #13233A;
  --navy-2: #1C2E4A;
  --ink: #13233A;
  --body: #46505F;
  --muted: #5A6472;
  --line: #D5DAE0;
  --line-2: #C5CCD4;
  --grey-card: #DCE0E5;
  --accent: #2E6A5D;      /* deep green-teal */
  --accent-hi: #4A9483;
  --accent-tint: #E2EEEA;
  --glow: rgba(74,148,131,.28);
  --sage: #819C88;
  /* Avenir Next is built into Apple devices; everyone else gets Nunito Sans, its closest free match */
  --font: "Avenir Next", "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1200px;
  --read: 66ch;
  --r-panel: 16px;
  --r-card: 12px;
  --shadow: 0 1px 2px rgba(19,35,58,.04), 0 10px 30px -12px rgba(19,35,58,.14);
  --shadow-lg: 0 2px 6px rgba(19,35,58,.05), 0 30px 60px -24px rgba(19,35,58,.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: var(--font); font-size: 15.5px; line-height: 1.65; font-weight: 400;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 40px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 16px; }

h1, h2, h3, h4 { font-family: var(--font); color: var(--ink); margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(37.5px, 6.2vw, 71.5px); line-height: 1.06; letter-spacing: -.02em; font-weight: 600; }
h2 { font-size: clamp(27px, 3.8vw, 42.5px); line-height: 1.12; font-weight: 600; letter-spacing: -.015em; }
h3 { font-size: 19px; line-height: 1.3; letter-spacing: 0; }
p { margin: 0 0 1em; }
.lede { font-size: clamp(16px, 1.3vw, 17.5px); line-height: 1.6; color: var(--body); max-width: 56ch; }
.label { display: inline-flex; align-items: flex-start; line-height: 1.5; gap: 10px; font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--body); font-weight: 500; }
.label::before { content: ""; margin-top: .48em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); flex: none; }
.label.plain::before { display: none; }
.muted { color: var(--muted); }

/* Draft placeholders — visible only while <body class="draft"> */
body.draft .ph { background: #FFF1C9; color: #6B4E00; border-radius: 4px; padding: 0 .25em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.draft-bar { display: none; }
body.draft .draft-bar { display: block; background: #FFF1C9; color: #6B4E00; font-size: 12.5px; text-align: center; padding: 7px 16px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 26px; border-radius: 8px;
  font-family: var(--font); font-size: 14.5px; font-weight: 500; text-decoration: none; cursor: pointer;
  border: 1px solid var(--navy); transition: background .2s, color .2s, border-color .2s, box-shadow .2s, transform .2s;
}
.btn.primary { background: var(--navy); color: #fff; box-shadow: 0 10px 24px -12px rgba(19,35,58,.7); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.btn.ghost { background: var(--white); color: var(--navy); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--navy); }
.btn.light { background: var(--white); color: var(--navy); border-color: var(--white); }
.btn.light:hover { background: var(--accent-tint); border-color: var(--accent-tint); }
.btn.outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.btn.outline-light:hover { border-color: #fff; }
.btn .arr { transition: transform .2s; }
.btn:hover .arr { transform: translateX(3px); }
.textlink { color: var(--accent); font-weight: 500; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.textlink:hover { color: var(--navy); }

/* ---------- Floating pill navigation ---------- */
/* Bar edges are set so the logo lines up with the page content: main padding + .wrap padding − (bar border + bar left padding) */
.site-header { position: sticky; top: 14px; z-index: 50; padding: 0 29px; pointer-events: none; }
.site-header .bar-inner {
  pointer-events: auto; max-width: calc(var(--wrap) - 26px); margin: 14px auto 0; height: 80px; padding: 0 12px 0 26px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: rgba(244,245,246,.9); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(244,245,246,.95); border-radius: 8px; box-shadow: var(--shadow); position: relative;
}
.logo { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--navy); flex: none; }
/* Logo rebuilt from the firm's artwork (_source/brand/logo-reference.png): Cinzel wordmark, Cormorant monogram */
.logo .box { width: 72px; height: 37px; border: 1px solid var(--sage); display: flex; align-items: center; justify-content: center; font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; font-size: 29px; line-height: 1; letter-spacing: -.035em; color: var(--sage); padding: 0 0 3px; }
.logo .bar { width: 1.5px; height: 54px; background: var(--sage); margin: 0 2px; }
.logo .nm { display: flex; flex-direction: column; line-height: 1; white-space: nowrap; font-family: "Cinzel", Georgia, serif; font-weight: 500; }
.logo .nm strong { font-weight: 600; font-size: 20px; letter-spacing: .1em; }
.logo .nm small { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .14em; margin-top: 6px; }
.logo .nm small i { flex: 1; height: 1px; background: currentColor; opacity: .45; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.nav ul a { display: block; padding: 10px 18px; border-radius: 8px; text-decoration: none; font-size: 16px; font-weight: 500; color: var(--ink); transition: background .2s; }
.nav ul a:hover { background: rgba(19,35,58,.05); }
.nav ul a[aria-current="page"] { background: rgba(19,35,58,.07); }
.nav .btn { height: 54px; padding: 0 26px; font-size: 15.5px; margin-left: 12px; }
/* Language switch (EN | BM | 中文) */
.lang-switch { display: flex; align-items: center; gap: 2px; margin-left: 8px; padding-left: 10px; border-left: 1px solid var(--line-2); }
.lang-switch a { font-size: 13.5px; font-weight: 500; padding: 7px 9px; border-radius: 6px; color: var(--muted); text-decoration: none; line-height: 1; }
.lang-switch a:hover { color: var(--navy); background: rgba(19,35,58,.05); }
.lang-switch a[aria-current] { color: var(--navy); background: rgba(19,35,58,.08); font-weight: 600; }
/* Chinese pages: Latin text in the site font, Chinese in good CJK system fonts */
:lang(zh) body, :lang(zh) .btn, :lang(zh) input, :lang(zh) select, :lang(zh) textarea { font-family: "Avenir Next", "Nunito Sans", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif; }
:lang(zh) h1, :lang(zh) h2, :lang(zh) h3 { letter-spacing: 0; }
/* Chinese headings: break at punctuation, not mid-word; break anywhere only if a line would overflow */
:lang(zh) h1, :lang(zh) h2 { word-break: keep-all; overflow-wrap: anywhere; }
:lang(zh) .hero h1 { max-width: 11em; }
.menu-btn { display: none; width: 46px; height: 46px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--white); cursor: pointer; }
.menu-btn i { display: block; width: 16px; height: 1.5px; background: var(--navy); margin: 4px auto; transition: transform .25s; }
.menu-btn[aria-expanded="true"] i:first-child { transform: translateY(2.75px) rotate(45deg); }
.menu-btn[aria-expanded="true"] i:last-child { transform: translateY(-2.75px) rotate(-45deg); }

/* ---------- Panels: every top-level block in <main> sits on a rounded panel ---------- */
main { padding: 0 16px; }
main > section { max-width: 1400px; margin: 0 auto 16px; border-radius: var(--r-panel); background: var(--panel); position: relative; overflow: hidden; }
main > section:first-child { margin-top: -108px; }  /* lets the floating nav sit inside the first panel */
.section { padding: 76px 0; }
.section.white { background: var(--white); }

/* Page heads */
.page-head { padding: 176px 0 80px; }
.page-head::after { content: ""; position: absolute; right: -10%; top: -30%; width: 60%; height: 140%; background: radial-gradient(closest-side, var(--glow), transparent); opacity: .55; pointer-events: none; }
.page-head .wrap { position: relative; z-index: 1; }
.page-head .label { margin-bottom: 26px; }
.page-head h1 { font-size: clamp(34px, 5.4vw, 61px); max-width: 15ch; }
.page-head .lede { margin-top: 26px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 26px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--navy); }
.crumbs span { margin: 0 8px; opacity: .6; }

/* ---------- Home hero ---------- */
.hero { padding: 184px 0 96px; }
.hero::before { content: ""; position: absolute; left: 50%; bottom: -40%; width: 70%; height: 80%; background: radial-gradient(closest-side, var(--glow), transparent); opacity: .7; pointer-events: none; }
.hero .wrap { display: grid; grid-template-columns: 1.08fr .92fr; gap: 40px; align-items: center; position: relative; z-index: 1; }
.hero h1 { margin-top: 26px; font-size: clamp(35.5px, 5.4vw, 64.5px); max-width: 13ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { margin: 30px 0 38px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.checks { list-style: none; display: flex; flex-wrap: wrap; gap: 12px 26px; padding: 0; margin: 40px 0 0; }
.checks li { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--body); font-weight: 500; }
.checks svg { width: 18px; height: 18px; color: var(--accent); flex: none; }

/* Hero artwork container (three artworks rotate in place; see site.js) */
.orb { position: relative; width: 100%; max-width: 520px; aspect-ratio: 1; margin: 0 auto; perspective: 1600px; }
.orb::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: 4%; height: 8%; border-radius: 50%; background: radial-gradient(closest-side, rgba(19,35,58,.22), transparent); filter: blur(6px); }

/* Outline scale (hero) */
.art-scale svg { position: absolute; inset: 2%; width: 96%; height: 96%; overflow: visible; }
.art-scale .halo { fill: none; stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 2 6; }
.art-scale .part { transform-box: fill-box; transform-origin: 50% 100%; animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
.art-scale .p-beam { animation-delay: .35s; }
.art-scale .p-pan { animation-delay: .65s; }
.art-scale .p-obj { animation-delay: 1s; animation-name: pop; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
.art-scale .beam { transform-box: view-box; transform-origin: 200px 116px; animation: balance 10s ease-in-out 2s infinite; }
.art-scale .pl { transform-box: view-box; transform-origin: 62px 130px; animation: counter 10s ease-in-out 2s infinite; }
.art-scale .pr { transform-box: view-box; transform-origin: 338px 130px; animation: counter 10s ease-in-out 2s infinite; }
@keyframes balance { 25% { transform: rotate(2deg); } 75% { transform: rotate(-2deg); } }
@keyframes counter { 25% { transform: rotate(-2deg); } 75% { transform: rotate(2deg); } }
.art-scale.orb::after { display: none; }

/* Stages timeline (home) */
.timeline { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 40px; right: 40px; top: 44px; height: 2px; background: linear-gradient(90deg, var(--line-2), var(--accent)); }
.stage { position: relative; display: flex; flex-direction: column; padding: 28px 26px 26px; border-radius: 11px; background: var(--panel); border: 1px solid var(--line); }
.stage .num { position: relative; z-index: 1; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--white, #fff); border: 2px solid var(--accent); color: var(--accent); font-weight: 700; font-size: 13px; box-shadow: 0 0 0 6px var(--panel); }
.stage:last-child .num { background: var(--accent); color: #fff; }
.stage h3 { margin: 22px 0 6px; font-size: 18.5px; }
.stage p { font-size: 14px; color: var(--muted); margin: 0 0 18px; }
.stage ul { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; }
.stage li { position: relative; padding-left: 18px; font-size: 14px; line-height: 1.45; color: var(--navy); }
.stage li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.stage .dev { color: var(--muted); font-size: 13px; white-space: nowrap; }
.stage .more { margin-top: auto; font-size: 13px; color: var(--accent); text-decoration: none; font-weight: 500; }
.stage .more:hover { text-decoration: underline; }
.every-stage { margin-top: 28px; }
.every-stage > .label { margin-bottom: 14px; }
.every-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.every { display: flex; flex-direction: column; padding: 24px 26px; border-radius: 12px; border: 1px dashed var(--line-2); }
.every h3 { font-size: 18px; margin-bottom: 14px; }
.every ul { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 10px; }
.every li { position: relative; padding-left: 18px; font-size: 15px; line-height: 1.45; color: var(--navy); }
.every li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; border: 1.5px solid var(--accent); box-sizing: border-box; }
.every .dev { color: var(--muted); font-size: 13px; white-space: nowrap; }
.every .more { margin-top: auto; font-size: 14px; color: var(--accent); text-decoration: none; font-weight: 500; }
.every .more:hover { text-decoration: underline; }
@media (max-width: 1080px) { .every-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { .every-grid { grid-template-columns: 1fr; } }
@media (max-width: 1080px) {
  .timeline { grid-template-columns: 1fr 1fr; }
  .timeline::before { display: none; }
}
@media (max-width: 680px) {
  .timeline { grid-template-columns: 1fr; }
}

/* Hero artwork alternatives (see hero_art() in build.py) */
.art { container-type: inline-size; }
.art-wrap { display: grid; }
.art-wrap > .art { grid-area: 1 / 1; transition: opacity 1s ease, transform 1s ease; }
.art-wrap > .art.off { opacity: 0; transform: translateY(12px) scale(.97); visibility: hidden; transition: opacity 1s ease, transform 1s ease, visibility 0s 1s; }
.art .plane { position: absolute; left: 50%; top: 50%; transform-style: preserve-3d; }

/* A. Contract stack: layered agreement pages, top one with clauses, signature and seal */
.art-docs .plane { width: 56cqw; height: 72cqw; margin: -38cqw 0 0 -28cqw; transform: rotateX(52deg) rotateZ(-32deg); }
.art-docs .sheet { position: absolute; inset: 0; border-radius: 2.4cqw; transform: translateZ(calc(var(--i) * 3.2cqw)); animation: lift 9s ease-in-out infinite;
  background: linear-gradient(160deg, #FFFFFF, #E9EDF2); box-shadow: 0 0 0 1px rgba(19,35,58,.08), 0 1.5cqw 3cqw -1cqw rgba(19,35,58,.25); }
.art-docs .sheet[style*="--i:0"] { background: linear-gradient(160deg, #2A3D5A, #13233A); }
.art-docs .sheet[style*="--i:1"] { background: linear-gradient(160deg, #8A99AD, #5D6F88); }
.art-docs .sheet[style*="--i:2"] { background: linear-gradient(160deg, #5E9787, #2E6A5D); }
.art-docs .sheet[style*="--i:3"] { background: linear-gradient(160deg, #DDE3EA, #C3CCD7); }
.art-docs .sheet i { position: absolute; left: 12%; right: 12%; height: 1.1cqw; border-radius: 1cqw; background: #C9D1DB; }
.art-docs .sheet .hd { top: 10%; right: 40%; height: 2cqw; background: #13233A; }
.art-docs .sheet .ln:nth-of-type(2) { top: 22%; } .art-docs .sheet .ln:nth-of-type(3) { top: 29%; }
.art-docs .sheet .ln:nth-of-type(4) { top: 36%; right: 30%; } .art-docs .sheet .ln:nth-of-type(5) { top: 46%; }
.art-docs .sheet .ln:nth-of-type(6) { top: 53%; } .art-docs .sheet .ln:nth-of-type(7) { top: 60%; right: 22%; }
.art-docs .sheet .ln:nth-of-type(8) { top: 67%; right: 45%; }
.art-docs .sheet .sig { top: 84%; right: 52%; height: .5cqw; background: #13233A; }
.art-docs .sheet .stamp { left: auto; right: 10%; top: 74%; width: 13cqw; height: 13cqw; border-radius: 50%; background: radial-gradient(circle, transparent 52%, #2E6A5D 54% 62%, transparent 64%), radial-gradient(circle, #2E6A5D 22%, rgba(46,106,93,.18) 24%); opacity: .9; }
@keyframes lift { 50% { transform: translateZ(calc(var(--i) * 5.2cqw)); } }

/* B. Growth stages: rising columns for every stage of business */
.art-stages .plane { width: 64cqw; height: 22cqw; margin: 12cqw 0 0 -36cqw; transform: rotateX(60deg) rotateZ(-38deg); animation: sway 14s ease-in-out infinite; }
.art-stages .path { position: absolute; left: -6%; right: -6%; top: 50%; height: .6cqw; margin-top: -.3cqw; border-radius: 1cqw; background: linear-gradient(90deg, transparent, rgba(46,106,93,.45)); }
.art-stages .col { position: absolute; top: 3cqw; left: calc(var(--x) * 17cqw); width: 13cqw; height: 13cqw; transform-style: preserve-3d; }
.art-stages .col i { position: absolute; }
.art-stages .top { inset: 0; transform: translateZ(calc(var(--h) * 1cqw)); background: linear-gradient(135deg, #FFFFFF, #DCE2E9); border-radius: .6cqw; }
.art-stages .fr { left: 0; bottom: 0; width: 13cqw; height: calc(var(--h) * 1cqw); transform-origin: bottom; transform: rotateX(-90deg); background: linear-gradient(180deg, #2A3D5A, #13233A); }
.art-stages .sd { left: 13cqw; top: 0; width: calc(var(--h) * 1cqw); height: 13cqw; transform-origin: left; transform: rotateY(-90deg); background: linear-gradient(90deg, #8A99AD, #5D6F88); }
.art-stages .col.t .top { background: linear-gradient(135deg, #DCEDE7, #9CC4B8); }
.art-stages .col.t .fr { background: linear-gradient(180deg, #3F7E6E, #1F4A41); }
.art-stages .col.t .sd { background: linear-gradient(90deg, #5E9787, #2E6A5D); }
@keyframes sway { 50% { transform: rotateX(60deg) rotateZ(-26deg); } }



/* Section intros */
/* Two-column sections share one grid: 360px side column + 64px gap, so right-hand columns start on the same line site-wide */
.sec-intro { display: grid; grid-template-columns: 360px 1fr; gap: 24px 64px; align-items: end; margin-bottom: 52px; }
.sec-intro h2 { max-width: 16ch; margin-top: 18px; }
.sec-intro p { max-width: 44ch; color: var(--body); margin: 0; }
.split { display: grid; grid-template-columns: 360px 1fr; gap: 64px; }
.split > .side h2 { margin-top: 18px; }
.prose { max-width: var(--read); color: var(--body); }
.prose h2 { margin-bottom: 26px; color: var(--ink); }
.prose h3 { margin: 40px 0 12px; color: var(--ink); }
.prose p { font-size: 16px; }
.big-quote { font-size: clamp(20.5px, 2.4vw, 27px); line-height: 1.3; letter-spacing: -.005em; color: var(--ink); font-weight: 500; max-width: 30ch; margin: 0; }

/* Practice cards (home) — dark / grey / white mix */
.pcards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.pcard {
  display: flex; flex-direction: column; justify-content: space-between; min-height: 330px; padding: 28px;
  border-radius: var(--r-card); text-decoration: none; background: var(--white); border: 1px solid var(--line);
  transition: transform .25s, box-shadow .25s;
}
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pcard.dark { background: var(--navy); border-color: var(--navy); color: #fff; }
.pcard.dark h3 { color: #fff; }
.pcard.dark p { color: rgba(255,255,255,.7); }
.pcard.grey { background: var(--grey-card); border-color: var(--grey-card); }
.pcard .ico { width: 46px; height: 46px; display: grid; place-items: center; color: inherit; }
.pcard .ico svg { width: 30px; height: 30px; stroke-width: 1.4; }
.pcard h3 { margin-top: 48px; }
.pcard p { margin: 12px 0 0; font-size: 14px; color: var(--body); line-height: 1.55; }
.pcard .more { margin-top: 20px; font-size: 13px; font-weight: 500; display: flex; justify-content: space-between; align-items: center; opacity: .8; }

/* Practice index — numbered rows (practices page) */
.index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.index li { border-bottom: 1px solid var(--line-2); }
.index a { display: grid; grid-template-columns: 70px minmax(0, 1.1fr) minmax(0, 1.4fr) 40px; gap: 28px; align-items: baseline; padding: 30px 12px; text-decoration: none; color: inherit; border-radius: 8px; transition: background .2s; }
.index a:hover { background: var(--white); }
.index .n { font-size: 13px; color: var(--muted); font-weight: 500; }
.index h3 { font-size: clamp(18.5px, 2.2vw, 24px); }
.index p { margin: 0; color: var(--body); font-size: 14.5px; }
.index .go { justify-self: end; font-size: 19px; color: var(--accent); transition: transform .2s; }
.index a:hover .go { transform: translateX(4px); }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; padding: 5px 11px; border-radius: 8px; background: var(--accent-tint); color: var(--accent); vertical-align: middle; margin-left: 10px; white-space: nowrap; font-weight: 600; }
.pcard.dark .tag { background: rgba(255,255,255,.1); color: #9FD3C4; margin: 0; }
.index h3 .tag { position: relative; top: -3px; }

/* Principles */
.principles { list-style: none; padding: 0; margin: 44px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.principles li { padding: 22px; background: var(--white); border: 1px solid var(--line); border-radius: 9px; font-size: 16.5px; font-weight: 500; letter-spacing: -.01em; line-height: 1.3; }
.principles li span { display: block; font-size: 12.5px; color: var(--accent); margin-bottom: 28px; font-weight: 600; letter-spacing: .04em; }

/* Article list */
.articles { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.articles li { display: grid; grid-template-columns: 56px 1fr auto; gap: 24px; align-items: center; padding: 22px 26px; background: var(--white); border: 1px solid var(--line); border-radius: 9px; }
.articles .n { font-size: 13px; color: var(--muted); font-weight: 500; }
.articles h3 { font-size: 16.5px; font-weight: 500; }
.articles .txt { display: grid; gap: 6px; min-width: 0; }
.articles .cat { font-size: 13px; color: var(--muted); }
.articles .status { justify-self: end; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line-2); border-radius: 8px; padding: 5px 11px; white-space: nowrap; font-weight: 600; }
.articles li[hidden] { display: none; }
.articles li:has(.article-link) { padding: 0; }
.articles .article-link { grid-column: 1 / -1; display: grid; grid-template-columns: 56px 1fr auto; gap: 24px; align-items: center; padding: 22px 26px; color: inherit; text-decoration: none; border-radius: 9px; }
.articles li:has(.article-link):hover { border-color: var(--accent); }
.articles .article-link:hover h3 { color: var(--accent); }
.articles .date { justify-self: end; font-size: 13px; color: var(--body); white-space: nowrap; }
@media (max-width: 680px) { .articles .article-link { grid-template-columns: 1fr; gap: 6px; padding: 18px 20px; } .articles .article-link .n { display: none; } .articles .date { justify-self: start; } }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filters button { font: inherit; font-size: 13.5px; font-weight: 500; color: var(--body); background: var(--white); border: 1px solid var(--line-2); border-radius: 8px; padding: 9px 18px; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.filters button:hover { border-color: var(--navy); color: var(--navy); }
.filters button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.empty { padding: 22px 24px; color: var(--muted); background: var(--white); border-radius: 9px; }

/* Lists & callouts */
.ticks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ticks li { padding: 18px 20px 18px 52px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; position: relative; color: var(--ink); font-size: 14.5px; font-weight: 500; }
.ticks li::before { content: ""; position: absolute; left: 20px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; border: 1.5px solid var(--accent); background: no-repeat center/10px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10' fill='none' stroke='%232E6A5D' stroke-width='2'%3E%3Cpath d='M1 5l3.5 3.5L11 1'/%3E%3C/svg%3E"); }
.callout { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 26px 28px; margin: 32px 0 0; position: relative; }
.callout::before { content: ""; position: absolute; left: 0; top: 24px; bottom: 24px; width: 3px; border-radius: 3px; background: var(--accent); }
.callout h4 { font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.callout p { margin: 0 0 .7em; color: var(--body); font-size: 14.5px; }
.callout p:last-child { margin: 0; }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: 9px; padding: 0 24px; }
.faq summary { list-style: none; cursor: pointer; padding: 22px 40px 22px 0; position: relative; font-size: 16.5px; font-weight: 500; letter-spacing: -.015em; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-weight: 300; font-size: 24.5px; color: var(--accent); transition: transform .25s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: 0 0 24px; color: var(--body); max-width: 66ch; }

/* Cross-links */
.related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.related a { display: block; padding: 26px; min-height: 160px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card); text-decoration: none; transition: transform .2s, box-shadow .2s; }
.related a:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.related .label { margin-bottom: 40px; }
.related h3 { font-size: 18.5px; }

/* Profile */
.profile { display: grid; grid-template-columns: 360px 1fr; gap: 64px; align-items: start; }
.portrait-ph { aspect-ratio: 4/5; background: var(--navy); border-radius: var(--r-card); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; color: rgba(255,255,255,.55); font-size: 12.5px; text-align: center; padding: 20px; position: relative; overflow: hidden; }
.portrait-ph::before { content: ""; position: absolute; inset: -30%; background: radial-gradient(closest-side at 70% 20%, rgba(74,148,131,.4), transparent); }
.portrait-ph > * { position: relative; }
.portrait-ph .box { width: 84px; height: 84px; border: 3px solid var(--sage); display: grid; place-items: center; font-size: 22px; font-weight: 700; color: var(--sage); letter-spacing: .06em; }
.facts { margin: 32px 0 0; display: grid; gap: 8px; }
.facts div { display: grid; grid-template-columns: 170px 1fr; gap: 24px; padding: 16px 20px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; }
.facts dt { font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 3px; font-weight: 500; }
.facts dd { margin: 0; color: var(--ink); }

/* Dark contact panel */
.band { background: var(--navy) !important; color: #fff; padding: 88px 0; }
.band::before { content: ""; position: absolute; left: -10%; top: -60%; width: 70%; height: 160%; background: radial-gradient(closest-side, rgba(110,130,170,.35), transparent); pointer-events: none; }
.band::after { content: ""; position: absolute; right: -10%; bottom: -70%; width: 60%; height: 150%; background: radial-gradient(closest-side, rgba(74,148,131,.35), transparent); pointer-events: none; }
.band .wrap { position: relative; z-index: 1; }
.band h2 { color: #fff; max-width: 16ch; margin-top: 20px; }
.band p { color: rgba(255,255,255,.72); max-width: 58ch; font-size: 16.5px; margin: 22px 0 36px; }
.band .label { color: rgba(255,255,255,.8); }
.band .label::before { background: #7FC3B1; box-shadow: 0 0 0 3px rgba(127,195,177,.2); }

/* Contact page */
.contact-grid { display: grid; grid-template-columns: 360px 1fr; gap: 64px; align-items: start; }
.details { margin: 0; display: grid; gap: 10px; }
.details div { padding: 20px 22px; background: var(--white); border: 1px solid var(--line); border-radius: 9px; }
.details dt { font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.details dd { margin: 0; font-size: 16.5px; color: var(--ink); }
.details a { text-decoration: none; }
.details a:hover { color: var(--accent); }
form.enquiry { background: var(--white); border: 1px solid var(--line); border-radius: 13px; padding: 36px; box-shadow: var(--shadow); }
form.enquiry h2 { font-size: 26px; margin-bottom: 8px; }
form.enquiry .hint { color: var(--muted); font-size: 14px; margin-bottom: 26px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fields .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--ink); }
.field label .req { color: var(--accent); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--panel);
  border: 1px solid var(--line-2); border-radius: 8px; padding: 13px 14px; outline: none; transition: border-color .2s, background .2s, box-shadow .2s;
  appearance: none; -webkit-appearance: none;
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%2313233A' stroke-width='1.6'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); background: var(--white); box-shadow: 0 0 0 4px var(--accent-tint); }
.field .help { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.55; }
.field .help p { margin: 0 0 6px; }
.field .help.calc-warn { display: block; margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: var(--accent-tint); color: var(--ink); }
.field .help.calc-warn[hidden] { display: none; }
.field .help details { margin-top: 4px; }
.field .help summary { cursor: pointer; color: var(--accent); font-weight: 500; }
.field .help ul { margin: 8px 0 6px; padding-left: 18px; }
.field .help li { margin-bottom: 6px; }
.eq { margin: 12px 0; padding: 16px; border-radius: var(--r-card); background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); max-width: 380px; }
.eq-tag { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 8px; }
.eq-line { display: grid; grid-template-columns: 18px 1fr auto; align-items: baseline; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.eq-line:first-of-type { border-top: 0; }
.eq-line i { font-style: normal; font-size: 16px; font-weight: 600; color: var(--accent); text-align: center; }
.eq-line span { font-size: 13px; color: var(--body); }
.eq-line b { font-size: 15px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.eq-line.is-sub { background: var(--accent-tint); margin: 0 -16px; padding: 8px 16px; border-top-color: transparent; }
.eq-line.is-result { margin: 6px -16px -16px; padding: 12px 16px; background: var(--accent); border-radius: 0 0 var(--r-card) var(--r-card); border-top: 0; }
.eq-line.is-result i, .eq-line.is-result span, .eq-line.is-result b { color: #fff; }
.eq-line.is-result b { font-size: 17px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; color: var(--body); margin: 22px 0 0; line-height: 1.55; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.form-actions { display: flex; align-items: center; gap: 16px; margin-top: 26px; flex-wrap: wrap; }
.form-note { font-size: 13px; color: var(--accent); margin: 0; }

/* Article template */
.article { max-width: 780px; margin: 0 auto; }
.article .meta { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 13px; color: var(--muted); margin-top: 26px; }
.article .summary { font-size: 17.5px; line-height: 1.55; color: var(--ink); margin: 0 0 40px; padding: 24px 26px; background: var(--panel); border-radius: 9px; }
.article h2 { font-size: 26px; margin: 48px 0 16px; }
.article p { font-size: 16.5px; color: var(--body); }
.prose-article h2 { font-size: 26px; margin: 48px 0 16px; }
.prose-article h3 { font-size: 20px; margin: 32px 0 12px; }
.prose-article p, .prose-article li { font-size: 16.5px; color: var(--ink); line-height: 1.7; }
.prose-article ul, .prose-article ol { padding-left: 22px; margin: 0 0 18px; }
.prose-article li { margin-bottom: 8px; }
.prose-article blockquote { margin: 24px 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); }
.prose-article blockquote p { font-style: italic; }
/* Article illustrations (:::example and :::timeline blocks) */
.prose-article figure { margin: 28px 0 32px; }
.prose-article .fig-eq { max-width: 440px; }
.prose-article .fig-eq .eq-line span { font-size: 14px; }
.fig-tl { padding: 20px 22px 6px; border-radius: var(--r-card); background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); }
.fig-tl ol { list-style: none; margin: 4px 0 0; padding: 0; }
.prose-article .fig-tl li { position: relative; display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 6px 22px; margin: 0; padding: 0 0 18px 22px; font-size: 15px; line-height: 1.55; }
.fig-tl li::before { content: ""; position: absolute; left: 0; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.fig-tl li::after { content: ""; position: absolute; left: 4px; top: 18px; bottom: 2px; width: 1px; background: var(--line); }
.fig-tl li:last-child::after { display: none; }
.fig-tl .tl-when { font-weight: 600; color: var(--ink); }
.fig-tl .tl-what { color: var(--body); }
@media (max-width: 560px) { .prose-article .fig-tl li { grid-template-columns: 1fr; gap: 2px; } }
.lang-note { font-size: 14px; color: var(--body); background: #FFF6DB; border-radius: 8px; padding: 10px 14px; margin: -20px 0 28px; }
.sources { font-size: 14px; color: var(--body); padding-left: 20px; }
.sources li { margin-bottom: 8px; }

/* Footer */
.site-footer { max-width: 1400px; margin: 0 auto 16px; width: calc(100% - 32px); border-radius: var(--r-panel); background: #0E1A2C; color: rgba(255,255,255,.62); padding: 72px 0 40px; font-size: 13.5px; }
.site-footer .logo { color: #fff; }
.site-footer .logo .nm small i { opacity: .35; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 44px; border-bottom: 1px solid rgba(255,255,255,.1); }
.foot-grid h4 { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.45); font-weight: 500; margin-bottom: 16px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: 10px; }
.foot-grid a { text-decoration: none; color: rgba(255,255,255,.82); }
.foot-grid a:hover { color: #fff; }
.foot-legal { padding-top: 28px; font-size: 13px; line-height: 1.7; }
.foot-legal p { max-width: 100ch; }
body.draft .site-footer .ph { background: rgba(255,241,201,.18); color: #FFE6A3; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .orb { max-width: 400px; margin-top: 20px; }
  .pcards { grid-template-columns: 1fr 1fr; }
  .split, .sec-intro { grid-template-columns: 1fr; gap: 28px; }
  .sec-intro { gap: 16px; }
  .index a { grid-template-columns: 50px 1fr 32px; }
  .index p { grid-column: 2 / 3; }
  .index .go { grid-row: 1; grid-column: 3; }
  .profile, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .portrait-ph { max-width: 320px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .related { grid-template-columns: 1fr 1fr; }
  .principles { grid-template-columns: 1fr 1fr; }
}
/* Collapse the top bar into the menu button below 1200px (spaced capitals and the language switch need the room) */
@media (max-width: 1200px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: calc(100% + 10px); left: 0; right: 0; flex-direction: column; align-items: stretch; background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); padding: 10px; }
  .nav.open { display: flex; }
  .nav ul { flex-direction: column; }
  .nav ul a { padding: 14px 16px; border-radius: 8px; font-size: 15.5px; }
  .nav .btn { margin: 8px 0 0; justify-content: center; }
  .lang-switch { margin: 6px 0 0; padding: 10px 6px 0; border-left: 0; border-top: 1px solid var(--line); }
  .lang-switch a { padding: 10px 12px; font-size: 15px; }
}
@media (max-width: 680px) {
  body { font-size: 15px; }
  .wrap { padding: 0 20px; }
  main { padding: 0 8px; }
  main > section { margin-bottom: 8px; border-radius: 12px; }
  .site-header { padding: 0 13px; top: 8px; }
  .site-header .bar-inner { height: 66px; padding: 0 8px 0 14px; margin-top: 8px; }
  main > section:first-child { margin-top: -82px; }
  .logo .nm strong { font-size: 15.5px; letter-spacing: .08em; }
  .logo .nm small { font-size: 9.5px; margin-top: 5px; }
  .logo .box { width: 58px; height: 30px; font-size: 23px; padding-bottom: 2px; }
  .logo .bar { height: 44px; }
  .logo { gap: 9px; }
  .hero { padding: 128px 0 64px; }
  .page-head { padding: 124px 0 52px; }
  .section, .band { padding: 56px 0; }
  .orb { max-width: 300px; }
  .pcards, .principles, .ticks, .related, .foot-grid { grid-template-columns: 1fr; }
  .pcard { min-height: 0; }
  .pcard h3 { margin-top: 28px; }
  .index a { grid-template-columns: 1fr 28px; gap: 8px 16px; padding: 24px 4px; }
  .index .n, .index h3 { grid-column: 1; }
  .index p { grid-column: 1 / -1; }
  .index .go { grid-row: 1 / 3; grid-column: 2; align-self: center; }
  .articles li { grid-template-columns: 1fr; gap: 6px; padding: 20px; }
  .articles .n, .articles .status { justify-self: start; }
  .facts div { grid-template-columns: 1fr; gap: 4px; }
  .fields { grid-template-columns: 1fr; }
  form.enquiry { padding: 24px 18px; border-radius: 10px; }
  .site-footer { width: calc(100% - 16px); margin-bottom: 8px; border-radius: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  html { scroll-behavior: auto; }
  .art .plane, .art .sheet, .art-scale .beam, .art-scale .pan { animation: none !important; }
  .art-scale .part { animation: none !important; opacity: 1; }
}

/* ---------- Dark hero (first block on the home page) ---------- */
main > section.hero { background: radial-gradient(120% 90% at 85% 40%, #22385A 0%, #13233A 55%, #0E1A2C 100%); color: #fff; }
.hero::before { opacity: .55; }
.hero h1 { color: #fff; }
.hero h1 em { color: #9CC4B8; }
.hero .lede { color: rgba(255,255,255,.76); }
.hero .label { color: rgba(255,255,255,.7); }
.hero .label::before { background: #9CC4B8; box-shadow: 0 0 0 3px rgba(156,196,184,.18); }
.hero .checks li { color: rgba(255,255,255,.72); }
.hero .checks svg { color: #9CC4B8; }
.hero .btn.primary { background: var(--white); color: var(--navy); border-color: var(--white); box-shadow: none; }
.hero .btn.primary:hover { background: #DCEDE7; border-color: #DCEDE7; }
.hero .btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.hero .btn.ghost:hover { border-color: #fff; }
body.draft .hero .ph { background: rgba(255,241,201,.9); }
/* artwork on dark: lift the navy parts so they stay visible */
.hero .art-scale .halo { stroke: rgba(255,255,255,.14); }
.hero .art-scale .p-stand [fill="#13233A"], .hero .art-scale .p-beam [fill="#13233A"] { fill: #C5CCD4; }
.hero .art-scale #sc-navy stop:nth-child(1), .hero .art-scale #sc-navy-v stop:nth-child(1) { stop-color: #E2E7EC; }
.hero .art-scale #sc-navy stop:nth-child(2) { stop-color: #FFFFFF; }
.hero .art-scale #sc-navy stop:nth-child(3), .hero .art-scale #sc-navy-v stop:nth-child(2) { stop-color: #8A99AD; }
.hero .art-scale [stroke="#13233A"] { stroke: #13233A; }
.hero .art-scale ellipse[fill="url(#sc-shadow)"] { opacity: .5; }
.hero .art-docs .sheet[style*="--i:0"] { background: linear-gradient(160deg, #3A5578, #2A3D5A); }
.hero .art-docs .sheet { box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 1.5cqw 3cqw -1cqw rgba(0,0,0,.45); }
.hero .art-stages .fr { background: linear-gradient(180deg, #4A5F7E, #2A3D5A); }
.hero .art-stages .path { background: linear-gradient(90deg, transparent, rgba(156,196,184,.6)); }
.hero .orb::after { background: radial-gradient(closest-side, rgba(0,0,0,.4), transparent); }

/* Privacy and legal notices */
.page-head .updated { margin-top: 14px; font-size: 14px; color: var(--muted); }
.prose.notice h3 { margin-top: 36px; }
.prose.notice h3:first-child { margin-top: 0; }
.prose.notice ul { margin: 0 0 1em; padding-left: 1.2em; }
.prose.notice li { margin: .4em 0; color: var(--body); }

/* Latham-style small capitals with wide tracking: top menu and buttons */
.nav ul a { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 500; white-space: nowrap; padding-left: 10px; padding-right: 10px; }
.btn { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 600; white-space: nowrap; }
.nav .btn { padding: 0 20px; }
.lang-switch a { white-space: nowrap; }
:lang(zh) .nav ul a, :lang(zh) .btn { letter-spacing: .08em; font-size: 14px; }
@media (max-width: 1200px) { .nav ul a { font-size: 13.5px; } .nav .btn { padding: 0 26px; } }

/* KL skyline, fine-line drawing (The Firm page header); generated by _source/make_skyline.py */
.page-head.has-art .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: end; }
.skyline { max-width: 460px; justify-self: end; width: 100%; }
.skyline svg { display: block; width: 100%; height: auto; overflow: visible; animation: rise 1.2s cubic-bezier(.2,.7,.2,1) both; }
.skyline .ln { stroke: var(--navy); stroke-width: .95; }
.skyline .thin { stroke-width: .7; opacity: .55; }
.skyline .win { stroke: var(--navy); stroke-width: .55; opacity: .42; }
.skyline .acc { stroke: var(--accent); }
.skyline circle.ln { fill: none; }
.skyline .ground { stroke: var(--line-2); stroke-width: 1.2; }
@media (max-width: 880px) { .page-head.has-art .wrap { grid-template-columns: 1fr; gap: 36px; } .skyline { max-width: 520px; } }
@media (prefers-reduced-motion: reduce) { .skyline svg { animation: none; } }

/* Case Updates page */
.case-empty { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 26px 28px; border: 1px dashed var(--line-2); border-radius: 12px; background: var(--panel); }
.case-empty p { margin: 0; color: var(--body); }
.case-empty .status { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line-2); border-radius: 8px; padding: 5px 11px; white-space: nowrap; font-weight: 600; }
.cases { display: grid; gap: 22px; }
.case { border: 1px solid var(--line); border-radius: 12px; background: var(--white); padding: 30px 32px; }
.case-head { border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 6px; }
.case-head h3 { margin: 10px 0 6px; font-size: 22px; line-height: 1.3; }
.case-name { margin: 0; color: var(--body); font-size: 15px; }
.case-name .cite { font-style: normal; font-weight: 600; color: var(--ink); white-space: nowrap; }
.case-draft { display: inline-block; margin-left: 10px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; background: #fff3b0; color: #5c4a00; border-radius: 6px; padding: 3px 9px; vertical-align: middle; }
.case-body { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 40px; }
.case-body section { padding-top: 18px; }
.case-body h4 { margin: 0 0 10px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.case-body p, .case-body li { font-size: 15px; color: var(--ink); line-height: 1.6; }
.case-body strong { font-weight: 700; color: var(--ink); }
.case-body q.jq { quotes: "\201C" "\201D"; font-style: italic; background: #E6EFE8; padding: 1px 3px; border-radius: 3px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.case-body .para { margin-left: 4px; font-size: 13px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.case-note { margin: 22px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.case-body p { margin: 0 0 10px; }
.case-meta { list-style: none; margin: 0 0 12px; padding: 0; }
.case-meta li { margin: 0 0 4px; }
.case-points { margin: 0; padding-left: 18px; }
.case-points li { margin: 0 0 9px; }
@media (max-width: 860px) { .case-body { grid-template-columns: 1fr; } .case { padding: 24px 20px; } }
.case-covers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.case-covers li { padding: 26px; border-radius: 12px; background: var(--white); border: 1px solid var(--line); }
.case-covers .n { font-size: 13px; color: var(--accent); font-weight: 600; }
.case-covers h3 { margin: 14px 0 8px; font-size: 18px; }
.case-covers p { margin: 0; font-size: 15px; color: var(--body); }
@media (max-width: 1080px) { .case-covers { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { .case-covers { grid-template-columns: 1fr; } }

/* Language dropdown (desktop): globe + current language, Latham style */
.lang-menu { position: relative; margin-left: 4px; }
.lang-menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 8px; font-size: 12px; font-weight: 600; letter-spacing: .1em; color: var(--navy); white-space: nowrap; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary svg { width: 17px; height: 17px; }
.lang-menu summary:hover, .lang-menu[open] summary { background: rgba(19,35,58,.06); }
.lang-list { position: absolute; right: 0; top: calc(100% + 10px); min-width: 170px; display: flex; flex-direction: column; padding: 6px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); z-index: 5; }
.lang-list a { padding: 10px 12px; border-radius: 6px; font-size: 14px; color: var(--body); text-decoration: none; white-space: nowrap; }
.lang-list a:hover { background: var(--panel); color: var(--navy); }
.lang-list a[aria-current] { color: var(--navy); font-weight: 600; background: rgba(19,35,58,.06); }
.nav > .lang-switch { display: none; }
@media (max-width: 1200px) { .lang-menu { display: none; } .nav > .lang-switch { display: flex; } }
/* BM menu words are longer: slightly tighter spacing so five items fit */
:lang(ms) .nav ul a { letter-spacing: .07em; padding-left: 8px; padding-right: 8px; }
:lang(ms) .nav .btn { letter-spacing: .08em; padding: 0 16px; }
@media (max-width: 1200px) { :lang(ms) .nav ul a { letter-spacing: .12em; padding-left: 16px; padding-right: 16px; } :lang(ms) .nav .btn { padding: 0 26px; } }

/* Stamp duty calculator */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.calc-in { display: grid; gap: 18px; padding: 30px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.calc-in fieldset { border: 0; margin: 0; padding: 0; }
.calc-in legend { display: block; padding: 0; font-size: 14px; font-weight: 500; margin-bottom: 8px; color: var(--ink); }
.calc-in .radio { display: flex; gap: 10px; align-items: center; font-size: 15px; color: var(--body); margin: 6px 0; }
.calc-in .check { margin: 0; }
.calc-results { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.calc-out { padding: 26px 28px; border-radius: 12px; background: var(--navy); color: #fff; }
.calc-out h3 { color: #fff; font-size: 17px; margin-bottom: 14px; }
.calc-out dl { margin: 0; display: grid; gap: 10px; }
.calc-out dl div { display: flex; justify-content: space-between; gap: 16px; font-size: 15px; color: rgba(255,255,255,.78); }
.calc-out dd { margin: 0; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.calc-out .total { margin-top: 6px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.18); font-weight: 600; color: #fff; font-size: 17px; }
.calc-out .note { color: rgba(255,255,255,.6); font-size: 13px; margin: 14px 0 0; }
.calc-results > .note { font-size: 13.5px; color: var(--muted); margin: 0; }
.calc-results .btn { justify-self: start; max-width: 100%; white-space: normal; }
@media (max-width: 880px) { .calc { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .calc-in { padding: 22px 18px; } .calc-out { padding: 22px 20px; } }

/* UN SDG tiles (ESG page): square, flat official colours, number beside the goal name, as on UN tiles */
.sdgs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.sdgs li { display: flex; flex-direction: column; }
.sdg-box { background: var(--sdg); color: #fff; aspect-ratio: 1 / 1; padding: 9% 9%; display: flex; align-items: flex-start; gap: 8px; border-radius: 0; }
.sdg-box .sdg-n { font-family: "Oswald", "Avenir Next Condensed", "Arial Narrow", sans-serif; font-weight: 700; font-size: clamp(40px, 4vw, 60px); line-height: .82; letter-spacing: -.01em; }
.sdg-box h3 { margin: 0; color: #fff; font-family: "Oswald", "Avenir Next Condensed", "Arial Narrow", sans-serif; font-weight: 500; font-size: clamp(12px, 1.05vw, 15px); line-height: 1.12; letter-spacing: .01em; text-transform: uppercase; }
:lang(zh) .sdg-box h3 { font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif; font-weight: 600; font-size: clamp(13px, 1.1vw, 16px); }
.sdgs p { margin: 0; padding: 12px 2px 0; font-size: 14px; line-height: 1.5; color: var(--body); }
@media (max-width: 1080px) { .sdgs { grid-template-columns: repeat(3, 1fr); } .sdg-box .sdg-n { font-size: 44px; } .sdg-box h3 { font-size: 14px; } }
@media (max-width: 680px) { .sdgs { grid-template-columns: 1fr 1fr; } .sdg-box .sdg-n { font-size: 40px; } .sdg-box h3 { font-size: 13px; } }
.calc-in .radio input { -webkit-appearance: radio; appearance: auto; width: 18px; height: 18px; padding: 0; margin: 0; flex: none; accent-color: var(--accent); background: none; border: 0; box-shadow: none; }

/* Tools and resources (home) */
.tools { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tools li > a, .tools li > div { display: flex; flex-direction: column; height: 100%; padding: 28px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; color: inherit; transition: border-color .2s, background .2s, transform .2s; }
.tools li > a:hover { border-color: var(--accent); background: var(--white); transform: translateY(-2px); }
.tools .tool-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 10px; background: var(--navy); color: #fff; }
.tools .tool-ic svg { width: 24px; height: 24px; }
.tools h3 { margin: 20px 0 8px; font-size: 19px; }
.tools p { margin: 0 0 22px; font-size: 15px; color: var(--body); }
.tools .more { margin-top: auto; font-size: 14px; font-weight: 600; color: var(--accent); }
.tools .soon > div { background: transparent; border-style: dashed; border-color: var(--line-2); }
.tools .soon .tool-ic { background: var(--accent-tint); color: var(--accent); }
@media (max-width: 880px) { .tools { grid-template-columns: 1fr; } }

.sdg-box h3 { overflow-wrap: anywhere; hyphens: auto; min-width: 0; }
@media (max-width: 680px) { .sdg-box { gap: 6px; } .sdg-box h3 { font-size: 11.5px; } }

/* Toolbox dropdown in the top bar */
.tools-menu { position: relative; margin-left: 4px; }
.tools-menu summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; color: var(--navy); }
.tools-menu summary::-webkit-details-marker { display: none; }
.tools-menu summary svg { width: 21px; height: 21px; }
.tools-menu summary:hover, .tools-menu[open] summary { background: rgba(19,35,58,.06); }
.tools-list { position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px; display: flex; flex-direction: column; padding: 8px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); z-index: 5; }
.tools-list .tl-h, .nav-tools .tl-h { padding: 6px 12px 8px; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.tools-list a { padding: 10px 12px; border-radius: 6px; font-size: 14px; color: var(--navy); text-decoration: none; white-space: nowrap; }
.tools-list a:hover { background: var(--panel); }
.nav > .nav-tools { display: none; }
@media (max-width: 1200px) {
  .tools-menu { display: none; }
  .nav > .nav-tools { display: flex; flex-direction: column; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
  .nav-tools a { padding: 12px 16px; border-radius: 8px; font-size: 15px; color: var(--navy); text-decoration: none; }
}

/* Tools: labelled outline button in the top bar */
.tools-menu summary { width: auto; height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--line-2); background: var(--white); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.tools-menu summary svg { width: 19px; height: 19px; color: var(--accent); }
.tools-menu summary .caret { width: 12px; height: 12px; color: var(--navy); transition: transform .2s; }
.tools-menu[open] summary .caret { transform: rotate(180deg); }
.tools-menu summary:hover, .tools-menu[open] summary { border-color: var(--navy); background: var(--white); }
.tools-menu { margin-left: 10px; }
:lang(zh) .tools-menu summary { letter-spacing: .06em; font-size: 13px; }
:lang(ms) .tools-menu summary { letter-spacing: .08em; padding: 0 12px; }
/* top bar fit with the labelled tools button */
.nav ul a { letter-spacing: .1em; }
.tools-menu summary { letter-spacing: .09em; padding: 0 12px; }
.nav .btn { padding: 0 16px; letter-spacing: .1em; }
@media (max-width: 1200px) { .nav ul a { letter-spacing: .12em; } .nav .btn { padding: 0 26px; } }

/* language globe now sits before the tools button */
.lang-menu { margin-left: 8px; }
.tools-menu { margin-left: 6px; }

.calc-in input[type="date"] { font: inherit; }
.calc-out dd[data-out="ar"], .calc-out dd[data-out="circ"], .calc-out dd[data-out="lodge"] { white-space: normal; text-align: right; }

/* Professional network (The Firm page) */
.network { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.network li { display: flex; flex-direction: column; padding: 26px 28px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--accent); }
.network .role { font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.network h3 { margin: 10px 0 8px; font-size: 19px; }
.network p { margin: 0 0 18px; font-size: 15px; color: var(--body); }
.network .more { margin-top: auto; font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: none; }
.network .more:hover { text-decoration: underline; }
@media (max-width: 880px) { .network { grid-template-columns: 1fr; } }
/* Tools dropdown: tool names in bold capitals, like the top menu */
.tools-list a, .nav-tools a { font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 12.5px; }
:lang(zh) .tools-list a, :lang(zh) .nav-tools a { letter-spacing: .04em; font-size: 14px; }

/* Network partner logos (The Firm page) */
.partners { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 20px; }
.partners a { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 22px 30px 18px; border-radius: 12px; background: #fff; border: 1px solid var(--line); text-decoration: none; transition: border-color .2s, box-shadow .2s; }
.partners a:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.partners img { display: block; width: 220px; height: auto; }
.partners .role { font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* Calendar reminders (company deadlines) */
.cal { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.18); }
.cal-h { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.7); margin-bottom: 10px; }
.cal-links { display: flex; flex-wrap: wrap; gap: 8px; }
.cal-links a, .cal-ics { display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.06); color: #fff; font: inherit; font-size: 13.5px; text-decoration: none; cursor: pointer; }
.cal-links a::before { content: "+"; font-weight: 700; color: #9CC4B8; }
.cal-links a:hover, .cal-ics:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.5); }
.cal-ics { margin-top: 10px; }
.cal-note { margin: 10px 0 0; font-size: 12.5px; color: rgba(255,255,255,.6); }

/* Case Updates: list with search and year filter, one page per case */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.case-filter { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 22px; }
.case-search { flex: 1 1 320px; }
.case-filter input, .case-filter select { width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: var(--white); border: 1px solid var(--line-2); border-radius: 8px; padding: 11px 14px; }
.case-filter input:focus, .case-filter select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.case-year { flex: 0 0 170px; }
.case-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.case-row { display: block; padding: 24px 28px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.case-row:hover, .case-row:focus-visible { border-color: var(--accent); box-shadow: 0 6px 22px rgba(19,35,58,.07); }
.case-row h3 { margin: 10px 0 6px; font-size: 20px; line-height: 1.3; }
.case-row:hover h3 { color: var(--accent); }
.case-when { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; color: var(--body); }
.case-none { margin: 18px 0 0; color: var(--body); }
.case-page-head h1 { max-width: 30ch; margin-top: 12px; }
.case-page-head .case-name { margin-top: 14px; font-size: 16px; }
.case-full { padding: 32px 34px; }
@media (max-width: 680px) { .case-year { flex: 1 1 100%; } .case-row { padding: 20px; } .case-full { padding: 22px 18px; } }

/* Share buttons on case updates and articles */
.share { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.share-label { font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--body); font-weight: 500; margin-right: 4px; }
.share-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border: 1px solid var(--line-2); border-radius: 50%; background: var(--white); color: var(--ink); cursor: pointer; padding: 0; transition: border-color .15s, color .15s, background .15s; }
.share-btn svg { width: 18px; height: 18px; }
.share-btn:hover, .share-btn:focus-visible { border-color: var(--accent); color: var(--accent); outline: none; }
.share-btn[hidden] { display: none; }
.share-done { font-size: 13px; color: var(--accent); font-weight: 600; margin-left: 4px; }

/* First-visit privacy note (no cookies are used; this only informs) */
.privacy-note { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: min(640px, calc(100% - 32px)); display: flex; align-items: center; gap: 16px; padding: 14px 16px 14px 20px;
  background: var(--white); color: var(--ink); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow-lg); }
.privacy-note[hidden] { display: none; }
.privacy-note p { margin: 0; font-size: 14px; line-height: 1.5; flex: 1; min-width: 0; }
.privacy-note a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.privacy-note .btn { flex: none; padding: 9px 18px; font-size: 14px; justify-content: center; text-align: center; }
@media (max-width: 520px) { .privacy-note { flex-direction: column; align-items: stretch; text-align: left; } .privacy-note .btn { width: 100%; } }
.notice h3[id] { scroll-margin-top: 110px; }
