:root {
  /* hillfamilyestate.com: #F2F2F2 header band, #333335 top bar, #353C42 headings, #53585E text, #967845 gold. */
  --bg: #F2F2F2; --panel: #FFFFFF; --ink: #353C42; --ink2: #53585E; --muted: #6B7077; --faint: #8C9197;
  --line: #DEDEDE; --line2: #ECECEC; --head: #F8F8F8;
  --accent: #333335; --gold: #967845; --gold-ink: #7A6136; --gold-bg: #F4EFE6;
  --display: 'Gilda Display', Georgia, 'Times New Roman', serif;
  --ok: #2F6B4F; --ok-bg: #EEF5F0; --warn: #8A4B12; --warn-bg: #FBF1E6; --bad: #9B2C2C; --bad-bg: #FBECEC; --info: #244A73; --info-bg: #EEF2F7;
  --hl: #FFF6D9; --bar: #CECECE; --row: 9px; --radius: 12px;
  color-scheme: light;
}
:root[data-mode="dark"] {
  --bg: #15181B; --panel: #1D2125; --ink: #ECEDEE; --ink2: #C9CDD1; --muted: #9AA0A6; --faint: #7C8288;
  --line: #2E3338; --line2: #262A2F; --head: #22262A; --accent: #C2A06A; --gold: #C2A06A; --gold-bg: #2B261C; --gold-ink: #D9BE88;
  --ok-bg: #1C2A22; --ok: #7CC4A0; --warn-bg: #2D2318; --warn: #E2A86A; --bad-bg: #2E1C1C; --bad: #EE9A9A; --info-bg: #1B2430; --info: #8DB4E2; --hl: #3A3320; --bar: #3F454B;
  color-scheme: dark;
}
:root[data-density="compact"] { --row: 5px; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: Geist, system-ui, -apple-system, sans-serif; font-size: 14px; font-variant-numeric: tabular-nums; }
a { color: var(--gold-ink); text-decoration: none; } a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.mono { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 12.5px; }
.muted { color: var(--muted); } .small { font-size: 12px; }
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr) auto; min-height: 100vh; }
.nav { background: var(--panel); border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: block; padding: 2px 8px 14px; } .brand img { width: 150px; display: block; }
:root[data-mode="dark"] .brand img { filter: invert(1) hue-rotate(180deg) brightness(1.2); }
.navlinks { display: flex; flex-direction: column; gap: 1px; }
.navlinks a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--ink2); font-size: 14px; }
.navlinks a:hover { background: var(--line2); text-decoration: none; }
.navlinks a.on { background: var(--line2); color: var(--ink); font-weight: 600; }
.navlinks a .count { margin-left: auto; font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--faint); }
.navlinks .sep { height: 1px; background: var(--line2); margin: 7px 10px; }
.navlinks .group { font-size: 11px; color: var(--faint); padding: 6px 10px 2px; text-transform: uppercase; letter-spacing: .05em; }
.sources { margin-top: auto; padding: 12px 6px 2px; border-top: 1px solid var(--line2); display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink2); padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); white-space: nowrap; }
.dot { width: 6px; height: 6px; border-radius: 999px; background: #2F8A5A; }
.main { padding: 22px 28px 60px; min-width: 0; outline: none; }
.rail { width: 340px; border-left: 1px solid var(--line); background: var(--panel); padding: 18px; display: flex; flex-direction: column; gap: 20px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.rail:empty { display: none; }
h1, h2, h3, .brief .name, .label-name, .email-hero div { font-family: var(--display); font-weight: 400 !important; letter-spacing: .01em !important; }
h1 { margin: 0; font-size: 27px; }
h1 .n { font-family: 'Geist Mono', monospace; font-size: 15px; color: var(--faint); font-weight: 400; margin-left: 6px; }
h2 { margin: 0 0 8px; font-size: 16px; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.sub { color: var(--muted); font-size: 13px; margin: 4px 0 0; max-width: 760px; line-height: 1.5; }
.btn { height: 34px; padding: 0 13px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.btn:hover { border-color: var(--faint); }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
:root[data-mode="dark"] .btn.primary { color: #15181B; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn.ghost { border-color: transparent; background: none; color: var(--muted); padding: 0 8px; } .btn.ghost:hover { background: var(--line2); color: var(--ink); }
.btn:disabled { opacity: .5; cursor: default; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.input, select.input { height: 34px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; }
.input.grow { flex: 1 1 260px; max-width: 380px; }
select.input { max-width: 100%; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.pad { padding: 14px 16px; }
.tablewrap { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: var(--muted); font-size: 12px; font-weight: 500; background: var(--head); padding: 9px 12px; white-space: nowrap; }
th.sortable { cursor: pointer; user-select: none; } th.sortable:hover { color: var(--ink); }
th .arrow { font-size: 10px; margin-left: 3px; }
td { padding: var(--row) 12px; border-top: 1px solid var(--line2); vertical-align: middle; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--head); }
tr.hl td { background: var(--hl) !important; }
.hlcard { outline: 2px solid var(--gold); background: var(--hl) !important; }
td.num, th.num { text-align: right; } td.num { font-family: 'Geist Mono', monospace; font-size: 12.5px; }
td { white-space: nowrap; } .answer td { white-space: normal; }
.who { display: flex; flex-direction: column; } .who b { font-weight: 500; } .who span { font-size: 12px; color: var(--faint); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink2); white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 99px; background: var(--faint); flex: none; }
.pill.ok::before { background: #2F8A5A; } .pill.warn::before { background: #C7832F; } .pill.bad::before { background: #C2453D; }
.pill.info::before { background: #4A7DB5; } .pill.gold::before { background: var(--gold); }
.pager { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); margin-top: 10px; gap: 8px; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); gap: 14px; }
@media (max-width: 520px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* Home: the agent */
.home { min-height: calc(100vh - 82px); display: flex; align-items: center; justify-content: center; }
.home-inner { width: 100%; max-width: 760px; display: flex; flex-direction: column; gap: 22px; }
.home h1 { font-size: 34px; text-align: center; letter-spacing: -0.02em; }
.ask { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.ask textarea { border: none; outline: none; resize: none; font-size: 16px; background: transparent; line-height: 1.5; }
.ask .bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pills button { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; font-size: 14px; color: var(--ink2); }
.pills button:hover { border-color: var(--gold); }
.todo { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line2); }
.todo input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--accent); }
.todo .t { font-size: 13px; font-weight: 500; line-height: 1.4; } .todo.done .t { text-decoration: line-through; color: var(--faint); }
.todo a { font-size: 12px; font-weight: 600; }
.arrival { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 13px; padding: 7px 0; border-bottom: 1px solid var(--line2); cursor: pointer; }
.arrival:hover { background: var(--head); }
.arrival .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Conversation */
.convo { display: flex; flex-direction: column; gap: 14px; max-width: 860px; margin: 0 auto; }
.bubble { align-self: flex-end; max-width: 560px; background: var(--accent); color: #fff; border-radius: 14px 14px 4px 14px; padding: 11px 15px; font-size: 14px; line-height: 1.5; }
:root[data-mode="dark"] .bubble { color: #15181B; }
.steps { display: flex; flex-direction: column; gap: 7px; }
.step { display: grid; grid-template-columns: 18px 96px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; }
.step .src { font-family: 'Geist Mono', monospace; font-size: 12px; color: var(--gold-ink); }
.step .meta { font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--faint); }
.spin { width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--gold); border-radius: 999px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.answer { font-size: 14.5px; line-height: 1.6; color: var(--ink); }
.answer p { margin: 0 0 8px; } .answer ul, .answer ol { margin: 0 0 8px; padding-left: 20px; }
.answer table { margin: 6px 0 10px; border: 1px solid var(--line); border-radius: 8px; }
.answer h3, .answer h4 { margin: 10px 0 6px; font-size: 14px; }
.answer code { font-family: 'Geist Mono', monospace; font-size: 12px; background: var(--line2); padding: 1px 4px; border-radius: 4px; }
.actions-done { display: flex; flex-wrap: wrap; gap: 6px; }
.draftcard { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--panel); display: flex; flex-direction: column; gap: 8px; }
.draftcard pre { white-space: pre-wrap; font: inherit; margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink2); }
.followup { display: flex; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 8px 8px 8px 14px; align-items: center; }
.followup input { flex: 1; border: none; outline: none; background: transparent; font-size: 14px; min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; }
.rail .convo .bubble { max-width: 100%; }
.rail .step { grid-template-columns: 18px 78px minmax(0, 1fr); } .rail .step .meta { display: none; }

/* Briefings */
.brief { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 14px; padding: 14px 16px; }
.brief .time { font-family: 'Geist Mono', monospace; font-size: 15px; font-weight: 500; }
.brief .name { font-size: 18px; }
.brief .facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 18px; margin-top: 10px; font-size: 13px; }
.brief .facts dt { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.brief .facts dd { margin: 0; line-height: 1.45; }
.warnline, .pourline { margin-top: 8px; font-size: 13px; display: flex; gap: 8px; align-items: baseline; }
.warnline::before, .pourline::before { content: ''; width: 6px; height: 6px; border-radius: 99px; flex: none; transform: translateY(-1px); }
.warnline::before { background: #C2453D; } .pourline::before { background: #2F8A5A; }

/* Dialog */
.scrim { position: fixed; inset: 0; background: rgba(20, 22, 25, .18); z-index: 50; display: flex; justify-content: flex-end; }
.drawer { width: min(1080px, 74vw); height: 100%; background: var(--panel); overflow-y: auto; padding: 12px 28px 48px; border-left: 1px solid var(--line); box-shadow: -16px 0 40px rgba(20,22,25,.08); }
.drawer h2.title { font-size: 25px; margin: 0; }
.msg { padding: 7px 10px; border-radius: 10px; max-width: 80%; font-size: 13px; line-height: 1.4; }
.msg.out { align-self: flex-end; background: var(--gold-bg); } .msg.in { align-self: flex-start; background: var(--line2); }
.thread { display: flex; flex-direction: column; gap: 6px; }
textarea.input { height: auto; padding: 9px 11px; width: 100%; resize: vertical; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 60; }
.toast.show { opacity: 1; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding: 8px 4px 0; }
.bars .col { flex: 1; display: flex; flex-direction: column-reverse; gap: 1px; min-width: 0; position: relative; }
.bars .seg { border-radius: 2px; }
.bars-x { display: flex; gap: 6px; padding: 4px 4px 0; font-size: 10.5px; color: var(--faint); font-family: 'Geist Mono', monospace; }
.bars-x span { flex: 1; text-align: center; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.meter { height: 6px; background: var(--line2); border-radius: 999px; overflow: hidden; min-width: 60px; }
.meter i { display: block; height: 100%; background: var(--gold); }
.empty { padding: 30px; text-align: center; color: var(--muted); }
.flow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.flow .node { padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.sr { position: absolute; left: -9999px; }

@media (max-width: 1180px) {
  .shell { grid-template-columns: 220px minmax(0, 1fr); }
  .rail { grid-column: 2; width: auto; height: auto; position: static; border-left: none; border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .nav { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; border-right: none; border-bottom: 1px solid var(--line); padding: 10px 12px; }
  .brand { padding: 0 8px 0 0; } .brand img { width: 110px; }
  .navlinks { flex-direction: row; overflow-x: auto; width: 100%; padding-bottom: 4px; }
  .navlinks a { white-space: nowrap; } .navlinks .sep, .navlinks .group, .sources { display: none; }
  .main { padding: 16px; } .rail { grid-column: 1; padding: 16px; }
  .home h1 { font-size: 26px; } .home { min-height: auto; padding-top: 20px; }
  .brief { grid-template-columns: minmax(0, 1fr); }
  .step { grid-template-columns: 18px 80px minmax(0, 1fr); } .step .meta { display: none; }
}

/* Detail panels: a Linear-style record page */
.drawer.full { width: 100%; }
.drawer:focus { outline: none; }
.phead { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; margin-bottom: 14px; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.crumbs .sep { color: var(--faint); }
.tools { display: flex; gap: 2px; }
.iconbtn { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: none; background: none; border-radius: 6px; color: var(--muted); padding: 0; }
.iconbtn:hover, .iconbtn:focus-visible { background: var(--line2); color: var(--ink); }
.psub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.metrics { display: flex; gap: 40px; flex-wrap: wrap; margin: 20px 0 4px; }
.metrics span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.metrics b { font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }
.dgrid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; align-items: start; margin-top: 20px; }
.dside { position: sticky; top: 0; border-left: 1px solid var(--line2); padding-left: 24px; }
.dsec { padding: 18px 0; border-top: 1px solid var(--line2); }
.dmain > .dsec:first-child { border-top: none; padding-top: 0; }
.dsec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.dsec h3 { margin: 0; font-size: 15px; }
.drawer .tablewrap { border: none; border-radius: 0; background: none; }
.drawer th { background: none; border-bottom: 1px solid var(--line); padding: 6px 12px 6px 0; }
.drawer td { padding: 7px 12px 7px 0; }
.drawer tr.click:hover td { background: var(--line2); }
.props { margin: 0; display: flex; flex-direction: column; gap: 11px; font-size: 13px; }
.props div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; }
.props dt { color: var(--muted); } .props dd { margin: 0; min-width: 0; overflow-wrap: anywhere; line-height: 1.45; }
.tag { display: inline-block; font-size: 12px; color: var(--ink2); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; margin: 0 4px 4px 0; }
.suggest { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line2); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.plabel { font-size: 12px; color: var(--muted); } .sline { font-size: 13.5px; font-weight: 500; line-height: 1.4; }
.suggest details { font-size: 12.5px; color: var(--muted); width: 100%; } .suggest summary { cursor: pointer; }
.suggest pre { white-space: pre-wrap; font: inherit; color: var(--ink2); margin: 6px 0 0; padding-left: 10px; border-left: 2px solid var(--line); }
.why { margin: 6px 0 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--muted); line-height: 1.5; display: flex; flex-direction: column; gap: 5px; }
.done { display: inline-flex; gap: 5px; align-items: center; color: var(--ok); font-size: 12.5px; }
.activity { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 1px solid var(--line); }
.activity li { position: relative; display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 13px; color: var(--ink2); line-height: 1.45; }
.activity li::before { content: ''; position: absolute; left: -19.5px; top: 11px; width: 6px; height: 6px; border-radius: 99px; background: var(--faint); box-shadow: 0 0 0 3px var(--panel); }
.activity time { color: var(--faint); font-size: 12px; white-space: nowrap; }
.activity b { color: var(--ink); font-weight: 500; }
.quote { margin-top: 4px; color: var(--ink); border: 1px solid var(--line2); border-radius: 6px; padding: 7px 10px; }
.comment { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; margin-top: 12px; }
.prose { margin: 0 0 8px; font-size: 13.5px; line-height: 1.55; }
.totalrow { display: flex; justify-content: flex-end; gap: 16px; padding: 8px 12px 0 0; font-size: 13px; }
.rule { font-size: 13px; margin-bottom: 8px; }
.linkbtn { border: none; background: none; padding: 0; color: var(--ink); font: inherit; text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; cursor: pointer; }
.linkbtn:hover { text-decoration-color: var(--ink); }
.legend { display: flex; gap: 12px; font-size: 12px; color: var(--muted); }
.label-card { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 18px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.label-logo { width: 90px; }
:root[data-mode="dark"] .label-logo, :root[data-mode="dark"] .email-hero img { filter: invert(1) hue-rotate(180deg) brightness(1.2); }
.label-vintage { color: var(--muted); } .label-name { font-size: 18px; font-weight: 600; }
.label-price { display: flex; flex-direction: column; align-items: flex-end; font-size: 16px; }
.perks { margin: 0; padding-left: 18px; line-height: 1.7; font-size: 13.5px; }
.phone { max-width: 340px; border: 1px solid var(--line); border-radius: 24px; padding: 16px 14px 18px; display: flex; flex-direction: column; gap: 10px; }
.phone-top { text-align: center; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line2); padding-bottom: 8px; }
.tok { border-bottom: 1px dashed var(--gold); }
.email { background: #fff; color: #1E2226; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; max-width: 600px; }
.email-meta { padding: 10px 14px; font-size: 12.5px; border-bottom: 1px solid #EEE; display: flex; flex-direction: column; gap: 3px; }
.email-meta .muted { display: inline-block; width: 56px; }
.email-hero { background: #F4EFE6; padding: 22px 18px; text-align: center; }
.email-hero img { width: 130px; display: block; margin: 0 auto 10px; }
.email-hero div { font-size: 19px; font-weight: 600; color: #353C42; letter-spacing: -0.01em; }
.email-body { padding: 16px 18px; font-size: 14px; line-height: 1.6; color: #3F454B; }
.email-cta { padding: 0 18px 18px; } .email-cta span { display: inline-block; background: #353C42; color: #fff; padding: 9px 16px; border-radius: 6px; font-size: 13px; font-weight: 600; }
.email-foot { font-size: 11px; color: #8C9197; padding: 10px 18px; border-top: 1px solid #EEE; }
@media (max-width: 900px) {
  .drawer { width: 100%; padding: 10px 16px 40px; }
  .dgrid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .dside { position: static; border-left: none; padding: 18px 0 0; border-top: 1px solid var(--line2); }
  .metrics { gap: 24px; }
  .label-card { grid-template-columns: 60px minmax(0, 1fr); } .label-logo { width: 60px; } .label-price { grid-column: 1 / -1; align-items: flex-start; }
}
.stack > p { margin: 0; line-height: 1.5; }
