:root {
  color-scheme: dark;
  --bg: #08090b;
  --surface: #0e1013;
  --surface-2: #15181d;
  --surface-3: #1b1f25;
  --text: #f7f7f5;
  --muted: #9298a3;
  --faint: #5d6470;
  --line: #252a31;
  --line-strong: #343a43;
  --accent: #f3f4f6;
  --accent-text: #090a0c;
  --focus: #9aa6ff;
  --success: #43d17b;
  --danger: #ff6b6b;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.34);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f5f5f3;
  --surface-3: #ececea;
  --text: #111214;
  --muted: #626871;
  --faint: #90959c;
  --line: #e2e3e0;
  --line-strong: #cfd1cd;
  --accent: #111214;
  --accent-text: #ffffff;
  --focus: #4855d6;
  --success: #168b4d;
  --danger: #c83d3d;
  --shadow: 0 24px 90px rgba(20, 25, 35, 0.1);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

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

button {
  color: inherit;
}

.hidden {
  display: none !important;
}

.view {
  min-height: 100dvh;
}

.theme-toggle {
  position: fixed;
  z-index: 100;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(16px);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.theme-toggle svg,
.icon-button svg,
.pr-nav-button svg,
.back-button svg,
.composer button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

html[data-theme="dark"] .moon-icon,
html[data-theme="light"] .sun-icon {
  display: none;
}

.landing-view {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: max(20px, env(safe-area-inset-top)) clamp(22px, 6vw, 88px)
    max(22px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--focus) 11%, transparent), transparent 31%),
    var(--bg);
}

.landing-nav {
  min-height: 48px;
  display: flex;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 720;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 800;
}

.hero {
  width: min(920px, 100%);
  margin: auto;
  text-align: center;
  padding: 88px 0 66px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--success) 14%, transparent);
}

.hero h1 {
  margin: 24px 0 25px;
  font-size: clamp(48px, 9vw, 112px);
  line-height: 0.93;
  letter-spacing: -0.065em;
  font-weight: 700;
}

.hero h1 span {
  color: var(--muted);
}

.hero > p {
  max-width: 650px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 42px;
}

.button {
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-weight: 680;
  cursor: pointer;
  transition: transform 150ms ease, opacity 150ms ease, background 150ms ease, border-color 150ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.button.primary {
  background: var(--accent);
  color: var(--accent-text);
}

.button.secondary {
  border-color: var(--line-strong);
  background: var(--surface);
}

.button.full {
  width: 100%;
}

.button.compact {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 11px;
  font-size: 13px;
}

.button.danger {
  border-color: color-mix(in srgb, var(--danger) 40%, var(--line));
  background: color-mix(in srgb, var(--danger) 9%, var(--surface));
  color: var(--danger);
}

.landing-footer {
  display: grid;
  justify-items: center;
  gap: 16px;
  color: var(--faint);
  font-size: 12px;
}

.footer-highlights,
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-highlights {
  gap: clamp(18px, 5vw, 64px);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-links {
  gap: 12px 24px;
}

.footer-links a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: color 150ms ease;
}

.centered-view {
  display: grid;
  place-items: center;
  padding: 72px 20px 32px;
  background:
    radial-gradient(circle at 50% 25%, color-mix(in srgb, var(--focus) 8%, transparent), transparent 34%),
    var(--bg);
}

.auth-card,
.verify-card {
  position: relative;
  width: min(430px, 100%);
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
}

.auth-card h2,
.verify-card h2 {
  margin: 0;
  text-align: center;
  font-size: 28px;
  letter-spacing: -0.035em;
}

.auth-card > p,
.verify-card > p {
  margin: 9px 0 28px;
  color: var(--muted);
  text-align: center;
  line-height: 1.55;
}

.back-button {
  position: absolute;
  top: 22px;
  left: 22px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.back-button:hover {
  background: var(--surface-2);
}

.google-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-color: var(--line);
  background: var(--surface);
}

.google-button svg {
  width: 19px;
  height: 19px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--faint);
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.field {
  display: block;
  margin-bottom: 16px;
}

.field span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.field input,
.code-input {
  width: 100%;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: var(--surface-2);
  color: var(--text);
  padding: 0 14px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field input:focus,
.code-input:focus,
.composer:focus-within {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 14%, transparent);
}

.form-error {
  margin: -3px 0 14px;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.45;
}

.auth-switch {
  margin: 22px 0 0 !important;
  font-size: 14px;
}

.auth-switch button,
.verify-actions button {
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.security-icon {
  width: 58px;
  height: 58px;
  margin: 2px auto 22px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--surface-2);
}

.security-icon svg {
  width: 29px;
  height: 29px;
  fill: none;
  stroke: var(--text);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.verify-card .eyebrow {
  width: 100%;
  justify-content: center;
  margin-bottom: 10px;
}

.code-display {
  margin: 0 0 16px;
  padding: 17px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: var(--surface-2);
  text-align: center;
  font: 720 28px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  user-select: all;
}

.code-input {
  height: 58px;
  margin-bottom: 16px;
  text-align: center;
  font: 700 23px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
}

.verify-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  font-size: 13px;
}

.dashboard-view {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

.app-header {
  flex: none;
  min-height: 68px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding: max(10px, env(safe-area-inset-top)) clamp(18px, 4vw, 44px) 10px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(18px);
}

.engine-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--faint);
}

.status-dot.active {
  background: var(--success);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--success) 12%, transparent);
}

.profile {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.profile-name {
  max-width: 180px;
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-badge {
  padding: 4px 8px;
  border: 1px solid color-mix(in srgb, var(--focus) 42%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--focus) 10%, transparent);
  color: var(--focus);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.pr-nav-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  cursor: pointer;
  white-space: nowrap;
}

.pr-nav-button svg {
  width: 17px;
  height: 17px;
}

.pr-nav-button:hover,
.pr-nav-button.selected {
  border-color: var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.chat-shell {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chat-messages {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  padding: 42px max(20px, calc((100vw - 850px) / 2)) 26px;
}

.empty-chat {
  height: 100%;
  min-height: 320px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.empty-mark {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--text);
  color: var(--bg);
  font-weight: 800;
}

.empty-chat h2 {
  margin: 20px 0 8px;
  font-size: clamp(24px, 4vw, 34px);
  letter-spacing: -0.045em;
}

.empty-chat p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.message {
  width: 100%;
  display: flex;
  margin: 0 auto 25px;
}

.message.user {
  justify-content: flex-end;
}

.message-content {
  max-width: min(78%, 680px);
  font-size: 15px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message.user .message-content {
  padding: 11px 16px;
  border-radius: 18px 18px 5px 18px;
  background: var(--surface-3);
}

.message.cit .message-content {
  max-width: min(88%, 740px);
}

.message.cit.streaming .message-content::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 16px;
  margin-left: 3px;
  background: var(--text);
  animation: blink 850ms steps(1) infinite;
  vertical-align: -2px;
}

.message.proactive .message-content {
  padding-left: 15px;
  border-left: 2px solid var(--line-strong);
  color: var(--muted);
}

@keyframes blink {
  50% { opacity: 0; }
}

.composer-wrap {
  flex: none;
  padding: 12px max(18px, calc((100vw - 850px) / 2))
    max(10px, env(safe-area-inset-bottom));
  background: linear-gradient(transparent, var(--bg) 20%);
}

.composer {
  min-height: 58px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 8px 8px 8px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 19px;
  background: var(--surface);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.composer textarea {
  min-height: 40px;
  max-height: 160px;
  flex: 1;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 9px 0 7px;
  line-height: 1.45;
}

.composer textarea::placeholder {
  color: var(--faint);
}

.composer button {
  flex: none;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 13px;
  background: var(--accent);
  color: var(--accent-text);
  cursor: pointer;
}

.composer button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.composer-wrap > p {
  margin: 8px 0 0;
  color: var(--faint);
  text-align: center;
  font-size: 11px;
}

.pr-panel {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(30px, 5vw, 68px) max(20px, calc((100vw - 1080px) / 2))
    max(40px, env(safe-area-inset-bottom));
}

.pr-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
}

.pr-panel-header h1 {
  margin: 10px 0 8px;
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: -0.055em;
}

.pr-panel-header p,
.pr-section-heading p {
  margin: 0;
  max-width: 650px;
  color: var(--muted);
  line-height: 1.55;
}

.smtp-status {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 26px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}

.smtp-status-dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--faint);
}

.smtp-status.ready .smtp-status-dot {
  background: var(--success);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--success) 12%, transparent);
}

.smtp-status.blocked .smtp-status-dot {
  background: var(--danger);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--danger) 10%, transparent);
}

.smtp-status > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.smtp-status strong {
  font-size: 13px;
}

.smtp-status span:last-child {
  color: var(--muted);
  font-size: 12px;
}

.evolution-note {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-top: 26px;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--success) 32%, var(--line));
  border-radius: 15px;
  background: color-mix(in srgb, var(--success) 5%, var(--surface));
}

.evolution-note .status-dot {
  flex: none;
  margin-top: 4px;
}

.evolution-note > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.evolution-note strong {
  font-size: 13px;
}

.evolution-note span:last-child {
  max-width: 780px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.pr-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 34px 0;
}

.pr-summary > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 112px;
  justify-content: center;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.pr-summary strong {
  font-size: 29px;
  letter-spacing: -0.04em;
}

.pr-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pr-section {
  margin-top: 28px;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: 21px;
  background: var(--surface);
}

.pr-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.pr-section-heading h2 {
  margin: 0 0 6px;
  font-size: 20px;
  letter-spacing: -0.025em;
}

.pr-section-heading p {
  font-size: 13px;
}

.pr-heading-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.text-button:hover {
  color: var(--text);
}

.text-button:disabled {
  opacity: 0.5;
  cursor: wait;
}

.contact-form {
  margin: -2px 0 22px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
}

.contact-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 14px;
}

.contact-form .field span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.contact-form .field em {
  color: var(--faint);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.contact-form .field input {
  background: var(--bg);
}

.contact-email-field {
  grid-column: 1 / -1;
}

.contact-form .form-error {
  margin: 0 0 14px;
}

.contact-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.pr-loading,
.pr-empty {
  margin: 0;
  padding: 28px 4px;
  color: var(--muted);
  text-align: center;
}

.pr-contact-list {
  display: grid;
  gap: 12px;
}

.evolution-list {
  display: grid;
  gap: 14px;
}

.proposal-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
}

.proposal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.proposal-header h3 {
  margin: 0;
  font: 700 15px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.proposal-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 5px;
}

.proposal-kind {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font: 750 10px/1.4 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.proposal-kind.new-file {
  border: 1px solid color-mix(in srgb, #38bdf8 42%, var(--line));
  background: color-mix(in srgb, #38bdf8 12%, var(--surface-2));
  color: #7dd3fc;
}

.proposal-kind.update {
  border: 1px solid color-mix(in srgb, var(--success) 36%, var(--line));
  background: color-mix(in srgb, var(--success) 10%, var(--surface-2));
  color: var(--success);
}

.proposal-header p {
  margin: 0;
  color: var(--faint);
  font-size: 11px;
}

.proposal-label {
  margin-top: 18px;
  color: var(--faint);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.proposal-reasoning {
  margin: 6px 0 17px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.sandbox-result {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  border: 1px solid color-mix(in srgb, var(--success) 36%, var(--line));
  border-radius: 10px;
  color: var(--success);
  font-size: 11px;
}

.sandbox-result .status-dot {
  flex: none;
}

.proposal-preview {
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

.proposal-preview summary {
  padding: 14px 2px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
  cursor: pointer;
}

.proposal-preview[open] summary {
  color: var(--text);
}

.proposal-preview pre {
  max-height: 520px;
  margin: 14px 0 0;
  padding: 17px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font: 12px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre;
}

.proposal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 16px;
}

.pitch-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
}

.pitch-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.pitch-identity h3 {
  margin: 0 0 5px;
  font-size: 16px;
}

.pitch-identity p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.pitch-status {
  flex: none;
  padding: 5px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pitch-status.sent {
  border-color: color-mix(in srgb, var(--success) 42%, var(--line));
  color: var(--success);
}

.pitch-status.rejected {
  border-color: color-mix(in srgb, var(--danger) 38%, var(--line));
  color: var(--danger);
}

.pitch-preview,
.material-card {
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.pitch-preview summary,
.material-card summary {
  padding: 14px 2px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
  cursor: pointer;
}

.pitch-preview[open] summary,
.material-card[open] summary {
  color: var(--text);
}

.pitch-preview pre,
.material-card pre {
  margin: 14px 0 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font: 12px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.pitch-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 16px;
}

.material-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.material-card {
  margin: 0;
  padding: 0 17px 17px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-2);
}

.material-card summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 17px;
}

.material-card summary span {
  color: var(--faint);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.toast {
  position: fixed;
  z-index: 200;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: min(92vw, 480px);
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-3);
  box-shadow: var(--shadow);
  font-size: 13px;
}


/* Public legal and CIT manifesto pages */
.content-page {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--focus) 8%, transparent), transparent 28%),
    var(--bg);
}

.content-header {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
}

.content-nav {
  width: min(1040px, calc(100% - 44px));
  min-height: 76px;
  margin: 0 auto;
  padding-right: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.content-back-link {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  transition: color 150ms ease;
}

.content-back-link:hover,
.content-back-link:focus-visible,
.footer-links a:hover,
.footer-links a:focus-visible,
.content-footer a:hover,
.content-footer a:focus-visible {
  color: var(--text);
}

.content-main {
  width: min(850px, calc(100% - 44px));
  margin: 0 auto;
  padding: clamp(54px, 8vw, 96px) 0 72px;
}

.content-card {
  padding: clamp(30px, 6vw, 64px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  box-shadow: var(--shadow);
}

.content-kicker {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.content-card h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(36px, 6vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.content-lead {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.75;
}

.content-body {
  display: grid;
  gap: 18px;
  margin-top: 42px;
}

.content-section {
  padding: 24px 0 0;
  border-top: 1px solid var(--line);
}

.content-section h2 {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.content-section p,
.content-closing {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.content-closing {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
}

.pillar-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: pillar;
}

.pillar-list .content-section {
  position: relative;
  padding-left: 58px;
  counter-increment: pillar;
}

.pillar-list .content-section::before {
  content: counter(pillar, decimal-leading-zero);
  position: absolute;
  top: 24px;
  left: 0;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.content-footer {
  padding: 0 22px max(30px, env(safe-area-inset-bottom));
  color: var(--faint);
  font-size: 13px;
  text-align: center;
}

.content-footer nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.content-footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 150ms ease;
}

.content-footer a[aria-current="page"] {
  color: var(--text);
}

@media (max-width: 720px) {
  .landing-view {
    padding-left: 22px;
    padding-right: 22px;
  }

  .hero {
    padding-top: 58px;
  }

  .hero h1 {
    font-size: clamp(46px, 15vw, 76px);
  }

  .hero-actions {
    flex-direction: column;
  }

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

  .landing-footer {
    gap: 14px;
    padding-top: 24px;
  }

  .footer-highlights {
    display: none;
  }

  .footer-links {
    gap: 10px 18px;
  }

  .content-nav {
    width: min(100% - 32px, 1040px);
    min-height: 68px;
  }

  .content-back-link {
    font-size: 13px;
  }

  .content-main {
    width: min(100% - 28px, 850px);
    padding: 36px 0 48px;
  }

  .content-card {
    padding: 30px 22px;
    border-radius: 20px;
  }

  .content-card h1 {
    font-size: clamp(34px, 11vw, 48px);
  }

  .content-lead {
    margin-top: 22px;
  }

  .content-body {
    margin-top: 32px;
  }

  .pillar-list .content-section {
    padding-left: 50px;
  }

  .auth-card,
  .verify-card {
    padding: 32px 24px;
    border-radius: 20px;
  }

  .app-header {
    grid-template-columns: 1fr auto;
    min-height: 62px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .app-header .brand > span:last-child,
  .profile-name {
    display: none;
  }

  .engine-status {
    grid-column: 1 / 3;
    grid-row: 2;
    justify-content: center;
    margin-top: -8px;
    padding-bottom: 4px;
    font-size: 11px;
  }

  .profile {
    grid-column: 2;
    grid-row: 1;
  }

  .pr-nav-button {
    width: 42px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .pr-nav-button span {
    display: none;
  }

  .pr-panel {
    padding: 26px 14px max(30px, env(safe-area-inset-bottom));
  }

  .pr-panel-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .pr-panel-header .button {
    width: 100%;
  }

  .pr-summary {
    gap: 8px;
    margin: 24px 0;
  }

  .smtp-status {
    align-items: flex-start;
  }

  .pr-summary > div {
    min-height: 94px;
    padding: 14px 12px;
  }

  .pr-summary strong {
    font-size: 24px;
  }

  .pr-summary span {
    font-size: 9px;
  }

  .pr-section {
    padding: 17px;
    border-radius: 17px;
  }

  .pr-section-heading {
    flex-direction: column;
  }

  .pr-heading-actions {
    width: 100%;
    justify-content: space-between;
  }

  .contact-form {
    padding: 16px;
  }

  .contact-form-grid {
    grid-template-columns: 1fr;
  }

  .contact-email-field {
    grid-column: auto;
  }

  .contact-form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .pitch-card-top {
    flex-direction: column;
  }

  .proposal-header {
    flex-direction: column;
  }

  .proposal-preview pre {
    max-height: 420px;
    font-size: 11px;
  }

  .proposal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .pitch-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .material-grid {
    grid-template-columns: 1fr;
  }

  .chat-messages {
    padding: 24px 16px 16px;
  }

  .message-content,
  .message.cit .message-content {
    max-width: 92%;
    font-size: 15px;
  }

  .composer-wrap {
    padding-left: 12px;
    padding-right: 12px;
  }

  .theme-toggle {
    width: 42px;
    height: 42px;
  }

  .dashboard-view:not(.hidden) ~ .theme-toggle {
    display: none;
  }
}

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