/* QuoteLoop — fir green and field tones, high-legibility type for reading on a phone outdoors. */
:root {
  --fir: #1e4d3a;
  --fir-2: #2c6a50;
  --moss: #5f8a2e;
  --paper: #f3f6f2;
  --card: #ffffff;
  --ink: #17221c;
  --stone: #5f6b64;
  --line: #d7ded8;
  --sun: #c98d0a;
  --sun-bg: #fdf4dc;
  --clay: #b0412c;
  --clay-bg: #fbe9e5;
  --teal: #23707e;
  --r: 10px;
  font-family: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 1.0625rem; }
a { color: var(--fir-2); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
h1 { font-size: 1.75rem; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 1.125rem; margin: 0 0 .75rem; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 1rem; }
main.wrap { padding-bottom: 4rem; }

/* header */
.top { background: var(--fir); color: #fff; }
.top-in { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; padding-top: .6rem; padding-bottom: .6rem; }
.brand { display: inline-flex; align-items: center; gap: .5rem; color: inherit; font-weight: 700; font-size: 1.15rem; text-decoration: none; }
.loop { width: 22px; height: 22px; border-radius: 50%; border: 3px solid currentColor; border-right-color: transparent; transform: rotate(-45deg); position: relative; }
.loop::after { content: ""; position: absolute; right: -5px; top: -1px; border: 5px solid transparent; border-left-color: currentColor; transform: rotate(45deg); }
.top nav { display: flex; gap: .15rem; order: 3; width: 100%; overflow-x: auto; }
.top nav a { color: #dfe9e3; text-decoration: none; padding: .45rem .7rem; border-radius: 8px; white-space: nowrap; }
.top nav a[aria-current] { background: rgba(255,255,255,.14); color: #fff; }
.logout { margin-left: auto; }
.logout .link { color: #dfe9e3; }
@media (min-width: 760px) { .top nav { order: 0; width: auto; } }

.sendbar { font-size: .95rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.sendbar.m-demo { background: #e6efe9; }
.sendbar.m-off { background: var(--sun-bg); }
.sendbar.m-live { background: var(--card); color: var(--stone); }

/* buttons & forms */
.btn { display: inline-block; font: inherit; font-weight: 700; background: var(--fir); color: #fff; border: 2px solid var(--fir); border-radius: var(--r); padding: .65rem 1.1rem; text-decoration: none; cursor: pointer; min-height: 46px; }
.btn:hover { background: var(--fir-2); border-color: var(--fir-2); }
.btn.ghost { background: transparent; color: var(--fir); }
.btn.ghost:hover { background: #e6efe9; }
.link { font: inherit; background: none; border: 0; color: var(--fir-2); text-decoration: underline; cursor: pointer; padding: .25rem 0; }
.stack { display: grid; gap: 1rem; }
label { display: grid; gap: .3rem; font-weight: 700; font-size: .95rem; }
label small, .note { font-weight: 400; color: var(--stone); font-size: .93rem; margin: 0; }
input, select, textarea { font: inherit; font-weight: 400; width: 100%; padding: .65rem .75rem; border: 1.5px solid #b9c4bd; border-radius: 8px; background: #fff; color: var(--ink); min-height: 46px; }
textarea { resize: vertical; line-height: 1.45; }
fieldset { border: 1.5px solid var(--line); border-radius: var(--r); padding: .75rem 1rem 1rem; margin: 0; display: grid; gap: .9rem; }
legend { font-weight: 700; padding: 0 .3rem; }
.two { display: grid; gap: 1rem; }
@media (min-width: 560px) { .two { grid-template-columns: 1fr 1fr; } }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.actions form { margin: 0; }

/* page structure */
.pagehead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin: 1.5rem 0 1rem; }
.pagehead .sub { margin: .2rem 0 0; color: var(--stone); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem; margin-bottom: 1rem; }
.panel.warn { border-color: var(--clay); background: var(--clay-bg); }
.cols { display: grid; gap: 0 1rem; }
@media (min-width: 760px) { .cols { grid-template-columns: 1fr 1fr; } }
.empty { color: var(--stone); margin: 0; }
.flash { padding: .7rem .9rem; border-radius: 8px; margin: 1rem 0; }
.flash.ok { background: #e3f0e4; }
.flash.info { background: #e6eef3; }
.flash.error { background: var(--clay-bg); color: #6e2416; }

/* tally strip: one strip, not a card per number */
.tally { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 1rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.tally > div { padding: .9rem 1rem; border-top: 1px solid var(--line); }
.tally > div:nth-child(-n+2) { border-top: 0; }
.tally > div:nth-child(odd) { border-right: 1px solid var(--line); }
.tally dt { font-size: .9rem; color: var(--stone); }
.tally dd { margin: .1rem 0; font-size: 1.9rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tally span { font-size: .85rem; color: var(--stone); }
.tally .booked { background: var(--fir); color: #fff; border-radius: 0 0 var(--r) 0; }
.tally .booked dt, .tally .booked span { color: #cfe0d6; }
@media (min-width: 760px) {
  .tally { grid-template-columns: repeat(4, 1fr); }
  .tally > div { border-top: 0; border-right: 1px solid var(--line); }
  .tally .booked { border-radius: 0 var(--r) var(--r) 0; border-right: 0; }
}

/* lists */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { border-top: 1px solid var(--line); }
.rows li:first-child { border-top: 0; }
.rows li > a, .rows li > span:first-child { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .1rem 1rem; padding: .65rem 0; text-decoration: none; color: inherit; }
.rows li { display: flex; flex-wrap: wrap; justify-content: space-between; }
.rows li > a { width: 100%; }
.rows span { color: var(--stone); font-size: .95rem; }
.qrows { list-style: none; margin: 0; padding: 0; }
.qrows li > a { display: block; padding: .85rem 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.qrows li:first-child > a { border-top: 0; }
.qrows li > a:hover strong { text-decoration: underline; }
.qtop { display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; }
.qmeta { color: var(--ink); font-size: .97rem; }
.qmeta span { display: block; color: var(--stone); font-size: .9rem; }

.badge { display: inline-block; font-size: .85rem; font-weight: 700; padding: .15rem .55rem; border-radius: 99px; white-space: nowrap; }
.s-pending { background: #e9ecea; color: #39443e; }
.s-replied { background: #dcedf0; color: #17535e; }
.s-booked { background: #dceccd; color: #2f5214; }
.s-declined { background: #efe3e0; color: #7a2e20; }
.s-expired { background: #ecebe7; color: #6a6a63; }

/* the loop line — the one signature element */
.loopline { list-style: none; margin: 1.1rem 0 .5rem; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); position: relative; }
.loopline::before { content: ""; position: absolute; left: 10%; right: 10%; top: 9px; height: 3px; background: var(--line); }
.loopline .n { position: relative; display: grid; justify-items: center; text-align: center; gap: .15rem; }
.loopline .dot { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--fir); position: relative; z-index: 1; }
.loopline .lbl { font-weight: 700; font-size: .85rem; margin-top: .3rem; }
.loopline .sub { font-size: .78rem; color: var(--stone); line-height: 1.3; }
.f-sent .dot { background: var(--fir); }
.f-scheduled .dot { background: #fff; }
.f-paused .dot { border-style: dashed; border-color: var(--stone); }
.f-skipped .dot, .f-canceled .dot, .f-none .dot { border-color: #b8c0bb; border-style: dashed; transform: scale(.75); }
.f-failed .dot { border-color: var(--clay); background: var(--clay); }
.f-uncertain .dot, .f-sending .dot { border-color: var(--sun); background: var(--sun); }
.end .dot { width: 24px; height: 24px; margin-top: -2px; border-color: #b8c0bb; }
.o-booked .dot { background: var(--moss); border-color: var(--moss); box-shadow: 0 0 0 4px #dceccd; }
.o-replied .dot { background: var(--teal); border-color: var(--teal); }
.o-declined .dot, .o-expired .dot { background: #cfd5d1; }
.loopline.compact { margin: .55rem 0 0; max-width: 260px; }
.loopline.compact::before { top: 5px; height: 2px; }
.loopline.compact .dot { width: 12px; height: 12px; border-width: 2px; }
.loopline.compact .end .dot { width: 14px; height: 14px; margin-top: -1px; }
.loopline.compact .o-booked .dot { box-shadow: 0 0 0 3px #dceccd; }

/* quote detail */
.job { font-size: 1.15rem; margin: 0; }
.amt { font-size: 1.6rem; font-weight: 700; margin: .25rem 0 0; font-variant-numeric: tabular-nums; }
.amt span { font-size: .95rem; font-weight: 400; color: var(--stone); }
.seg { display: flex; flex-wrap: wrap; gap: .4rem; }
.seg label { display: block; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: block; padding: .55rem .9rem; border: 1.5px solid #b9c4bd; border-radius: 99px; font-weight: 700; cursor: pointer; }
.seg input:checked + span { background: var(--fir); border-color: var(--fir); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--sun); outline-offset: 2px; }
.fu { border-top: 1px solid var(--line); padding: .7rem 0; }
.fu:first-of-type { border-top: 0; }
.fu summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: .25rem .6rem; align-items: baseline; }
.fu summary .when { color: var(--stone); font-size: .93rem; }
.fu form, .fu .preview { margin-top: .8rem; }
.fu-s { font-size: .85rem; font-weight: 700; }
.fu-s.f-sent { color: var(--fir-2); }
.fu-s.f-failed { color: var(--clay); }
.fu-s.f-uncertain { color: #8a5f00; }
.fu-s.f-canceled, .fu-s.f-skipped { color: var(--stone); }
.preview { background: var(--paper); border-radius: 8px; padding: .75rem .9rem; }
.preview .subj { font-weight: 700; margin: 0 0 .4rem; }
.preview pre { white-space: pre-wrap; font: inherit; margin: 0; }

/* activity feed */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { padding: .6rem 0 .6rem 1rem; border-left: 3px solid var(--line); position: relative; }
.feed li::before { content: ""; position: absolute; left: -6px; top: 1rem; width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.feed .k-email_sent::before, .feed .k-email_simulated::before { background: var(--fir); }
.feed .k-reply::before { background: var(--teal); }
.feed .k-email_failed::before, .feed .k-uncertain::before { background: var(--clay); }
.feed .k-optout::before { background: var(--sun); }
.feed time { font-size: .85rem; color: var(--stone); }
.feed p { margin: .1rem 0 0; }

.search { display: flex; gap: .5rem; margin-bottom: .75rem; }
.search input { flex: 1; }
.tabs { display: flex; gap: .3rem; overflow-x: auto; margin-bottom: 1rem; padding-bottom: .25rem; }
.tabs a { white-space: nowrap; padding: .45rem .8rem; border-radius: 99px; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); }
.tabs a span { color: var(--stone); font-size: .88rem; }
.tabs a[aria-current] { background: var(--ink); color: #fff; border-color: var(--ink); }
.tabs a[aria-current] span { color: #cbd3ce; }
.danger { margin-top: 1.5rem; }
.danger .link { color: var(--clay); }
.demo-tools { background: #e6efe9; border-style: dashed; }

/* landing & auth */
.hero { max-width: 34rem; margin: 0 auto; padding: 4rem 0 2rem; }
.hero .loop.big { width: 64px; height: 64px; border-width: 7px; color: var(--fir); margin-bottom: 1.5rem; }
.hero .loop.big::after { border-width: 12px; right: -13px; top: -4px; }
.hero h1 { font-size: clamp(2rem, 6vw, 2.8rem); line-height: 1.08; letter-spacing: -0.02em; }
.lede { font-size: 1.2rem; color: #33413a; margin: 1rem 0 1.5rem; }
.cta { display: flex; flex-wrap: wrap; gap: .6rem; }
.demo-start { margin-top: 1.5rem; display: grid; justify-items: start; gap: .2rem; }
.demo-start small { color: var(--stone); }
.auth { max-width: 26rem; margin: 0 auto; padding: 3rem 0; }
.auth h1 { margin: 1.5rem 0 1rem; }
.auth .brand { color: var(--fir); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* trial banner, marketing sections, billing, legal */
.sendbar.m-trial { background: #e6eef3; }
.sell { max-width: 40rem; margin: 0 auto; padding: 2rem 0; border-top: 1px solid var(--line); }
.sell h2 { font-size: 1.45rem; line-height: 1.2; }
.how { padding-left: 1.3rem; display: grid; gap: .8rem; }
.plan { background: var(--card); border: 2px solid var(--fir); border-radius: var(--r); padding: 1.3rem; margin-bottom: 1rem; }
.plan .tag { display: inline-block; background: var(--sun-bg); color: #6b4a00; font-weight: 700; font-size: .9rem; padding: .25rem .6rem; border-radius: 99px; margin: 0; }
.plan .amt { font-size: 2.6rem; font-weight: 700; margin: .3rem 0; line-height: 1; }
.plan .amt span { font-size: 1rem; font-weight: 400; color: var(--stone); }
.plan ul { padding-left: 1.2rem; }
details { border-bottom: 1px solid var(--line); padding: .7rem 0; }
details summary { cursor: pointer; font-weight: 700; }
details p { margin: .5rem 0 0; }
.facts { display: grid; gap: .6rem; margin: 0 0 1rem; }
.facts div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding-bottom: .5rem; }
.facts dt { color: var(--stone); }
.facts dd { margin: 0; font-weight: 700; text-align: right; }
.legal { max-width: 42rem; margin: 0 auto; padding: 2.5rem 0; }
.legal .brand { color: var(--fir); }
.legal h1 { margin: 1.5rem 0 .5rem; }
.legal h2 { margin-top: 1.6rem; }
.foot { border-top: 1px solid var(--line); padding: 1.2rem 0 2rem; }
.foot .wrap { display: flex; gap: 1.2rem; justify-content: center; }
