/* ThinkNow bids desk. Brand from thinknow.com: black and white, magenta #e958f7 (hover #cc0bde),
   cyan #58f3ef and yellow #fff652 accents; Bebas Neue for display, League Spartan (Spartan) for text.
   Fonts are served from this app (the CSP allows no other origin); both are SIL Open Font License. */
@font-face { font-family: "Bebas Neue"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/bebas-neue-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                 U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bebas Neue"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/bebas-neue-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F,
                 U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "League Spartan"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/league-spartan-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                 U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "League Spartan"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/league-spartan-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F,
                 U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ink: #111111;
  --ink-soft: #3b3b3f;
  --muted: #6b6b72;
  --line: #e7e7ea;
  --line-strong: #d6d6db;
  --bg: #f6f6f7;
  --card: #ffffff;
  --brand: #e958f7;          /* ThinkNow magenta: accents, bars, focus */
  --brand-strong: #cc0bde;   /* solid buttons with white text */
  --brand-ink: #9b1aa8;      /* links and text on white */
  --brand-tint: #fdf0fe;
  --brand-tint-2: #f8dcfb;
  --cyan: #58f3ef;
  --cyan-ink: #0b7471;
  --cyan-tint: #e6fdfc;
  --yellow: #fff652;
  --yellow-ink: #6f6500;
  --yellow-tint: #fffbdc;
  --danger: #d00000;
  --danger-tint: #fff2f2;
  --success: #0f8a5f;
  --gradient: linear-gradient(90deg, #fff652 0%, #e958f7 52%, #58f3ef 100%);
  --radius: 7px;
  --radius-lg: 12px;
  --shadow: 0 1px 2px rgba(17, 17, 17, .04), 0 6px 20px rgba(17, 17, 17, .05);
  --shadow-lg: 0 24px 64px rgba(17, 17, 17, .28);
  --font: "League Spartan", Helvetica, Arial, sans-serif;
  --display: "Bebas Neue", Helvetica, Arial, sans-serif;
  --reading: "Segoe UI", Arial, Helvetica, sans-serif;   /* client email and drafts, as Outlook shows them */
  font-family: var(--font);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg);
       font-size: 15px; line-height: 1.45; }
body::before { content: ""; display: block; height: 4px; background: var(--gradient); flex: none; }
a { color: var(--brand-ink); text-decoration: none; }
a:hover { color: var(--brand-strong); text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.15; }
h1 { font-family: var(--display); font-weight: 400; font-size: 2.2rem; letter-spacing: .03em; margin: 0 0 .25rem; }
h2 { font-family: var(--display); font-weight: 400; font-size: 1.55rem; letter-spacing: .04em; margin: 2rem 0 .75rem; }
h3 { font-size: 1rem; font-weight: 700; margin: 0 0 .5rem; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .85em; background: var(--bg);
       border: 1px solid var(--line); padding: .05rem .35rem; border-radius: 5px; }
:focus-visible { outline: 3px solid rgba(233, 88, 247, .5); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--brand-tint-2); }

/* ---- Top bar ---------------------------------------------------------------------------- */
.topbar { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, .96);
          border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(8px); }
.topbar-in { max-width: 1240px; margin: 0 auto; padding: .55rem 1.5rem; display: flex; align-items: center; gap: 1.5rem; }
.brand { display: flex; align-items: center; gap: .65rem; color: var(--ink); }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand-mark { width: 38px; height: 38px; border-radius: 9px; flex: none;   /* a background, so pages hold no <img> */
              background: url("img/thinknow-icon.png") center / cover no-repeat; }
.wordmark { font-weight: 700; font-size: 1.45rem; letter-spacing: -.045em; line-height: 1; padding-top: .15rem; }
.brand-app { font-family: var(--display); font-size: 1.25rem; letter-spacing: .08em; color: var(--brand-ink);
             border-left: 1.5px solid var(--line-strong); padding: .2rem 0 0 .65rem; line-height: 1; }
.nav { display: flex; gap: .25rem; }
.nav a { font-weight: 600; color: var(--ink-soft); padding: .45rem .75rem .35rem; border-radius: var(--radius); }
.nav a:hover { background: var(--bg); color: var(--ink); text-decoration: none; }
.nav a.active { color: var(--ink); box-shadow: inset 0 -3px 0 var(--brand); border-radius: 0; }
.logout { display: flex; align-items: center; gap: .65rem; margin: 0 0 0 auto; }
.who { color: var(--muted); font-size: .88rem; }
.avatar { display: inline-grid; place-items: center; flex: none; width: 2.1rem; height: 2.1rem; border-radius: 50%;
          font-weight: 700; font-size: .9rem; line-height: 1; padding-top: .12rem; text-transform: uppercase;
          background: var(--brand-tint-2); color: var(--brand-ink); }
.avatar.sm { width: 1.9rem; height: 1.9rem; font-size: .8rem; }
.av-0 { background: var(--brand-tint-2); color: var(--brand-ink); }
.av-1 { background: var(--cyan-tint); color: var(--cyan-ink); }
.av-2 { background: var(--yellow-tint); color: var(--yellow-ink); }
.av-3 { background: #111111; color: #ffffff; }
.av-4 { background: #efe7ff; color: #5a2a8a; }
.av-5 { background: #ececef; color: #3b3b3f; }

/* ---- Layout ---------------------------------------------------------------------------- */
main { width: 100%; max-width: 1240px; margin: 0 auto; padding: 1.75rem 1.5rem 2.5rem; flex: 1; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
        padding: 1.5rem; box-shadow: var(--shadow); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin: 0 0 1.1rem; }
.page-head p { margin: 0; }
.eyebrow { font-family: var(--display); letter-spacing: .12em; color: var(--brand-ink); font-size: 1rem; margin: 0; }
.foot { max-width: 1240px; width: 100%; margin: 0 auto; padding: 1rem 1.5rem 1.5rem; color: var(--muted);
        font-size: .8rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ---- Forms and buttons ----------------------------------------------------------------- */
form label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 1rem; }
input { display: block; width: 100%; margin-top: .35rem; padding: .7rem .8rem .6rem; font: inherit; font-weight: 400;
        color: var(--ink); border: 1.5px solid var(--line-strong); border-radius: var(--radius); background: #fff;
        transition: border-color .15s, box-shadow .15s; }
input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(233, 88, 247, .18); }
button { display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
         font-family: var(--display); font-size: 1.08rem; letter-spacing: .09em; line-height: 1;
         padding: .62rem 1.1rem .5rem; border-radius: var(--radius); cursor: pointer;
         border: 1.5px solid var(--ink); background: #fff; color: var(--ink);
         transition: background-color .2s, color .2s, border-color .2s, box-shadow .2s; }
button:hover { background: var(--ink); color: #fff; }
button.primary { background: var(--brand-strong); border-color: var(--brand-strong); color: #fff;
                 box-shadow: 0 4px 14px rgba(204, 11, 222, .28); }
button.primary:hover { background: #a909b8; border-color: #a909b8; }
button.secondary { background: #fff; color: var(--ink); border-color: var(--line-strong); }
button.secondary:hover { border-color: var(--ink); background: #fff; color: var(--ink); }
button:disabled { opacity: .45; cursor: not-allowed; }
.toolbar button::before, .icon-mask { content: ""; display: inline-block; width: 1.05rem; height: 1.05rem;
  background: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
  margin-top: -.12rem; }
.toolbar [data-open="tracking-dialog"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E"); }
.toolbar [data-open="compare-dialog"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Cpath d='M12 3v18'/%3E%3C/svg%3E"); }
.toolbar .primary { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 2 3 14h9l-1 8 10-12h-9l1-8z'/%3E%3C/svg%3E"); }

.error { color: var(--danger); background: var(--danger-tint); border: 1px solid #f6c9c9; padding: .6rem .8rem;
         border-radius: var(--radius); font-size: .9rem; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: .82rem; word-break: break-all; }
.nowrap { white-space: nowrap; }

/* ---- Sign in ----------------------------------------------------------------------------- */
.login-page main { display: grid; place-items: center; max-width: none; padding: 2rem 1rem; }
.login-page { background:
  radial-gradient(36rem 26rem at 8% 12%, rgba(255, 246, 82, .55), transparent 60%),
  radial-gradient(40rem 30rem at 92% 18%, rgba(233, 88, 247, .32), transparent 62%),
  radial-gradient(34rem 26rem at 70% 100%, rgba(88, 243, 239, .35), transparent 60%), var(--bg); }
.login { width: min(26rem, 100%); background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg);
         padding: 2.25rem 2.25rem 2rem; border: 1px solid var(--line); }
.login-logo { display: block; width: 210px; height: auto; margin: 0 0 1.4rem; }
.login h1 { font-size: 2rem; margin: 0 0 .2rem; }
.login .lead { margin: 0 0 1.5rem; color: var(--muted); font-size: .92rem; }
.login button { width: 100%; padding: .85rem 1rem .72rem; font-size: 1.2rem; margin-top: .25rem; }
.login .fine { margin: 1.25rem 0 0; font-size: .78rem; color: var(--muted); text-align: center; }

/* ---- Inbox ------------------------------------------------------------------------------- */
.list-card { padding: 0; overflow: hidden; }
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem;
             padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.pill { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; font-weight: 600;
        padding: .3rem .7rem .2rem; border-radius: 999px; background: var(--brand-tint); color: var(--brand-ink); }
.pill.neutral { background: var(--bg); color: var(--ink-soft); }
.emails { width: 100%; border-collapse: collapse; font-size: .93rem; }
.emails th { text-align: left; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
             color: var(--muted); padding: .7rem 1rem .55rem; background: #fafafb; border-bottom: 1px solid var(--line); }
.emails td { text-align: left; padding: .75rem 1rem .65rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.emails tbody tr { transition: background-color .12s; }
.emails tbody tr:hover td { background: var(--brand-tint); }
.emails tbody tr:last-child td { border-bottom: 0; }
.emails td.when { color: var(--muted); font-size: .85rem; width: 9.5rem; white-space: nowrap; }
.emails td.icon, .emails th.icon { text-align: center; width: 3.5rem; color: var(--muted); }
.sender { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.sender-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 15rem; }
.sender .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 15rem; }
.subject { color: var(--ink); font-weight: 500; }
.subject:hover { color: var(--brand-ink); }
.emails tr.unread td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
.emails tr.unread .subject { font-weight: 700; }
.emails tr.unread .sender-name::after { content: ""; display: inline-block; width: .45rem; height: .45rem;
  border-radius: 50%; background: var(--brand); margin-left: .45rem; vertical-align: .12rem; }
.clip { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48'/%3E%3C/svg%3E");
        color: var(--brand-ink); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .85rem 1.25rem;
         border-top: 1px solid var(--line); background: #fafafb; font-size: .9rem; }
.pager a { font-weight: 600; padding: .45rem .8rem .35rem; border: 1.5px solid var(--line-strong); border-radius: var(--radius);
           color: var(--ink); background: #fff; }
.pager a:hover { border-color: var(--ink); text-decoration: none; }
.pager .spacer { min-width: 6rem; }
.empty { padding: 2.5rem 1.25rem; text-align: center; }

/* ---- Email page -------------------------------------------------------------------------- */
.back { margin: 0 0 .9rem; font-size: .9rem; font-weight: 600; }
.back a { color: var(--ink-soft); }
.email-card { padding: 1.4rem 1.5rem 1.1rem; }
.email-head h1 { font-family: var(--font); font-weight: 700; font-size: 1.5rem; letter-spacing: -.01em;
                 line-height: 1.25; margin: 0 0 .8rem; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.4rem; margin: 0; font-size: .9rem; }
.meta b { color: var(--muted); font-weight: 600; margin-right: .3rem; font-size: .76rem; letter-spacing: .07em;
          text-transform: uppercase; }
.more { margin-top: .6rem; font-size: .85rem; }
.more summary { cursor: pointer; color: var(--brand-ink); font-weight: 600; width: max-content; }
.summary { display: grid; grid-template-columns: 8rem 1fr; gap: .35rem 1rem; margin: .7rem 0 0; padding: .9rem 1rem;
           background: #fafafb; border: 1px solid var(--line); border-radius: var(--radius); }
.summary dt { color: var(--muted); font-weight: 600; }
.summary dd { margin: 0; word-break: break-word; }
.toolbar { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; margin: 1.1rem 0 0;
           padding-top: 1.1rem; border-top: 1px solid var(--line); }
.toolbar form { margin: 0 0 0 auto; }
.toolbar .primary { padding: .72rem 1.5rem .6rem; font-size: 1.2rem; }

/* ---- Modals (<dialog>): the backdrop blocks the page ------------------------------------- */
.modal { border: 0; border-radius: 14px; padding: 1.4rem 1.6rem 1.3rem; color: var(--ink);
         width: min(36rem, calc(100vw - 2rem)); box-shadow: var(--shadow-lg);
         background: #fff var(--gradient) top / 100% 5px no-repeat; }
.modal.wide { width: min(76rem, calc(100vw - 2rem)); }
.modal::backdrop { background: rgba(17, 17, 17, .55); backdrop-filter: blur(3px); }
.modal h2 { margin: .1rem 0 .9rem; font-size: 1.7rem; }
.modal form { margin: 0; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.body { font-family: var(--reading); font-size: .9rem; line-height: 1.55; background: #fbfbfc;
        border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem;
        max-height: 75vh; overflow: auto; margin: 0; }

/* Bid progress */
.bid-now { display: flex; align-items: center; gap: .7rem; font-weight: 600; min-height: 1.6rem; }
.spinner { width: 1.2rem; height: 1.2rem; border-radius: 50%; flex: none;
           border: 3px solid var(--brand-tint-2); border-top-color: var(--brand-strong); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.modal.finished .spinner, .modal.failed .spinner { display: none; }
.modal progress { -webkit-appearance: none; appearance: none; width: 100%; height: .6rem; margin: 1rem 0 .3rem;
                  border: 0; border-radius: 999px; background: #efeff2; overflow: hidden; accent-color: var(--brand-strong); }
.modal progress::-webkit-progress-bar { background: #efeff2; border-radius: 999px; }
.modal progress::-webkit-progress-value { background: var(--gradient); border-radius: 999px; transition: width .3s; }
.modal progress::-moz-progress-bar { background: var(--gradient); border-radius: 999px; }
.steps { list-style: none; margin: .9rem 0; padding: 0; font-size: .92rem; color: var(--muted);
         display: grid; gap: .1rem; }
.steps li { display: flex; align-items: center; gap: .6rem; padding: .3rem .5rem .22rem; border-radius: 6px; }
.steps li::before { content: ""; flex: none; width: .65rem; height: .65rem; border-radius: 50%;
                    border: 2px solid var(--line-strong); margin-top: -.1rem; }
.steps li.done { color: var(--ink); }
.steps li.done::before { border-color: var(--success); background: var(--success); }
.steps li.current { color: var(--brand-ink); font-weight: 700; background: var(--brand-tint); }
.steps li.current::before { border-color: var(--brand-strong); background: #fff; box-shadow: 0 0 0 3px var(--brand-tint-2); }
.steps li.failed { color: var(--danger); font-weight: 700; background: var(--danger-tint); }
.steps li.failed::before { border-color: var(--danger); background: var(--danger); }
.bid-message { font-size: .92rem; margin: .6rem 0; font-weight: 600; }
.modal.finished .bid-message { color: var(--success); }
.modal.failed .bid-message { color: var(--danger); }

/* Client email bodies, rebuilt from text blocks */
.mail-text { white-space: pre-wrap; word-wrap: break-word; margin: 0 0 .7rem; }
.mail-table-wrap { overflow-x: auto; }
.mail-table { border-collapse: collapse; margin: .2rem 0 .9rem; font-size: .86rem; background: #fff; }
.mail-table td { border: 1px solid var(--line-strong); padding: .35rem .55rem; vertical-align: top; white-space: pre-line; }

/* ---- Reply drafts ------------------------------------------------------------------------ */
.drafts-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.panels { display: grid; gap: 1rem; margin-top: .25rem; }
.panel { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.1rem 1.25rem; background: #fff;
         min-width: 0; box-shadow: var(--shadow); }
.panel h3 { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin: 0 0 .8rem;
            font-family: var(--display); font-weight: 400; font-size: 1.35rem; letter-spacing: .05em; }
.tag { font-family: var(--font); font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
       color: var(--ink-soft); background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
       padding: .22rem .6rem .12rem; margin-left: .2rem; line-height: 1.2; }
.panel:first-child .tag { background: var(--cyan-tint); border-color: #b4f1ee; color: var(--cyan-ink); }
.panel + .panel .tag { background: var(--yellow-tint); border-color: #f1e78a; color: var(--yellow-ink); }
.badge { font-size: .84rem; background: var(--cyan-tint); border: 1px solid #b4f1ee; border-left: 4px solid var(--cyan);
         border-radius: var(--radius); padding: .5rem .75rem .4rem; margin: 0 0 .8rem; color: var(--ink-soft); }
.hold { font-size: .9rem; color: var(--danger); background: var(--danger-tint); border: 1px solid #f6c9c9;
        border-radius: var(--radius); padding: .6rem .85rem .5rem; margin: .9rem 0 0; }
.pricing { margin-top: 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.pricing > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: .55rem;
                     padding: .85rem 1.1rem .75rem; font-weight: 700; color: var(--ink); }
.pricing > summary::-webkit-details-marker { display: none; }
.pricing > summary::before { content: ""; width: .95rem; height: .95rem; background: var(--brand-ink); transition: transform .15s;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / contain no-repeat; }
.pricing[open] > summary::before { transform: rotate(90deg); }
.pricing > summary:hover { color: var(--brand-ink); }
.pricing > .draft { padding: 0 1.1rem 1rem; }
.draft { font-family: var(--reading); font-size: .9rem; line-height: 1.5; overflow-x: auto; }
.draft ol, .draft ul { padding-left: 1.3rem; }
.d-table { border-collapse: collapse; font-size: .84rem; margin: .5rem 0; }
.d-th, .d-td, .d-td-right { border: 1px solid var(--line-strong); padding: .38rem .6rem; text-align: left; }
.d-th { background: #f3f3f5; color: var(--ink); font-weight: 700; }   /* neutral: drafts are copied into Outlook */
.d-td-right { text-align: right; font-variant-numeric: tabular-nums; }
.d-small { font-size: .8rem; color: var(--muted); }
.d-alert { color: var(--danger); }
.d-title { font-size: 1.05rem; margin: 0 0 .5rem; }
.d-cell-title { font-size: .95rem; margin: 1.1rem 0 .3rem; }
.d-tight { margin: 0; }
.d-compact { margin: .3rem 0; }
.d-label { margin: .5rem 0 .2rem; }
.built { margin-top: 1.1rem; }
.drafts > p.muted:not(.built) { background: #fff; border: 1.5px dashed var(--line-strong); border-radius: var(--radius-lg);
                                padding: 1.6rem 1rem; text-align: center; margin: 0; }

/* ---- Tracking: the whole thread, newest first -------------------------------------------- */
.count { display: inline-grid; place-items: center; min-width: 1.35rem; height: 1.35rem; padding: .1rem .35rem 0;
         border-radius: 999px; background: var(--bg); color: var(--ink-soft); font-family: var(--font);
         font-size: .74rem; font-weight: 700; letter-spacing: 0; }
button:hover .count { background: rgba(255, 255, 255, .2); color: inherit; }
button.secondary:hover .count { background: var(--brand-tint); color: var(--brand-ink); }
.thread { display: grid; gap: .8rem; max-height: 78vh; overflow: auto; padding-right: .3rem; }
.msg { border: 1px solid var(--line); border-left: 4px solid var(--ink); border-radius: 10px; padding: .8rem 1rem; background: #fff; }
.msg.client { border-left-color: var(--brand); }
.msg.current { box-shadow: 0 0 0 3px var(--brand-tint-2); }
.msg-head { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .8rem; font-size: .88rem; margin-bottom: .5rem; }
.msg-head .tag { margin-left: 0; }
.tag.bid { color: #fff; background: var(--brand-strong); border-color: var(--brand-strong); }
.msg-subject { margin: 0 0 .35rem; }
.msg .body { max-height: none; overflow: visible; }
.quoted { margin-top: .5rem; font-size: .85rem; }
.quoted summary { cursor: pointer; color: var(--brand-ink); font-weight: 600; }
.quoted .body { margin-top: .4rem; background: #f6f6f7; }

/* ---- Things a person must check before sending a quote ----------------------------------- */
.review { font-size: .88rem; background: var(--yellow-tint); border: 1px solid #efe38a; border-left: 4px solid #e0cf1e;
          border-radius: var(--radius); padding: .6rem .95rem .5rem; margin-top: .9rem; }
.review p { margin: .15rem 0; }
.review ul { margin: .25rem 0 .3rem; padding-left: 1.2rem; }
/* Special bids (R24): left to the bid team, not priced */
.human { position: relative; font-size: .92rem; background: var(--danger-tint); border: 1px solid #f6c9c9;
         border-left: 4px solid var(--danger); border-radius: var(--radius); padding: .75rem 1rem .6rem 2.9rem; margin: 0 0 1rem; }
.human::before { content: ""; position: absolute; left: .95rem; top: .8rem; width: 1.25rem; height: 1.25rem; background: var(--danger);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E") center / contain no-repeat; }
.human p { margin: .15rem 0; }
.human ul { margin: .25rem 0 .3rem; padding-left: 1.2rem; }
.human-modal { background: #fff linear-gradient(var(--danger), var(--danger)) top / 100% 5px no-repeat; }
.human-modal h2 { color: var(--danger); }
.human-modal ul { padding-left: 1.2rem; font-weight: 600; }
.human-modal form { display: flex; justify-content: flex-end; margin-top: 1rem; }

/* ---- Compare: the team's reply, our bid and the pricing reference ------------------------ */
.compare { display: grid; gap: 1.1rem; max-height: 78vh; overflow: auto; padding-right: .3rem; }
.compare-part h3 { margin: .2rem 0 .6rem; font-family: var(--display); font-weight: 400; font-size: 1.3rem; letter-spacing: .05em; }
.compare-part + .compare-part { border-top: 1px solid var(--line); padding-top: 1rem; }

/* ---- Small screens ----------------------------------------------------------------------- */
@media (max-width: 760px) {
  main { padding: 1.1rem .9rem 2rem; }
  .topbar-in { padding: .5rem .9rem; gap: .8rem; }
  .who, .wordmark { display: none; }
  .emails th:nth-child(1), .emails td:nth-child(1) { display: none; }
  .sender-name, .sender .small { max-width: 9rem; }
  .toolbar form { margin-left: 0; }
  .summary { grid-template-columns: 1fr; }
}
