:root {
  --ink: #241a45;
  --ink2: #5f5780;
  --line: #e9e4f5;
  --bg1: #f6f4ff;
  --bg2: #fff6f0;
  --card: #ffffff;
  --primary: #6c3df4;
  --primary2: #c13df0;
  --accent: #ff7a45;
  --accent2: #ffb020;
  --grad: linear-gradient(120deg, #6c3df4, #c13df0);
  --grad-warm: linear-gradient(120deg, #ff7a45, #ffb020);
  --shadow: 0 10px 30px rgba(76, 42, 180, .10);
  --shadow-lg: 0 18px 45px rgba(76, 42, 180, .16);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: linear-gradient(155deg, var(--bg1) 0%, #fbf7ff 45%, var(--bg2) 100%) fixed;
  color: var(--ink);
  font: 16px/1.55 "Sora", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 24px 18px 72px; }
h1 { font-size: 34px; font-weight: 800; line-height: 1.15; margin: 0 0 14px; letter-spacing: -0.02em; }
h1 .pop { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
h2 { font-size: 19px; font-weight: 700; margin: 0 0 8px; }
.lede { color: var(--ink2); font-size: 17px; margin: 0; }

/* Landing */
.hero { padding: 18px 0 6px; text-align: center; }
.hero .badge {
  display: inline-block; padding: 5px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  color: var(--primary); background: #efe9ff; border: 1px solid #e2d6ff; margin-bottom: 16px; letter-spacing: .02em;
}
.hero .lede { max-width: 560px; margin: 0 auto; }
.cards { display: grid; gap: 16px; grid-template-columns: 1fr; margin: 22px 0; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
.bigcard {
  position: relative; display: block; background: var(--card); border-radius: 20px; box-shadow: var(--shadow);
  padding: 24px 22px 22px; text-decoration: none; color: inherit; overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.bigcard::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--grad); }
.bigcard.warm::before { background: var(--grad-warm); }
.bigcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.bigcard .icon {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px;
  background: #efe9ff; color: var(--primary);
}
.bigcard.warm .icon { background: #ffeee2; color: var(--accent); }
.bigcard p { color: var(--ink2); margin: 0 0 16px; font-size: 15px; }
.cta { font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bigcard.warm .cta { background: var(--grad-warm); -webkit-background-clip: text; background-clip: text; }
.cta .arr { -webkit-text-fill-color: currentColor; }
.how, .privacy { background: var(--card); border-radius: 20px; box-shadow: var(--shadow); padding: 24px 22px; margin-bottom: 16px; }
.how ol, .privacy ul { margin: 6px 0 0; padding: 0; list-style: none; }
.how li, .privacy li { position: relative; padding-left: 42px; margin-bottom: 14px; color: var(--ink2); }
.how li:last-child, .privacy li:last-child { margin-bottom: 0; }
.how li .step {
  position: absolute; left: 0; top: 1px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--grad); color: #fff; font-size: 13.5px; font-weight: 700; display: grid; place-items: center;
}
.privacy li::before {
  content: ""; position: absolute; left: 6px; top: 7px; width: 12px; height: 7px;
  border-left: 3px solid var(--accent); border-bottom: 3px solid var(--accent); transform: rotate(-45deg);
}
.privacy li { padding-left: 34px; }
.foot { color: var(--ink2); font-size: 13px; text-align: center; margin-top: 34px; }

/* Chat page */
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--grad); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 17px; flex: none;
  box-shadow: 0 4px 12px rgba(108, 61, 244, .35);
}
.topbar .who { font-weight: 700; font-size: 15px; line-height: 1.25; }
.topbar .sub { color: var(--ink2); font-size: 12.5px; }
.readiness { margin-left: auto; text-align: right; font-size: 13px; font-weight: 700; color: var(--primary); white-space: nowrap; }
.readiness .enc { display: block; font-weight: 500; font-size: 12px; color: var(--ink2); }
.track { height: 8px; background: #e7e1f6; border-radius: 999px; overflow: hidden; margin-bottom: 10px; }
.fill { height: 100%; background: var(--grad-warm); border-radius: 999px; transition: width .45s cubic-bezier(.22,.9,.35,1); }
.dots { display: flex; gap: 7px; justify-content: center; margin: 0 0 18px; }
.dots .dot {
  width: 11px; height: 11px; border-radius: 50%; background: #e2dbf3; border: 2px solid #d5ccef;
  transition: background .3s, border-color .3s, transform .3s;
}
.dots .dot.on { background: var(--accent2); border-color: var(--accent2); transform: scale(1.15); }
.chat { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.bubble { max-width: 86%; padding: 12px 16px; border-radius: 18px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15.5px; }
.bubble.ai { align-self: flex-start; background: var(--card); box-shadow: var(--shadow); border-bottom-left-radius: 6px; }
.bubble.me { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 6px; box-shadow: 0 6px 16px rgba(108, 61, 244, .30); }
.typing { display: inline-flex; gap: 5px; align-items: center; padding: 14px 18px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); opacity: .35; animation: bounce 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .35; } 30% { transform: translateY(-5px); opacity: .9; } }
.composer { display: flex; gap: 10px; position: sticky; bottom: 0; padding: 12px 2px; background: var(--bg1); border-top: 1px solid var(--line); }
.composer textarea {
  flex: 1; resize: none; min-height: 50px; max-height: 140px; padding: 13px 16px;
  border: 2px solid #e2d9f6; border-radius: 16px; font: inherit; background: var(--card); color: inherit;
  box-shadow: var(--shadow); outline: none; transition: border-color .15s;
}
.composer textarea:focus { border-color: var(--primary); }
button, .btn {
  font: inherit; font-weight: 700; border-radius: 999px; border: 0;
  background: var(--card); color: var(--ink); padding: 12px 20px; cursor: pointer; text-decoration: none;
  display: inline-block; text-align: center; box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
button:hover, .btn:hover { transform: translateY(-1px); }
button.primary, .btn.primary { background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(108, 61, 244, .35); }
button.primary:hover, .btn.primary:hover { filter: brightness(1.07); }
button.ghost { background: transparent; box-shadow: none; border: 2px solid #e2d9f6; color: var(--ink2); }
button:disabled { opacity: .5; cursor: default; transform: none; }
.note { color: var(--ink2); font-size: 13px; margin-top: 8px; }
.error { color: #c02c52; font-size: 14px; margin-top: 10px; font-weight: 600; }
.done-banner {
  background: var(--card); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 26px 22px; text-align: center;
  border: 2px solid transparent;
  background-image: linear-gradient(var(--card), var(--card)), var(--grad-warm);
  background-origin: border-box; background-clip: padding-box, border-box;
  margin-bottom: 16px;
}
.done-banner h2 { font-size: 22px; }
.done-banner .conf { font-size: 34px; display: block; margin-bottom: 6px; }
.done-banner p { color: var(--ink2); margin: 0 0 18px; }
.done-banner .btn.primary { font-size: 17px; padding: 14px 28px; }

/* Matches */
.mhead { text-align: center; padding: 20px 0 6px; }
.mhead .lede { max-width: 540px; margin: 0 auto; }
.match { background: var(--card); border-radius: 20px; box-shadow: var(--shadow); padding: 0 0 20px; margin-bottom: 18px; overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.match:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.match .strip { height: 6px; background: var(--grad); }
.match:nth-child(2n) .strip { background: var(--grad-warm); }
.match .inner { padding: 18px 22px 0; }
.match .tag { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #efe9ff; color: var(--primary); margin-bottom: 10px; letter-spacing: .02em; }
.match:nth-child(2n) .tag { background: #ffeee2; color: #e05f2a; }
.match h2 { margin-bottom: 6px; }
.match .sum { color: var(--ink2); margin: 0 0 12px; }
.match ul { margin: 0 0 16px; padding: 0; list-style: none; }
.match li { position: relative; padding-left: 26px; margin-bottom: 7px; color: var(--ink2); font-size: 14.5px; }
.match li::before {
  content: ""; position: absolute; left: 4px; top: 6px; width: 10px; height: 6px;
  border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg);
}
.match .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.match .state { margin-top: 12px; font-size: 14px; color: var(--primary); font-weight: 700; }
.match .dim { opacity: .5; }
.match.dimcard { opacity: .55; }

/* Dashboard */
.dhead { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 12px; }
.dhead h1 { font-size: 30px; }
.lockcard { background: var(--card); border-radius: 20px; box-shadow: var(--shadow); padding: 24px 22px; margin-top: 18px; }
.lockcard .keyrow { display: flex; gap: 10px; margin-top: 14px; }
.lockcard input {
  flex: 1; padding: 13px 16px; border: 2px solid #e2d9f6; border-radius: 14px; font: inherit; outline: none;
}
.lockcard input:focus { border-color: var(--primary); }
table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; font-size: 14px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: #faf8ff; }
th { color: var(--ink2); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; background: #f7f4ff; }
.section-title { margin: 30px 0 12px; display: flex; align-items: center; gap: 10px; }
.pill { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #efe9ff; color: var(--primary); }
select { font: inherit; padding: 7px 10px; border: 2px solid #e2d9f6; border-radius: 10px; background: var(--card); color: var(--ink); }
details { font-size: 13px; color: var(--ink2); }
details summary { cursor: pointer; color: var(--primary); font-weight: 600; }

/* Status select + narrow screens */
td select { min-width: 8.5em; }
#requests, #profiles { overflow-x: auto; }
@media (max-width: 520px) {
  h1 { font-size: 27px; }
  .hero { padding: 14px 0 6px; }
  .wrap { padding: 16px 14px 60px; }
  .bigcard, .how, .privacy { padding: 20px 18px; }
  .done-banner { padding: 22px 18px; }
}
@media (max-width: 520px) {
  th, td { padding: 9px 10px; font-size: 13px; }
}

/* Dashboard stacked cards (<=640px, applied by JS) */
.rcard { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px; overflow-wrap: anywhere; }
.rcard .rhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.rcard .rtime { color: var(--ink2); font-size: 12.5px; }
.rcard .rside { font-size: 14px; line-height: 1.5; }
.rcard .rside .pill { margin-right: 2px; }
.rcard .rarrow { color: var(--ink2); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; margin: 10px 0 6px; font-weight: 700; }
.rcard .rsum { color: var(--ink2); font-size: 14px; margin: 8px 0; }
.rcard select { min-width: 8.5em; }
@media (max-width: 360px) {
  .rcard { padding: 13px 12px; }
}

.site-nav { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:4px 0 22px; font-size:12px; }
.site-nav a { color:var(--ink); font-weight:700; text-decoration:none; }
.site-nav span { color:var(--ink2); }
.returning { display:flex; flex-wrap:wrap; gap:10px; justify-content:center; padding:14px 0 0; }
[hidden] { display:none !important; }
.composer textarea { min-width:0; }
button:focus-visible,a:focus-visible,summary:focus-visible,select:focus-visible { outline:3px solid var(--accent); outline-offset:4px; }
.match { overflow-wrap:anywhere; }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; } }

.lockcard input { min-width:0; width:100%; }
@media(max-width:360px) { .lockcard .keyrow { flex-direction:column; } }

#account-form label { display:block; margin-bottom:16px; }
#account-form input { display:block; width:100%; box-sizing:border-box; }
.lockcard .actions { display:flex; gap:10px; flex-wrap:wrap; margin:16px 0 12px; }
#verification-actions { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:18px; }
#signout { margin-top:18px; }

/* Site-wide dark theme. Toggle stores choice in localStorage 'acct-theme'. */
html[data-theme="dark"]{
  --ink:#f1edff;
  --ink2:#b3a8d6;
  --line:#3d3159;
  --bg1:#17122b;
  --bg2:#28182f;
  --card:#241d3d;
  --shadow:0 10px 30px rgba(0,0,0,.35);
  --shadow-lg:0 18px 45px rgba(0,0,0,.45);
}
html[data-theme="dark"] body{background:linear-gradient(155deg,#17122b 0%,#1e1738 50%,#28182f 100%) fixed;color:var(--ink)}
html[data-theme="dark"] a{color:#b79cff}
html[data-theme="dark"] .note,html[data-theme="dark"] .lede,html[data-theme="dark"] .how li,html[data-theme="dark"] .privacy li{color:#b3a8d6}
html[data-theme="dark"] textarea,html[data-theme="dark"] input,html[data-theme="dark"] select{background:#1e1736;border-color:#3d3159;color:#f1edff}
html[data-theme="dark"] button.ghost{border-color:#4a3f6e;color:#c9b8ff}
html[data-theme="dark"] .hero .badge{background:#2a2144;border-color:#3d3159;color:#c9b8ff}
html[data-theme="dark"] .track{background:#2a2144}
html[data-theme="dark"] .dots .dot{background:#2a2144;border-color:#3d3159}
html[data-theme="dark"] #choices button.chip{background:#2a2144;border-color:#3d3159;color:#f1edff}
html[data-theme="dark"] #choices button.chip[aria-pressed="true"]{background:var(--grad,#6c3df4);color:#fff;border-color:transparent}
html[data-theme="dark"] .error{color:#ff7a9c}
html[data-theme="dark"] th,html[data-theme="dark"] td{border-color:#3d3159}
html[data-theme="dark"] tr:hover td{background:#2a2144}
html[data-theme="dark"] .site-nav a{color:#f1edff}
html[data-theme="dark"] .site-nav span{color:#b3a8d6}
html[data-theme="dark"] .readiness{color:#c9b8ff}
#site-theme-btn{position:fixed;top:14px;right:14px;z-index:60;font:inherit;font-size:12.5px;font-weight:700;cursor:pointer;border-radius:999px;padding:10px 16px;border:1.5px solid #e2d6ff;background:#ffffff;color:#6c3df4;box-shadow:0 18px 45px rgba(76,42,180,.16)}
html[data-theme="dark"] #site-theme-btn{background:#2a2144;border-color:#3d3159;color:#c9b8ff;box-shadow:0 18px 45px rgba(0,0,0,.45)}

/* aesthetic pass 2026-11-20 */

/* === Complete dark theme === */
html[data-theme="dark"]{--ink:#f1edff;--ink2:#b3a8d6;--line:#3d3159;--card:#241d3d;--shadow:0 10px 30px rgba(0,0,0,.45);--shadow-lg:0 18px 45px rgba(0,0,0,.55);color-scheme:dark}
html[data-theme="dark"] .bigcard .icon{background:#2a2144;color:#c9b8ff}
html[data-theme="dark"] .bigcard.warm .icon{background:#3a2b1c;color:#ffb020}
html[data-theme="dark"] .match .tag,html[data-theme="dark"] .pill{background:#2a2144;color:#c9b8ff}
html[data-theme="dark"] .match:nth-child(2n) .tag{background:#3a2b1c;color:#ffb020}
html[data-theme="dark"] th{background:#2a2144}
html[data-theme="dark"] .resume-sheet{background:#241d3d;border-color:#3d3159}
html[data-theme="dark"] .resume-sheet textarea{background:#1e1736;border-color:#4a3f6e;color:#f1edff}
html[data-theme="dark"] .rv{background:#241d3d;border-color:#3d3159}
html[data-theme="dark"] .rv-title{color:#b79cff;border-color:#3d3159}
html[data-theme="dark"] .rv-item{color:#ddd6f5}
html[data-theme="dark"] .rv-item.rv-todo{color:#f0a8c0}
html[data-theme="dark"] .rv-empty{color:#8f86b3}
html[data-theme="dark"] .todo-box{background:#3a1f2e;border-color:#5b2f42;color:#f3c6d5}
html[data-theme="dark"] .diff{background:#241d3d;border-color:#3d3159}
html[data-theme="dark"] .diff .plus{color:#4ade80}
html[data-theme="dark"] .diff .minus{color:#f87171}
html[data-theme="dark"] .diff .skip{color:#a99fcb}
html[data-theme="dark"] .more summary,html[data-theme="dark"] .editor summary{color:#b79cff}
html[data-theme="dark"] .ask textarea{background:#1e1736;border-color:#4a3f6e;color:#f1edff}
html[data-theme="dark"] .acct-help-summary{color:#c9b8ff}
html[data-theme="dark"] .match h2,html[data-theme="dark"] .match .state{color:#f1edff}
