/* ============================================================
   Fonts — self-hosted, latin subset, loaded from local files
   ============================================================ */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/public-sans.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('fonts/source-serif-4.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/source-serif-4-italic.woff2') format('woff2');
}

/* ============================================================
   Design tokens
   ============================================================ */
:root {
  --paper:      #FAF8F4;
  --ink:        #23262D;
  --navy:       #1B2B4B;
  --navy-dark:  #16213A;
  --navy-hover: #14213A;
  --brass:      #8E6F3E;
  --brass-lite: #C6A96C;
  --gold-edge:  #B8935A;
  --muted:      #575E6B;
  --muted-2:    #454C59;
  --muted-3:    #7A7F8A;
  --sand:       #8A8474;
  --line:       #E5E1D8;
  --line-2:     #E7E2D6;
  --serif: 'Source Serif 4', Georgia, serif;
  --sans:  'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ============================================================
   Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; } /* win over component display:flex */
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
body.page-marketing {
  font-size: 16px;
  line-height: 1.55;
  background: var(--paper);
}
body.page-app { background: var(--app-bg); }
body.page-signin { background: var(--navy-dark); }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding-inline: 24px;
}

/* Shared type */
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass)!important;
}
.eyebrow--onDark { color: var(--brass-lite)!important; }

.display {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.heading {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.18;
  text-wrap: balance;
}
.lede { color: var(--muted); text-wrap: pretty; }

/* Buttons */
.btn {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--navy-hover); }
.btn--secondary { background: var(--paper); color: var(--navy); }
.btn--secondary:hover { background: var(--line); }

/* Cards */
.panel {
  max-width: 1080px;
  margin: 0 auto;
  border-radius: 12px;
  padding: clamp(48px, 7vw, 88px) clamp(28px, 6vw, 88px);
}
.panel--dark  { background: var(--navy-dark); }
.panel--light { background: #fff; border: 1px solid var(--line); }

/* ============================================================
   Header
   ============================================================ */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 18px;
}
.brand {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 22px;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 32px);
  flex-wrap: wrap;
}
.site-nav a:not(.btn) {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted-2);
  text-decoration: none;
}
.site-nav a:not(.btn):hover { color: var(--navy); text-decoration: underline; }
.site-nav .btn { padding: 10px 20px; }

/* Mobile menu toggle — hidden on desktop, shown on narrow screens */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 11px 8px;
  margin-right: -8px; /* align the icon with the container edge */
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  box-sizing: border-box;
}
.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.site-header.is-open .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.is-open .nav-toggle__bar:nth-child(2) { opacity: 0; }
.site-header.is-open .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    order: 3;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-bottom: 8px;
  }
  .site-header.is-open .site-nav { display: flex; }
  .site-nav a:not(.btn) {
    font-size: 16px;
    padding: 13px 2px;
    border-top: 1px solid var(--line);
  }
  .site-nav .btn { text-align: center; padding: 14px 20px; margin-top: 12px; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero { padding: clamp(80px, 12vw, 150px) 24px clamp(72px, 10vw, 130px); }
.hero__inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 28px;
}
.hero h1 { font-size: clamp(38px, 6.5vw, 62px); }
.hero__lede {
  max-width: 600px;
  font-size: clamp(17px, 2.4vw, 19px);
  line-height: 1.65;
}
.hero__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-top: 8px;
}
.hero__cta .btn { font-size: 17px; padding: 16px 34px; }
.assurance {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  font-size: 14px;
  color: var(--muted-3);
}
.assurance .dot { color: #C9C3B6; }

/* ============================================================
   The problem (dark card)
   ============================================================ */
.problem { padding-inline: 24px; }
.problem__inner {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.problem h2 {
  font-size: clamp(28px, 4.5vw, 40px);
  color: #fff;
}
.problem p {
  line-height: 1.75;
  color: rgba(255,255,255,0.78);
  text-wrap: pretty;
}

/* ============================================================
   How it works
   ============================================================ */
.how { padding: clamp(72px, 9vw, 116px) 24px; }
.how__inner {
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 6vw, 64px);
}
.how__intro { display: flex; flex-direction: column; gap: 16px; max-width: 640px; }
.how__intro h2 { font-size: clamp(28px, 4.5vw, 40px); }
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(32px, 5vw, 56px);
}
.step {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 26px;
}
.step__num {
  font-family: var(--serif);
  font-weight: 500;
  font-style: italic;
  font-size: 34px;
  color: var(--brass);
  line-height: 1;
}
.step h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.3;
  color: var(--navy);
}
.step p { font-size: 16px; line-height: 1.7; color: var(--muted); text-wrap: pretty; }

/* ============================================================
   Product demo
   ============================================================ */
.demo { padding: 0 24px clamp(72px, 9vw, 116px); }
.demo__inner { display: flex; flex-direction: column; gap: 28px; }
.demo__head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  text-align: center;
}
.demo__head h2 { font-size: clamp(28px, 4.5vw, 40px); }
.demo__head p { max-width: 560px; line-height: 1.65; color: var(--muted); text-wrap: pretty; }

.demo__frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid #DDD7CA;
  background: var(--navy-dark);
}
.demo__stage {
  position: absolute;
  top: 0; left: 0;
  width: 800px;
  height: 450px;
  transform-origin: 0 0;
}

.demo__steps {
  display: flex;
  justify-content: center;
  gap: 8px 16px;
  flex-wrap: wrap;
}
.demo__steps button {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 12px;
  opacity: 0.35;
  transition: opacity 0.3s ease;
}
.demo__steps button:hover { opacity: 1; }

/* --- Demo scenes (800x450 coordinate space) --- */
.scene { position: absolute; inset: 0; transition: opacity 0.5s ease; }
.scene--login {
  background: var(--navy-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}
.scene--app { background: #F0EDE5; display: flex; flex-direction: column; }

.login-card {
  width: 264px;
  background: #fff;
  border-radius: 8px;
  padding: 26px 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 18px 40px -18px rgba(0,0,0,0.5);
}
.login-card__brand { display: flex; flex-direction: column; gap: 2px; align-items: center; padding-bottom: 4px; }
.login-card__brand b { font-family: var(--serif); font-weight: 700; font-size: 18px; color: var(--navy); }
.login-card__brand span { font-size: 10.5px; color: var(--sand); }
.field { display: flex; flex-direction: column; gap: 5px; }
.field__label { font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sand); }
.field__box {
  display: block;
  box-sizing: content-box; /* height is the text row; padding sits outside it */
  border: 1px solid #D9D4C8;
  border-radius: 5px;
  padding: 8px 10px;
  font-size: 11.5px;
  color: var(--ink);
  height: 14px;
  line-height: 14px;
  white-space: nowrap;
  overflow: hidden;
  background: #fff;
}
.field__box--pw { letter-spacing: 2px; }
.login-card .fake-btn { margin-top: 2px; text-align: center; padding: 9px; font-size: 12px; }
.login-card__note { font-size: 9.5px; color: var(--sand); text-align: center; }

/* Caret */
.caret {
  display: none;
  width: 1px;
  height: 11px;
  background: var(--navy);
  margin-left: 1px;
  vertical-align: -1px;
  animation: pd-blink 1s steps(1) infinite;
}
.caret--tall { height: 12px; vertical-align: -2px; }

/* App chrome */
.app-top {
  height: 46px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.app-top__inner {
  width: 100%;
  max-width: 620px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.app-top__left { display: flex; align-items: center; gap: 12px; }
.app-brand { font-family: var(--serif); font-weight: 700; font-size: 15px; color: var(--navy); }
.app-top__sep { width: 1px; height: 14px; background: var(--line); }
.app-nav { display: flex; align-items: center; gap: 4px; }
.nav-pill {
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 5px;
  color: var(--muted);
  transition: background 0.3s ease, color 0.3s ease;
}
.app-top__right { display: flex; align-items: center; gap: 12px; }
.badge-live {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 600;
  color: #2E7D4F;
  background: #EDF4EE;
  border: 1px solid #D3E3D6;
  border-radius: 999px;
  padding: 4px 10px;
}
.badge-live__dot { width: 6px; height: 6px; border-radius: 50%; background: #2E7D4F; }
.avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-body { flex: 1; display: flex; min-height: 0; }
.app-main { flex: 1; position: relative; min-width: 0; }
.app-panel { position: absolute; inset: 0; overflow: hidden; transition: opacity 0.4s ease; }
.panel-pad {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* Dashboard panel */
.dash-hello { display: flex; flex-direction: column; gap: 3px; }
.dash-hello b { font-family: var(--serif); font-weight: 600; font-size: 19px; color: var(--navy); }
.dash-hello span { font-size: 11px; color: var(--sand); }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat b { font-family: var(--serif); font-weight: 600; font-size: 21px; color: var(--navy); }
.stat span { font-size: 9.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sand); }
.dash-list { display: flex; flex-direction: column; transition: opacity 0.5s ease; }
.dash-list__title { font-size: 9.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sand); padding-bottom: 8px; }
.dash-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  border-top: 1px solid var(--line-2);
  padding: 9px 2px;
  font-size: 12px;
}
.dash-row b { font-weight: 600; color: var(--ink); }
.dash-row .aside { font-size: 10.5px; color: var(--sand); flex-shrink: 0; }
.dash-row .aside--gold { color: var(--brass); font-weight: 600; }

/* Matters panel */
.mat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mat-head b { font-family: var(--serif); font-weight: 600; font-size: 19px; color: var(--navy); }
.fake-btn {
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 5px;
  background: var(--navy);
  transition: background 0.15s ease, transform 0.15s ease;
}
.mat-empty {
  border: 1.5px dashed #CFC9BB;
  background: #FBFAF7;
  border-radius: 7px;
  padding: 30px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
}
.mat-empty b { font-size: 12px; font-weight: 600; color: var(--muted); }
.mat-empty span { font-size: 10.5px; color: var(--sand); }
.mat-new {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: pd-in 0.3s ease both;
}
.mat-new__label { font-size: 9.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--sand); }
.mat-new__actions { display: flex; gap: 8px; align-items: center; }
.mat-new__cancel { color: var(--muted); font-size: 11px; font-weight: 600; padding: 7px 10px; }
.mat-row {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  animation: pd-in 0.35s ease both;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.mat-row__name { display: flex; flex-direction: column; gap: 1px; }
.mat-row__name b { font-size: 12.5px; font-weight: 600; color: var(--navy); }
.mat-row__name span { font-size: 10px; color: var(--sand); }
.mat-row__aside { font-size: 10.5px; color: var(--sand); flex-shrink: 0; }

/* Upload panel */
.up-head { display: flex; flex-direction: column; gap: 3px; }
.up-head__crumb { font-size: 9.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sand); }
.up-head b { font-family: var(--serif); font-weight: 600; font-size: 19px; color: var(--navy); }
.dropzone {
  border: 1.5px dashed #CFC9BB;
  background: #FBFAF7;
  border-radius: 7px;
  padding: 13px;
  text-align: center;
  font-size: 11.5px;
  color: var(--sand);
  transition: border-color 0.3s ease, background 0.3s ease;
}
.up-list { display: flex; flex-direction: column; gap: 8px; }
.up-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 12px;
  animation: pd-in 0.35s ease both;
}
.up-row__icon {
  width: 28px; height: 28px;
  border-radius: 5px;
  background: #F2EDE1;
  color: var(--brass);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.up-row__body { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.up-row__line { display: flex; justify-content: space-between; gap: 12px; font-size: 11.5px; line-height: 1; }
.up-row__name { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-row__status { font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.up-row__bar { display: block; height: 3px; background: #EDE8DB; border-radius: 2px; overflow: hidden; }
.up-row__fill { display: block; height: 100%; background: var(--brass); transition: width 0.16s linear; }

/* Chat panel */
.panel--chat { display: flex; flex-direction: column; }
.chat-top { border-bottom: 1px solid var(--line-2); flex-shrink: 0; }
.chat-top__inner {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: 10px 24px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-sizing: border-box;
}
.chat-top__left { display: flex; align-items: center; gap: 10px; }
.chat-top__left > b { font-family: var(--serif); font-weight: 600; font-size: 15px; color: var(--navy); }
.matter-select { position: relative; display: block; }
.select-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  border: 1px solid #C9C3B6;
  border-radius: 5px;
  padding: 5px 9px;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--sand);
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.select-pill__chev { font-size: 6.5px; color: var(--sand); }
.select-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 218px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 12px 28px -14px rgba(20,33,58,0.4);
  display: flex;
  flex-direction: column;
  padding: 4px;
  z-index: 5;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.select-menu__opt { padding: 6px 9px; border-radius: 4px; font-size: 10.5px; color: var(--muted); }
.select-menu__opt--active { font-weight: 600; color: var(--navy); transition: background 0.2s ease; }
.chat-top__hint { font-size: 10px; color: var(--sand); }

.chat-scroll { flex: 1; min-height: 0; overflow: hidden; }
.chat-thread {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
}
.bubble-user {
  align-self: flex-end;
  max-width: 62%;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  line-height: 1.5;
  padding: 9px 13px;
  border-radius: 10px 10px 2px 10px;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.answer-wrap { position: relative; align-self: flex-start; max-width: 78%; }
.thinking {
  position: absolute;
  top: 0; left: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px 10px 10px 2px;
  padding: 11px 14px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.thinking span { width: 5px; height: 5px; border-radius: 50%; background: var(--brass); animation: pd-pulse 1.1s ease infinite; }
.thinking span:nth-child(2) { animation-delay: 0.18s; }
.thinking span:nth-child(3) { animation-delay: 0.36s; }
.answer {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px 10px 10px 2px;
  padding: 11px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.answer__text { font-size: 12px; line-height: 1.6; color: var(--ink); }
.sources { display: flex; flex-direction: column; gap: 6px; }
.sources__label { font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sand); }
.sources__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted-2);
  background: #F7F4EC;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 4px 9px;
  opacity: 0;
  transition: opacity 0.3s ease, background 0.25s ease, border-color 0.25s ease;
}
.excerpt {
  display: none;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid #F0EBDF;
  padding-top: 9px;
  animation: pd-in 0.35s ease both;
}
.excerpt__label { font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sand); }
.excerpt__quote {
  font-size: 10.5px;
  line-height: 1.65;
  color: var(--ink);
  background: #F9F1DF;
  border-left: 3px solid var(--brass-lite);
  padding: 7px 10px;
}
.excerpt__note { font-size: 9px; color: #9A9484; }

.chat-input { border-top: 1px solid var(--line-2); flex-shrink: 0; }
.chat-input__inner {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: 12px 24px 16px;
  display: flex;
  gap: 8px;
  align-items: center;
  box-sizing: border-box;
}
.chat-input__box {
  position: relative;
  flex: 1;
  box-sizing: content-box; /* height is the text row; padding sits outside it */
  background: #fff;
  border: 1px solid #D9D4C8;
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 12px;
  color: var(--ink);
  display: block;
  height: 14px;
  line-height: 14px;
  white-space: nowrap;
  overflow: hidden;
}
.chat-input__ph { position: absolute; left: 12px; top: 9px; color: #A8A192; transition: opacity 0.2s ease; }
.chat-input__send {
  width: 32px; height: 32px;
  border-radius: 6px;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease;
  font-size: 14px;
}

/* ============================================================
   Founder
   ============================================================ */
.founder { padding: 0 24px clamp(72px, 9vw, 116px); }
.founder__inner { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.founder h2 { font-size: clamp(26px, 4vw, 36px); line-height: 1.2; }
.founder p { line-height: 1.75; color: var(--muted); text-wrap: pretty; }

/* ============================================================
   FAQ
   ============================================================ */
.faq { padding: 0 24px clamp(72px, 9vw, 116px); }
.faq__inner { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: clamp(28px, 5vw, 44px); }
.faq__intro { display: flex; flex-direction: column; gap: 14px; }
.faq__intro h2 { font-size: clamp(28px, 4.5vw, 40px); }
.faq__list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q:hover { color: var(--navy); }
.faq__plus {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--brass);
  line-height: 1;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.faq__item[open] .faq__plus { transform: rotate(45deg); }
.faq__a { padding: 0 32px 24px 0; font-size: 16px; line-height: 1.7; color: var(--muted); text-wrap: pretty; }

/* ============================================================
   Final CTA
   ============================================================ */
.cta { padding-inline: 24px; }
.cta__inner {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
}
.cta h2 { font-size: clamp(30px, 5vw, 44px); line-height: 1.15; color: #fff; }
.cta__inner .btn { font-size: 14px; padding: 8px 34px; }
.cta__lede { max-width: 540px; font-size: 17px; line-height: 1.7; color: rgba(255,255,255,0.75); text-wrap: pretty; }
.cta__placeholder {
  width: 100%;
  min-height: 300px;
  border: 1.5px dashed rgba(255,255,255,0.3);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px;
  margin-top: 8px;
}
.cta__placeholder b { font-size: 15px; font-weight: 600; color: rgba(255,255,255,0.8); }
.cta__placeholder p { font-size: 14px; line-height: 1.6; color: rgba(255,255,255,0.5); max-width: 380px; }
.cta__email { font-size: 16px; line-height: 1.6; color: rgba(255,255,255,0.75); margin-top: 4px; }
.cta__email a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.cta__email a:hover { color: var(--brass-lite); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { padding: clamp(40px, 6vw, 64px) 24px 40px; }
.site-footer .container {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 32px;
  flex-wrap: wrap;
}
.site-footer p { font-size: 14px; color: var(--muted-3); }
.footer-brand { font-family: var(--serif); font-weight: 700; font-size: 16px; color: var(--navy); }
.site-footer a { color: var(--muted-2); text-decoration: underline; text-underline-offset: 3px; }
.site-footer a:hover { color: var(--navy); }

@media (max-width: 640px) {
  .site-footer .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .site-footer p { line-height: 1.6; }
}

/* ============================================================
   Keyframes
   ============================================================ */
@keyframes pd-blink { 0%, 54% { opacity: 1; } 55%, 100% { opacity: 0; } }
@keyframes pd-pulse { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
@keyframes pd-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* ============================================================
   APP PAGES  (Sign in · Dashboard · Matters · Ask · Settings)
   ============================================================ */

/* --- App-only tokens --- */
:root {
  --app-bg:          #F0EDE5;
  --nav-active:       #EAE4D6;
  --nav-hover:        #F2EFE6;
  --line-3:          #F0EBDF;
  --green:           #2E7D4F;
  --green-bg:        #EDF4EE;
  --green-border:    #D3E3D6;
  --field-border:    #D9D4C8;
  --control-border:  #C9C3B6;
  --placeholder:     #A8A192;
  --doc-icon-bg:     #F2EDE1;
  --progress-track:  #EDE8DB;
  --avatar-alt:      #57687F;
  --danger:          #9B3B2E;
  --danger-bg:       #FBF3F1;
  --danger-border:   #E8CFC9;
  --danger-btn-edge: #D9B3AB;
  --danger-ink:      #6E2A20;
  --danger-hover:    #83301F;
}

.page-app ::placeholder,
.page-signin ::placeholder { color: var(--placeholder); }

/* --- Shell --- */
.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--app-bg);
}
.app-scroll { flex: 1; overflow-y: auto; min-width: 0; }

/* --- App bar --- */
.appbar { background: #fff; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.appbar__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 10px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  flex-wrap: wrap;
  box-sizing: border-box;
}
.appbar__left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.appbar__brand { font-family: var(--serif); font-weight: 700; font-size: 18px; color: var(--navy); text-decoration: none; }
.appbar__sep { width: 1px; height: 16px; background: var(--line); flex-shrink: 0; }
.appbar__nav { display: flex; align-items: center; gap: 4px; }
.appbar__link {
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
}
.appbar__link:not(.is-active):hover { background: var(--nav-hover); color: var(--navy); }
.appbar__link.is-active { background: var(--nav-active); color: var(--navy); }
.appbar__right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.appbar__avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Status pill (on-premise · connected) --- */
.status-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  border-radius: 999px;
  padding: 5px 12px;
}
.status-pill__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

/* --- Headings --- */
.app-h1 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 27px; color: var(--navy); }
.app-h1--detail { font-size: 24px; }
.card-title { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 18px; color: var(--navy); }
.subtle { font-size: 13px; color: var(--sand); }
.mini-label { font-size: 11px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--sand); }
.mini-label--sm { font-size: 10.5px; }

/* --- Buttons (app) --- */
.btn-solid {
  display: inline-block;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--navy);
  border: none;
  border-radius: 6px;
  padding: 9px 16px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
}
.btn-solid:hover { background: var(--navy-hover); }
.btn-solid.btn-sm { font-size: 12.5px; }
.btn-outline {
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--control-border);
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-outline:hover { background: #FBFAF7; }
.btn-ghost {
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: none;
  padding: 9px 10px;
  cursor: pointer;
  transition: color 0.15s ease;
}
.btn-ghost:hover { color: var(--navy); }
.btn-danger-outline {
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--danger);
  background: #fff;
  border: 1px solid var(--danger-btn-edge);
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-danger-outline:hover { background: var(--danger-bg); }
.btn-danger {
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  background: var(--danger);
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-danger:hover { background: var(--danger-hover); }
.btn-send {
  width: 42px; height: 42px;
  border-radius: 7px;
  background: var(--navy);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 16px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.btn-send:hover { background: var(--navy-hover); }
.btn-back {
  align-self: flex-start;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--brass);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.btn-back:hover { text-decoration: underline; }

/* --- Form controls (app) --- */
.field-app { display: flex; flex-direction: column; gap: 6px; }
.field-app__label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sand); }
.input {
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--field-border);
  outline: none;
}
.input:focus { border-color: var(--navy); }
.input--signin { border-radius: 6px; padding: 11px 12px; font-size: 14px; }
.input--matter { border-radius: 6px; padding: 10px 12px; font-size: 13.5px; }
.input--ask { flex: 1; min-width: 0; border-radius: 7px; padding: 11px 14px; font-size: 13.5px; }
.select-matter {
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--control-border);
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
  max-width: 320px;
}

/* --- Links --- */
.link-brass { color: var(--brass); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.link-more { font-size: 12.5px; font-weight: 600; color: var(--brass); text-decoration: none; }
.link-more:hover { text-decoration: underline; }
.link-signout { font-size: 12.5px; font-weight: 600; color: var(--brass); text-decoration: none; flex-shrink: 0; }
.link-signout:hover { text-decoration: underline; }

/* ============================================================
   Sign in
   ============================================================ */
.signin {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 24px;
  background: var(--navy-dark);
  box-sizing: border-box;
}
.signin__card {
  width: 340px;
  max-width: 100%;
  background: #fff;
  border-radius: 10px;
  padding: 34px 32px 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.55);
  box-sizing: border-box;
}
.signin__brand { display: flex; flex-direction: column; gap: 4px; align-items: center; padding-bottom: 6px; }
.signin__brand b { font-family: var(--serif); font-weight: 700; font-size: 24px; color: var(--navy); }
.signin__brand span { font-size: 12.5px; color: var(--sand); }
.signin__submit {
  margin-top: 4px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  color: #fff;
  background: var(--navy);
  border: none;
  border-radius: 6px;
  padding: 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.signin__submit:hover { background: var(--navy-hover); }
.signin__hint { font-size: 12px; color: var(--sand); text-align: center; line-height: 1.5; }
.signin__foot { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: rgba(255, 255, 255, 0.55); }
.signin__foot-dot { width: 7px; height: 7px; border-radius: 50%; background: #5FA57C; }

/* ============================================================
   Dashboard
   ============================================================ */
.dash-wrap { max-width: 960px; margin: 0 auto; padding: 36px 32px 56px; display: flex; flex-direction: column; gap: 28px; box-sizing: border-box; }
.dash-head { display: flex; flex-direction: column; gap: 4px; }
.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.dash-stat { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.dash-stat__num { font-family: var(--serif); font-weight: 600; font-size: 30px; color: var(--navy); line-height: 1; }
.dash-stat__label { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sand); }
.dash-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; align-items: start; }
.dash-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 20px 22px 8px; display: flex; flex-direction: column; }
.dash-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 10px; }
.dash-card__title { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sand); }
.dash-item { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-top: 1px solid var(--line-2); padding: 11px 2px; text-decoration: none; }
.dash-item:hover { background: #FBFAF7; }
.dash-item__name { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.dash-item__meta { font-size: 12px; color: var(--sand); flex-shrink: 0; }
.dash-q { display: flex; flex-direction: column; gap: 3px; border-top: 1px solid var(--line-2); padding: 11px 2px; text-decoration: none; }
.dash-q:hover { background: #FBFAF7; }
.dash-q__text { font-size: 13.5px; font-weight: 500; color: var(--ink); }
.dash-q__meta { font-size: 11.5px; color: var(--sand); }

/* ============================================================
   Matters
   ============================================================ */
.matters-wrap { max-width: 860px; margin: 0 auto; padding: 36px 32px 56px; display: flex; flex-direction: column; gap: 18px; box-sizing: border-box; }
.matters-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.matters-head__text { display: flex; flex-direction: column; gap: 4px; }
.create-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; animation: pd-in 0.3s ease both; }
.create-card__actions { display: flex; gap: 10px; align-items: center; }
.matter-list { background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.matter-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line-3); cursor: pointer; animation: pd-in 0.3s ease both; }
.matter-row:hover { background: #FBFAF7; }
.matter-row__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.matter-row__name { font-size: 14px; font-weight: 600; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.matter-row__meta { font-size: 11.5px; color: var(--sand); }
.matter-row__right { font-size: 12px; color: var(--sand); flex-shrink: 0; }

/* Matter detail */
.matter-detail { max-width: 860px; margin: 0 auto; padding: 28px 32px 56px; display: flex; flex-direction: column; gap: 20px; box-sizing: border-box; }
.detail-head { display: flex; flex-direction: column; gap: 10px; }
.detail-head__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.detail-head__titles { display: flex; flex-direction: column; gap: 3px; }
.dropzone-app {
  border: 1.5px dashed #CFC9BB;
  background: #FBFAF7;
  border-radius: 8px;
  padding: 22px;
  text-align: center;
  font-size: 13px;
  color: var(--sand);
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.dropzone-app:hover { border-color: var(--gold-edge); }
.dropzone-app.is-uploading { border-color: var(--gold-edge); background: #FBF5E8; }
.doc-list { background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.doc-list__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 13px 20px; border-bottom: 1px solid var(--line); background: #FBFAF7; }
.doc-list__note { font-size: 11.5px; color: var(--sand); }
.doc-empty { margin: 0; padding: 28px 20px; text-align: center; font-size: 13px; color: var(--sand); }
.doc-row { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--line-3); animation: pd-in 0.3s ease both; }
.doc-icon {
  width: 34px; height: 34px;
  border-radius: 6px;
  background: var(--doc-icon-bg);
  color: var(--brass);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.doc-row__body { flex: 1; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.doc-row__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.doc-row__name { font-size: 13.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-row__status { font-size: 12px; font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.doc-row__status.is-indexed { color: var(--green); }
.doc-row__status.is-indexing { color: var(--brass); }
.doc-row__bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.doc-row__meta { font-size: 11.5px; color: var(--sand); }
.doc-progress { display: block; width: 120px; height: 3px; background: var(--progress-track); border-radius: 2px; overflow: hidden; flex-shrink: 0; }
.doc-progress__fill { display: block; height: 100%; background: var(--brass); transition: width 0.16s linear; }
.note-center { margin: 0; font-size: 12px; color: #9A9484; text-align: center; }

/* Matter detail — new design */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--sand);
  min-width: 0;
}
.breadcrumb__back {
  font: inherit;
  color: var(--sand);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}
.breadcrumb__back:hover { color: var(--navy); text-decoration: underline; }
.breadcrumb__sep { flex-shrink: 0; }
.breadcrumb__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.doc-cards { display: flex; flex-direction: column; gap: 14px; }
.doc-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 20px;
  animation: pd-in 0.3s ease both;
}
.doc-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--doc-icon-bg);
  color: var(--brass);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.doc-card__body { flex: 1; display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.doc-card__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.doc-card__name { font-size: 15px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-card__status { font-size: 13px; font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.doc-card__status.is-indexed { color: var(--green); }
.doc-card__status.is-indexing { color: var(--brass); }
.doc-card__bar { display: block; width: 100%; height: 4px; background: var(--progress-track); border-radius: 2px; overflow: hidden; }
.doc-card__fill { display: block; height: 100%; background: var(--brass); transition: width 0.16s linear; }
.doc-empty--card { background: #fff; border: 1px solid var(--line); border-radius: 10px; }

/* ============================================================
   Ask
   ============================================================ */
.ask-main { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.ask-bar { border-bottom: 1px solid var(--line-2); flex-shrink: 0; }
.ask-bar__inner { max-width: 760px; margin: 0 auto; padding: 15px 32px 13px; display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; box-sizing: border-box; }
.ask-bar__left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ask-title { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 20px; color: var(--navy); }
.ask-thread { flex: 1; overflow-y: auto; min-height: 0; }
.ask-thread__inner { max-width: 760px; margin: 0 auto; padding: 22px 32px; display: flex; flex-direction: column; gap: 14px; box-sizing: border-box; }
.ask-empty { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 56px 0 24px; text-align: center; }
.ask-empty__title { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 21px; color: var(--navy); text-wrap: balance; }
.ask-empty__sub { margin: 0; font-size: 13px; color: var(--sand); max-width: 400px; }
.ask-suggestions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding-top: 4px; }
.chip-suggest {
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted-2);
  background: #fff;
  border: 1px solid var(--field-border);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.chip-suggest:hover { border-color: var(--brass); color: var(--navy); }
.msg { max-width: 86%; padding: 12px 16px; font-size: 13.5px; line-height: 1.65; display: flex; flex-direction: column; gap: 10px; animation: pd-in 0.3s ease both; box-sizing: border-box; }
.msg--user { align-self: flex-end; max-width: 70%; background: var(--navy); color: #fff; border-radius: 12px 12px 3px 12px; }
.msg--ai { align-self: flex-start; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 12px 12px 12px 3px; }
.msg__text { white-space: pre-line; }
.msg__block { display: flex; flex-direction: column; gap: 7px; border-top: 1px solid var(--line-3); padding-top: 10px; }
.ex-label { font-size: 9.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sand); }
.source-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.source-chip {
  font: inherit;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted-2);
  background: #F7F4EC;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 6px 10px;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.source-chip:hover { border-color: var(--brass); color: var(--navy); }
.source-chip.is-active { background: #F2E8D2; border-color: var(--gold-edge); color: var(--navy); }
.excerpt-app { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line-3); padding-top: 10px; animation: pd-in 0.3s ease both; }
.excerpt-app__label { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sand); }
.excerpt-app__ctx { font-size: 12.5px; line-height: 1.65; color: var(--sand); }
.excerpt-app__mark { font-size: 13px; line-height: 1.7; color: var(--ink); background: #F9F1DF; border-left: 3px solid var(--brass-lite); padding: 9px 12px; }
.excerpt-app__note { font-size: 10.5px; color: #9A9484; }
.thinking-app { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 12px 12px 12px 3px; padding: 13px 16px; display: flex; gap: 5px; }
.thinking-app span { width: 6px; height: 6px; border-radius: 50%; background: var(--brass); animation: pd-pulse 1.1s ease infinite; }
.thinking-app span:nth-child(2) { animation-delay: 0.18s; }
.thinking-app span:nth-child(3) { animation-delay: 0.36s; }
.ask-input { border-top: 1px solid var(--line-2); flex-shrink: 0; }
.ask-input__form { max-width: 760px; margin: 0 auto; padding: 14px 32px 10px; display: flex; gap: 10px; box-sizing: border-box; }
.ask-input__note { margin: 0 auto; max-width: 760px; padding: 0 32px 12px; font-size: 11px; color: #9A9484; box-sizing: border-box; }

/* ============================================================
   Settings
   ============================================================ */
.settings-wrap { max-width: 760px; margin: 0 auto; padding: 36px 32px 56px; display: flex; flex-direction: column; gap: 20px; box-sizing: border-box; }
.settings-section { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.settings-section--people { padding: 22px 24px 12px; gap: 8px; }
.settings-section--data { gap: 16px; }
.section-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.def-grid { display: grid; grid-template-columns: 150px 1fr; gap: 9px 16px; font-size: 13.5px; }
.def-grid .k { color: var(--sand); }
.def-grid .v { font-weight: 500; }
.def-grid .v--green { font-weight: 600; color: var(--green); }
.privacy-note { margin: 0; font-size: 13px; line-height: 1.6; color: var(--muted); border-top: 1px solid var(--line-2); padding-top: 13px; }
.person { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line-2); padding: 11px 2px; }
.person__avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.person__avatar--alt { background: var(--avatar-alt); }
.person__body { flex: 1; display: flex; flex-direction: column; }
.person__name { font-size: 13.5px; font-weight: 600; }
.person__role { font-size: 11.5px; color: var(--sand); }
.role-badge { font-size: 11px; font-weight: 600; letter-spacing: 0.05em; border-radius: 4px; padding: 3px 8px; }
.role-badge--admin { color: var(--brass); background: #F7F1E4; border: 1px solid #EADFC8; }
.role-badge--member { color: var(--muted); background: #F5F3ED; border: 1px solid var(--line); }
.people-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; border-top: 1px solid var(--line-2); padding: 12px 2px; }
.control-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.control-row__text { display: flex; flex-direction: column; gap: 2px; max-width: 420px; }
.control-row__title { font-size: 13.5px; font-weight: 600; }
.control-row__title--danger { color: var(--danger); }
.control-row__desc { font-size: 12.5px; color: var(--sand); line-height: 1.5; }
.data-block { display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--line-2); padding-top: 16px; }
.wipe-confirm { background: var(--danger-bg); border: 1px solid var(--danger-border); border-radius: 6px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.wipe-confirm__text { font-size: 13px; line-height: 1.6; color: var(--danger-ink); }
.wipe-confirm__actions { display: flex; gap: 10px; }
.wipe-requested { font-size: 13px; font-weight: 600; color: var(--danger); }
