:root {
  color-scheme: light;
  --navy-950: #071426;
  --navy-900: #0b1f3a;
  --navy-800: #123154;
  --navy-700: #1e4168;
  --cyan-500: #0cb7c8;
  --cyan-200: #a7e8ee;
  --blue-600: #0b74b8;
  --blue-100: #e7f3fa;
  --ink: #10233e;
  --muted: #617188;
  --line: #d8e0e9;
  --line-strong: #b8c5d3;
  --surface: #ffffff;
  --canvas: #f2f5f8;
  --success: #16755a;
  --success-soft: #e7f5ef;
  --warning: #a84b31;
  --warning-soft: #fff0eb;
  --shadow: 0 16px 42px rgba(15, 35, 62, 0.1);
  --font-sans: "Avenir Next", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  --font-mono: "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(rgba(16, 35, 62, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 35, 62, 0.028) 1px, transparent 1px),
    var(--canvas);
  background-size: 28px 28px;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(12, 183, 200, 0.35);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.app-shell {
  display: grid;
  grid-template-columns: 254px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  height: 100vh;
  color: #eaf2fb;
  background: var(--navy-950);
  border-right: 1px solid #1c3756;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 92px;
  padding: 20px 22px;
  color: white;
  text-decoration: none;
  border-bottom: 1px solid #1c3756;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--navy-950);
  background: var(--cyan-500);
  border: 1px solid #55dbe6;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 900;
  box-shadow: 8px 8px 0 rgba(12, 183, 200, 0.12);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
  letter-spacing: 0.02em;
}

.brand small {
  margin-top: 5px;
  color: #8299b4;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.primary-nav {
  display: grid;
  gap: 2px;
  padding: 18px 12px;
}

.nav-item,
.profile-link {
  width: 100%;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.nav-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 48px;
  padding: 0 12px;
  color: #9db0c6;
  background: transparent;
  border-left: 3px solid transparent;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 700;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.nav-item:hover {
  color: white;
  background: #102947;
}

.nav-item.is-active {
  color: white;
  background: #153453;
  border-left-color: var(--cyan-500);
}

.nav-code {
  color: #5d7693;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.nav-item.is-active .nav-code {
  color: var(--cyan-200);
}

.nav-item b {
  min-width: 24px;
  padding: 2px 6px;
  color: #d5e4f4;
  background: #234566;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-align: center;
}

.nav-item i,
.profile-link i {
  color: #68809a;
  font-size: 10px;
  font-style: normal;
}

.sidebar-foot {
  margin-top: auto;
  padding: 14px 12px 18px;
  border-top: 1px solid #1c3756;
}

.profile-link {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  color: #dce8f4;
  background: transparent;
  border-radius: 3px;
}

.profile-link:hover {
  background: #102947;
}

.company-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--cyan-200);
  background: #153453;
  border: 1px solid #2d5378;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 900;
}

.profile-link strong,
.profile-link small {
  display: block;
}

.profile-link strong {
  font-size: 12px;
}

.profile-link small {
  margin-top: 3px;
  color: #7187a0;
  font-size: 10px;
}

.sidebar-foot > p {
  margin: 14px 10px 0;
  color: #7187a0;
  font-size: 10px;
  line-height: 1.6;
}

.main-shell {
  min-width: 0;
}

.guest-mode-strip {
  position: relative;
  z-index: 16;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 34px;
  padding: 7px clamp(22px, 3vw, 44px);
  color: #dce8f4;
  background: var(--navy-800);
  border-bottom: 1px solid #274b70;
  font-size: 10px;
}

.guest-mode-strip strong {
  color: var(--cyan-200);
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
}

.guest-mode-strip span {
  color: #b8c9d9;
}

.guest-mode-strip b {
  color: white;
  font-family: var(--font-mono);
}

.workspace-bar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 92px;
  padding: 15px clamp(22px, 3vw, 44px);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--blue-600);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.workspace-bar h1,
.panel-head h2,
.view-heading h2,
.guide-head h2,
.hero-copy h2,
.locked-outline h2,
.plan-lock-dialog h2 {
  margin: 0;
}

.workspace-bar h1 {
  font-size: 24px;
  letter-spacing: -0.03em;
}

.workspace-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.live-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--success);
  font-size: 11px;
  font-weight: 800;
}

.live-chip i {
  width: 7px;
  height: 7px;
  background: #26ad80;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(38, 173, 128, 0.12);
}

.quota-button {
  display: grid;
  gap: 3px;
  min-width: 258px;
  padding: 10px 14px;
  cursor: pointer;
  text-align: left;
  background: #f8fbfd;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
}

.quota-button:hover {
  border-color: var(--blue-600);
}

.quota-button span {
  font-size: 12px;
  font-weight: 900;
}

.quota-button small {
  color: var(--muted);
  font-size: 10px;
}

.quota-button.is-running {
  background: var(--blue-100);
  border-color: #80b7d6;
}

.quota-button.is-exhausted {
  background: var(--warning-soft);
  border-color: #e1a08d;
}

.workspace-content {
  width: min(100%, 1460px);
  margin: 0 auto;
  padding: clamp(22px, 3.5vw, 48px);
}

.view {
  animation: view-in 180ms ease both;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.guide {
  margin-bottom: 20px;
  padding: 18px 20px;
  color: white;
  background: var(--navy-900);
  border-left: 5px solid var(--cyan-500);
  box-shadow: var(--shadow);
}

.results-expired {
  margin-bottom: 20px;
  padding: 17px 20px;
  color: #7c3d2c;
  background: var(--warning-soft);
  border: 1px solid #e4b5a8;
  border-left: 5px solid var(--warning);
}

.results-expired strong {
  font-size: 13px;
}

.results-expired p {
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.6;
}

.guide-head,
.panel-head,
.view-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.guide .eyebrow {
  color: var(--cyan-200);
}

.guide-head h2 {
  font-size: 18px;
}

.text-button {
  padding: 4px 2px;
  color: var(--blue-600);
  background: transparent;
  border: 0;
  border-bottom: 1px solid currentColor;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.guide .text-button {
  color: var(--cyan-200);
}

.guide-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 16px 0 0;
  padding: 0;
  overflow: hidden;
  list-style: none;
  background: #29415f;
  border: 1px solid #29415f;
}

.guide-steps li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 2px 10px;
  min-height: 62px;
  padding: 11px 14px;
  color: #97abc1;
  background: #102945;
}

.guide-steps li.is-active {
  color: white;
  background: #193a5d;
}

.guide-steps li > span {
  grid-row: 1 / 3;
  color: var(--cyan-200);
  font-family: var(--font-mono);
  font-size: 11px;
}

.guide-steps strong {
  font-size: 12px;
}

.guide-steps small {
  font-size: 10px;
}

.command-hero {
  display: grid;
  grid-template-columns: minmax(270px, 0.72fr) minmax(520px, 1.28fr);
  min-height: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 4vw, 54px);
  color: white;
  background: var(--navy-900);
  border-bottom: 8px solid var(--cyan-500);
}

.hero-copy .eyebrow {
  color: var(--cyan-200);
}

.hero-copy h2 {
  max-width: 540px;
  font-size: clamp(30px, 3.3vw, 50px);
  line-height: 1.06;
  letter-spacing: -0.055em;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 560px;
  margin: 22px 0 0;
  color: #b9c9da;
  font-size: 14px;
  line-height: 1.8;
}

.truth-list {
  display: grid;
  gap: 10px;
  margin: 30px 0 0;
}

.truth-list div {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid #2a4564;
}

.truth-list dt {
  color: #7892ad;
  font-family: var(--font-mono);
  font-size: 9px;
}

.truth-list dd {
  margin: 0;
  color: #d9e6f2;
  font-size: 11px;
  font-weight: 700;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(15, 35, 62, 0.06);
}

.task-composer {
  padding: clamp(28px, 4vw, 48px);
  border: 0;
  box-shadow: none;
}

.panel-head {
  margin-bottom: 24px;
}

.panel-head h2,
.view-heading h2 {
  font-size: 24px;
  letter-spacing: -0.035em;
}

.panel-status {
  padding: 6px 9px;
  color: var(--success);
  background: var(--success-soft);
  border: 1px solid #b8dece;
  border-radius: 2px;
  font-size: 10px;
  font-weight: 900;
}

#trial-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

#trial-form label {
  display: grid;
  gap: 8px;
}

#trial-form label:nth-of-type(3),
#trial-form label:nth-of-type(4),
.project-lock-note,
.browser-binding-note,
.form-error,
.form-actions {
  grid-column: 1 / -1;
}

#trial-form label > span {
  color: #40536b;
  font-size: 11px;
  font-weight: 900;
}

input,
textarea {
  width: 100%;
  color: var(--ink);
  background: #fbfcfd;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

input {
  height: 46px;
  padding: 0 13px;
}

textarea {
  min-height: 94px;
  padding: 12px 13px;
  resize: vertical;
}

input:focus,
textarea:focus {
  background: white;
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(11, 116, 184, 0.1);
}

input[readonly] {
  color: #53657b;
  background: #eef2f5;
  cursor: not-allowed;
}

.project-lock-note,
.browser-binding-note,
.form-error {
  margin: 0;
  padding: 11px 13px;
  font-size: 11px;
  line-height: 1.55;
}

.project-lock-note {
  color: #1e5474;
  background: var(--blue-100);
  border-left: 3px solid var(--blue-600);
}

.browser-binding-note {
  color: #40536b;
  background: #f5f8fb;
  border-left: 3px solid var(--line-strong);
}

.form-error {
  color: #8b301d;
  background: var(--warning-soft);
  border-left: 3px solid var(--warning);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 4px;
}

.form-actions > span {
  color: var(--muted);
  font-size: 10px;
}

.primary-button,
.secondary-button,
.copy-button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 2px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  transition: transform 130ms ease, background 130ms ease, border-color 130ms ease;
}

.primary-button {
  color: white;
  background: var(--blue-600);
  border: 1px solid var(--blue-600);
}

.primary-button:hover {
  background: #075f98;
  border-color: #075f98;
  transform: translateY(-1px);
}

.secondary-button,
.copy-button {
  color: var(--ink);
  background: white;
  border: 1px solid var(--line-strong);
}

.secondary-button:hover,
.copy-button:hover {
  color: var(--blue-600);
  border-color: var(--blue-600);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none !important;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 20px 0;
  background: white;
  border: 1px solid var(--line);
}

.metric-strip article {
  min-width: 0;
  padding: 20px;
  border-right: 1px solid var(--line);
}

.metric-strip article:last-child {
  border-right: 0;
}

.metric-strip span,
.metric-strip small,
.metric-strip strong {
  display: block;
}

.metric-strip span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.05em;
}

.metric-strip strong {
  margin: 8px 0 5px;
  overflow: hidden;
  font-size: clamp(17px, 2vw, 25px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-strip small {
  color: #8290a2;
  font-size: 10px;
}

.live-task {
  margin-top: 20px;
  padding: 24px;
}

.progress-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(330px, 0.65fr);
  gap: 18px;
}

.progress-main {
  padding: 24px;
  color: white;
  background: var(--navy-900);
}

.progress-main > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.progress-main > div strong {
  color: var(--cyan-200);
  font-family: var(--font-mono);
  font-size: 24px;
}

.progress-main p {
  margin: 16px 0 0;
  color: #a9bbcd;
  font-size: 11px;
}

.progress-track {
  height: 7px;
  margin-top: 22px;
  overflow: hidden;
  background: #29415f;
}

.progress-track span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--cyan-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 280ms ease;
}

.progress-layout dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  border: 1px solid var(--line);
}

.progress-layout dl div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
  border-right: 1px solid var(--line);
}

.progress-layout dl div:last-child {
  border-right: 0;
}

.progress-layout dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.progress-layout dd {
  margin: 8px 0 0;
  font-size: 15px;
  font-weight: 900;
}

.queue-message {
  margin: 16px 0 0;
  padding: 13px 15px;
  color: #1e5474;
  background: var(--blue-100);
  border-left: 4px solid var(--blue-600);
  font-size: 11px;
  line-height: 1.65;
}

.example-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 20px;
  padding: 18px 20px;
  background: #fffaf0;
  border: 1px solid #ead6a8;
}

.example-banner strong {
  font-size: 12px;
}

.view-heading {
  align-items: flex-end;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-strong);
}

.view-heading p:not(.eyebrow) {
  max-width: 760px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.lead-list,
.task-list,
.outreach-list {
  display: grid;
  gap: 12px;
}

.lead-row {
  display: grid;
  grid-template-columns: minmax(250px, 0.8fr) minmax(330px, 1.15fr) minmax(250px, 0.8fr);
  background: white;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue-600);
  box-shadow: 0 6px 18px rgba(15, 35, 62, 0.045);
}

.lead-row > section {
  min-width: 0;
  padding: 22px;
}

.lead-row > section + section {
  border-left: 1px solid var(--line);
}

.lead-identity {
  position: relative;
  display: grid;
  grid-template-columns: 38px 1fr;
  align-content: start;
  gap: 12px;
}

.row-number {
  color: var(--blue-600);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
}

.lead-location {
  margin: 0 0 5px;
  color: var(--blue-600);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead-row h3,
.outreach-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
}

.lead-products {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.score-stack {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.score-stack span,
.risk-chip,
.clean-chip,
.draft-chip,
.cache-badge {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 2px;
  font-size: 9px;
  font-weight: 900;
}

.score-stack span {
  color: #1d5b75;
  background: var(--blue-100);
  border: 1px solid #beddea;
}

.cache-badge {
  grid-column: 2;
  width: fit-content;
  margin-top: 10px;
  color: #78551b;
  background: #fff4d8;
  border: 1px solid #ead19c;
}

.lead-row h4,
.outreach-card h4 {
  margin: 0 0 12px;
  color: #3d516a;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.evidence-cell ul {
  margin: 0;
  padding-left: 17px;
}

.evidence-cell li,
.assessment-cell p {
  color: #44576d;
  font-size: 11px;
  line-height: 1.65;
}

.evidence-cell li + li {
  margin-top: 6px;
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.source-link {
  padding: 5px 7px;
  color: var(--blue-600);
  background: #f6fbfe;
  border: 1px solid #c9deea;
  border-radius: 2px;
  font-size: 9px;
  font-weight: 800;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.source-link:hover {
  color: white;
  background: var(--blue-600);
  border-color: var(--blue-600);
}

.source-link.is-disabled {
  color: var(--muted);
  pointer-events: none;
}

.risk-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 15px;
}

.risk-chip {
  color: #8b301d;
  background: var(--warning-soft);
  border: 1px solid #e4b5a8;
}

.clean-chip {
  color: var(--success);
  background: var(--success-soft);
  border: 1px solid #b8dece;
}

.task-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 140px minmax(170px, auto) 100px;
  align-items: center;
  gap: 18px;
  padding: 17px 20px;
  background: white;
  border: 1px solid var(--line);
}

.task-identity {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
}

.task-identity strong,
.task-identity small,
.task-progress-copy strong,
.task-progress-copy small {
  display: block;
}

.task-identity strong {
  font-size: 12px;
}

.task-identity small,
.task-progress-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.task-progress-copy strong {
  font-family: var(--font-mono);
  font-size: 14px;
}

.status-pill {
  width: fit-content;
  padding: 6px 8px;
  color: #43566c;
  background: #edf1f5;
  border: 1px solid #d5dee7;
  border-radius: 2px;
  font-size: 9px;
  font-weight: 900;
}

.status-completed {
  color: var(--success);
  background: var(--success-soft);
  border-color: #b8dece;
}

.status-partial,
.status-failed,
.status-cancelled {
  color: #8b4d21;
  background: #fff7e8;
  border-color: #ead1a5;
}

.status-queued,
.status-claimed,
.status-researching,
.status-verifying,
.status-writing_outreach,
.status-validating {
  color: #1d5b75;
  background: var(--blue-100);
  border-color: #beddea;
}

.outreach-card {
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  border-top: 4px solid var(--navy-800);
}

.outreach-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.outreach-card > header > div {
  display: flex;
  gap: 12px;
}

.draft-chip {
  color: #78551b;
  background: #fff4d8;
  border: 1px solid #ead19c;
}

.draft-subject {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: #f7f9fb;
  border-bottom: 1px solid var(--line);
}

.draft-subject > span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
}

.draft-subject strong {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.copy-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 9px;
}

.draft-body {
  margin: 0;
  padding: 24px;
  overflow-wrap: anywhere;
  color: #32465e;
  background: white;
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.evidence-cell,
.draft-body {
  overflow-wrap: anywhere;
}

.draft-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 14px 20px;
  background: #f7f9fb;
  border-top: 1px solid var(--line);
}

.empty-state {
  padding: 60px 30px;
  text-align: center;
  background: white;
  border: 1px dashed var(--line-strong);
}

.empty-state strong {
  font-size: 17px;
}

.empty-state p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.cache-notice {
  margin: 0;
  padding: 12px 14px;
  color: #78551b;
  background: #fff4d8;
  border: 1px solid #ead19c;
  font-size: 10px;
  font-weight: 800;
}

.locked-view {
  min-height: 560px;
}

.locked-outline {
  display: grid;
  min-height: 520px;
  padding: clamp(38px, 8vw, 110px);
  place-content: center;
  text-align: center;
  background:
    linear-gradient(rgba(16, 35, 62, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 35, 62, 0.035) 1px, transparent 1px),
    white;
  background-size: 36px 36px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.locked-outline::before {
  content: "LOCKED IN PUBLIC TRIAL";
  width: fit-content;
  margin: 0 auto 24px;
  padding: 7px 10px;
  color: #6b7d91;
  background: #eef2f5;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.locked-outline h2 {
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.05em;
}

.locked-outline > p:not(.eyebrow) {
  max-width: 600px;
  margin: 18px auto 24px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.locked-outline .primary-button {
  width: fit-content;
  margin: 0 auto;
}

.plan-lock-dialog {
  width: min(92vw, 560px);
  padding: 30px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line-strong);
  border-top: 6px solid var(--cyan-500);
  border-radius: 3px;
  box-shadow: 0 28px 80px rgba(7, 20, 38, 0.32);
}

.plan-lock-dialog::backdrop,
dialog::backdrop {
  background: rgba(5, 15, 29, 0.68);
  backdrop-filter: blur(3px);
}

.plan-lock-dialog > form {
  position: absolute;
  top: 12px;
  right: 12px;
}

.dialog-close {
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  color: var(--muted);
  background: #f1f4f7;
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
  font-size: 19px;
}

.plan-lock-dialog h2 {
  font-size: 28px;
  letter-spacing: -0.04em;
}

.lock-feature {
  margin: 18px 0 8px;
  font-weight: 900;
}

#plan-lock-detail {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.experience-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px 12px;
  margin-top: 20px;
  padding: 16px;
  background: var(--navy-900);
  border-left: 4px solid var(--cyan-500);
}

.experience-panel > span,
.experience-panel > small {
  color: #91a7bf;
  font-size: 10px;
}

.experience-panel > strong {
  grid-row: 2;
  color: white;
  font-family: var(--font-mono);
  font-size: 22px;
  letter-spacing: 0.08em;
}

.experience-panel .text-button {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  color: var(--cyan-200);
}

.experience-panel > small {
  grid-column: 1 / -1;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.muted {
  color: var(--muted);
}

@media (max-width: 1180px) {
  .command-hero {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    min-height: 360px;
  }

  .metric-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .metric-strip article:nth-child(2) {
    border-right: 0;
  }

  .metric-strip article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .lead-row {
    grid-template-columns: minmax(250px, 0.8fr) minmax(330px, 1.2fr);
  }

  .assessment-cell {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    border-left: 0 !important;
  }
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .brand {
    justify-content: center;
    padding: 18px 10px;
  }

  .brand > span:last-child,
  .nav-item > span:not(.nav-code),
  .nav-item b,
  .nav-item i,
  .profile-link > span:nth-child(2),
  .profile-link i,
  .sidebar-foot > p {
    display: none;
  }

  .primary-nav {
    padding-inline: 9px;
  }

  .nav-item {
    grid-template-columns: 1fr;
    place-items: center;
    padding: 0;
    border-left: 0;
    border-bottom: 3px solid transparent;
  }

  .nav-item.is-active {
    border-bottom-color: var(--cyan-500);
  }

  .profile-link {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .workspace-bar {
    align-items: flex-start;
  }

  .workspace-actions {
    align-items: stretch;
  }

  .live-chip {
    display: none;
  }

  .quota-button {
    min-width: 210px;
  }

  .guide-steps,
  .progress-layout {
    grid-template-columns: 1fr;
  }

  .lead-row {
    grid-template-columns: 1fr;
  }

  .lead-row > section + section {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .assessment-cell {
    grid-column: auto;
  }

  .task-row {
    grid-template-columns: 1fr auto;
  }

  .task-progress-copy,
  .task-row .status-pill {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  body {
    padding-bottom: 74px;
  }

  input,
  textarea,
  button {
    font-size: 16px;
  }

  .nav-item,
  button {
    min-height: 44px;
  }

  button.primary-button,
  button.secondary-button,
  button.copy-button {
    min-height: 44px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    display: block;
    width: 100%;
    height: 68px;
    overflow-x: hidden;
    border-top: 1px solid #27415e;
    border-right: 0;
  }

  .brand,
  .sidebar-foot {
    display: none;
  }

  .primary-nav {
    display: flex;
    width: 100%;
    min-width: 100%;
    gap: 0;
    padding: 6px 8px;
  }

  .nav-item {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    min-height: 55px;
  }

  .nav-code {
    font-size: 11px;
  }

  .workspace-bar {
    min-height: 118px;
    padding: 14px 16px;
  }

  .guest-mode-strip {
    flex-wrap: wrap;
    gap: 5px 13px;
    min-height: 52px;
    padding: 8px 16px;
  }

  .guest-mode-strip strong {
    width: 100%;
  }

  .workspace-bar h1 {
    font-size: 20px;
  }

  .quota-button {
    min-width: 0;
    width: min(48vw, 230px);
  }

  .quota-button span {
    font-size: 10px;
  }

  .quota-button small {
    display: none;
  }

  .workspace-content {
    padding: 16px;
  }

  .guide {
    padding: 16px;
  }

  .guide-steps {
    display: grid;
    overflow-x: visible;
  }

  .guide-steps li {
    min-width: 0;
  }

  .hero-copy {
    min-height: 330px;
    padding: 30px 24px;
  }

  .hero-copy h2 {
    font-size: 34px;
  }

  .task-composer {
    padding: 24px 18px;
  }

  #trial-form {
    grid-template-columns: 1fr;
  }

  #trial-form label,
  #trial-form label:nth-of-type(3),
  #trial-form label:nth-of-type(4),
  .project-lock-note,
  .browser-binding-note,
  .form-error,
  .form-actions {
    grid-column: auto;
  }

  .form-actions,
  .view-heading,
  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .form-actions .primary-button,
  .view-heading > button {
    width: 100%;
  }

  .metric-strip {
    grid-template-columns: 1fr 1fr;
  }

  .metric-strip article {
    padding: 16px;
  }

  .progress-layout dl {
    grid-template-columns: 1fr;
  }

  .progress-layout dl div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .progress-layout dl div:last-child {
    border-bottom: 0;
  }

  .lead-row > section {
    padding: 18px;
  }

  .task-row {
    grid-template-columns: 1fr;
  }

  .task-row > * {
    grid-column: auto !important;
  }

  .task-row .text-button {
    width: fit-content;
  }

  .outreach-card > header,
  .draft-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .draft-subject {
    grid-template-columns: 1fr auto;
  }

  .draft-subject > span {
    grid-column: 1 / -1;
  }

  .draft-actions button {
    width: 100%;
  }

  .locked-outline {
    min-height: 480px;
    padding: 40px 24px;
  }

  .dialog-actions {
    flex-direction: column-reverse;
  }

  .dialog-actions button {
    width: 100%;
  }
}

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