:root {
  color-scheme: light;
  --ink: #17213b;
  --muted: #66748f;
  --subtle: #8a96aa;
  --line: #dce4ef;
  --line-strong: #cbd6e5;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --surface-tint: #eef4ff;
  --canvas: #f4f7fb;
  --primary: #3664f4;
  --primary-strong: #2548c7;
  --primary-soft: #e9efff;
  --success: #0c9669;
  --success-soft: #e6f7f1;
  --warning: #b36b00;
  --warning-soft: #fff3dd;
  --danger: #c43d4d;
  --danger-soft: #fdecef;
  --violet: #7658df;
  --shadow-sm: 0 8px 24px rgba(25, 41, 72, .07);
  --shadow-lg: 0 24px 70px rgba(25, 41, 72, .16);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --sidebar-width: 248px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body[data-theme="dark"] {
  color-scheme: dark;
  --ink: #eef3ff;
  --muted: #a7b1c6;
  --subtle: #7f8aa2;
  --line: #27334a;
  --line-strong: #36435c;
  --surface: #141c2d;
  --surface-soft: #101827;
  --surface-tint: #192746;
  --canvas: #0d1421;
  --primary: #6e8cff;
  --primary-strong: #91a5ff;
  --primary-soft: #202f55;
  --success: #43c99a;
  --success-soft: #123c31;
  --warning: #f1b85e;
  --warning-soft: #3d2e16;
  --danger: #ff7f8d;
  --danger-soft: #412029;
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, .22);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, .42);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--canvas); color: var(--ink); }
button, input, textarea, select { font: inherit; }
button { color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.mobile-only { display: none !important; }
.muted { color: var(--muted); }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 38%, transparent); outline-offset: 2px; }

.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; display: block; object-fit: contain; flex: 0 0 auto; background: transparent; box-shadow: 0 10px 22px rgba(54, 100, 244, .25); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1.06rem; letter-spacing: -.02em; }
.brand small { color: var(--muted); font-size: .76rem; margin-top: 2px; }
.brand-large .brand-mark { width: 48px; height: 48px; border-radius: 15px; }
.brand-large strong { font-size: 1.25rem; }

.eyebrow { margin: 0 0 8px; color: var(--primary); font-size: .72rem; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }

.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 1.05fr) minmax(440px, .95fr); background: var(--surface-soft); }
.auth-loading-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--surface-soft);
}
.auth-loading-card {
  width: min(100%, 460px);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.auth-loading-indicator {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 3px solid var(--line);
  border-top-color: var(--primary);
  border-radius: 999px;
  animation: auth-loading-spin .8s linear infinite;
}
@keyframes auth-loading-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .auth-loading-indicator { animation: none; border-top-color: var(--line); }
}
.auth-loading-card strong,
.auth-loading-card small { display: block; }
.auth-loading-card strong { color: var(--ink); }
.auth-loading-card small { margin-top: 4px; color: var(--muted); line-height: 1.45; }
.auth-story { min-height: 100vh; padding: 42px clamp(34px, 5vw, 78px); display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; background: linear-gradient(150deg, #eff4ff 0%, #f6f8fd 58%, #eef6f7 100%); border-right: 1px solid var(--line); }
body[data-theme="dark"] .auth-story { background: linear-gradient(150deg, #17233f 0%, #101827 60%, #13232b 100%); }
.auth-story::before, .auth-story::after { content: ""; position: absolute; border-radius: 999px; pointer-events: none; filter: blur(1px); }
.auth-story::before { width: 420px; height: 420px; right: -170px; top: 80px; background: radial-gradient(circle, rgba(54, 100, 244, .18), rgba(54, 100, 244, 0)); }
.auth-story::after { width: 320px; height: 320px; left: -130px; bottom: 40px; background: radial-gradient(circle, rgba(12, 150, 105, .12), rgba(12, 150, 105, 0)); }
.auth-story-copy { position: relative; z-index: 1; max-width: 680px; margin: 70px 0; }
.auth-story-copy h1 { margin: 0 0 24px; max-width: 730px; font-size: clamp(3rem, 5vw, 5.6rem); line-height: .98; letter-spacing: -.058em; }
.auth-story-copy > p:last-child { max-width: 650px; margin: 0; color: var(--muted); font-size: 1.08rem; line-height: 1.75; }
.auth-proof-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.auth-proof-grid article { min-height: 112px; display: flex; gap: 12px; align-items: flex-start; padding: 18px; border: 1px solid rgba(203, 214, 229, .92); border-radius: var(--radius-md); background: rgba(255, 255, 255, .66); backdrop-filter: blur(12px); }
body[data-theme="dark"] .auth-proof-grid article { background: rgba(20, 28, 45, .72); }
.proof-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; flex: 0 0 auto; background: var(--primary-soft); color: var(--primary); font-weight: 850; }
.auth-proof-grid strong, .auth-proof-grid small { display: block; }
.auth-proof-grid small { margin-top: 5px; color: var(--muted); line-height: 1.4; }
.auth-stage { min-height: 100vh; display: grid; place-items: center; padding: 44px; background: var(--surface); }
.auth-card { width: min(100%, 500px); }
.auth-card-heading h2 { margin: 0 0 10px; font-size: 2rem; letter-spacing: -.035em; }
.auth-card-heading > p:last-child { margin: 0 0 26px; color: var(--muted); line-height: 1.55; }
.provider-stack { display: grid; gap: 10px; }
.provider-button { min-height: 50px; display: flex; align-items: center; justify-content: center; gap: 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); font-weight: 750; transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.provider-button:hover:not(:disabled) { border-color: var(--primary); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.provider-button:disabled { opacity: .52; cursor: not-allowed; transform: none; box-shadow: none; }
.provider-button-dark { background: #111827; color: #fff; border-color: #111827; }
.provider-logo { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; font-weight: 900; }
.google-logo { color: #315efb; background: #fff; border: 1px solid #dfe4ec; }
.apple-logo { color: #fff; font-size: .9rem; }
.provider-status { min-height: 1.2em; margin: 9px 0 0; color: var(--muted); font-size: .76rem; line-height: 1.45; text-align: center; }
.provider-status.error { color: var(--danger); }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 23px 0; color: var(--subtle); font-size: .78rem; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.auth-tabs { display: grid; grid-template-columns: repeat(2, 1fr); padding: 4px; margin-bottom: 22px; border-radius: 12px; background: var(--surface-soft); }
.auth-tab { min-height: 42px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 750; }
.auth-tab.active { background: var(--surface); color: var(--ink); box-shadow: 0 4px 12px rgba(25, 41, 72, .08); }
.form-stack { display: grid; gap: 15px; }
label { display: grid; gap: 7px; color: var(--ink); font-size: .88rem; font-weight: 720; }
input, textarea, select { width: 100%; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--surface); color: var(--ink); transition: border-color .16s ease, box-shadow .16s ease; }
input, select { min-height: 46px; padding: 0 13px; }
textarea { padding: 12px 13px; resize: vertical; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: var(--subtle); }
input:focus, textarea:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 12%, transparent); outline: none; }
.password-control { display: flex; align-items: center; position: relative; }
.password-control input { padding-right: 66px; }
.password-toggle { position: absolute; right: 8px; border: 0; background: transparent; color: var(--primary); font-size: .76rem; font-weight: 800; }
.field-help { margin-top: -8px; color: var(--muted); font-size: .76rem; }
.auth-legal { margin: 20px 0 0; color: var(--subtle); font-size: .72rem; line-height: 1.55; text-align: center; }
.auth-legal p { margin: 0; }
.auth-legal-links { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 10px; }
.auth-legal a { color: var(--muted); font-weight: 750; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--muted) 40%, transparent); text-underline-offset: 3px; }
.auth-legal a:hover { color: var(--primary); text-decoration-color: currentColor; }
.auth-owner-link { display: inline-block; margin-top: 8px; }

.legal-page { min-height: 100vh; background: var(--surface-soft); color: var(--ink); }
.legal-topbar { position: sticky; z-index: 10; top: 0; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px); }
.legal-topbar-inner { width: min(100% - 40px, 1040px); min-height: 74px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.legal-nav { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .82rem; font-weight: 760; }
.legal-nav a { padding: 8px 10px; border-radius: 9px; }
.legal-nav a:hover, .legal-nav a[aria-current="page"] { color: var(--primary); background: var(--primary-soft); }
.legal-main { width: min(100% - 40px, 920px); margin: 0 auto; padding: 64px 0 80px; }
.legal-hero { margin-bottom: 30px; }
.legal-hero h1 { max-width: 820px; margin: 0; font-size: clamp(2.55rem, 6vw, 4.5rem); line-height: 1; letter-spacing: -.055em; }
.legal-hero > p:last-child { max-width: 780px; margin: 18px 0 0; color: var(--muted); font-size: 1.02rem; line-height: 1.7; }
.legal-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 22px 0 0; color: var(--subtle); font-size: .78rem; font-weight: 700; }
.legal-document { display: grid; gap: 18px; }
.legal-section { padding: 26px 28px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.legal-section h2 { margin: 0 0 12px; font-size: 1.3rem; letter-spacing: -.025em; }
.legal-section h3 { margin: 20px 0 8px; font-size: 1rem; }
.legal-section p, .legal-section li { color: var(--muted); line-height: 1.72; }
.legal-section p { margin: 9px 0; }
.legal-section ul { margin: 10px 0; padding-left: 22px; }
.legal-section strong { color: var(--ink); }
.legal-section a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.legal-callout { border-color: color-mix(in srgb, var(--primary) 30%, var(--line)); background: color-mix(in srgb, var(--primary) 4%, var(--surface)); }
.legal-footer { width: min(100% - 40px, 920px); margin: 0 auto; padding: 0 0 44px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; color: var(--subtle); font-size: .78rem; }
.legal-footer-links { display: flex; flex-wrap: wrap; gap: 14px; }
.legal-footer a { color: var(--muted); font-weight: 700; }
.legal-footer a:hover { color: var(--primary); }

@media (max-width: 680px) {
  .legal-topbar-inner { width: min(100% - 28px, 1040px); min-height: 68px; }
  .legal-topbar .brand small { display: none; }
  .legal-nav { gap: 2px; font-size: .76rem; }
  .legal-nav a { padding: 7px 8px; }
  .legal-main, .legal-footer { width: min(100% - 28px, 920px); }
  .legal-main { padding-top: 44px; }
  .legal-section { padding: 22px 20px; }
}
.form-message { min-height: 1.2em; margin: 10px 0 0; color: var(--danger); font-size: .84rem; line-height: 1.5; }
.form-message.success { color: var(--success); }

.button { min-height: 42px; padding: 0 17px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 11px; border: 1px solid transparent; font-weight: 760; transition: transform .16s ease, opacity .16s ease, box-shadow .16s ease, background .16s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { opacity: .58; cursor: wait; }
.button-primary { background: var(--primary); color: #fff; box-shadow: 0 9px 22px rgba(54, 100, 244, .2); }
.button-primary:hover:not(:disabled) { background: var(--primary-strong); }
.button-secondary { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.button-secondary:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.button-quiet { background: var(--surface-soft); color: var(--ink); }
.button-danger { background: var(--danger-soft); color: var(--danger); }
.button-full { width: 100%; min-height: 50px; }
.text-button { border: 0; background: transparent; color: var(--primary); font-weight: 760; }
.icon-button { width: 40px; height: 40px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); font-size: 1.05rem; }
.icon-button:hover { border-color: var(--primary); color: var(--primary); }

.workspace { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) 1fr; background: var(--canvas); }
.sidebar { position: fixed; z-index: 40; inset: 0 auto 0 0; width: var(--sidebar-width); display: flex; flex-direction: column; padding: 24px 16px 18px; background: var(--surface); border-right: 1px solid var(--line); }
.sidebar-header { padding: 0 8px 24px; display: flex; align-items: center; justify-content: space-between; }
.primary-nav { display: flex; flex: 1; flex-direction: column; gap: 4px; overflow-y: auto; }
.nav-label { margin: 20px 12px 7px; color: var(--subtle); font-size: .66rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.nav-item { width: 100%; min-height: 44px; padding: 0 11px; display: flex; align-items: center; gap: 11px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-weight: 690; text-align: left; }
.nav-item:hover { background: var(--surface-soft); color: var(--ink); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); }
.nav-icon { width: 22px; display: inline-grid; place-items: center; flex: 0 0 auto; font-size: 1.05rem; }
.nav-count { min-width: 25px; height: 22px; padding: 0 7px; display: grid; place-items: center; margin-left: auto; border-radius: 999px; background: var(--surface-soft); color: var(--muted); font-size: .72rem; }
.nav-item.active .nav-count { background: var(--surface); color: var(--primary); }
.sidebar-footer { display: grid; gap: 4px; padding-top: 14px; border-top: 1px solid var(--line); }
.nav-item-danger:hover { color: var(--danger); background: var(--danger-soft); }
.theme-switch { width: 31px; height: 18px; margin-left: auto; border-radius: 999px; background: var(--line-strong); position: relative; }
.theme-switch::after { content: ""; width: 13px; height: 13px; position: absolute; left: 3px; top: 2.5px; border-radius: 50%; background: #fff; transition: transform .2s ease; }
body[data-theme="dark"] .theme-switch { background: var(--primary); }
body[data-theme="dark"] .theme-switch::after { transform: translateX(12px); }
.workspace-main { min-width: 0; grid-column: 2; }
.workspace-topbar { height: 74px; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 92%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.global-search { width: min(520px, 46vw); display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); color: var(--muted); }
.global-search input { min-height: 42px; padding: 0; border: 0; background: transparent; box-shadow: none; }
.global-search input:focus { box-shadow: none; }
kbd { padding: 3px 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--subtle); font-size: .7rem; font-family: inherit; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.notification-dot { width: 7px; height: 7px; position: absolute; transform: translate(10px, -10px); border: 2px solid var(--surface); border-radius: 50%; background: var(--primary); }
.profile-menu-shell { position: relative; }
.profile-chip { min-height: 46px; display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); text-align: left; }
.profile-chip:hover, .profile-chip[aria-expanded="true"] { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; overflow: hidden; border-radius: 11px; background: linear-gradient(145deg, #242f4b, #4e5f87); color: #fff; font-weight: 850; }
.profile-chip-avatar-image { width: 100%; height: 100%; display: block; object-fit: cover; }
.profile-chip-copy strong, .profile-chip-copy small { display: block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-chip-copy strong { font-size: .82rem; }
.profile-chip-copy small { margin-top: 2px; color: var(--muted); font-size: .68rem; }
.profile-chip-caret { transition: transform .18s ease; }
.profile-chip[aria-expanded="true"] .profile-chip-caret { transform: rotate(180deg); }
.account-menu { position: absolute; z-index: 120; top: calc(100% + 10px); right: 0; width: min(320px, calc(100vw - 28px)); padding: 8px; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-lg); }
.account-menu-item { width: 100%; min-height: 58px; display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 11px; background: transparent; color: var(--ink); text-align: left; }
.account-menu-item:hover:not(:disabled), .account-menu-item:focus-visible { background: var(--surface-soft); }
.account-menu-item:disabled { cursor: not-allowed; opacity: .52; }
.account-menu-item strong, .account-menu-item small { display: block; }
.account-menu-item strong { font-size: .82rem; }
.account-menu-item small { margin-top: 3px; color: var(--muted); font-size: .69rem; line-height: 1.35; }
.account-menu-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--surface-soft); color: var(--primary); font-weight: 850; }
.account-menu-divider { height: 1px; margin: 6px 4px; background: var(--line); }
.account-menu-item-danger:hover:not(:disabled), .account-menu-item-danger:focus-visible { background: var(--danger-soft); color: var(--danger); }
.account-menu-item-danger .account-menu-icon { color: var(--danger); }
.content-shell { width: min(100%, 1500px); margin: 0 auto; padding: 34px 34px 70px; }
.panel-view { animation: panel-in .22s ease; }
@keyframes panel-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.page-heading h1 { margin: 0 0 8px; font-size: clamp(1.9rem, 3vw, 2.75rem); letter-spacing: -.045em; }
.page-heading > div > p:last-child { margin: 0; color: var(--muted); }
.heading-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.card-heading h2 { margin: 0; font-size: 1.15rem; letter-spacing: -.025em; }
.card-heading p { margin: 5px 0 0; color: var(--muted); font-size: .84rem; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric-card { min-height: 142px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.metric-card-header { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: .8rem; font-weight: 720; }
.metric-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--primary-soft); color: var(--primary); }
.metric-card strong { display: block; margin-top: 17px; font-size: 2.05rem; letter-spacing: -.05em; }
.metric-card small { display: block; margin-top: 5px; color: var(--muted); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .72fr); gap: 18px; }
.suggested-card, .application-summary-card { padding: 22px; }
.job-list-compact { display: grid; gap: 3px; margin-top: 14px; }
.compact-job-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 15px 5px; border-bottom: 1px solid var(--line); }
.compact-job-row:last-child { border-bottom: 0; }
.job-identity { min-width: 0; display: flex; align-items: center; gap: 13px; }
.company-logo { width: 44px; height: 44px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 13px; background: linear-gradient(145deg, var(--primary-soft), var(--surface-soft)); color: var(--primary); border: 1px solid var(--line); font-weight: 850; text-transform: uppercase; }
.job-identity strong, .job-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-identity strong { font-size: .9rem; }
.job-identity small { margin-top: 4px; color: var(--muted); font-size: .76rem; }
.job-row-actions { display: flex; align-items: center; gap: 10px; }
.match-badge { min-width: 58px; padding: 6px 9px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--success-soft); color: var(--success); font-size: .72rem; font-weight: 850; }
.match-badge.medium { background: var(--warning-soft); color: var(--warning); }
.match-badge.low { background: var(--surface-soft); color: var(--muted); }
.application-progress { margin-top: 24px; }
.progress-total { display: flex; align-items: baseline; gap: 8px; }
.progress-total strong { font-size: 2.3rem; letter-spacing: -.05em; }
.progress-total span { color: var(--muted); font-size: .8rem; }
.progress-bar { height: 10px; display: flex; margin: 17px 0 18px; overflow: hidden; border-radius: 999px; background: var(--surface-soft); }
.progress-bar span { min-width: 0; }
.progress-bar .submitted { background: var(--primary); }
.progress-bar .interviewing { background: var(--violet); }
.progress-bar .offer { background: var(--success); }
.progress-bar .closed { background: var(--line-strong); }
.progress-legend { display: grid; gap: 10px; }
.legend-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .78rem; }
.legend-label { display: flex; align-items: center; gap: 8px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.follow-up-summary { margin-top: 23px; padding-top: 18px; border-top: 1px solid var(--line); }
.follow-up-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; color: var(--muted); font-size: .8rem; }
.follow-up-row strong { color: var(--ink); }

.filter-bar { display: grid; grid-template-columns: minmax(260px, 1fr) 190px 170px; gap: 10px; margin-bottom: 18px; }
.filter-search { display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--surface); color: var(--muted); }
.filter-search input { min-height: 44px; padding: 0; border: 0; box-shadow: none; }
.results-heading { margin-bottom: 12px; color: var(--muted); font-size: .8rem; }
.job-results { display: grid; gap: 12px; }
.job-card { padding: 20px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.job-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); box-shadow: 0 15px 32px rgba(25, 41, 72, .1); }
.job-card-main { min-width: 0; display: flex; gap: 16px; }
.job-card-copy { min-width: 0; }
.job-card-copy h3 { margin: 0 0 6px; font-size: 1rem; }
.job-card-copy > p { margin: 0; color: var(--muted); font-size: .82rem; }
.job-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.pill { padding: 5px 8px; display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; background: var(--surface-soft); color: var(--muted); border: 1px solid var(--line); font-size: .68rem; font-weight: 720; }
.pill-primary { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.pill-success { background: var(--success-soft); color: var(--success); border-color: transparent; }
.pill-warning { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.job-card-side { min-width: 160px; display: grid; justify-items: end; gap: 12px; }
.job-card-side small { color: var(--muted); }
.job-card-actions { display: flex; gap: 8px; }
.save-icon-button { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 1.1rem; }
.save-icon-button.saved { color: var(--primary); background: var(--primary-soft); border-color: transparent; }

.status-tabs { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; padding-bottom: 4px; }
.status-tab { min-height: 38px; padding: 0 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); white-space: nowrap; }
.status-tab.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 780; }
.application-list { display: grid; gap: 12px; }
.application-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.application-card-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: start; }
.application-card h3 { margin: 0 0 5px; font-size: 1rem; }
.application-card p { margin: 0; color: var(--muted); font-size: .8rem; }
.application-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.application-status-select { min-height: 38px; width: auto; min-width: 145px; padding: 0 34px 0 11px; }
.application-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.activity-list { display: grid; gap: 9px; }
.activity-row { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: .78rem; }
.activity-dot { width: 8px; height: 8px; margin-top: 5px; flex: 0 0 auto; border-radius: 50%; background: var(--primary); }

.resume-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 18px; }
.resume-source-card, .resume-checklist-card { padding: 22px; min-height: 440px; }
.resume-keywords { display: grid; gap: 12px; margin-top: 20px; }
.keyword-group h3 { margin: 0 0 9px; font-size: .85rem; }
.keyword-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.keyword { padding: 6px 9px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: .72rem; font-weight: 740; }
.keyword.missing { background: var(--warning-soft); color: var(--warning); }
.resume-guidance { padding: 14px; border-radius: 12px; background: var(--surface-soft); color: var(--muted); font-size: .82rem; line-height: 1.55; }

.profile-form { padding: 24px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.section-heading h2 { margin: 0 0 5px; font-size: 1.1rem; }
.section-heading p { margin: 0; color: var(--muted); font-size: .82rem; }
.role-heading { margin-top: 30px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.span-2 { grid-column: span 2; }
.checkbox-field { min-height: 46px; grid-template-columns: auto 1fr; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 11px; }
.checkbox-field input { width: 18px; min-height: 18px; margin: 0; accent-color: var(--primary); }
.checkbox-field strong, .checkbox-field small { display: block; }
.checkbox-field small { margin-top: 2px; color: var(--muted); font-weight: 500; }
.role-option-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.role-option { min-height: 68px; display: flex; align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); cursor: pointer; transition: border-color .16s ease, background .16s ease; }
.role-option:hover { border-color: var(--primary); }
.role-option.selected { border-color: var(--primary); background: var(--primary-soft); }
.role-option input { width: 18px; min-height: 18px; flex: 0 0 auto; accent-color: var(--primary); }
.role-option strong, .role-option small { display: block; }
.role-option strong { font-size: .8rem; }
.role-option small { margin-top: 3px; color: var(--muted); font-size: .68rem; line-height: 1.35; }
.form-actions { display: flex; align-items: center; gap: 14px; margin-top: 24px; }

.help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.help-grid article { padding: 22px; }
.help-grid h2 { margin: 16px 0 8px; font-size: 1rem; }
.help-grid p { margin: 0; color: var(--muted); line-height: 1.6; }
.help-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--primary-soft); color: var(--primary); font-weight: 850; }

.empty-state { padding: 46px 24px; display: grid; justify-items: center; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius-md); background: var(--surface-soft); }
.empty-state.compact { margin-top: 20px; padding: 34px 20px; }
.empty-state h3 { margin: 10px 0 6px; color: var(--ink); }
.empty-state p { max-width: 480px; margin: 0; line-height: 1.55; }
.empty-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--primary-soft); color: var(--primary); font-size: 1.35rem; }
.loading-list { display: grid; gap: 12px; }
.skeleton { height: 92px; border-radius: 14px; background: linear-gradient(90deg, var(--surface-soft), color-mix(in srgb, var(--surface-soft) 45%, var(--surface)), var(--surface-soft)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.modal, .job-detail-dialog { padding: 0; border: 0; background: transparent; color: var(--ink); }
.modal::backdrop, .job-detail-dialog::backdrop { background: rgba(10, 18, 34, .56); backdrop-filter: blur(3px); }
.modal { width: min(92vw, 620px); }
.modal-wide { width: min(94vw, 900px); }
.modal-card { max-height: min(90vh, 900px); overflow-y: auto; padding: 26px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-lg); }
.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.modal-heading h2 { margin: 0 0 6px; font-size: 1.45rem; letter-spacing: -.035em; }
.modal-heading p:last-child { margin: 0; color: var(--muted); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.draft-preview-result { display: grid; gap: 16px; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.draft-preview-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.draft-preview-heading h3 { margin: 0; }
.draft-preview-metadata { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.draft-preview-metadata div { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.draft-preview-metadata dt, .draft-preview-message > span { color: var(--muted); font-size: .72rem; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.draft-preview-metadata dd { margin: 5px 0 0; overflow-wrap: anywhere; font-size: .82rem; }
.draft-preview-message { display: grid; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.draft-preview-message strong { overflow-wrap: anywhere; }
.draft-preview-message pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); font: inherit; line-height: 1.65; }
.onboarding-progress { display: flex; gap: 7px; margin-bottom: 26px; }
.onboarding-progress span { height: 5px; flex: 1; border-radius: 999px; background: var(--line); }
.onboarding-progress span.active { background: var(--primary); }
.onboarding-step > h2 { margin: 0 0 9px; font-size: 1.75rem; letter-spacing: -.04em; }
.onboarding-step > p:not(.eyebrow):not(.form-message) { margin: 0; color: var(--muted); line-height: 1.55; }
.onboarding-select-field { display: grid; gap: 7px; min-width: 0; color: var(--ink); font-size: .88rem; font-weight: 720; }
.field-label { display: block; }
.themed-select { position: relative; min-width: 0; }
.themed-select-trigger { width: 100%; min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 11px; appearance: none; -webkit-appearance: none; background: var(--surface); color: var(--ink); text-align: left; user-select: none; -webkit-user-select: none; transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
.themed-select-trigger:hover { border-color: color-mix(in srgb, var(--primary) 58%, var(--line-strong)); }
.themed-select-trigger:focus-visible, .themed-select.open .themed-select-trigger { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 12%, transparent); outline: none; }
.themed-select[data-has-value="false"] .themed-select-value { color: var(--subtle); font-weight: 650; }
.themed-select-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.themed-select-chevron { width: 9px; height: 9px; flex: 0 0 auto; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-2px) rotate(45deg); transition: transform .16s ease, border-color .16s ease; }
.themed-select.open .themed-select-chevron { border-color: var(--primary); transform: translateY(2px) rotate(225deg); }
.themed-select-menu { position: absolute; z-index: 1000; display: grid; align-content: start; gap: 4px; min-width: 220px; max-width: calc(100% - 24px); margin: 0; padding: 7px; overflow-x: hidden; overflow-y: auto; border: 1px solid var(--line-strong); border-radius: 13px; background: var(--surface); color: var(--ink); box-shadow: 0 22px 54px rgba(10, 18, 34, .28); isolation: isolate; overscroll-behavior: contain; user-select: none; -webkit-user-select: none; }
body[data-theme="dark"] .themed-select-menu { box-shadow: 0 24px 60px rgba(0, 0, 0, .55); }
.themed-select-option { position: relative; width: 100%; min-height: 42px; display: flex; align-items: center; padding: 10px 38px 10px 12px; border: 0; border-radius: 9px; appearance: none; -webkit-appearance: none; background: transparent; color: var(--ink); text-align: left; line-height: 1.35; }
.themed-select-option:hover, .themed-select-option:focus-visible { background: var(--surface-soft); outline: none; }
.themed-select-option[aria-selected="true"] { background: var(--primary-soft); color: var(--primary); font-weight: 780; }
.themed-select-option[aria-selected="true"]::after { content: "✓"; position: absolute; top: 50%; right: 13px; transform: translateY(-50%); color: var(--primary); font-weight: 900; }
.themed-select-menu::-webkit-scrollbar { width: 10px; }
.themed-select-menu::-webkit-scrollbar-thumb { border: 3px solid var(--surface); border-radius: 999px; background: var(--line-strong); }
.role-option-grid-large { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.job-detail-dialog { width: min(96vw, 1080px); max-width: none; }
.job-detail-shell { max-height: 92vh; overflow-y: auto; position: relative; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-lg); }
.job-detail-close { width: 40px; height: 40px; position: absolute; right: 18px; top: 18px; z-index: 2; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--ink); font-size: 1.2rem; }
.job-detail-hero { padding: 30px 72px 24px 30px; border-bottom: 1px solid var(--line); background: linear-gradient(155deg, var(--surface-tint), var(--surface)); }
.job-detail-title-row { display: flex; gap: 16px; align-items: flex-start; }
.job-detail-title-row .company-logo { width: 54px; height: 54px; border-radius: 15px; }
.job-detail-title-row h2 { margin: 0 0 6px; font-size: clamp(1.55rem, 3vw, 2.2rem); letter-spacing: -.045em; }
.job-detail-title-row p { margin: 0; color: var(--muted); }
.job-detail-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.job-detail-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.job-detail-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; padding: 28px 30px 34px; }
.job-detail-section + .job-detail-section { margin-top: 28px; }
.job-detail-section h3 { margin: 0 0 12px; font-size: 1rem; }
.job-detail-section p { margin: 0; color: var(--muted); line-height: 1.7; white-space: pre-line; }
.job-detail-aside { display: grid; align-content: start; gap: 12px; }
.detail-fact-card { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.detail-fact-card span, .detail-fact-card strong { display: block; }
.detail-fact-card span { color: var(--muted); font-size: .72rem; }
.detail-fact-card strong { margin-top: 5px; font-size: .84rem; }
.relevance-explanation { padding: 16px; border-radius: 14px; background: var(--primary-soft); color: var(--muted); font-size: .78rem; line-height: 1.55; }
.relevance-explanation strong { display: block; margin-bottom: 5px; color: var(--primary); }

.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 10px; pointer-events: none; }
.toast { min-width: 270px; max-width: 390px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); animation: toast-in .22s ease; }
.toast.error { border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1120px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-story { min-height: auto; padding-bottom: 34px; }
  .auth-story-copy { margin: 54px 0; }
  .auth-story-copy h1 { font-size: clamp(2.7rem, 7vw, 4.8rem); }
  .auth-stage { min-height: auto; padding: 52px 24px 70px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .application-summary-card { min-height: 310px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .role-option-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .mobile-only { display: grid !important; }
  .workspace { display: block; }
  .workspace-main { grid-column: auto; }
  .sidebar { transform: translateX(-105%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-scrim { position: fixed; z-index: 35; inset: 0; display: block; background: rgba(10, 18, 34, .48); }
  .workspace-topbar { padding: 0 16px; }
  .global-search { width: 100%; }
  .profile-chip-copy, .profile-chip > span:last-child, kbd { display: none; }
  .content-shell { padding: 26px 18px 60px; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .filter-search { grid-column: 1 / -1; }
  .resume-grid { grid-template-columns: 1fr; }
  .job-detail-body { grid-template-columns: 1fr; }
  .job-detail-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .auth-story { padding: 28px 20px; }
  .auth-story-copy { margin: 44px 0; }
  .auth-story-copy h1 { font-size: 2.75rem; }
  .auth-proof-grid { grid-template-columns: 1fr; }
  .auth-proof-grid article { min-height: auto; }
  .auth-stage { padding: 38px 20px 56px; }
  .workspace-topbar { height: 66px; gap: 10px; }
  .topbar-actions { gap: 6px; }
  .page-heading { display: grid; }
  .heading-actions { width: 100%; }
  .heading-actions .button { flex: 1; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric-card { min-height: 124px; padding: 15px; }
  .metric-card strong { font-size: 1.75rem; }
  .suggested-card, .application-summary-card { padding: 17px; }
  .compact-job-row { grid-template-columns: 1fr; }
  .job-row-actions { padding-left: 57px; justify-content: space-between; }
  .filter-bar { grid-template-columns: 1fr; }
  .filter-search { grid-column: auto; }
  .job-card { grid-template-columns: 1fr; gap: 16px; }
  .job-card-side { min-width: 0; justify-items: stretch; }
  .job-card-actions .button { flex: 1; }
  .application-card-top { grid-template-columns: 1fr; }
  .application-detail-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .role-option-grid, .role-option-grid-large { grid-template-columns: 1fr; }
  .help-grid { grid-template-columns: 1fr; }
  .modal { width: 96vw; }
  .modal-card { padding: 20px; border-radius: 17px; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .button { width: 100%; }
  .job-detail-dialog { width: 100vw; max-height: 100vh; }
  .job-detail-shell { min-height: 100vh; max-height: 100vh; border-radius: 0; }
  .job-detail-hero { padding: 24px 58px 22px 20px; }
  .job-detail-body { padding: 22px 20px 32px; }
  .job-detail-aside { grid-template-columns: 1fr; }
  .job-detail-actions .button { flex: 1; }
  .toast-region { left: 12px; right: 12px; bottom: 12px; }
  .toast { min-width: 0; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* CareerOS plan presentation */
.plan-sidebar-card { width: 100%; border: 1px solid color-mix(in srgb, var(--primary) 32%, var(--line)); border-radius: 16px; background: color-mix(in srgb, var(--primary) 8%, var(--surface)); color: var(--text); padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; text-align: left; cursor: pointer; }
.plan-sidebar-card span:first-child { display: grid; gap: 3px; }
.plan-sidebar-card small { color: var(--muted); font-size: .73rem; }
.plan-sidebar-arrow { color: var(--primary); font-weight: 800; }
.plan-summary-card { display: grid; grid-template-columns: minmax(240px, 1.1fr) minmax(300px, 1.7fr) auto; align-items: center; gap: 20px; margin-bottom: 24px; padding: 22px; border: 1px solid color-mix(in srgb, var(--primary) 32%, var(--line)); border-radius: 22px; background: linear-gradient(140deg, color-mix(in srgb, var(--primary) 11%, var(--surface)), var(--surface)); }
.plan-summary-card h2 { margin-bottom: 6px; }
.plan-summary-card p { margin-bottom: 0; color: var(--muted); line-height: 1.55; }
.plan-capability-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.plan-capability-summary > span { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: var(--surface-soft); display: grid; gap: 4px; }
.plan-capability-summary strong { font-size: 1.05rem; }
.plan-capability-summary small { color: var(--muted); line-height: 1.35; }
.plan-catalog { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.plan-catalog-card { border: 1px solid var(--line); border-radius: 18px; padding: 18px; background: var(--surface-soft); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.plan-catalog-card.current { border-color: color-mix(in srgb, var(--primary) 55%, var(--line)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 20%, transparent); }
.plan-catalog-card h3 { margin: 0 0 5px; }
.plan-price { display: block; font-size: 1.35rem; }
.plan-terms { margin: -7px 0 0; color: var(--muted); font-size: .84rem; line-height: 1.35; }
.plan-catalog-card ul { margin: 0; padding-left: 18px; color: var(--muted); display: grid; gap: 8px; line-height: 1.45; }
.plan-catalog-card .pill { margin-top: auto; align-self: flex-start; }
.plan-billing-note { margin: 18px 0 0; color: var(--muted); font-size: .9rem; line-height: 1.5; }
@media (max-width: 1180px) {
  .plan-summary-card { grid-template-columns: 1fr; }
  .plan-capability-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan-catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .plan-capability-summary, .plan-catalog { grid-template-columns: 1fr; }
}

/* Milestone 2 — trustworthy discovery */
.review-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.pill-source { background: color-mix(in srgb, var(--primary) 16%, transparent); border-color: color-mix(in srgb, var(--primary) 42%, var(--line)); color: var(--primary-strong); }
.button-danger { background: color-mix(in srgb, var(--danger) 15%, transparent); border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); color: var(--danger); }
.button-quiet { background: transparent; border-color: transparent; color: var(--muted); }
.button-quiet:hover { color: var(--text); border-color: var(--line); }
.quality-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.quality-summary > div { border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: grid; gap: 5px; }
.quality-summary span { color: var(--muted); font-size: .82rem; }
.quality-reason-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.quality-reason-list.compact { margin-top: 12px; }
.quality-reason { border-left: 3px solid var(--primary); padding: 8px 10px; display: grid; gap: 3px; background: color-mix(in srgb, var(--surface) 80%, transparent); border-radius: 0 10px 10px 0; }
.quality-reason.warning { border-left-color: var(--warning); }
.quality-reason.high { border-left-color: var(--danger); }
.quality-reason strong { text-transform: capitalize; font-size: .86rem; }
.quality-reason span { color: var(--muted); font-size: .84rem; line-height: 1.45; }
.integrity-notice { border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--line)); background: color-mix(in srgb, var(--primary) 8%, var(--surface)); border-radius: 16px; padding: 15px 17px; color: var(--muted); line-height: 1.55; }
.integrity-notice strong { color: var(--text); }

@media (max-width: 720px) {
  .quality-summary { grid-template-columns: 1fr; }
}


/* Milestone 2.2 — profile intelligence and private resume vault */
.profile-tabs {
  display: inline-flex;
  gap: 0.4rem;
  padding: 0.35rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  background: var(--surface-muted);
}
.profile-tab {
  border: 0;
  border-radius: 0.7rem;
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.profile-tab.active {
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.profile-section-card { padding: 1.5rem; }
.work-history-list,
.resume-vault-list {
  display: grid;
  gap: 0.9rem;
}
.work-history-card,
.resume-version-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  background: var(--surface-muted);
}
.work-history-card h3,
.resume-version-card strong { margin: 0; }
.work-history-card p { margin: 0.25rem 0; }
.work-history-card ul { margin: 0.8rem 0 0; padding-left: 1.2rem; }
.work-history-card li { margin: 0.35rem 0; }
.work-history-card li .pill { margin-left: 0.5rem; }
.resume-vault-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.5fr);
  gap: 1rem;
  align-items: start;
}
.resume-vault-card { padding: 1.25rem; }
.resume-vault-card .resume-vault-list { max-height: 68vh; overflow: auto; }
.resume-version-card { flex-direction: column; }
.resume-version-card.archived { opacity: 0.62; }
.resume-version-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.resume-version-card small {
  display: block;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}
.profile-form select,
#work-history-form input,
#work-history-form textarea,
#resume-upload-form input {
  width: 100%;
}

@media (max-width: 960px) {
  .resume-vault-layout { grid-template-columns: 1fr; }
  .resume-vault-card .resume-vault-list { max-height: none; }
}

@media (max-width: 640px) {
  .profile-tabs { display: grid; width: 100%; }
  .work-history-card { flex-direction: column; }
  .work-history-card .review-actions,
  .resume-version-card .review-actions { width: 100%; }
}

.provider-button-linkedin { border-color: rgba(111, 140, 255, .48); }
.linkedin-logo { font-size: .78rem; font-weight: 900; letter-spacing: -.04em; }

.connected-accounts-card { margin-top: 1rem; }
.connected-accounts-list { display: grid; gap: .75rem; }
.connected-account-row { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: 1rem; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-soft); }
.connected-account-row > div { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.connected-account-row small { display: block; width: 100%; color: var(--text-muted); }
@media (max-width: 620px) { .connected-account-row { align-items: flex-start; flex-direction: column; } }

@media (max-width: 640px) {
  .draft-preview-metadata { grid-template-columns: 1fr; }
}


.copy-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .65rem; align-items: center; }
.tailoring-studio-dialog { width: min(1500px, calc(100vw - 24px)); max-width: none; height: min(940px, calc(100vh - 24px)); }
.tailoring-studio-card { min-height: 100%; display: flex; flex-direction: column; gap: 1rem; padding: 1.35rem; }
.tailoring-studio-heading, .tailoring-insight-bar, .tailoring-pane-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.tailoring-studio-heading h2 { margin: .25rem 0; font-size: clamp(1.7rem, 3vw, 2.65rem); }
.tailoring-toolbar { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(240px, 1fr) auto; gap: .85rem; align-items: end; padding: 1rem; border: 1px solid var(--border); border-radius: 18px; background: var(--surface-subtle); }
.studio-empty { min-height: 430px; display: grid; place-content: center; text-align: center; color: var(--muted); }
.tailoring-studio-result { display: grid; gap: 1rem; min-height: 0; }
.tailoring-score { display: inline-flex; padding: .5rem .75rem; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-weight: 800; }
.tailoring-score-stack { display: grid; gap: .35rem; }
.tailoring-score-stack > div { display: flex; flex-wrap: wrap; gap: .5rem; }
.tailoring-integrity-score { display: inline-flex; padding: .5rem .75rem; border-radius: 999px; background: rgba(31, 157, 112, .13); color: #1f9d70; font-weight: 800; }
.tailoring-comparison-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; min-height: 620px; }
.tailoring-pane { min-width: 0; border: 1px solid var(--border); border-radius: 22px; background: var(--surface); overflow: hidden; display: flex; flex-direction: column; }
.tailoring-pane-heading { padding: 1rem 1.1rem; border-bottom: 1px solid var(--border); }
.tailoring-pane-heading h3 { margin: .15rem 0; }
.tailoring-original-preview { flex: 1; min-height: 560px; background: #e8ecf4; }
.original-resume-frame { width: 100%; height: 100%; min-height: 620px; border: 0; }
.docx-original-card, .studio-loading { height: 100%; min-height: 560px; display: grid; place-content: center; justify-items: center; gap: .75rem; padding: 2rem; text-align: center; color: var(--muted); }
.document-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: #2b579a; color: white; font-size: 1.6rem; font-weight: 900; }
.tailored-resume-paper { margin: 1rem; padding: clamp(1.25rem, 3vw, 2.5rem); background: #fff; color: #111827; border: 1px solid #d9dfeb; box-shadow: 0 18px 45px rgba(20, 33, 61, .08); min-height: 620px; }
.tailored-resume-header { border-bottom: 2px solid #111827; padding-bottom: 1rem; margin-bottom: 1rem; }
.tailored-resume-header h2 { margin: 0; font-size: 2rem; letter-spacing: -.035em; }
.tailored-resume-header p { margin: .3rem 0; font-weight: 700; }
.tailored-resume-header div { display: flex; flex-wrap: wrap; gap: .5rem 1rem; font-size: .88rem; }
.tailored-section { margin: 1.2rem 0; }
.tailored-section h3 { margin: 0 0 .6rem; font-size: .9rem; letter-spacing: .1em; text-transform: uppercase; }
.tailored-skill-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.tailored-skill-list span { padding: .28rem .52rem; border: 1px solid #cbd5e1; border-radius: 999px; font-size: .82rem; }
.tailored-skill-list span.matched { border-color: #4263eb; background: #edf2ff; color: #2445c6; font-weight: 700; }
.tailored-experience { margin: 1rem 0; }
.tailored-experience > div { display: grid; grid-template-columns: 1fr auto; gap: .15rem 1rem; }
.tailored-experience h4 { margin: 0; }
.tailored-experience > div span { grid-column: 2; grid-row: 1 / span 2; font-size: .8rem; color: #64748b; }
.tailored-experience li { margin: .45rem 0; }
.tailoring-match-note { display: block; margin-top: .15rem; color: #4263eb; font-size: .72rem; font-weight: 700; }
.tailored-resume-paper footer { margin-top: 1.5rem; padding-top: .75rem; border-top: 1px solid #e2e8f0; color: #64748b; font-size: .75rem; }
.tailoring-analysis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.compact-card { padding: 1rem; }
.compact-card h3 { margin-top: 0; }
.change-log-item { display: grid; grid-template-columns: auto 1fr; gap: .65rem; padding: .65rem 0; border-bottom: 1px solid var(--border); }
.change-log-item > span { align-self: start; padding: .2rem .42rem; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.change-log-item p { margin: .2rem 0 0; color: var(--muted); }
.rolefit-details { padding: 0; overflow: hidden; }
.rolefit-details > summary { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: 1rem 1.15rem; cursor: pointer; list-style: none; }
.rolefit-details > summary::-webkit-details-marker { display: none; }
.rolefit-details > summary span:first-child { display: grid; gap: .2rem; }
.rolefit-details > summary small { color: var(--muted); font-weight: 500; }
.rolefit-details[open] > summary { border-bottom: 1px solid var(--border); }
.rolefit-details-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; padding: 1rem; }
.rolefit-details-body > section { min-width: 0; padding: 1rem; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-subtle); }
.rolefit-details-body > section h3 { margin-top: 0; }
.rolefit-pillars { display: flex; flex-wrap: wrap; gap: .5rem; }
.rolefit-pillars > span { padding: .45rem .65rem; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-weight: 800; font-size: .82rem; }
.rolefit-guidance-list { margin: .75rem 0 0; padding-left: 1.2rem; color: var(--muted); }
.rolefit-guidance-list li { margin: .45rem 0; }
.rolefit-scorecard { display: grid; gap: .75rem; }
.rolefit-scorecard article { display: grid; gap: .35rem; }
.rolefit-scorecard article > div { display: flex; justify-content: space-between; gap: .75rem; }
.rolefit-scorecard progress { width: 100%; accent-color: var(--primary); }
.rolefit-scorecard p { margin: 0; color: var(--muted); font-size: .82rem; }
.rolefit-requirements { display: grid; gap: .65rem; max-height: 520px; overflow: auto; padding-right: .25rem; }
.rolefit-requirement { padding: .75rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.rolefit-requirement > div { display: grid; grid-template-columns: auto 1fr; gap: .2rem .5rem; align-items: center; }
.rolefit-requirement > div small { grid-column: 2; color: var(--muted); text-transform: capitalize; }
.rolefit-status { padding: .18rem .4rem; border-radius: 999px; background: var(--surface-soft); color: var(--muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.rolefit-requirement.strongly_supported .rolefit-status { background: rgba(31, 157, 112, .13); color: #1f9d70; }
.rolefit-requirement.partially_supported .rolefit-status, .rolefit-requirement.selected_skill_only .rolefit-status { background: var(--primary-soft); color: var(--primary); }
.rolefit-requirement.unsupported .rolefit-status { background: rgba(220, 53, 69, .12); color: #dc3545; }
.rolefit-requirement ul { margin: .6rem 0 0; padding-left: 1.1rem; }
.rolefit-requirement li { margin: .35rem 0; }
.rolefit-requirement li span { display: block; color: var(--muted); font-size: .78rem; }
.rolefit-requirement p { margin: .5rem 0 0; color: var(--muted); font-size: .82rem; }
@media (max-width: 980px) { .tailoring-comparison-grid, .tailoring-analysis-grid, .rolefit-details-body { grid-template-columns: 1fr; } .tailoring-toolbar { grid-template-columns: 1fr; } .tailoring-studio-dialog { height: calc(100vh - 12px); width: calc(100vw - 12px); } }
@media print { body.printing-tailored-resume > * { display: none !important; } body.printing-tailored-resume #tailoring-studio-dialog { display: block !important; position: static; width: auto; height: auto; padding: 0; border: 0; } body.printing-tailored-resume #tailoring-studio-dialog > form > * { display: none !important; } body.printing-tailored-resume #tailoring-studio-result, body.printing-tailored-resume .tailoring-comparison-grid, body.printing-tailored-resume .tailored-pane, body.printing-tailored-resume #tailored-resume-preview { display: block !important; margin: 0; border: 0; box-shadow: none; } body.printing-tailored-resume .original-pane, body.printing-tailored-resume .tailoring-analysis-grid, body.printing-tailored-resume .tailoring-insight-bar, body.printing-tailored-resume .rolefit-details { display: none !important; } }

/* Opt-in public profile and share link */
.public-profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .8fr);
  gap: 1rem;
  align-items: start;
}
.public-profile-url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .8rem;
  align-items: end;
}
.public-profile-link-actions,
.public-profile-actions,
.public-profile-social-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  align-items: center;
}
.public-profile-url-preview {
  min-height: 1.35rem;
  margin: .45rem 0 1rem;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}
.public-profile-fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
  margin: 1.1rem 0;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-muted);
}
.public-profile-fieldset legend {
  padding: 0 .45rem;
  color: var(--text);
  font-weight: 800;
}
.public-selection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
.public-option-list {
  display: grid;
  gap: .65rem;
  max-height: 320px;
  overflow: auto;
  padding-right: .25rem;
}
.public-option {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  padding: .8rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-muted);
  cursor: pointer;
}
.public-option:has(input:checked) {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
}
.public-option input { margin-top: .18rem; }
.public-option span { display: grid; gap: .2rem; }
.public-option small { color: var(--text-muted); }
.public-profile-preview-card {
  position: sticky;
  top: 82px;
  padding: 1.25rem;
}
.public-profile-preview {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface-muted);
}
.public-preview-hero {
  padding: 1.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(145deg, color-mix(in srgb, var(--primary) 10%, var(--surface)), var(--surface));
}
.public-preview-avatar {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto .8rem;
  border-radius: 18px;
  color: white;
  background: linear-gradient(135deg, var(--primary), #7b5cff);
  font-size: 1.5rem;
  font-weight: 900;
}
.public-preview-hero h3 { margin: .25rem 0; font-size: 1.55rem; }
.public-preview-hero > p:not(.eyebrow),
.public-preview-hero small { color: var(--text-muted); }
.public-preview-links,
.public-preview-skills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .45rem;
  margin-top: .8rem;
}
.public-preview-links a,
.public-preview-skills span {
  padding: .42rem .62rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
}
.public-profile-preview > section { padding: 1rem 1.2rem; border-bottom: 1px solid var(--border); }
.public-profile-preview > section h4 { margin: 0 0 .6rem; }
.public-profile-preview > section > p,
.public-preview-experience p,
.public-preview-experience li { color: var(--text-muted); line-height: 1.55; }
.public-preview-history { display: grid; gap: .7rem; }
.public-preview-experience {
  padding: .85rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.public-preview-experience h4 { margin: .2rem 0; }
.public-preview-experience ul { padding-left: 1.15rem; }
.public-profile-preview footer {
  padding: 1rem 1.2rem;
  color: var(--text-muted);
  font-size: .8rem;
  line-height: 1.5;
}
.public-profile-social-actions { margin-top: 1rem; }
.public-profile-social-actions .button { flex: 1 1 100px; justify-content: center; }

@media (max-width: 1050px) {
  .public-profile-layout { grid-template-columns: 1fr; }
  .public-profile-preview-card { position: static; }
}

@media (max-width: 720px) {
  .public-profile-url-row,
  .public-profile-fieldset,
  .public-selection-grid { grid-template-columns: 1fr; }
  .public-profile-link-actions .button,
  .public-profile-link-actions a,
  .public-profile-actions .button { flex: 1 1 100%; justify-content: center; }
}

/* Public profile polish: private photo controls and conditional identity links */
.public-profile-photo-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-muted);
}
.public-profile-photo-preview {
  width: 92px;
  height: 92px;
}
.public-profile-photo-preview .public-preview-avatar {
  width: 92px;
  height: 92px;
  margin: 0;
  border-radius: 24px;
  font-size: 2rem;
}
.public-profile-photo-copy h3 { margin: 0; }
.public-profile-photo-copy > p { margin: .35rem 0 .75rem; color: var(--text-muted); }
.public-profile-photo-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.public-social-field {
  display: grid;
  gap: .55rem;
  padding: .8rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.public-preview-avatar-photo {
  display: block;
  object-fit: cover;
  overflow: hidden;
}
.public-preview-link {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}
.public-preview-link svg { width: 22px; height: 22px; }
.public-preview-link:hover,
.public-preview-link:focus-visible {
  border-color: var(--primary);
  outline: 3px solid color-mix(in srgb, var(--primary) 22%, transparent);
}

@media (max-width: 620px) {
  .public-profile-photo-card { grid-template-columns: 1fr; text-align: center; }
  .public-profile-photo-preview { margin: 0 auto; }
  .public-profile-photo-actions { justify-content: center; }
}

/* Secure account deletion */
.danger-eyebrow { color: var(--danger); }
.danger-callout { margin: 4px 0 20px; padding: 16px 18px; border: 1px solid color-mix(in srgb, var(--danger) 38%, var(--line)); border-radius: 14px; background: var(--danger-soft); color: var(--ink); }
.danger-callout > strong { display: block; color: var(--danger); }
.danger-callout ul { margin: 10px 0; padding-left: 20px; }
.danger-callout li + li { margin-top: 5px; }
.danger-callout p { margin: 10px 0 0; color: var(--muted); font-size: .84rem; line-height: 1.5; }
#delete-account-form input:invalid:not(:placeholder-shown) { border-color: color-mix(in srgb, var(--danger) 55%, var(--line)); }
#confirm-delete-account:disabled { opacity: .48; cursor: not-allowed; }


/* Structured About Me preference controls */
.profile-form label > small,
.profile-choice-field + small { display: block; margin-top: .42rem; color: var(--text-muted); font-size: .74rem; line-height: 1.45; }
.profile-form select:disabled { cursor: not-allowed; opacity: .68; background: var(--surface-muted); }
.profile-choice-field { position: relative; display: grid; gap: 7px; min-width: 0; color: var(--ink); font-size: .88rem; font-weight: 720; }
.profile-choice-trigger { width: 100%; min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--surface); color: var(--ink); text-align: left; transition: border-color .16s ease, box-shadow .16s ease; }
.profile-choice-trigger:hover { border-color: color-mix(in srgb, var(--primary) 58%, var(--line-strong)); }
.profile-choice-trigger:focus-visible,
.profile-choice-field.open .profile-choice-trigger { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 12%, transparent); outline: none; }
.profile-choice-field[data-has-value="false"] .profile-choice-summary { color: var(--subtle); font-weight: 650; }
.profile-choice-summary { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-choice-panel { position: absolute; z-index: 1050; top: calc(100% + 8px); left: 0; right: 0; display: grid; gap: 7px; max-height: min(360px, 55vh); padding: 9px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); box-shadow: 0 24px 60px rgba(10, 18, 34, .28); }
body[data-theme="dark"] .profile-choice-panel { box-shadow: 0 26px 64px rgba(0, 0, 0, .58); }
.profile-choice-panel-head, .profile-choice-panel-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.profile-choice-panel-head { min-height: 28px; }
.profile-choice-count { color: var(--text-muted); font-size: .76rem; font-weight: 750; }
.profile-choice-clear { border: 0; background: transparent; color: var(--primary); font-size: .76rem; font-weight: 760; }
.profile-choice-clear:disabled { color: var(--subtle); cursor: default; }
.profile-choice-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 92px; overflow-y: auto; }
.profile-choice-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 5px 8px; border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--line)); border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: .74rem; font-weight: 750; }
.profile-choice-chip span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-choice-panel-footer { padding-top: 4px; border-top: 1px solid var(--line); color: var(--text-muted); font-size: .72rem; font-weight: 600; }
.profile-choice-done { min-height: 34px; padding: 0 14px; }
.profile-choice-search-shell { display: block; }
.profile-choice-search { min-height: 42px; }
.profile-choice-options { display: grid; gap: 4px; max-height: 270px; overflow-y: auto; overscroll-behavior: contain; }
.profile-choice-option { width: 100%; min-height: 42px; display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: 9px; padding: 9px 11px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); text-align: left; line-height: 1.35; }
.profile-choice-option:hover,
.profile-choice-option:focus-visible { background: var(--surface-soft); outline: none; }
.profile-choice-option[aria-selected="true"] { background: var(--primary-soft); color: var(--primary); font-weight: 780; }
.profile-choice-check { width: 20px; height: 20px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 6px; color: white; font-size: .72rem; }
.profile-choice-option[aria-selected="true"] .profile-choice-check { border-color: var(--primary); background: var(--primary); }
.profile-choice-add { color: var(--primary); }
.profile-choice-empty { margin: 0; padding: 10px; color: var(--text-muted); font-weight: 600; text-align: center; }
.profile-choice-options::-webkit-scrollbar { width: 10px; }
.profile-choice-options::-webkit-scrollbar-thumb { border: 3px solid var(--surface); border-radius: 999px; background: var(--line-strong); }
@media (max-width: 640px) {
  .profile-choice-panel { position: fixed; left: 12px; right: 12px; top: auto; bottom: 12px; max-height: 62vh; }
}

/* RoleFit v2 career evidence graph and recruiter-ready resume canvas */
.tailoring-toolbar { grid-template-columns: minmax(190px, 1fr) minmax(190px, 1fr) auto auto; }
.tailored-resume-paper { max-width: 8.5in; margin-inline: auto; font-family: Arial, Helvetica, sans-serif; line-height: 1.35; }
.tailored-resume-paper p { line-height: 1.42; }
.tailored-resume-header { display: grid; gap: .25rem; }
.tailored-resume-header h2 { font-size: 1.9rem; }
.tailored-resume-header > p { font-size: 1rem; }
.tailored-section { break-inside: avoid; }
.tailored-section > p { margin: .35rem 0; }
.tailored-skill-line { margin: 0; font-size: .84rem; line-height: 1.55; }
.tailored-skill-line span.matched { font-weight: 800; }
.tailored-credential-list { margin: .35rem 0 0; padding-left: 1.15rem; }
.tailored-credential-list li { margin: .22rem 0; line-height: 1.35; }
.tailored-experience { break-inside: avoid; }
.tailored-experience ul { margin: .5rem 0 0; padding-left: 1.15rem; }
.tailored-experience li { line-height: 1.4; }
.rolefit-corpus-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.rolefit-corpus-summary > * { padding: .55rem .65rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.rolefit-corpus-skills { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }
.rolefit-corpus-skills > span { padding: .3rem .5rem; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: .76rem; font-weight: 750; }
.rolefit-page-budget { margin-top: .75rem; color: var(--muted); font-size: .8rem; }
@media (max-width: 1120px) { .tailoring-toolbar { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { .tailoring-toolbar, .rolefit-corpus-summary { grid-template-columns: 1fr; } }
@media print {
  @page { size: Letter; margin: .45in; }
  body.printing-tailored-resume #tailored-resume-preview {
    width: 7.6in;
    max-width: 7.6in;
    min-height: auto;
    padding: 0;
    font-size: 9.6pt;
    line-height: 1.25;
  }
  body.printing-tailored-resume .tailored-resume-header h2 { font-size: 20pt; }
  body.printing-tailored-resume .tailored-section { margin: .75rem 0; }
  body.printing-tailored-resume .tailored-experience { margin: .65rem 0; }
  body.printing-tailored-resume .tailored-experience li { margin: .24rem 0; }
  body.printing-tailored-resume #tailored-resume-preview footer { display: none !important; }
}

.application-contact-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin: 14px 0; }
.application-contact, .delivery-status { display: flex; flex-direction: column; gap: 3px; min-height: 54px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.application-contact small, .delivery-status small { color: var(--muted); overflow-wrap: anywhere; }
.delivery-sent { border-color: color-mix(in srgb, var(--success) 45%, var(--line)); }
.delivery-captured { border-color: color-mix(in srgb, var(--accent) 38%, var(--line)); }
.delivery-failed { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.recipient-save-status { display: block; margin-top: 4px; font-weight: 700; }
.recipient-save-status[data-status="saved"] { color: var(--success); }
.recipient-save-status[data-status="saving"] { color: var(--accent); }
.recipient-save-status[data-status="error"] { color: var(--danger); }
.draft-send-panel { display: grid; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.draft-send-panel h3, .draft-send-panel p { margin: 0; }
.draft-send-receipt { display: grid; gap: 4px; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.draft-send-receipt span, .draft-send-receipt small { color: var(--muted); overflow-wrap: anywhere; }

@media (max-width: 720px) {
  .application-contact-row { grid-template-columns: 1fr; }
}

/* Search Intelligence Composer v1 */
.intelligence-field { display: grid; gap: 8px; min-width: 0; }
.intelligence-feedback {
  display: grid;
  gap: 8px;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  transition: border-color .16s ease, background .16s ease;
}
.intelligence-feedback.neutral { color: var(--muted); }
.intelligence-feedback.polished {
  border-color: color-mix(in srgb, var(--primary) 38%, var(--line));
  background: color-mix(in srgb, var(--primary-soft) 68%, var(--surface));
}
.intelligence-feedback.approved {
  border-color: color-mix(in srgb, var(--success) 42%, var(--line));
  background: var(--success-soft);
}
.intelligence-feedback.review {
  border-color: color-mix(in srgb, var(--warning) 48%, var(--line));
  background: var(--warning-soft);
}
.intelligence-feedback-main { display: flex; align-items: flex-start; gap: 9px; }
.intelligence-feedback-main > div { min-width: 0; }
.intelligence-feedback-main strong,
.intelligence-feedback-main small { display: block; }
.intelligence-feedback-main strong { color: var(--ink); font-size: .79rem; }
.intelligence-feedback-main small { margin-top: 2px; color: var(--muted); font-size: .73rem; line-height: 1.45; }
.intelligence-mark {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: .8rem;
  font-weight: 900;
}
.intelligence-feedback.approved .intelligence-mark { background: var(--success-soft); color: var(--success); }
.intelligence-feedback.review .intelligence-mark { background: var(--warning-soft); color: var(--warning); }
.intelligence-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.intelligence-actions:empty { display: none; }
.intelligence-actions .button { min-height: 32px; padding: 0 10px; font-size: .72rem; }
.intelligence-issues { margin: 0; padding-left: 1.25rem; color: var(--warning); font-size: .74rem; line-height: 1.45; }
.intelligence-issues li + li { margin-top: 3px; }
.intelligence-changes { margin: 0; color: var(--muted); font-size: .72rem; line-height: 1.45; }
.intelligence-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.intelligence-comparison article {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.intelligence-comparison span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.intelligence-comparison p {
  margin: 0;
  color: var(--ink);
  font-size: .76rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
@media (max-width: 640px) {
  .intelligence-comparison { grid-template-columns: 1fr; }
}
.intelligence-original {
  max-height: 160px;
  margin: 0;
  padding: 10px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: .74rem;
  line-height: 1.5;
}

.work-history-main { min-width: 0; flex: 1; }
.work-history-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.intelligence-card-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: .69rem;
  font-weight: 800;
  white-space: nowrap;
}
.intelligence-card-status.polished { border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); color: var(--primary); }
.intelligence-card-status.approved { border-color: color-mix(in srgb, var(--success) 42%, var(--line)); color: var(--success); background: var(--success-soft); }
.intelligence-card-status.review { border-color: color-mix(in srgb, var(--warning) 48%, var(--line)); color: var(--warning); background: var(--warning-soft); }
.work-history-overview,
.work-history-achievements {
  margin-top: 14px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}
.work-history-overview > span,
.work-history-achievements > div > span {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.work-history-overview p { margin: 7px 0 0; line-height: 1.55; }
.work-history-achievements > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.work-history-achievements small { color: var(--muted); font-size: .7rem; }
.work-history-achievements ul { margin: 10px 0 0; }
.intelligence-inline-warning { display: block; margin-top: 3px; color: var(--warning) !important; font-weight: 750; }
.intelligence-history-link { min-height: 34px; margin-top: 10px; padding: 0 11px; font-size: .72rem; }

.intelligence-history-content { display: grid; gap: 12px; max-height: min(64vh, 680px); overflow: auto; padding-right: 3px; }
.intelligence-revision-card { padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.intelligence-revision-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.intelligence-revision-heading strong,
.intelligence-revision-heading small { display: block; }
.intelligence-revision-heading strong { text-transform: capitalize; }
.intelligence-revision-heading small { margin-top: 3px; color: var(--muted); font-size: .72rem; }
.intelligence-revision-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.intelligence-revision-grid section { min-width: 0; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.intelligence-revision-grid span { color: var(--muted); font-size: .68rem; font-weight: 820; letter-spacing: .06em; text-transform: uppercase; }
.intelligence-revision-grid p { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }

@media (max-width: 720px) {
  .work-history-heading,
  .work-history-achievements > div,
  .intelligence-revision-heading { align-items: flex-start; flex-direction: column; }
  .intelligence-card-status { white-space: normal; }
  .intelligence-revision-grid { grid-template-columns: 1fr; }
}

/* Pro billing and server-enforced paywall */
.plan-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.plan-catalog-card.recommended { border-color: color-mix(in srgb, var(--primary) 75%, var(--line)); background: color-mix(in srgb, var(--primary) 5%, var(--surface)); }
.plan-recommended { background: color-mix(in srgb, var(--primary) 14%, var(--surface)); color: var(--primary); border-color: color-mix(in srgb, var(--primary) 38%, var(--line)); white-space: nowrap; }
.plan-card-footer { margin-top: auto; display: grid; gap: 12px; align-items: center; }
.plan-card-footer .pill { margin-top: 0; }
.plan-action { width: 100%; min-height: 44px; }
.plan-basic-label { color: var(--muted); font-size: .84rem; line-height: 1.4; }
.plan-dialog-card .form-message { margin: 12px 0 0; }
.plan-dialog-card .form-message.success { color: var(--success); }
.plan-dialog-card .modal-actions { justify-content: space-between; }

@media (max-width: 760px) {
  .plan-card-heading { align-items: center; }
  .plan-dialog-card .modal-actions { align-items: stretch; }
  .plan-dialog-card .modal-actions .button { width: 100%; }
}


/* Phase 23A-R4 — application ledger and responsive action repair */
.application-identity { min-width: 0; }
.application-identity h3,
.application-identity p { overflow-wrap: anywhere; }
.application-actions { justify-content: flex-end; }
.application-action-button { flex: 0 0 auto; }
.application-ledger-section { min-width: 0; }
.activity-row-ledger { padding: 10px 0; }
.activity-row-ledger + .activity-row-ledger { border-top: 1px solid var(--line); }
.activity-row-ledger.is-complete { opacity: .68; }
.activity-content { min-width: 0; display: grid; gap: 3px; }
.activity-content strong,
.activity-content small,
.activity-summary { overflow-wrap: anywhere; }
.activity-content small { color: var(--muted); font-size: .72rem; }
.activity-summary { color: var(--ink); white-space: pre-wrap; line-height: 1.45; }

@media (max-width: 860px) {
  .workspace-topbar { position: sticky; top: 0; z-index: 34; min-height: 66px; height: auto; padding-top: env(safe-area-inset-top); background: var(--surface); }
  .global-search { min-width: 0; }
}

@media (max-width: 640px) {
  .button { min-height: 48px; max-height: 56px; height: auto; flex-grow: 0; padding: 9px 16px; }
  .button-full,
  .empty-state .button,
  .profile-section-card .button { min-height: 52px; max-height: 56px; }
  .empty-state .button { width: min(100%, 240px); justify-self: center; align-self: center; }
  .profile-section-card:has(.work-history-list .empty-state) > .section-heading .button,
  .profile-section-card:has(.work-history-list .empty-state) > .card-heading .button,
  .profile-section-card:has(.work-history-list .empty-state) > .button:first-of-type { display: none; }
  .application-card { padding: 16px; border-radius: 18px; }
  .application-card-top { gap: 16px; }
  .application-identity h3 { margin-bottom: 7px; font-size: 1.05rem; line-height: 1.3; }
  .application-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; gap: 9px; }
  .application-status-select { grid-column: 1 / -1; width: 100%; min-height: 48px; }
  .application-actions .button { width: 100%; min-width: 0; }
  .application-contact-row { gap: 10px; margin-top: 16px; }
  .application-detail-grid { gap: 20px; }
  .activity-row-ledger { font-size: .82rem; }
  .modal { position: fixed; inset: auto 0 0; width: 100vw; max-width: none; margin: 0; }
  .modal-card { max-height: min(92dvh, 900px); padding: 22px 18px calc(18px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; }
  .modal-actions { position: sticky; bottom: 0; margin: 20px -18px calc(-18px - env(safe-area-inset-bottom)); padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 94%, transparent); border-top: 1px solid var(--line); backdrop-filter: blur(14px); }
  .modal-actions .button { min-height: 52px; max-height: 56px; }
}

@media (max-width: 420px) {
  .application-actions { grid-template-columns: 1fr; }
  .application-status-select { grid-column: auto; }
}


/* Phase 23B-R2-R2B1 — editable recipient and immutable multi-CC */
#draft-preview-form textarea[name="cc_recipients"] {
  min-height: 88px;
  resize: vertical;
}

#draft-preview-cc {
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .draft-preview-metadata {
    grid-template-columns: minmax(0, 1fr);
  }

  #draft-preview-form textarea[name="cc_recipients"] {
    min-height: 104px;
  }
}

/* Help Center V2 + container-responsive Applications repair */

.application-card {
  container-type: inline-size;
}

.application-identity h3,
.application-identity p {
  overflow-wrap: break-word;
  word-break: normal;
}

.application-actions {
  min-width: 0;
  max-width: 100%;
}

@container (max-width: 880px) {
  .application-card-top {
    grid-template-columns: 1fr;
  }

  .application-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .application-actions > * {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .application-status-select {
    width: 100%;
    min-width: 0;
  }
}

@container (max-width: 620px) {
  .application-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container (max-width: 420px) {
  .application-actions {
    grid-template-columns: 1fr;
  }
}

.help-v2 {
  display: grid;
  gap: 24px;
}

.help-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 4vw, 46px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(
      circle at 88% 10%,
      color-mix(in srgb, var(--primary) 18%, transparent),
      transparent 36%
    ),
    linear-gradient(
      135deg,
      var(--surface),
      color-mix(in srgb, var(--surface-soft) 84%, var(--primary-soft))
    );
}

.help-hero h1 {
  max-width: 760px;
  margin: 6px 0 8px;
  font-size: clamp(2rem, 5vw, 3.35rem);
  letter-spacing: -.045em;
  line-height: 1;
}

.help-hero > p:last-of-type {
  max-width: 700px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.help-search {
  width: min(720px, 100%);
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .06);
}

.help-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  outline: 0;
}

.help-category-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 6px;
  scrollbar-width: thin;
}

.help-category {
  min-height: 38px;
  flex: 0 0 auto;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 700;
}

.help-category.active,
.help-category:hover {
  border-color: color-mix(in srgb, var(--primary) 48%, var(--line));
  background: var(--primary-soft);
  color: var(--primary);
}

.help-v2-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: 22px;
  align-items: start;
}

.help-faq-column {
  min-width: 0;
}

.help-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.help-section-heading h2 {
  margin: 3px 0 0;
}

.help-result-count {
  color: var(--muted);
  font-size: .78rem;
  white-space: nowrap;
}

.help-faq-list {
  display: grid;
  gap: 10px;
}

.help-faq {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  overflow: clip;
}

.help-faq summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 17px;
  cursor: pointer;
  font-weight: 760;
  list-style: none;
}

.help-faq summary::-webkit-details-marker {
  display: none;
}

.help-faq summary::after {
  content: "+";
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--primary);
  font-size: 1rem;
  transition: transform .16s ease;
}

.help-faq[open] summary::after {
  transform: rotate(45deg);
}

.help-faq > div {
  padding: 0 17px 17px;
  border-top: 1px solid var(--line);
}

.help-faq p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.help-no-results {
  padding: 28px;
  display: grid;
  gap: 5px;
  text-align: center;
  color: var(--muted);
}

.help-contact-column {
  min-width: 0;
  display: grid;
  gap: 16px;
  position: sticky;
  top: 96px;
}

.support-contact-card,
.support-recent-card {
  padding: 22px;
}

.support-card-heading {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.support-card-heading.compact {
  justify-content: space-between;
}

.support-card-heading h2 {
  margin: 3px 0 7px;
  font-size: 1.15rem;
}

.support-card-heading p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.support-signal {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
}

.support-identity {
  display: grid;
  gap: 3px;
  margin: 18px 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.support-identity span {
  color: var(--muted);
  font-size: .72rem;
}

.support-identity strong {
  overflow-wrap: anywhere;
  font-size: .86rem;
}

.support-form {
  display: grid;
  gap: 13px;
}

.support-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}

.support-form textarea {
  resize: vertical;
  min-height: 138px;
}

.support-honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.support-turnstile {
  min-height: 65px;
}

.support-form-footer {
  display: grid;
  gap: 8px;
}

.support-form-message {
  min-height: 1.2em;
  color: var(--muted);
  line-height: 1.45;
}

.support-form-message.success {
  color: var(--success);
}

.support-form-message.error {
  color: var(--danger);
}

.support-recent-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.support-recent-item {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
}

.support-recent-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.support-recent-item strong {
  font-size: .82rem;
}

.support-recent-item small,
.support-recent-item span {
  color: var(--muted);
  font-size: .72rem;
}

.support-status {
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary) !important;
  font-weight: 760;
  text-transform: capitalize;
}

.support-recent-button {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  transition:
    border-color .16s ease,
    transform .16s ease,
    box-shadow .16s ease,
    background .16s ease;
}

.support-recent-button:hover {
  border-color: color-mix(
    in srgb,
    var(--primary) 48%,
    var(--line)
  );
  background: color-mix(
    in srgb,
    var(--surface-soft) 88%,
    var(--primary-soft)
  );
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.support-recent-button:focus-visible {
  outline: 3px solid color-mix(
    in srgb,
    var(--primary) 34%,
    transparent
  );
  outline-offset: 2px;
}

.support-recent-action {
  margin-top: 3px;
  color: var(--primary) !important;
  font-size: .73rem !important;
  font-weight: 780;
}

.support-detail-dialog {
  width: min(94vw, 780px);
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.support-detail-dialog::backdrop {
  background: rgba(10, 18, 34, .58);
  backdrop-filter: blur(4px);
}

.support-detail-shell {
  max-height: min(90vh, 900px);
  overflow-y: auto;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.support-detail-close {
  width: 40px;
  height: 40px;
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink);
  font-size: 1.2rem;
  cursor: pointer;
}

.support-detail-close:hover {
  background: var(--surface-soft);
}

.support-detail-close:focus-visible {
  outline: 3px solid color-mix(
    in srgb,
    var(--primary) 34%,
    transparent
  );
  outline-offset: 2px;
}

.support-detail-hero {
  padding: 28px 72px 24px 28px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(
    155deg,
    var(--surface-tint),
    var(--surface)
  );
}

.support-detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.support-detail-heading h2 {
  margin: 3px 0 7px;
  font-size: clamp(
    1.35rem,
    3vw,
    1.85rem
  );
  letter-spacing: -.035em;
}

.support-detail-reference {
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
  overflow-wrap: anywhere;
}

.support-detail-status {
  flex: 0 0 auto;
  margin-right: 4px;
}

.support-detail-facts {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.support-detail-fact {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(
    in srgb,
    var(--surface) 88%,
    transparent
  );
}

.support-detail-fact span {
  color: var(--muted);
  font-size: .7rem;
}

.support-detail-fact strong {
  overflow-wrap: anywhere;
  font-size: .82rem;
}

.support-detail-body {
  display: grid;
  gap: 24px;
  padding: 26px 28px 32px;
}

.support-detail-section {
  display: grid;
  gap: 11px;
}

.support-detail-section h3 {
  margin: 0;
  font-size: .94rem;
}

.support-detail-message {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--ink);
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.support-detail-context {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.support-detail-loading,
.support-detail-error {
  min-height: 240px;
  display: grid;
  place-content: center;
  gap: 6px;
  padding: 32px;
  text-align: center;
  color: var(--muted);
}

.support-detail-error strong {
  color: var(--ink);
}

@media (max-width: 1040px) {
  .help-v2-layout {
    grid-template-columns: 1fr;
  }

  .help-contact-column {
    position: static;
  }
}

@media (max-width: 640px) {
  .help-hero {
    padding: 22px 18px;
    border-radius: 18px;
  }

  .help-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .support-contact-card,
  .support-recent-card {
    padding: 18px;
  }

  .support-detail-dialog {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    inset: 0;
  }

  .support-detail-shell {
    min-height: 100dvh;
    max-height: 100dvh;
    border-width: 0;
    border-radius: 0;
  }

  .support-detail-hero {
    padding: 24px 58px 22px 18px;
  }

  .support-detail-heading {
    flex-direction: column;
    gap: 10px;
  }

  .support-detail-facts,
  .support-detail-context {
    grid-template-columns: 1fr;
  }

  .support-detail-body {
    padding:
      22px
      18px
      calc(
        28px
        + env(safe-area-inset-bottom)
      );
  }
}

@media (prefers-reduced-motion: reduce) {
  .help-faq summary::after {
    transition: none;
  }
}

/* Customer support request resolution */
.support-detail-resolution {
  display: grid;
  gap: 14px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.support-resolution-message {
  display: grid;
  gap: 5px;
}

.support-resolution-message strong {
  color: var(--ink);
  font-size: .94rem;
}

.support-resolution-message span {
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.55;
}

.support-resolution-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.support-detail-resolution.is-confirming {
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: var(--surface-soft);
}

.support-detail-resolution.is-resolved {
  padding: 18px;
  border: 1px solid rgba(31, 157, 112, .24);
  border-radius: 15px;
  background: rgba(31, 157, 112, .08);
}

.support-resolution-success strong {
  color: var(--success);
}

.support-status.support-status-resolved {
  background: rgba(31, 157, 112, .13);
  color: var(--success) !important;
}

.support-status.support-status-closed {
  background: var(--surface-soft);
  color: var(--muted) !important;
}

@media (max-width: 640px) {
  .support-resolution-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .support-resolution-actions .button {
    width: 100%;
  }
}
