/* TexMinerals — shared styles for the public site and the app. */
:root {
  --ink: #14232e;
  --ink-2: #3b4a54;
  --muted: #6b7880;
  --paper: #f6f1e8;
  --card: #ffffff;
  --line: #e2dbcf;
  --teal: #1f3f66;
  --teal-dark: #172f4d;
  --teal-soft: #e4eaf2;
  --rust: #b8562b;
  --gold: #c9a13b;
  --gold-soft: #fbf1dc;
  --orange: #e8590c;
  --brown: #6e4a33;
  --red: #b42318;
  --red-soft: #fdecea;
  --green: #1f7a4d;
  --green-soft: #e4f4ea;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 35, 46, .06), 0 4px 16px rgba(20, 35, 46, .06);
  --font: "Segoe UI", Inter, system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 var(--font); color: var(--ink); background: var(--paper); }
a { color: var(--teal-dark); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -.01em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 999px; border: 1.5px solid transparent;
  font: 600 1rem var(--font); text-decoration: none; cursor: pointer; transition: background .15s, transform .05s; background: var(--teal); color: #fff; }
.btn:hover { background: var(--teal-dark); }
.btn:active { transform: translateY(1px); }
.btn.big { padding: 15px 28px; font-size: 1.08rem; }
.btn.alt { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.alt:hover { background: rgba(20, 35, 46, .06); }
.btn.gold { background: var(--gold); color: var(--ink); }
.btn.gold:hover { background: #c99232; }
.btn.danger { background: var(--red); }
.btn.ghost { background: transparent; color: var(--teal-dark); border-color: transparent; padding: 6px 10px; }
.btn.ghost:hover { background: var(--teal-soft); }
.btn.sm { padding: 6px 12px; font-size: .88rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Site header */
.site-head { position: sticky; top: 0; z-index: 50; background: rgba(246, 241, 232, .94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 46px; width: auto; }
.site-nav { display: flex; gap: 18px; margin-left: auto; align-items: center; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.site-nav a:hover { color: var(--teal-dark); }
.site-nav .btn { color: #fff; }
@media (max-width: 860px) { .site-nav .hide-sm { display: none; } }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 64px 0 120px; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; position: relative; z-index: 1; }
.hero .lead { font-size: 1.25rem; color: var(--ink-2); max-width: 36em; }
.hero .promise { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 26px; padding: 0; list-style: none; }
.hero .promise li { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: .95rem; }
.hero .promise li::before { content: "✓ "; color: var(--teal); }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.strata { position: absolute; left: 0; right: 0; bottom: 0; height: 110px; z-index: 0; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } .hero { padding-top: 36px; } }

/* Sample summary card in the hero */
.sample { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); border: 1px solid var(--line); padding: 22px; position: relative; }
.sample .tag { position: absolute; top: -12px; left: 20px; background: var(--gold); color: var(--ink); font-weight: 700; font-size: .78rem; padding: 3px 10px; border-radius: 999px; letter-spacing: .04em; }
.sample h3 { margin-top: 6px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.kv dt { color: var(--muted); font-size: .9rem; }
.kv dd { margin: 0; font-weight: 600; }

/* Sections */
section.band { padding: 72px 0; }
section.band.white { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: s; }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; counter-increment: s; position: relative; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 700; margin-bottom: 10px; }
.steps h3 { font-size: 1.02rem; }
.steps p { font-size: .93rem; color: var(--ink-2); margin: 0; }
@media (max-width: 960px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } }

table.plain { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
table.plain th, table.plain td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.plain th { background: #faf7f1; font-size: .85rem; color: var(--ink-2); font-weight: 600; }
table.plain tr:last-child td { border-bottom: 0; }
table.plain td.num, table.plain th.num { text-align: right; font-variant-numeric: tabular-nums; }

.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 10px; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq details p { margin: 10px 0 0; color: var(--ink-2); }

.cta-band { background: var(--ink); color: #f4ebdd; padding: 56px 0; }
.cta-band h2 { color: #fff; }
.cta-band .btn.alt { color: #fff; border-color: #fff; }

.site-foot { padding: 36px 0 48px; font-size: .88rem; color: var(--ink-2); }
.site-foot .wrap { display: grid; gap: 14px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 16px; }
.disclaimer { font-size: .8rem; color: var(--muted); line-height: 1.5; }

/* ------- App ------- */
body.app { background: #f3efe7; }
.app-head { background: var(--ink); color: #f4ebdd; }
.app-head .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.app-head .brand img { height: 38px; }
.app-head nav { display: flex; gap: 4px; margin-left: 12px; flex-wrap: wrap; }
.app-head nav a { color: #d8d2c6; text-decoration: none; padding: 6px 10px; border-radius: 8px; font-weight: 500; font-size: .95rem; }
.app-head nav a.on, .app-head nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.app-head .who { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: .9rem; color: #c9c2b5; }
.app-head .who a { color: #fff; }
@media (max-width: 760px) { .app-head .wrap { height: auto; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; } .app-head .who { margin-left: 0; } }
main.app-main { padding: 24px 0 64px; }
.page-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-title h1 { font-size: 1.6rem; margin: 0; }
.page-title .spacer { flex: 1; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: 0 1px 2px rgba(0, 0, 0, .03); margin-bottom: 16px; }
.card h2 { font-size: 1.15rem; margin-bottom: 12px; }
.card h2 .count { color: var(--muted); font-weight: 500; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: #faf7f1; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.stat .label { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.stat .value { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: .8rem; color: var(--muted); }

form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
form .row.three { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 700px) { form .row, form .row.three { grid-template-columns: 1fr; } }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 12px; }
label .hint { display: block; font-weight: 400; color: var(--muted); font-size: .82rem; margin-top: 2px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], select, textarea {
  display: block; width: 100%; margin-top: 5px; padding: 10px 12px; border: 1px solid #cfc7b8; border-radius: 9px; font: 1rem var(--font); background: #fff; color: var(--ink); }
textarea { min-height: 86px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--teal); outline-offset: 1px; border-color: var(--teal); }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
label.check input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.err { background: var(--red-soft); color: var(--red); border-radius: 9px; padding: 10px 14px; margin: 10px 0; font-weight: 500; }
.ok { background: var(--green-soft); color: var(--green); border-radius: 9px; padding: 10px 14px; margin: 10px 0; font-weight: 500; }
.note { background: var(--gold-soft); border: 1px solid #efd9a8; border-radius: 9px; padding: 10px 14px; margin: 10px 0; font-size: .92rem; }
.auth-card { max-width: 520px; margin: 32px auto; }

.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; letter-spacing: .02em; background: #eee8dc; color: var(--ink-2); white-space: nowrap; }
.pill.submitted, .pill.pending { background: #e9eef7; color: #2b4a7a; }
.pill.researching { background: var(--gold-soft); color: #8a5a00; }
.pill.summary_ready, .pill.countered { background: #f3e8fb; color: #6b3a8c; }
.pill.agreement_signed, .pill.open { background: var(--teal-soft); color: var(--teal-dark); }
.pill.listed, .pill.approved, .pill.accepted, .pill.closed, .pill.done, .pill.got { background: var(--green-soft); color: var(--green); }
.pill.under_contract, .pill.active { background: #fff0e6; color: #a2420b; }
.pill.withdrawn, .pill.rejected, .pill.declined, .pill.cancelled, .pill.not_selected, .pill.not_needed { background: #efefef; color: #777; }
.pill.free { background: var(--teal-soft); color: var(--teal-dark); }
.pill.paid { background: var(--gold-soft); color: #8a5a00; }

table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: .93rem; }
table.list th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
table.list td.num, table.list th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.list tr.click { cursor: pointer; }
table.list tr.click:hover td { background: #faf7f1; }
.table-scroll { overflow-x: auto; }

/* Progress bar for deals */
.progress { display: grid; grid-template-columns: repeat(var(--n, 8), 1fr); gap: 6px; margin: 8px 0 4px; }
.progress .step { position: relative; text-align: center; font-size: .76rem; color: var(--muted); }
.progress .step .bar { height: 8px; border-radius: 999px; background: #e4ddd0; margin-bottom: 8px; }
.progress .step.done .bar { background: var(--teal); }
.progress .step.now .bar { background: linear-gradient(90deg, var(--teal) 50%, #e4ddd0 50%); }
.progress .step.done, .progress .step.now { color: var(--ink); }
.progress .step.now { font-weight: 700; }
.progress .step .dot { display: block; font-weight: 700; }
@media (max-width: 760px) { .progress { grid-template-columns: 1fr; } .progress .step { text-align: left; display: flex; gap: 10px; align-items: center; } .progress .step .bar { width: 60px; margin: 0; flex: none; } }
.status-track { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.status-track span { font-size: .78rem; padding: 4px 10px; border-radius: 999px; background: #e9e3d7; color: var(--muted); }
.status-track span.done { background: var(--teal-soft); color: var(--teal-dark); }
.status-track span.now { background: var(--teal); color: #fff; font-weight: 700; }

.listing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.listing { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; cursor: pointer; text-decoration: none; color: inherit; display: block; transition: box-shadow .15s; }
.listing:hover { box-shadow: var(--shadow); }
.listing .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.listing .county { font-weight: 700; font-size: 1.05rem; }
.listing .nums { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: .9rem; }
.listing .nums b { display: block; font-size: 1.05rem; }
.map { height: 360px; border-radius: var(--radius); border: 1px solid var(--line); z-index: 0; }
.map.small { height: 260px; }

.drop { border: 2px dashed #cbbfa9; border-radius: var(--radius); padding: 22px; text-align: center; background: #fdfbf7; cursor: pointer; }
.drop.over { border-color: var(--teal); background: var(--teal-soft); }
.file-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.file-row:last-child { border-bottom: 0; }
.file-row .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.agreement { max-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 16px 20px; background: #fdfcf9; font-family: Georgia, serif; font-size: .95rem; }
.agreement h2 { font-family: var(--font); }
.agreement h3 { font-family: var(--font); font-size: .98rem; margin: 14px 0 4px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; text-decoration: none; color: var(--ink-2); border-bottom: 2px solid transparent; font-weight: 600; }
.tabs a.on { color: var(--teal-dark); border-color: var(--teal); }
.empty { text-align: center; color: var(--muted); padding: 28px 10px; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; z-index: 100; box-shadow: var(--shadow); }
dialog { border: 0; border-radius: 14px; padding: 22px; max-width: 560px; width: calc(100% - 32px); box-shadow: 0 10px 40px rgba(0, 0, 0, .25); }
dialog::backdrop { background: rgba(20, 35, 46, .45); }
.inline-edit input, .inline-edit select { margin-top: 0; padding: 6px 8px; font-size: .9rem; }

/* ------- Printable summary report & closing statement ------- */
.report { background: #fff; max-width: 8.5in; margin: 0 auto; padding: .55in .6in; position: relative; overflow: hidden; border: 1px solid var(--line); }
.report .r-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 16px; }
.report .r-head img { height: 46px; }
.report .r-head .r-title { text-align: right; }
.report .r-head .r-title b { display: block; font-size: 1.15rem; }
.report h2.part { font-size: 1.05rem; border-bottom: 1px solid var(--line); padding-bottom: 4px; margin: 20px 0 10px; }
.report table.mor { width: 100%; border-collapse: collapse; font-size: .85rem; }
.report table.mor th, .report table.mor td { border-bottom: 1px solid #ddd; padding: 6px; text-align: left; }
.report table.mor td.num, .report table.mor th.num { text-align: right; font-variant-numeric: tabular-nums; }
.report .disclaimer-box { border: 1px solid #c9c2b5; background: #faf7f1; padding: 10px 12px; font-size: .74rem; color: #444; margin-top: 18px; border-radius: 6px; }
.report .r-foot { margin-top: 18px; font-size: .72rem; color: var(--muted); display: flex; justify-content: space-between; }
.watermark { position: absolute; inset: 0; pointer-events: none; display: flex; align-items: center; justify-content: center; z-index: 0; }
.watermark span { transform: rotate(-35deg); font-size: 64px; font-weight: 800; letter-spacing: .08em; color: rgba(47, 127, 122, .07); white-space: nowrap; }
.report > *:not(.watermark) { position: relative; z-index: 1; }
@media print {
  body.app { background: #fff; }
  .app-head, .no-print, .toast { display: none !important; }
  main.app-main { padding: 0; }
  .wrap { max-width: none; padding: 0; }
  .report { border: 0; padding: 0; max-width: none; }
  .watermark { position: fixed; }
  @page { size: letter; margin: .5in; }
}

/* Small-screen and filter tweaks */
.site-nav a { white-space: nowrap; }
@media (max-width: 480px) { .site-head .wrap { gap: 10px; } .site-nav { gap: 10px; } .brand img { height: 34px; } .site-nav .btn.sm { padding: 6px 10px; } }
.page-title select { width: auto; margin-top: 0; }
.big-phone { font-size: 1.4rem; font-weight: 700; }
.site-nav .phone-link { font-weight: 700; color: var(--teal-dark); }
.hero .promise li.vet { background: var(--ink); color: #f4ebdd; border-color: var(--ink); }
.hero .promise li.vet::before { content: "★ "; color: var(--gold); }

/* ------- Virtual assistant ------- */
.txm-chat-btn { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: flex; align-items: center; gap: 8px; padding: 12px 18px; border: 0; border-radius: 999px;
  background: var(--teal); color: #fff; font: 600 1rem var(--font); box-shadow: 0 6px 20px rgba(20, 35, 46, .25); cursor: pointer; }
.txm-chat-btn:hover { background: var(--teal-dark); }
.txm-chat { position: fixed; right: 18px; bottom: 18px; z-index: 91; width: min(380px, calc(100vw - 24px)); height: min(560px, calc(100vh - 40px)); display: flex; flex-direction: column;
  background: #fff; border-radius: 16px; box-shadow: 0 12px 40px rgba(20, 35, 46, .3); overflow: hidden; border: 1px solid var(--line); }
.txm-chat[hidden] { display: none; }
.txm-chat header { background: var(--ink); color: #f4ebdd; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; }
.txm-chat header small { display: block; color: #b9c2c0; font-size: .76rem; }
.txm-chat header .x { background: none; border: 0; color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.txm-chat .msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: #faf7f1; }
.txm-chat .m { max-width: 85%; padding: 8px 12px; border-radius: 14px; font-size: .93rem; line-height: 1.45; overflow-wrap: anywhere; }
.txm-chat .m.bot { background: #fff; border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.txm-chat .m.me { background: var(--teal); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.txm-chat .typing span { display: inline-block; width: 6px; height: 6px; margin: 0 2px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.txm-chat .typing span:nth-child(2) { animation-delay: .2s; } .txm-chat .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .2; } }
.txm-chat .chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; background: #faf7f1; }
.txm-chat .chips button { border: 1px solid var(--teal); color: var(--teal-dark); background: #fff; border-radius: 999px; padding: 5px 10px; font: .82rem var(--font); cursor: pointer; }
.txm-chat form { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--line); }
.txm-chat form input { flex: 1; margin: 0; padding: 9px 11px; }
.txm-chat form button { border: 0; background: var(--teal); color: #fff; border-radius: 9px; padding: 0 14px; font: 600 .9rem var(--font); cursor: pointer; }
.txm-chat footer { padding: 6px 12px 10px; font-size: .72rem; color: var(--muted); display: flex; gap: 8px; justify-content: space-between; align-items: center; }
.txm-chat footer .call { white-space: nowrap; font-weight: 700; }
@media print { .txm-chat, .txm-chat-btn { display: none !important; } }
.guide h2 { font-size: 1.3rem; margin-top: 28px; }
.guide p, .guide li { font-size: 1.05rem; }
.sr-only, input.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; border: 0 !important; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
