/* Draftstack · Rhea AI (v8.2) */
:root { --rh-ink: #141B2D; --rh-navy: var(--navy, #1C2541); --rh-mut: #5A6075; --rh-line: #E6E8EE; --rh-soft: #F5F6F9; --rh-gold: var(--gold, #E2B867); }
.rh-mark { display: block; flex: none; }
.rh-av { width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--rh-navy); border: 1px solid var(--rh-line); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.rh-av svg { width: 16px; height: 16px; }
.rh-av.lg { width: 46px; height: 46px; border-radius: 14px; } .rh-av.lg svg { width: 24px; height: 24px; }

/* ---------- page ---------- */
.rh-page { background: #FBFAF7; }
.rh-hero { padding: 56px 0 40px; background: radial-gradient(1200px 400px at 50% -120px, rgba(28,37,65,.07), transparent 70%); }
.rh-hero-in { text-align: center; }
.rh-logo { display: inline-flex; align-items: center; justify-content: center; color: var(--rh-navy); } .rh-logo svg { width: 72px; height: 72px; }
.rh-hero h1 { font-family: var(--serif, Lora, Georgia, serif); font-weight: 600; font-size: clamp(34px, 5vw, 52px); letter-spacing: -.02em; margin: 18px 0 8px; color: var(--rh-ink); }
.rh-sub { color: var(--rh-mut); font-size: 17px; max-width: 560px; margin: 0 auto 26px; }
.rh-meta { color: var(--rh-mut); font-size: 13.5px; margin: 14px 0 0; } .rh-meta a { color: var(--rh-ink); font-weight: 600; }
.rh-app-page { text-align: left; }
.rh-app-page .rh-thread { display: none; max-height: 56vh; overflow-y: auto; padding: 4px 2px 12px; }
.rh-app-page.has-msgs .rh-thread { display: flex; }
.rh-app-page.has-msgs .rh-sugg { display: none; }
.rh-caps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding-top: 12px; padding-bottom: 28px; }
.rh-cap { background: #fff; border: 1px solid var(--rh-line); border-radius: 18px; padding: 20px; }
.rh-cap-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--rh-soft); color: var(--rh-navy); display: inline-flex; align-items: center; justify-content: center; }
.rh-cap h2 { font-size: 16.5px; margin: 14px 0 6px; color: var(--rh-ink); font-family: inherit; font-weight: 650; }
.rh-cap p { margin: 0; color: var(--rh-mut); font-size: 14.5px; line-height: 1.55; }
.rh-trust { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding-bottom: 64px; }
.rh-trust div { border-top: 2px solid var(--rh-ink); padding-top: 12px; }
.rh-trust b { display: block; font-size: 15px; color: var(--rh-ink); margin-bottom: 4px; } .rh-trust span { color: var(--rh-mut); font-size: 14px; line-height: 1.55; } .rh-trust a { color: inherit; }

/* ---------- thread + composer (page and panel) ---------- */
.rh-thread { display: flex; flex-direction: column; gap: 14px; }
.rh-m { display: flex; gap: 10px; align-items: flex-start; max-width: 100%; }
.rh-u { justify-content: flex-end; }
.rh-bub { padding: 11px 14px; border-radius: 16px; font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.rh-u .rh-bub { background: var(--rh-ink); color: #fff; border-bottom-right-radius: 6px; max-width: 82%; }
.rh-r .rh-bub { background: #fff; border: 1px solid var(--rh-line); color: var(--rh-ink); border-top-left-radius: 6px; }
.rh-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; max-width: calc(100% - 40px); }
.rh-bub a { color: var(--rh-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.rh-bub .rh-li { display: block; padding-left: 14px; position: relative; margin: 2px 0; } .rh-bub .rh-li::before { content: ''; position: absolute; left: 2px; top: .7em; width: 5px; height: 5px; border-radius: 50%; background: var(--rh-gold); }
.rh-ord { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; } .rh-ord li { display: flex; flex-direction: column; } .rh-ord span { color: var(--rh-mut); font-size: 13px; }
.rh-err { color: #B42318; } .rh-ok { color: #067647; font-weight: 600; font-size: 14px; }
.rh-typing .rh-bub { display: inline-flex; gap: 5px; padding: 14px 16px; }
.rh-typing i { width: 7px; height: 7px; border-radius: 50%; background: #A2A8B8; animation: rhDot 1.2s infinite ease-in-out; }
.rh-typing i:nth-child(2) { animation-delay: .15s; } .rh-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes rhDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .rh-typing i { animation: none; } }
.rh-composer { display: flex; align-items: flex-end; gap: 8px; background: #fff; border: 1.5px solid #D9DCE5; border-radius: 22px; padding: 8px 8px 8px 16px; box-shadow: 0 8px 28px rgba(20,27,45,.08); transition: border-color .15s, box-shadow .15s; }
.rh-composer:focus-within { border-color: var(--rh-ink); box-shadow: 0 8px 28px rgba(20,27,45,.12), 0 0 0 3px rgba(28,37,65,.08); }
.rh-composer textarea { flex: 1; min-width: 0; border: 0; outline: 0; resize: none; font: inherit; font-size: 16px; line-height: 1.5; padding: 8px 0; max-height: 160px; background: transparent; color: var(--rh-ink); }
.rh-send { width: 42px; height: 42px; border-radius: 14px; border: 0; background: var(--rh-ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.rh-send:disabled { opacity: .4; cursor: default; }
.rh-sugg { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; justify-content: center; }
.rh-sugg button { border: 1px solid var(--rh-line); background: #fff; color: var(--rh-ink); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 13.5px; cursor: pointer; }
.rh-sugg button:hover { border-color: var(--rh-ink); }
.rh-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 999px; background: var(--rh-ink); color: #fff; font: inherit; font-weight: 600; font-size: 13.5px; padding: 8px 14px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.rh-btn-o { background: #fff; color: var(--rh-ink); border: 1.5px solid #D9DCE5; }
.rh-login { align-self: flex-start; }

/* product cards in chat */
.rh-cards { display: grid; gap: 8px; }
.rh-card { display: flex; gap: 12px; background: #fff; border: 1px solid var(--rh-line); border-radius: 16px; padding: 10px; min-width: 0; }
.rh-card-img { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--rh-soft); flex: none; }
.rh-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rh-card-b { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.rh-card-t { color: var(--rh-ink); font-weight: 650; font-size: 14.5px; text-decoration: none; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rh-card-p { display: flex; gap: 6px; align-items: baseline; font-size: 14px; } .rh-card-p s { color: #9AA0B2; font-size: 12.5px; } .rh-card-p em { color: #067647; font-style: normal; font-weight: 700; font-size: 12.5px; }
.rh-card-a { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; } .rh-card-a .rh-btn { padding: 7px 12px; font-size: 13px; }
.rh-consent { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; background: var(--rh-soft); border-radius: 14px; padding: 8px 10px; font-size: 13.5px; }
.rh-consent span { font-weight: 600; } .rh-consent input { flex: 1; min-width: 140px; border: 1px solid #D9DCE5; border-radius: 10px; padding: 7px 10px; font: inherit; font-size: 14px; }

/* ---------- floating button + panel ---------- */
.rh-fab { position: fixed; right: 20px; bottom: 20px; z-index: 70; display: inline-flex; align-items: center; gap: 9px; border: 0; border-radius: 999px; background: var(--rh-ink); color: #fff; padding: 10px 18px 10px 10px; font: inherit; font-weight: 650; font-size: 14.5px; cursor: pointer; box-shadow: 0 12px 32px rgba(20,27,45,.28); }
.rh-fab-ic { width: 32px; height: 32px; border-radius: 50%; background: #fff; color: var(--rh-navy); display: inline-flex; align-items: center; justify-content: center; }
.rh-open .rh-fab { display: none; }
.rh-panel { position: fixed; right: 20px; top: 84px; z-index: 80; width: 400px; height: min(640px, calc(100vh - 104px)); background: #FBFAF7; border-radius: 22px; box-shadow: 0 24px 64px rgba(20,27,45,.28); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--rh-line); }
.rh-panel[hidden] { display: none; }
.rh-ph { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; background: #fff; border-bottom: 1px solid var(--rh-line); }
.rh-pt { flex: 1; min-width: 0; } .rh-pt b { display: block; font-size: 15px; color: var(--rh-ink); } .rh-pt small { color: var(--rh-mut); font-size: 12.5px; }
.rh-x, .rh-open-full { width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: var(--rh-mut); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.rh-x:hover, .rh-open-full:hover { background: var(--rh-soft); color: var(--rh-ink); }
.rh-app-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 14px; gap: 10px; }
.rh-app-panel .rh-thread { flex: 1; min-height: 0; overflow-y: auto; padding-right: 2px; }
.rh-app-panel .rh-sugg { justify-content: flex-start; margin: 0; }
.rh-app-panel.has-msgs .rh-sugg, .rh-app-panel.has-msgs .rh-hello { display: none; }
.rh-hello { text-align: center; margin: auto 0; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px 10px; }
.rh-hello b { font-size: 18px; color: var(--rh-ink); margin-top: 6px; } .rh-hello span { color: var(--rh-mut); font-size: 14px; }
.rh-app-panel .rh-composer { box-shadow: none; border-radius: 18px; }
@media (max-width: 720px) {
  .rh-fab { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); padding: 8px; } .rh-fab-t { display: none; } .rh-fab-ic { width: 40px; height: 40px; }
  .rh-panel { inset: 0; width: auto; height: 100%; border-radius: 0; border: 0; }
  .rh-open body { overflow: hidden; }
  .rh-caps { grid-template-columns: minmax(0, 1fr); } .rh-trust { grid-template-columns: minmax(0, 1fr); }
  .rh-hero { padding: 36px 0 28px; }
}
@media (min-width: 721px) and (max-width: 1000px) { .rh-caps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- free tools: Write with Rhea ---------- */
.rh-wbtn { display: inline-flex; width: auto; justify-self: start; align-self: flex-start; max-width: 100%; align-items: center; gap: 6px; margin: 6px 0 2px; border: 1px solid #D9DCE5; background: #fff; color: var(--rh-ink); border-radius: 999px; padding: 5px 12px 5px 8px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.rh-wbtn svg { width: 15px; height: 15px; color: var(--rh-navy); } .rh-wbtn:hover { border-color: var(--rh-ink); }
.rh-pop { margin: 6px 0 10px; background: #fff; border: 1.5px solid var(--rh-ink); border-radius: 16px; padding: 12px; display: grid; gap: 10px; box-shadow: 0 10px 28px rgba(20,27,45,.12); }
.rh-pop-h { display: flex; align-items: center; gap: 7px; font-size: 14px; } .rh-pop-h svg { width: 16px; height: 16px; color: var(--rh-navy); } .rh-pop-h span { color: var(--rh-mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rh-tones { display: flex; flex-wrap: wrap; gap: 6px; } .rh-tones button { border: 1px solid #D9DCE5; background: #fff; border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 13px; cursor: pointer; color: var(--rh-ink); } .rh-tones button.on { background: var(--rh-ink); color: #fff; border-color: var(--rh-ink); }
.rh-pop .rh-ask { border: 1px solid #D9DCE5; border-radius: 10px; padding: 9px 11px; font: inherit; font-size: 14.5px; width: 100%; box-sizing: border-box; }
.rh-pop-a { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .rh-left { color: var(--rh-mut); font-size: 12.5px; }
.rh-out .rh-txt { margin: 0 0 8px; background: var(--rh-soft); border-radius: 12px; padding: 10px 12px; font-size: 14.5px; line-height: 1.55; white-space: normal; }

/* ---------- guides ---------- */
.rh-guide { margin: 36px 0 8px; background: #fff; border: 1px solid var(--rh-line); border-radius: 20px; padding: 20px; }
.rh-guide-h { display: flex; gap: 12px; align-items: flex-start; } .rh-guide-h h2 { font-size: 18px; margin: 2px 0 4px; font-family: inherit; } .rh-guide-h p { margin: 0; color: var(--rh-mut); font-size: 14.5px; }
.rh-guide-f { display: flex; gap: 8px; margin-top: 14px; } .rh-guide-f input { flex: 1; min-width: 0; border: 1.5px solid #D9DCE5; border-radius: 12px; padding: 11px 13px; font: inherit; font-size: 15px; }
.rh-guide-a { margin-top: 14px; } .rh-ans { display: flex; gap: 10px; font-size: 15px; line-height: 1.6; } .rh-ans small { display: block; margin-top: 8px; color: var(--rh-mut); font-size: 12.5px; }
@media (max-width: 520px) { .rh-guide-f { flex-direction: column; } }

/* v8.2b: Rhea button in the header (where the account icon was) */
.rh-head { color: inherit; }
.rh-head svg { width: 23px; height: 23px; }
.rh-head[aria-expanded="true"] { color: var(--rh-ink); }
/* v8.2b: grey mark on white, like the owner's reference */
:root { --rh-icon: var(--navy, #1C2541); }
.rh-logo, .rh-av, .rh-wbtn svg, .rh-pop-h svg { color: var(--rh-icon); }
.rh-av { background: #fff; }
/* v8.2b: header button opens Rhea as a drawer sliding in from the right */
.rh-panel { top: 0; right: 0; bottom: 0; height: 100%; height: 100dvh; width: min(440px, 100%); border-radius: 22px 0 0 22px; border: 0; box-shadow: -18px 0 60px rgba(20,27,45,.22); animation: rhSlide .28s cubic-bezier(.2,.8,.2,1); }
@keyframes rhSlide { from { transform: translateX(100%); } to { transform: none; } }
.rh-scrim { position: fixed; inset: 0; z-index: 79; background: rgba(20,27,45,.38); animation: rhFade .2s ease; }
.rh-scrim[hidden] { display: none; }
@keyframes rhFade { from { opacity: 0; } to { opacity: 1; } }
.rh-ph { padding-top: calc(12px + env(safe-area-inset-top)); }
.rh-app-panel { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
.rh-open body { overflow: hidden; }
@media (max-width: 720px) { .rh-panel { width: 100%; border-radius: 0; } }
@media (prefers-reduced-motion: reduce) { .rh-panel, .rh-scrim { animation: none; } }
/* v8.2e: AI search bar everywhere Rhea takes a question (page, drawer, guides, free tools):
   white pill, Draftstack navy → gold outline with a soft glow, Rhea mark on the left, + for a new chat, round send button. */
.rh-composer, .rh-pill {
  display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 14px; min-height: 56px; box-sizing: border-box;
  border: 2px solid transparent; border-radius: 999px;
  background: linear-gradient(#fff, #fff) padding-box, linear-gradient(90deg, var(--rh-navy) 0%, #4A5A8C 45%, var(--rh-gold) 100%) border-box;
  box-shadow: 0 10px 34px rgba(28,37,65,.12), 0 6px 22px rgba(226,184,103,.18);
}
.rh-composer:focus-within, .rh-pill:focus-within { border-color: transparent; box-shadow: 0 10px 34px rgba(28,37,65,.16), 0 8px 28px rgba(226,184,103,.32), 0 0 0 4px rgba(226,184,103,.14); }
.rh-composer.multi { border-radius: 26px; align-items: flex-end; }
.rh-cmark { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex: none; color: var(--rh-icon, #1C2541); }
.rh-cmark svg { width: 22px; height: 22px; }
.rh-composer textarea, .rh-pill input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; color: var(--rh-ink); padding: 10px 4px; }
.rh-pill input::placeholder, .rh-composer textarea::placeholder { color: #8B90A3; }
.rh-new { width: 40px; height: 40px; border: 0; background: transparent; color: var(--rh-ink); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.rh-new:hover { background: var(--rh-soft); }
.rh-send, .rh-pill .rh-send { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--rh-navy); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; box-shadow: 0 6px 16px rgba(28,37,65,.28); }
.rh-send:hover { background: #2A3560; }
.rh-app-panel .rh-composer { box-shadow: 0 6px 20px rgba(28,37,65,.10), 0 4px 16px rgba(226,184,103,.16); }
.rh-guide-f.rh-pill { margin-top: 14px; }
.rh-pop .rh-ask { border: 2px solid transparent; border-radius: 999px; padding: 10px 16px; background: linear-gradient(#fff, #fff) padding-box, linear-gradient(90deg, var(--rh-navy), #4A5A8C 45%, var(--rh-gold)) border-box; }
@media (max-width: 520px) {
  .rh-composer, .rh-pill { min-height: 52px; padding: 5px 5px 5px 10px; gap: 2px; }
  .rh-cmark { width: 30px; } .rh-new { width: 36px; height: 36px; } .rh-send, .rh-pill .rh-send { width: 42px; height: 42px; }
  .rh-guide-f.rh-pill { flex-direction: row; }
}
/* v8.2f owner icon: same line weight as search and bag in the header, a bit bolder when small */
.rh-head svg path:not([stroke="none"]) { stroke-width: 1.75; }
.rh-cmark svg path:not([stroke="none"]), .rh-av svg path:not([stroke="none"]), .rh-wbtn svg path:not([stroke="none"]), .rh-pop-h svg path:not([stroke="none"]) { stroke-width: 1.6; }
/* v8.2h: the chat box hint stays on one line on small phones */
.rh-composer textarea::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rh-head svg { width: 22px; height: 22px; }   /* v8.2h filled icon: same visual weight as search and bag */
/* v8.2i: Rhea opens as a popup under the header icon (computer) and as a floating sheet with gaps on every side (phone) */
.rh-panel { top: var(--rh-top, 84px); right: 20px; bottom: auto; left: auto; width: 400px; height: min(640px, calc(100vh - var(--rh-top, 84px) - 20px)); height: min(640px, calc(100dvh - var(--rh-top, 84px) - 20px)); border-radius: 22px; border: 1px solid var(--rh-line); box-shadow: 0 24px 64px rgba(20,27,45,.28); transform-origin: top right; animation: rhPop .22s cubic-bezier(.2,.8,.2,1); }
.rh-scrim { background: rgba(20,27,45,.22); }
@keyframes rhPop { from { opacity: 0; transform: translateY(-8px) scale(.96); } to { opacity: 1; transform: none; } }
@media (max-width: 720px) {
  .rh-panel { left: 8px; right: 8px; top: auto; bottom: calc(8px + env(safe-area-inset-bottom)); width: auto; height: min(620px, 80vh); height: min(620px, 80dvh); border-radius: 22px; border: 1px solid var(--rh-line); transform-origin: bottom center; animation: rhUp .26s cubic-bezier(.2,.8,.2,1); }
  .rh-app-panel { padding-bottom: 14px; }
}
@keyframes rhUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
/* v8.2j: Rhea is a round button right above the WhatsApp button; it opens a popup just above itself (computer) or a sheet (phone) */
.rh-fab { right: 22px; bottom: 24px; z-index: 46; width: 52px; height: 52px; padding: 0; gap: 0; justify-content: center; border-radius: 50%; background: var(--navy, #1C2541); color: #fff; box-shadow: 0 10px 22px rgba(20,27,45,.30); transition: transform .2s ease, bottom .2s ease; }
.rh-fab svg { width: 25px; height: 25px; }
.rh-fab:hover { transform: translateY(-2px); }
.rh-fab:focus-visible { outline: 3px solid var(--gold, #E2B867); outline-offset: 3px; }
.rh-open .rh-fab { display: inline-flex; }
.rh-panel { top: auto; bottom: var(--rh-bottom, 96px); height: min(620px, calc(100vh - var(--rh-bottom, 96px) - 20px)); height: min(620px, calc(100dvh - var(--rh-bottom, 96px) - 20px)); transform-origin: bottom right; }
@media (max-width: 720px) {
  .rh-fab { right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); width: 48px; height: 48px; padding: 0; }
  .rh-fab svg { width: 23px; height: 23px; }
  .rh-open .rh-fab { display: none; }
  .rh-panel { top: auto; bottom: calc(8px + env(safe-area-inset-bottom)); height: min(620px, 80vh); height: min(620px, 80dvh); transform-origin: bottom center; }
}
/* v8.2k: white round button with the navy Rhea icon (matches the clean header icons) */
.rh-fab { background: #fff; color: var(--navy, #1C2541); border: 1px solid rgba(28,37,65,.10); box-shadow: 0 10px 26px rgba(20,27,45,.20), 0 2px 6px rgba(20,27,45,.08); }
.rh-fab:hover { box-shadow: 0 14px 30px rgba(20,27,45,.24), 0 2px 6px rgba(20,27,45,.08); }
