/* G-BOT — Contemporary Redesign Stylesheet
 * Palette and typography deliberately calm: a single deep ink background,
 * one warm accent (muted gold), one cool accent (sea-glass cyan),
 * a serif for headlines and an industrial sans for body.
 */

:root {
  --ink:        #0b1220;   /* page background */
  --ink-2:      #0f1729;   /* slightly raised band */
  --surface:    #131c33;   /* card surface */
  --surface-2:  #182341;   /* card surface hovered */
  --hairline:   rgba(255, 255, 255, 0.08);
  --hairline-2: rgba(255, 255, 255, 0.16);

  --text:       #f0ebdb;   /* primary text, warm off-white */
  --text-soft:  #d4d1c2;
  --muted:      #a8aebf;
  --dim:        #7a8295;

  --gold:       #d6b87a;   /* muted gold accent */
  --gold-soft:  #b89a5a;
  --gold-dim:   rgba(214, 184, 122, 0.18);

  --cyan:       #6cbfc7;   /* link / data accent */
  --cyan-soft:  #4a949c;

  --danger:     #d8794d;   /* warnings */
  --danger-bg:  rgba(216, 121, 77, 0.10);

  --ok:         #82c08d;

  --radius:     14px;
  --radius-sm:  8px;
  --shadow:     0 10px 30px rgba(0, 0, 0, 0.35);

  --serif:      'Fraunces', 'Source Serif Pro', Georgia, 'Times New Roman', serif;
  --sans:       'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono:       'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --gold-pill-text:  #1a1305;       /* text on a solid gold pill */
  --gold-hover:      #e6cb95;       /* gold pill background on hover */
  --nav-bg:          rgba(11, 18, 32, 0.78);
  --footer-bg:       #070c17;
  --hero-radial-1:   rgba(214, 184, 122, 0.10);
  --hero-radial-2:   rgba(108, 191, 199, 0.06);
  --eyebrow-bg:      rgba(214, 184, 122, 0.05);
  --quote-bg:        rgba(214, 184, 122, 0.04);
  --band-alt-bg:     linear-gradient(180deg, rgba(15, 23, 41, 0.55), rgba(11, 18, 32, 0));
}

/* ─────── Light theme (cream / private-bank brochure) ─────── */

[data-theme="light"] {
  --ink:        #f7f4ea;
  --ink-2:      #f1ecdc;
  --surface:    #fbf8ed;
  --surface-2:  #f4ecd2;
  --hairline:   rgba(28, 31, 44, 0.10);
  --hairline-2: rgba(28, 31, 44, 0.22);

  --text:       #1c1f2c;
  --text-soft:  #3a4054;
  --muted:      #6a6c7a;
  --dim:        #9a9b9f;

  --gold:       #8a6f30;
  --gold-soft:  #6f5826;
  --gold-dim:   rgba(138, 111, 48, 0.15);

  --cyan:       #2f6a72;
  --cyan-soft:  #225057;

  --danger:     #9c4824;
  --danger-bg:  rgba(156, 72, 36, 0.07);

  --ok:         #406b46;

  --shadow:     0 6px 22px rgba(60, 50, 18, 0.10);

  --gold-pill-text:  #fbf8ed;
  --gold-hover:      #a4843c;
  --nav-bg:          rgba(247, 244, 234, 0.85);
  --footer-bg:       #ece4cf;
  --hero-radial-1:   rgba(138, 111, 48, 0.10);
  --hero-radial-2:   rgba(47, 106, 114, 0.06);
  --eyebrow-bg:      rgba(138, 111, 48, 0.06);
  --quote-bg:        rgba(138, 111, 48, 0.04);
  --band-alt-bg:     linear-gradient(180deg, rgba(241, 236, 220, 0.7), rgba(247, 244, 234, 0));
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
hr  { border: 0; border-top: 1px solid var(--hairline); margin: 3rem 0; }

a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(108, 191, 199, 0.35);
  transition: color 0.18s ease, border-color 0.18s ease;
}
a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

::selection { background: var(--gold-dim); color: var(--text); }

/* ─────── Layout ─────── */

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
}

.container-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ─────── Top nav ─────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  max-width: 1120px;
  margin: 0 auto;
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
  color: var(--text);
  border: 0;
  font-family: var(--serif);
  white-space: nowrap;
}
.brand .mark {
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 0.5px;
  color: var(--gold);
  white-space: nowrap;
}
.brand .sub {
  font-family: var(--sans);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
  white-space: nowrap;
}
.brand:hover { color: var(--text); }

.nav-links {
  display: flex;
  gap: 22px;
}
.nav-links a {
  font-size: 0.9rem;
  color: var(--text-soft);
  border: 0;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--gold); }

.nav-cta {
  font-size: 0.82rem;
  background: var(--gold);
  color: var(--gold-pill-text);
  padding: 9px 16px;
  border-radius: 999px;
  border: 0;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.nav-cta:hover {
  background: var(--gold-hover);
  color: var(--gold-pill-text);
  border: 0;
}

@media (max-width: 1024px) {
  .brand .sub { display: none; }
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 0.86rem; }
}
@media (max-width: 880px) {
  .nav-links { display: none; }
}

/* ─────── Hero ─────── */

.hero {
  padding: 96px 0 64px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 60% at 80% 0%, var(--hero-radial-1), transparent 70%),
    radial-gradient(80% 80% at 0% 30%, var(--hero-radial-2), transparent 60%);
  pointer-events: none;
}
.hero-eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--gold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  padding: 6px 12px;
  border: 1px solid var(--gold-dim);
  border-radius: 999px;
  background: var(--eyebrow-bg);
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.1rem, 5.4vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0 0 1.25rem 0;
  color: var(--text);
}
.hero h1 em {
  font-style: italic;
  color: var(--gold);
  font-weight: 400;
}
.hero-lede {
  font-size: 1.2rem;
  max-width: 60ch;
  color: var(--text-soft);
  margin-bottom: 2.5rem;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  border: 0;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn-primary {
  background: var(--gold);
  color: var(--gold-pill-text);
}
.btn-primary:hover {
  background: var(--gold-hover);
  color: var(--gold-pill-text);
  border: 0;
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--hairline-2);
}
.btn-ghost:hover {
  background: var(--surface);
  color: var(--gold);
  border-color: var(--gold-dim);
}

.hero-quote {
  margin-top: 4rem;
  padding: 28px 32px;
  border-left: 2px solid var(--gold);
  background: var(--quote-bg);
  border-radius: 0 var(--radius) var(--radius) 0;
  max-width: 720px;
}
.hero-quote p {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.32rem;
  line-height: 1.5;
  color: var(--text);
}
.hero-quote cite {
  display: block;
  margin-top: 12px;
  font-style: normal;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-figure {
  margin-top: 4rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink-2);
  box-shadow: var(--shadow);
}
.hero-figure img {
  width: 100%;
}
.hero-figure-caption {
  padding: 16px 22px;
  border-top: 1px solid var(--hairline);
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
}

/* ─────── Section primitives ─────── */

section.band {
  padding: 88px 0;
  border-top: 1px solid var(--hairline);
}

.section-label {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 1.5rem 0;
}

.section-lede {
  font-size: 1.1rem;
  color: var(--text-soft);
  max-width: 65ch;
  margin: 0 0 3rem 0;
}

/* ─────── Grids ─────── */

.grid {
  display: grid;
  gap: 24px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ─────── Cards ─────── */

.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}
.card:hover {
  border-color: var(--hairline-2);
  background: var(--surface-2);
  transform: translateY(-2px);
}

.card-eyebrow {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.85rem;
}
.card h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.35rem;
  line-height: 1.25;
  margin: 0 0 0.85rem 0;
  color: var(--text);
}
.card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.96rem;
}
.card-link {
  margin-top: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--gold);
  border: 0;
  letter-spacing: 0.03em;
}
.card-link::after { content: "→"; transition: transform 0.15s ease; }
.card:hover .card-link::after { transform: translateX(3px); }
.card-link:hover { color: var(--gold); border: 0; }
.card a { border: 0; }
.card a:hover { border: 0; }

/* ─────── Principle row ─────── */

.principle {
  display: flex;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--hairline);
}
.principle:last-child { border-bottom: 0; }
.principle .pnum {
  font-family: var(--mono);
  font-size: 0.86rem;
  color: var(--gold);
  letter-spacing: 0.12em;
  min-width: 64px;
  padding-top: 4px;
}
.principle .pbody h4 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.2rem;
  margin: 0 0 0.5rem 0;
  color: var(--text);
}
.principle .pbody p {
  margin: 0;
  color: var(--text-soft);
}

/* ─────── Stats ─────── */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.stat {
  padding: 28px;
  border-right: 1px solid var(--hairline);
}
.stat:last-child { border-right: 0; }
.stat-num {
  font-family: var(--serif);
  font-size: 2.4rem;
  line-height: 1;
  color: var(--gold);
  margin-bottom: 0.4rem;
}
.stat-label {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { border-bottom: 1px solid var(--hairline); }
  .stat:nth-child(2) { border-right: 0; }
}

/* ─────── Pull-quotes & notes ─────── */

.callout {
  padding: 22px 26px;
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
  background: var(--ink-2);
  margin: 2rem 0;
}
.callout-warn {
  border-color: rgba(216, 121, 77, 0.35);
  background: var(--danger-bg);
}
.callout strong { color: var(--gold); }
.callout-warn strong { color: var(--danger); }

/* ─────── Library list ─────── */

.library {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
}
.lib-group-title {
  grid-column: 1 / -1;
  background: var(--ink-2);
  padding: 20px 24px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.lib-item {
  background: var(--surface);
  padding: 22px 24px;
  transition: background 0.15s ease;
}
.lib-item:hover { background: var(--surface-2); }
.lib-item a {
  display: block;
  border: 0;
  color: var(--text);
}
.lib-item a:hover { color: var(--gold); border: 0; }
.lib-item h4 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.05rem;
  margin: 0 0 0.35rem 0;
  letter-spacing: -0.005em;
}
.lib-item p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
}
@media (max-width: 700px) {
  .library { grid-template-columns: 1fr; }
}

/* ─────── Two-col content ─────── */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
}

.split-figure {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink-2);
}
.split-figure img { width: 100%; }
.split-caption {
  padding: 14px 18px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  border-top: 1px solid var(--hairline);
}

/* ─────── Contact strip ─────── */

.contact {
  padding: 88px 0;
  border-top: 1px solid var(--hairline);
  background:
    radial-gradient(60% 60% at 20% 100%, rgba(214, 184, 122, 0.08), transparent 70%),
    radial-gradient(60% 60% at 100% 0%, var(--hero-radial-2), transparent 70%);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.contact h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.15;
  margin: 0 0 1rem 0;
}
.contact p { color: var(--text-soft); margin: 0 0 1rem 0; max-width: 50ch; }
.contact-channels {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.contact-channel {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.18s ease, background 0.18s ease;
}
.contact-channel:hover {
  border-color: var(--gold-dim);
  background: var(--surface-2);
  color: var(--text);
}
.contact-channel .icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--ink-2);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  color: var(--gold);
  font-size: 0.9rem;
}
.contact-channel .label {
  display: block;
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}
.contact-channel .value { font-weight: 600; }
@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ─────── Person / Anno-Zero panel ─────── */

.author-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 28px;
  padding: 28px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--surface);
  align-items: center;
}
.author-card img {
  border-radius: var(--radius-sm);
  width: 100%;
  height: auto;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.05);
}
.author-card h4 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.3rem;
  margin: 0 0 0.5rem 0;
}
.author-card p {
  margin: 0 0 0.75rem 0;
  color: var(--text-soft);
}
.author-card .author-meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}
@media (max-width: 700px) {
  .author-card { grid-template-columns: 1fr; text-align: left; }
}

/* ─────── Footer ─────── */

footer {
  padding: 56px 0 40px;
  border-top: 1px solid var(--hairline);
  background: var(--footer-bg);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
}
.foot-grid h5 {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1rem 0;
}
.foot-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.foot-grid li { margin-bottom: 0.6rem; }
.foot-grid a {
  color: var(--text-soft);
  font-size: 0.92rem;
  border: 0;
}
.foot-grid a:hover { color: var(--gold); border: 0; }
.foot-brand {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--gold);
}
.foot-disclaimer {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
  font-size: 0.78rem;
  color: var(--dim);
  line-height: 1.7;
}
@media (max-width: 820px) {
  .foot-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ─────── Article (subpage) layout ─────── */

article.essay {
  padding: 64px 0 96px;
}
article.essay h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 1rem 0;
}
article.essay .lede {
  font-size: 1.2rem;
  color: var(--text-soft);
  margin: 0 0 3rem 0;
  max-width: 60ch;
}
article.essay h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.6rem;
  margin: 2.5rem 0 1rem;
  color: var(--text);
}
article.essay h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.2rem;
  margin: 2rem 0 0.75rem;
  color: var(--text);
}
article.essay p {
  margin: 0 0 1.1em 0;
  color: var(--text-soft);
}
article.essay strong { color: var(--text); }
article.essay ul, article.essay ol {
  margin: 0.6em 0 1.4em 1.4em;
  padding: 0;
}
article.essay li { margin: 0.4em 0; color: var(--text-soft); }
article.essay blockquote {
  margin: 2rem 0;
  padding: 18px 24px;
  border-left: 2px solid var(--gold);
  background: rgba(214, 184, 122, 0.04);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--serif);
  font-style: italic;
  color: var(--text);
}

article.essay pre {
  font-family: var(--mono);
  font-size: 0.88rem;
  background: var(--ink-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin: 1.5rem 0;
  overflow-x: auto;
  color: var(--text);
  line-height: 1.55;
}

article.essay code {
  font-family: var(--mono);
  font-size: 0.92em;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--ink-2);
  color: var(--gold);
}

article.essay table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.94rem;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
article.essay th,
article.essay td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
}
article.essay th {
  background: var(--ink-2);
  color: var(--gold);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
}
article.essay tr:last-child td { border-bottom: 0; }

article.essay figure {
  margin: 2rem 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink-2);
}
article.essay figure img { width: 100%; }
article.essay figure figcaption {
  padding: 14px 18px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  border-top: 1px solid var(--hairline);
}

article.essay img {
  border-radius: var(--radius-sm);
  margin: 1.5rem 0;
  max-width: 100%;
  height: auto;
}

article.essay dl {
  margin: 1rem 0 1.5rem;
}
article.essay dt {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--text);
  margin-top: 1rem;
  font-size: 1.05rem;
}
article.essay dd {
  margin: 0.4rem 0 0 1.2rem;
  color: var(--text-soft);
}

article.essay hr {
  margin: 3rem 0;
  border: 0;
  border-top: 1px solid var(--hairline);
}

/* Articles often contain bare <div> shells around mixed content from the
 * source pages. Treat them as transparent paragraph groups. */
article.essay > .container-narrow > div,
article.essay > .container-narrow > div > div {
  margin: 0;
}

/* Inline icons (whatsapp etc.) inside paragraphs should not break flow. */
article.essay p img[alt*="icon" i],
article.essay p img[alt*="WhatsApp" i],
article.essay li img {
  display: inline-block;
  vertical-align: middle;
  width: auto;
  max-height: 1.2em;
  margin: 0 4px;
  border-radius: 4px;
}
.eyebrow-back {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
  display: inline-block;
}

/* ─────── Brand italic ─────── */

.brand .mark em,
.foot-brand em {
  font-style: italic;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.01em;
}

/* ─────── Band variant ─────── */

section.band-alt {
  background: var(--band-alt-bg), var(--ink);
}

/* ─────── Tear sheet (inline preview) ─────── */

.tearsheet-preview {
  background: #fbfaf4;
  color: #1a1f2c;
  border-radius: var(--radius);
  border: 1px solid var(--hairline-2);
  padding: 36px 40px;
  font-family: var(--sans);
  box-shadow: var(--shadow);
  max-width: 880px;
  margin: 0 auto;
}
.tearsheet-preview a { color: #4a5b3a; border-bottom-color: rgba(74, 91, 58, 0.4); }
.tearsheet-preview a:hover { color: #2c361f; }

.ts-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  padding-bottom: 18px;
  border-bottom: 2px solid #1a1f2c;
  margin-bottom: 22px;
}
.ts-firm {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #1a1f2c;
}
.ts-firm em { font-style: italic; color: #1a1f2c; }
.ts-subline {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #6a6a5a;
  margin-top: 4px;
}
.ts-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: #4a4a3a;
  text-align: right;
  line-height: 1.7;
}
.ts-meta span {
  display: inline-block;
  min-width: 42px;
  color: #8a8a78;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-right: 4px;
}

.ts-block { margin: 22px 0; }
.ts-block h4 {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #4a5b3a;
  margin: 0 0 0.5rem 0;
  font-weight: 600;
}
.ts-block p {
  margin: 0 0 0.4rem 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #2a2f3c;
}
.ts-list {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0;
  font-size: 0.88rem;
  line-height: 1.6;
}
.ts-list li {
  padding: 4px 0 4px 18px;
  position: relative;
  color: #2a2f3c;
}
.ts-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  top: 4px;
  color: #4a5b3a;
}
.ts-list strong { color: #1a1f2c; }

.ts-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
@media (max-width: 760px) {
  .ts-two-col { grid-template-columns: 1fr; gap: 18px; }
  .tearsheet-preview { padding: 24px 22px; }
  .ts-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .ts-meta { text-align: left; }
}

.ts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  margin: 0;
}
.ts-table th,
.ts-table td {
  text-align: left;
  padding: 5px 0;
  border-bottom: 1px dotted #c8c8b8;
  color: #2a2f3c;
  vertical-align: top;
}
.ts-table th {
  font-weight: 500;
  color: #6a6a5a;
  width: 55%;
}
.ts-table tr:last-child th,
.ts-table tr:last-child td { border-bottom: 0; }

.ts-footnote {
  font-size: 0.74rem;
  color: #6a6a5a;
  margin-top: 0.6rem;
  line-height: 1.5;
  font-style: italic;
}

.ts-footer {
  border-top: 1px solid #c8c8b8;
  padding-top: 14px;
  margin-top: 24px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: #6a6a5a;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.tearsheet-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 2.5rem;
}

/* ─────── Allocator tier cards ─────── */

.tier {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 32px 28px;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}
.tier:hover {
  background: var(--surface-2);
  border-color: var(--gold-dim);
  color: var(--text);
  transform: translateY(-2px);
}
.tier-tag {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}
.tier h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.35rem;
  line-height: 1.25;
  margin: 0 0 0.85rem 0;
  color: var(--text);
}
.tier p {
  margin: 0 0 1.25rem 0;
  color: var(--text-soft);
  font-size: 0.94rem;
}
.tier-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
  font-size: 0.88rem;
}
.tier-list li {
  padding: 6px 0 6px 22px;
  border-top: 1px solid var(--hairline);
  color: var(--text-soft);
  position: relative;
}
.tier-list li:first-child { border-top: 0; }
.tier-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 0.86rem;
  top: 6px;
}
.tier-cta {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  text-transform: uppercase;
}

/* ─────── Data room form ─────── */

.dataroom-form {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 32px 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.dataroom-form .form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dataroom-form label {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.dataroom-form input[type="text"],
.dataroom-form input[type="email"],
.dataroom-form textarea {
  background: var(--ink-2);
  border: 1px solid var(--hairline-2);
  color: var(--text);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  font-size: 0.96rem;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.dataroom-form input:focus,
.dataroom-form textarea:focus {
  outline: 0;
  border-color: var(--gold);
  background: var(--ink);
}
.dataroom-form input::placeholder,
.dataroom-form textarea::placeholder {
  color: var(--dim);
}

.form-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.form-options .opt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--hairline-2);
  border-radius: 999px;
  background: var(--ink-2);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.86rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-soft);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.form-options .opt:hover { border-color: var(--gold-dim); color: var(--text); }
.form-options input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border: 1px solid var(--muted);
  border-radius: 50%;
  display: inline-block;
  position: relative;
  margin: 0;
  cursor: pointer;
  background: transparent;
}
.form-options input[type="radio"]:checked {
  border-color: var(--gold);
}
.form-options input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--gold);
}
.form-options .opt:has(input[type="radio"]:checked) {
  border-color: var(--gold);
  background: var(--hero-radial-1);
  color: var(--text);
}

.opt-tag {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  margin-left: 8px;
}

.form-check {
  display: flex !important;
  gap: 10px;
  align-items: flex-start;
  font-family: var(--sans) !important;
  font-size: 0.86rem !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: var(--text-soft) !important;
  padding: 6px 0;
}
.form-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border: 1px solid var(--muted);
  border-radius: 3px;
  background: var(--ink-2);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  margin-top: 2px;
}
.form-check input[type="checkbox"]:checked {
  background: var(--gold);
  border-color: var(--gold);
}
.form-check input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--gold-pill-text);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

.dataroom-form button[type="submit"] {
  align-self: flex-start;
  margin-top: 6px;
}
.dataroom-form button[disabled] { opacity: 0.6; cursor: progress; }

.form-status {
  font-family: var(--mono);
  font-size: 0.82rem;
  margin-top: 4px;
  min-height: 1.4em;
  color: var(--text-soft);
}
.form-status-ok { color: var(--ok); }
.form-status-err { color: var(--danger); }

.form-fallback {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 4px 0 0 0;
}

@media (max-width: 820px) {
  .dataroom-form { padding: 24px 22px; }
}

/* ─────── Print-clean tear sheet (when /tearsheet.html is opened) ─── */

@media print {
  body { background: #fff; color: #000; }
  nav, footer, .nav, .hero, .band, section.contact { display: none; }
}

/* ─────── Nav extras: language + theme switchers ─────── */

.nav-extras {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 8px;
}
.lang-switcher {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 1px solid var(--hairline-2);
  color: var(--text-soft);
  border-radius: 999px;
  padding: 6px 28px 6px 12px;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  /* tiny chevron */
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.lang-switcher:hover {
  border-color: var(--gold-dim);
  color: var(--text);
}
.lang-switcher:focus { outline: 0; border-color: var(--gold); }
.lang-switcher option {
  background: var(--surface);
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--sans);
  font-size: 0.92rem;
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--hairline-2);
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease;
  padding: 0;
}
.theme-toggle:hover {
  border-color: var(--gold-dim);
  color: var(--gold);
}
.theme-toggle svg { width: 16px; height: 16px; display: block; }
.theme-toggle .sun  { display: none; }
.theme-toggle .moon { display: block; }
[data-theme="light"] .theme-toggle .sun  { display: block; }
[data-theme="light"] .theme-toggle .moon { display: none; }

@media (max-width: 1024px) {
  .nav-extras { gap: 6px; margin-left: 4px; }
  .lang-switcher { padding: 5px 24px 5px 10px; font-size: 0.72rem; }
  .theme-toggle { width: 30px; height: 30px; }
}

/* ─────── Per-language fonts ─────── */

[lang="ar"] {
  font-family: 'Noto Sans Arabic', 'Cairo', system-ui, sans-serif;
}
[lang="ar"] h1, [lang="ar"] h2, [lang="ar"] h3,
[lang="ar"] h4, [lang="ar"] h5,
[lang="ar"] .section-title,
[lang="ar"] .ts-firm,
[lang="ar"] .hero-quote p,
[lang="ar"] article.essay h1,
[lang="ar"] article.essay blockquote {
  font-family: 'Noto Serif Arabic', 'Amiri', Georgia, serif;
}

[lang="zh"] {
  font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
}
[lang="zh"] h1, [lang="zh"] h2, [lang="zh"] h3,
[lang="zh"] h4, [lang="zh"] h5,
[lang="zh"] .section-title,
[lang="zh"] .ts-firm,
[lang="zh"] .hero-quote p {
  font-family: 'Noto Serif SC', 'Source Han Serif SC', Georgia, serif;
}

/* ─────── RTL flips (Arabic) ─────── */

[dir="rtl"] .hero-quote {
  border-left: 0;
  border-right: 2px solid var(--gold);
  border-radius: var(--radius) 0 0 var(--radius);
}
[dir="rtl"] .principle .pnum {
  text-align: right;
}
[dir="rtl"] .ts-meta {
  text-align: left;
}
[dir="rtl"] .ts-header {
  flex-direction: row-reverse;
}
[dir="rtl"] .ts-list li,
[dir="rtl"] .tier-list li {
  padding-left: 0;
  padding-right: 22px;
}
[dir="rtl"] .ts-list li::before,
[dir="rtl"] .tier-list li::before {
  left: auto;
  right: 0;
}
[dir="rtl"] .ts-list li::before {
  content: "◂";
}
[dir="rtl"] .form-check input[type="checkbox"] {
  /* keep checkbox before label visually */
}
[dir="rtl"] .nav-extras { margin-left: 0; margin-right: 8px; }
[dir="rtl"] .lang-switcher {
  padding: 6px 12px 6px 28px;
  background-position: 14px 50%, 9px 50%;
}
[dir="rtl"] .card-link::after,
[dir="rtl"] .tier-cta {
  /* arrows naturally flip in RTL text flow */
}
[dir="rtl"] .author-card {
  grid-template-columns: 1fr 200px;
}
[dir="rtl"] .eyebrow-back::before { content: "→ "; }
[dir="rtl"] .eyebrow-back { direction: rtl; }

/* Section labels are Latin-style "// 01 · X" — keep them LTR even in RTL mode. */
[dir="rtl"] .section-label,
[dir="rtl"] .card-eyebrow,
[dir="rtl"] .tier-tag,
[dir="rtl"] .stat-label,
[dir="rtl"] .hero-figure-caption {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: right;
}

