:root {
  --cream: #f6f2ea;
  --paper: #fffdf8;
  --ink: #192724;
  --forest: #203c35;
  --forest-2: #31584d;
  --sage: #88a499;
  --sage-pale: #e3ece7;
  --amber: #d9a75d;
  --rose: #b86d68;
  --line: rgba(31, 60, 53, .12);
  --shadow: 0 20px 55px rgba(28, 48, 42, .09);
  --radius: 24px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--cream);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--cream); }
body { min-height: 100dvh; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.muted { color: #687570; }
.eyebrow { margin: 0 0 6px; color: #75837e; font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--forest); font-size: 20px; font-weight: 800; letter-spacing: -.03em; }
.brand-large { justify-content: center; font-size: 25px; margin-bottom: 36px; }
.heart-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--forest); color: var(--cream); font-size: 19px; box-shadow: 0 7px 18px rgba(32, 60, 53, .18); }
.auth-shell { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 15% 10%, #fff 0, transparent 28%), radial-gradient(circle at 90% 80%, #dce9e2 0, transparent 33%), var(--cream); }
.auth-card { width: min(100%, 450px); padding: 44px; border: 1px solid var(--line); border-radius: 32px; background: rgba(255, 253, 248, .92); box-shadow: var(--shadow); backdrop-filter: blur(20px); }
.auth-card h1 { margin: 5px 0 8px; font-family: Georgia, serif; font-size: clamp(36px, 8vw, 48px); font-weight: 500; letter-spacing: -.04em; }
.stack { display: grid; gap: 16px; margin-top: 30px; }
label { display: grid; gap: 7px; color: #55635e; font-size: 13px; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid rgba(32, 60, 53, .16); border-radius: 14px; background: #fff; color: var(--ink); padding: 13px 14px; outline: none; transition: border .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { border-color: var(--forest-2); box-shadow: 0 0 0 4px rgba(49, 88, 77, .1); }
textarea { min-height: 110px; resize: vertical; }
.button { min-height: 46px; border: 0; border-radius: 14px; padding: 12px 18px; font-weight: 800; }
.button.primary { background: var(--forest); color: #fff; box-shadow: 0 8px 20px rgba(32, 60, 53, .2); }
.button.secondary { background: var(--sage-pale); color: var(--forest); }
.button.ghost { background: transparent; border: 1px solid var(--line); color: var(--forest); }
.button.danger { background: #f7e4e2; color: #8b3f3a; }
.button:disabled { opacity: .55; cursor: wait; }
.privacy-note { display: flex; gap: 9px; margin-top: 26px; color: #71807a; font-size: 12px; }
.privacy-note span:first-child { color: #6b9b82; }
.app-shell { min-height: 100dvh; display: grid; grid-template-columns: 246px 1fr; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 246px; display: flex; flex-direction: column; padding: 28px 22px; border-right: 1px solid var(--line); background: rgba(255, 253, 248, .72); backdrop-filter: blur(22px); z-index: 10; }
.side-nav { display: grid; gap: 6px; margin-top: 46px; }
.nav-button { display: flex; align-items: center; gap: 13px; width: 100%; min-height: 47px; border: 0; border-radius: 15px; padding: 0 14px; background: transparent; color: #687570; font-weight: 750; text-align: left; }
.nav-button .nav-icon { width: 25px; text-align: center; font-size: 18px; }
.nav-button.active { background: var(--forest); color: #fff; box-shadow: 0 10px 25px rgba(32, 60, 53, .18); }
.side-bottom { margin-top: auto; }
.profile-chip { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; border-radius: 16px; padding: 10px; background: transparent; color: var(--ink); text-align: left; }
.profile-chip > span:first-child { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 50%; background: var(--amber); color: #fff; font-weight: 900; }
.profile-chip strong, .profile-chip small { display: block; }
.profile-chip small { color: #7c8884; margin-top: 2px; }
.workspace { grid-column: 2; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 8; display: flex; justify-content: space-between; align-items: center; min-height: 100px; padding: 22px clamp(24px, 5vw, 70px); background: rgba(246, 242, 234, .82); backdrop-filter: blur(18px); }
.topbar h1 { margin: 0; font-family: Georgia, serif; font-size: 34px; font-weight: 500; letter-spacing: -.035em; }
.top-actions { display: flex; gap: 8px; }
.icon-button { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.66); color: var(--forest); font-size: 20px; }
.icon-button b { position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; border-radius: 10px; background: var(--rose); color: white; font-size: 10px; line-height: 19px; }
.content { width: min(1280px, 100%); margin: 0 auto; padding: 16px clamp(24px, 5vw, 70px) 70px; }
.hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1.35fr .65fr; gap: 24px; min-height: 260px; padding: clamp(28px, 5vw, 48px); border-radius: 30px; background: var(--forest); color: #fff; box-shadow: var(--shadow); }
.hero::after { content: "♥"; position: absolute; right: -25px; bottom: -105px; color: rgba(255,255,255,.06); font-size: 310px; line-height: 1; }
.hero h2 { margin: 8px 0 12px; font-family: Georgia, serif; font-size: clamp(36px, 5vw, 62px); font-weight: 500; line-height: .98; letter-spacing: -.045em; }
.hero p { max-width: 570px; color: rgba(255,255,255,.72); line-height: 1.55; }
.hero .eyebrow { color: #bdd0c6; }
.hero-side { align-self: end; position: relative; z-index: 1; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 999px; background: rgba(255,255,255,.1); font-size: 12px; font-weight: 800; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #90d0a9; box-shadow: 0 0 0 5px rgba(144,208,169,.12); }
.ask-bar { display: flex; gap: 10px; margin-top: 26px; padding: 8px; border-radius: 18px; background: white; box-shadow: 0 15px 35px rgba(7, 25, 20, .18); }
.ask-bar input { border: 0; box-shadow: none; }
.ask-bar .button { flex: 0 0 auto; }
.mic-button { flex: 0 0 46px; border: 0; border-radius: 13px; background: var(--sage-pale); color: var(--forest); font-size: 20px; }
.mic-button.listening { animation: pulse 1s infinite; background: #f4d7d4; color: #9c4640; }
@keyframes pulse { 50% { transform: scale(.94); } }
.grid { display: grid; gap: 18px; margin-top: 20px; }
.grid > * { min-width: 0; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { min-width: 0; padding: 23px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,253,248,.86); box-shadow: 0 10px 35px rgba(38, 55, 49, .045); }
.card h3 { margin: 0; font-family: Georgia, serif; font-size: 22px; font-weight: 500; letter-spacing: -.025em; }
.card-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.card-link { border: 0; background: transparent; color: var(--forest-2); font-size: 12px; font-weight: 850; }
.metric { display: block; margin: 9px 0 2px; color: var(--forest); font-family: Georgia, serif; font-size: 40px; }
.metric-label { color: #7a8782; font-size: 12px; }
.list { display: grid; gap: 10px; }
.list-row { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 48px; padding: 10px 11px; border-radius: 14px; background: rgba(227,236,231,.45); }
.list-row .row-main { min-width: 0; flex: 1; }
.list-row strong, .list-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row small { margin-top: 3px; color: #77847f; }
.check { width: 23px; height: 23px; border: 1.5px solid #9cb1a7; border-radius: 8px; background: transparent; color: white; }
.check.done { background: var(--forest-2); border-color: var(--forest-2); }
.empty { display: grid; place-items: center; min-height: 130px; color: #85918d; text-align: center; }
.empty-icon { display: block; margin-bottom: 10px; font-size: 30px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: 8px 0 18px; }
.section-head h2 { margin: 0; font-family: Georgia, serif; font-size: 30px; font-weight: 500; }
.toolbar { display: flex; flex-wrap: wrap; gap: 9px; }
.segmented { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(32,60,53,.07); }
.segment { border: 0; border-radius: 11px; padding: 9px 13px; background: transparent; color: #687570; font-size: 12px; font-weight: 800; }
.segment.active { background: white; color: var(--forest); box-shadow: 0 3px 10px rgba(25,39,36,.09); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.form-grid .span-2 { grid-column: 1/-1; }
.chat-shell { display: grid; grid-template-rows: 1fr auto; min-height: calc(100dvh - 190px); border: 1px solid var(--line); border-radius: 28px; background: rgba(255,253,248,.82); overflow: hidden; }
.chat-log { display: flex; flex-direction: column; gap: 14px; padding: 28px; overflow: auto; }
.bubble { max-width: min(76%, 720px); padding: 15px 18px; border-radius: 19px; line-height: 1.55; white-space: pre-wrap; }
.bubble.user { align-self: flex-end; border-bottom-right-radius: 6px; background: var(--forest); color: white; }
.bubble.ai { align-self: flex-start; border-bottom-left-radius: 6px; background: var(--sage-pale); color: var(--ink); }
.bubble-meta { margin-top: 7px; font-size: 10px; opacity: .62; }
.chat-input { display: flex; gap: 10px; padding: 15px; border-top: 1px solid var(--line); background: rgba(255,255,255,.75); }
.chat-input textarea { min-height: 50px; max-height: 140px; resize: none; }
.chat-input .button { align-self: end; }
.risk { display: inline-flex; align-items: center; min-width: 32px; height: 24px; justify-content: center; border-radius: 7px; background: var(--sage-pale); color: var(--forest); font-size: 10px; font-weight: 900; }
.risk.R3, .risk.R4 { background: #f4d7d4; color: #8b3f3a; }
.badge { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 8px; background: var(--sage-pale); color: var(--forest); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.badge.pending { background: #f5e8cd; color: #815d20; }
.badge.error { background: #f4d7d4; color: #8b3f3a; }
.integration { display: flex; gap: 14px; align-items: center; }
.integration-icon { display: grid; place-items: center; flex: 0 0 44px; height: 44px; border-radius: 14px; background: var(--sage-pale); font-size: 20px; }
.email-row { width: 100%; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.email-row:hover { background: var(--sage-pale); }
.email-body { max-height: 52vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; padding: 16px; border-radius: 14px; background: var(--sage-pale); color: var(--ink); font: inherit; line-height: 1.55; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th, .data-table td { padding: 11px 9px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table th { color: #74817c; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.data-table td { max-width: 400px; overflow-wrap: anywhere; }
.modal { width: min(620px, calc(100% - 24px)); max-height: calc(100dvh - 24px); border: 0; border-radius: 28px; padding: 30px; color: var(--ink); background: var(--paper); box-shadow: 0 30px 90px rgba(14, 30, 25, .3); }
.modal::backdrop { background: rgba(18,31,27,.48); backdrop-filter: blur(5px); }
.modal-close { float: right; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--sage-pale); font-size: 25px; }
.toast { position: fixed; right: 22px; bottom: calc(22px + var(--safe-bottom)); z-index: 100; max-width: 380px; padding: 13px 16px; border-radius: 14px; background: var(--ink); color: white; box-shadow: var(--shadow); transform: translateY(130%); opacity: 0; transition: .25s; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { background: #8b3f3a; }
.mobile-nav { display: none; }
.skeleton { min-height: 80px; border-radius: 16px; background: linear-gradient(90deg, rgba(32,60,53,.05), rgba(255,255,255,.7), rgba(32,60,53,.05)); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (max-width: 1050px) {
  .grid.four { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hero { grid-template-columns: 1fr; }
  .hero-side { display: none; }
}
@media (max-width: 900px) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .workspace { padding-bottom: calc(80px + var(--safe-bottom)); }
  .topbar { min-height: 78px; padding: 15px 18px; }
  .topbar h1 { font-size: 28px; }
  .content { padding: 8px 14px 36px; }
  .hero { min-height: 300px; padding: 28px 22px; border-radius: 24px; }
  .hero h2 { font-size: 42px; }
  .ask-bar { flex-wrap: wrap; }
  .ask-bar input { width: calc(100% - 56px); }
  .ask-bar .button { width: 100%; }
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .mobile-nav { position: fixed; z-index: 20; inset: auto 0 0; display: grid; grid-template-columns: repeat(5,1fr); padding: 8px 7px calc(8px + var(--safe-bottom)); border-top: 1px solid var(--line); background: rgba(255,253,248,.93); backdrop-filter: blur(22px); }
  .mobile-nav .nav-button { justify-content: center; display: grid; gap: 2px; min-height: 54px; padding: 4px; font-size: 9px; text-align: center; }
  .mobile-nav .nav-button .nav-icon { width: auto; font-size: 18px; }
  .mobile-nav .nav-button.active { background: var(--sage-pale); color: var(--forest); box-shadow: none; }
  .chat-shell { min-height: calc(100dvh - 165px); border-radius: 22px; }
  .chat-log { padding: 18px 14px; }
  .bubble { max-width: 88%; }
  .chat-input { padding: 10px; }
  .auth-card { padding: 32px 22px; }
  .section-head { align-items: start; flex-direction: column; }
  .data-table { display: block; overflow-x: auto; }
}
@media (min-width: 600px) and (max-width: 900px) {
  .content { padding-inline: 22px; }
  .grid.two, .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { min-height: 270px; }
}
