:root {
  color-scheme: dark;
  --page: #080B12;
  --surface: #111722;
  --surface-2: #171F2D;
  --surface-3: #202C3E;
  --text: #F2F5FB;
  --muted: #A8B2C3;
  --faint: #A8B2C3;
  --line: #263143;
  --accent: #2F5DE7;
  --accent-text: #9AB5FF;
  --accent-ink: #F2F5FB;
  --danger: #ff9185;
  --warning: #e8c66a;
  --shadow: rgba(0, 0, 0, 0.38);
  --radius-card: 24px;
  --radius-control: 14px;
  --content-width: 470px;
  font-family: "Avenir Next", Avenir, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

[data-theme="light"] {
  color-scheme: light;
  --page: #F4F6FB;
  --surface: #FFFFFF;
  --surface-2: #EAF0FA;
  --surface-3: #DCE5F4;
  --text: #101722;
  --muted: #526074;
  --faint: #526074;
  --line: #B9C5D8;
  --accent: #2F5DE7;
  --accent-text: #254DC8;
  --accent-ink: #F2F5FB;
  --danger: #a5362e;
  --warning: #8c6818;
  --shadow: rgba(38, 45, 34, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--page);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 50% -10%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 34rem),
    var(--page);
  color: var(--text);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

button,
input,
textarea {
  font: inherit;
}

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

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 82%, white);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  transform: translateY(-150%);
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 14px;
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  width: 100%;
  min-height: 100dvh;
}

.phone-stage {
  width: 100%;
  min-height: 100dvh;
  background: var(--page);
}

.screen {
  width: min(100%, var(--content-width));
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 20px calc(104px + env(safe-area-inset-bottom));
  background: var(--page);
}

.screen--centered {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-bottom: max(26px, env(safe-area-inset-bottom));
}

.screen--auth {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: max(30px, env(safe-area-inset-bottom));
}

.screen-enter {
  animation: screen-enter 360ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes screen-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--line));
  border-radius: 11px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--accent-text);
  font-size: 15px;
  font-weight: 800;
}

.brand-home {
  border: 0;
  padding: 0;
  min-height: 44px;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
}

.topbar-title { min-width: 0; }

.topbar {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.topbar-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  font-size: 20px;
  transition: transform 160ms ease, background 160ms ease;
}

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

.icon-button:active,
.button:active,
.automation-card:active,
.nav-button:active,
.chip:active {
  transform: scale(0.98);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  letter-spacing: -0.035em;
}

.hero-title {
  max-width: 10ch;
  margin-bottom: 18px;
  font-size: clamp(46px, 13vw, 64px);
  line-height: 0.95;
}

.page-title {
  margin-bottom: 10px;
  font-size: 34px;
  line-height: 1.02;
}

.section-title {
  margin-bottom: 8px;
  font-size: 24px;
  line-height: 1.08;
}

.body-copy,
.helper,
.card-copy {
  color: var(--muted);
  line-height: 1.55;
}

.body-copy {
  max-width: 36ch;
  font-size: 17px;
}

.helper {
  margin-bottom: 0;
  font-size: 13px;
}

.prototype-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 24px 0;
  border: 1px solid color-mix(in srgb, var(--warning) 38%, var(--line));
  border-radius: var(--radius-control);
  background: color-mix(in srgb, var(--warning) 8%, var(--surface));
  padding: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.prototype-note strong {
  color: var(--text);
}

.button-row {
  display: grid;
  gap: 10px;
}

.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  padding: 0 18px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

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

.button--primary:hover {
  background: color-mix(in srgb, var(--accent) 88%, white);
}

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

.button--ghost {
  background: transparent;
  color: var(--muted);
}

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

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

.auth-card,
.panel,
.summary-card,
.step-card,
.upload-panel,
.chat-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: 0 18px 50px var(--shadow);
}

.auth-card {
  margin-top: 28px;
  padding: 22px;
}

.form-stack {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.input,
.textarea,
.search-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-2);
  color: var(--text);
}

.input,
.search-input {
  min-height: 50px;
  padding: 0 15px;
}

.textarea {
  min-height: 92px;
  resize: vertical;
  padding: 14px 15px;
  line-height: 1.45;
}

.input::placeholder,
.textarea::placeholder,
.search-input::placeholder {
  color: var(--faint);
  opacity: 1;
}

.field-error {
  margin: 0;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.4;
}

.dashboard-header {
  margin-bottom: 24px;
}

.dashboard-header h1 {
  max-width: 12ch;
}

.progress-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 26px;
  border-radius: var(--radius-card);
  background: var(--accent);
  padding: 20px;
  color: var(--accent-ink);
}

.progress-panel p {
  margin-bottom: 5px;
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 700;
}

.progress-panel strong {
  font-size: 22px;
  letter-spacing: -0.035em;
}

.progress-orbit {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 6px solid color-mix(in srgb, var(--accent-ink) 14%, transparent);
  border-top-color: var(--accent-ink);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
}

.search-wrap {
  position: relative;
  margin-bottom: 14px;
}

.search-input {
  padding-left: 42px;
}

.search-symbol {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  color: var(--faint);
  font-size: 18px;
}

.chip-row {
  display: flex;
  gap: 8px;
  margin: 0 -20px 22px;
  padding: 0 20px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.chip-row::-webkit-scrollbar {
  display: none;
}

.chip {
  min-height: 38px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.chip[aria-pressed="true"] {
  border-color: var(--accent-text);
  background: var(--accent);
  color: var(--accent-ink);
}

.automation-grid {
  display: grid;
  gap: 12px;
}

.automation-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--text);
  padding: 18px;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.automation-card:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: var(--surface-2);
}

.automation-card-top,
.meta-row,
.detail-actions,
.setting-row,
.progress-row,
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.automation-index {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px;
  background: var(--surface-3);
  color: var(--accent-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 800;
}

.status-label,
.meta-label,
.tool-tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-label {
  color: var(--warning);
}

.automation-card h2 {
  margin: 20px 0 8px;
  font-size: 21px;
  line-height: 1.08;
}

.automation-card p {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.48;
}

.meta-row {
  justify-content: flex-start;
  color: var(--faint);
  font-size: 12px;
}

.meta-separator {
  width: 1px;
  height: 14px;
  background: var(--line);
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--radius-card);
  padding: 34px 24px;
  text-align: center;
}

.empty-state h2 {
  margin-bottom: 8px;
  font-size: 22px;
}

.empty-state p {
  margin-bottom: 20px;
  color: var(--muted);
  line-height: 1.5;
}

.bottom-nav {
  position: fixed;
  z-index: 20;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: 12px;
  display: grid;
  width: min(calc(100% - 24px), calc(var(--content-width) - 24px));
  min-height: 70px;
  grid-template-columns: repeat(4, 1fr);
  margin: 0 auto;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 23px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: 0 18px 42px var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.nav-button {
  display: grid;
  min-width: 0;
  place-items: center;
  gap: 2px;
  border: 0;
  background: transparent;
  color: var(--faint);
  padding: 9px 4px 8px;
  transition: transform 160ms ease, color 160ms ease;
}

.nav-button[aria-current="page"] {
  color: var(--accent-text);
}

.nav-symbol {
  font-size: 20px;
  line-height: 1;
}

.nav-label {
  font-size: 10px;
  font-weight: 700;
}

.detail-hero {
  margin-bottom: 24px;
}

.detail-hero h1 {
  max-width: 12ch;
  margin: 18px 0 12px;
  font-size: 38px;
  line-height: 0.98;
}

.detail-hero > p {
  color: var(--muted);
  line-height: 1.55;
}

.tool-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 16px 0 0;
}

.tool-tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: 8px 10px;
}

.summary-card {
  margin-bottom: 14px;
  padding: 20px;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.summary-item {
  border-radius: var(--radius-control);
  background: var(--surface-2);
  padding: 14px;
}

.summary-item span {
  display: block;
  margin-bottom: 7px;
  color: var(--faint);
  font-size: 11px;
}

.summary-item strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
}

.trust-box {
  margin: 16px 0 24px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  padding: 15px 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.trust-box strong {
  color: var(--text);
}

.sticky-action {
  position: sticky;
  bottom: 92px;
  display: grid;
  padding-top: 16px;
  background: linear-gradient(transparent, var(--page) 34%);
}

.step-progress {
  margin: 6px 0 22px;
}

.progress-row {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-3);
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 360ms cubic-bezier(0.16, 1, 0.3, 1);
}

.step-card {
  padding: 22px;
}

.step-card h1 {
  margin-bottom: 12px;
  font-size: 31px;
  line-height: 1.03;
}

.step-card > p {
  color: var(--muted);
  line-height: 1.55;
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 28px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  top: 0;
  left: 0;
  color: var(--accent-text);
  font-weight: 800;
}

.upload-panel {
  margin-top: 14px;
  padding: 20px;
}

.upload-panel h2 {
  margin-bottom: 8px;
  font-size: 21px;
}

.upload-panel > p {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.file-drop {
  display: grid;
  min-height: 126px;
  place-items: center;
  border: 1px dashed color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: var(--radius-control);
  background: var(--surface-2);
  padding: 16px;
  text-align: center;
}

.file-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.file-drop-label {
  cursor: pointer;
}

.file-drop-label strong,
.file-drop-label span {
  display: block;
}

.file-drop-label strong {
  margin-bottom: 6px;
}

.file-drop-label span {
  color: var(--faint);
  font-size: 12px;
}

.evidence-preview {
  width: 100%;
}

.evidence-preview img {
  display: block;
  width: 100%;
  max-height: 210px;
  object-fit: cover;
  border-radius: 12px;
}

.evidence-preview p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.validation-state {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 14px;
  border-radius: var(--radius-control);
  background: var(--surface-2);
  padding: 14px;
}

.validation-symbol {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 900;
}

.validation-state strong,
.validation-state span {
  display: block;
}

.validation-state span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.skeleton-line {
  height: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-3);
}

.skeleton-line::after {
  content: "";
  display: block;
  width: 42%;
  height: 100%;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--text) 13%, transparent), transparent);
  animation: shimmer 900ms ease-in-out infinite;
}

@keyframes shimmer {
  from { transform: translateX(-120%); }
  to { transform: translateX(340%); }
}

.step-actions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  margin-top: 18px;
}

.chat-panel {
  display: flex;
  min-height: calc(100dvh - 190px);
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding: 17px;
}

.chat-header strong,
.chat-header span {
  display: block;
}

.chat-header span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.chat-messages {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  overflow-y: auto;
}

.message {
  width: fit-content;
  max-width: 86%;
  border-radius: 18px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.48;
}

.message--assistant {
  align-self: flex-start;
  border-bottom-left-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
}

.message--user {
  align-self: flex-end;
  border-bottom-right-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
  border-top: 1px solid var(--line);
  padding: 12px;
}

.chat-form .input {
  min-width: 0;
}

.send-button {
  width: 50px;
  min-height: 50px;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 20px;
  font-weight: 900;
}

.panel {
  margin-bottom: 14px;
  padding: 20px;
}

.panel h2 {
  margin-bottom: 14px;
  font-size: 20px;
}

.setting-row {
  min-height: 54px;
  border-top: 1px solid var(--line);
}

.setting-row:first-of-type {
  border-top: 0;
}

.setting-row span {
  color: var(--muted);
  font-size: 13px;
}

.toggle {
  position: relative;
  width: 48px;
  height: 28px;
  flex: 0 0 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-3);
}

.toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 180ms ease, background 180ms ease;
}

.toggle[aria-pressed="true"] {
  background: color-mix(in srgb, var(--accent) 25%, var(--surface-3));
}

.toggle[aria-pressed="true"]::after {
  transform: translateX(20px);
  background: var(--accent);
}

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

.progress-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  border-radius: var(--radius-control);
  background: var(--surface-2);
  padding: 13px;
}

.progress-item strong,
.progress-item span {
  display: block;
}

.progress-item span {
  margin-top: 3px;
  color: var(--faint);
  font-size: 11px;
}

.progress-badge {
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 800;
}

.legal-copy {
  color: var(--faint);
  font-size: 12px;
  line-height: 1.55;
}

/* Keep every auth action aligned, including inside the WordPress workspace. */
.screen--auth > .auth-card {
  width: 100%;
  max-width: none;
  margin: 24px 0 16px;
}

.screen--auth > .auth-actions {
  width: 100%;
  max-width: none;
  margin: 0;
  gap: 12px;
}

.screen--auth .button {
  white-space: normal;
  line-height: 1.4;
  padding: 12px 16px;
}

.screen--auth > .auth-about {
  align-self: center;
  min-height: 44px;
  margin: 16px 0 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.screen--auth > .legal-copy {
  margin: 0;
  line-height: 1.65;
}

.toast {
  position: fixed;
  z-index: 50;
  right: 20px;
  bottom: 96px;
  left: 20px;
  width: min(calc(100% - 40px), 430px);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--text);
  color: var(--page);
  padding: 13px 15px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 20px 50px var(--shadow);
  animation: toast-in 240ms ease both;
}

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

@media (min-width: 760px) {
  body {
    padding: 30px;
  }

  .phone-stage {
    width: min(100%, 500px);
    min-height: calc(100dvh - 60px);
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    box-shadow: 0 32px 90px var(--shadow);
  }

  .screen {
    min-height: calc(100dvh - 60px);
  }

  .bottom-nav {
    bottom: 42px;
  }

  .toast {
    bottom: 118px;
  }
}

@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;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .bottom-nav {
    background: var(--surface);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

.request-status { padding: 14px; border: 1px solid var(--line); border-radius: 12px; line-height: 1.6; }
.consent { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.consent input { flex: 0 0 auto; width: 22px; height: 22px; margin: 1px 0 0; }
.button-row > .button { min-height: 48px; }
.panel h2 { overflow-wrap: anywhere; }
button:disabled { cursor: not-allowed; }
.brand-mark { background: var(--accent); color: var(--accent-ink); }
.hero-title { max-width: 13ch; font-size: clamp(38px, 10vw, 52px); line-height: 1.06; }
.icon-button { min-width: 48px; min-height: 48px; }
[data-theme="light"] button:focus-visible,
[data-theme="light"] a:focus-visible,
[data-theme="light"] input:focus-visible,
[data-theme="light"] textarea:focus-visible { outline-color: #111318; }

/* Nocturne: the same graphite/cobalt identity as the WordPress drafts. */
body { background: var(--page); }
.brand { font-weight: 800; }
.button--primary, .category-chip[aria-pressed="true"] { color: var(--accent-ink); }
.progress-panel { border: 1px solid var(--accent); }
[data-theme="dark"] .bottom-nav { background: var(--surface); }

/* Personal mobile learning: same Nocturne palette, earned state only. */
.learning-panel {display:grid;grid-template-columns:1fr 1fr;gap:16px;background:var(--accent);color:var(--accent-ink);border-radius:24px;padding:18px;margin:20px 0 24px;align-items:center;}
.learning-score>span {font-size:10px;font-weight:800;letter-spacing:.12em;}
.learning-score strong {display:block;font-size:44px;line-height:1.1;margin-top:8px;letter-spacing:-.04em;}
.learning-score small {font-size:18px;letter-spacing:0;}
.learning-score p {font-weight:700;margin:6px 0 0;}
.learning-path {min-width:0;}
.learning-path>span {display:block;height:8px;border-radius:8px;background:rgba(242,245,251,.25);overflow:hidden;}
.learning-path>span::after {content:"";display:block;width:var(--earned);height:100%;background:var(--accent-ink);}
.learning-path p {font-size:12px;line-height:1.5;margin:8px 0 0;}
.challenge-heading h2 {font-size:22px;line-height:1.25;margin:0 0 8px;letter-spacing:-.03em;}
.challenge-heading p {font-size:14px;color:var(--muted);margin:0 0 20px;}
.challenge-reward {display:block;color:var(--accent-text);font-size:12px;font-weight:700;margin:14px 0;}
.learning-rules,.device-explanation {border-top:1px solid var(--line);margin:28px 0 0;padding:24px 0 4px;}
.learning-rules summary {cursor:pointer;font-weight:700;padding:8px 0;}
.learning-rules p,.device-explanation p {font-size:14px;line-height:1.65;color:var(--muted);}
.device-explanation h2 {font-size:22px;line-height:1.3;letter-spacing:-.02em;}
.device-explanation strong {color:var(--text);}
.source-links {padding-left:20px;line-height:1.6;font-size:14px;}
.source-links a {color:var(--accent-text);text-decoration:underline;}
@media(max-width:360px){.learning-panel{padding:18px;gap:12px}.learning-score strong{font-size:46px}.learning-score>span{font-size:9px}}

/* Account initials are separate from the Scalia brand mark. */
.account-avatar{font-weight:800;font-size:18px}
.nav-button[data-navigate="profile"] .nav-symbol{display:grid;place-items:center;width:30px;height:30px;border:1px solid var(--line);border-radius:50%;background:var(--surface-2);color:var(--text);font-size:16px;font-weight:800;line-height:1}

.welcome-copy{padding:clamp(36px,9vh,100px) 0 36px}.welcome-copy .hero-title{font-size:clamp(38px,7vw,64px);max-width:14ch}.account-data{padding:22px;margin:20px 0}.account-data summary{font-size:17px;font-weight:700;cursor:pointer;min-height:32px}.account-data p{font-size:14px;line-height:1.7;color:var(--muted)}.screen--auth>.legal-copy{margin-top:8px}

.preview-entry{display:flex;align-items:center;gap:24px;padding:18px 0 24px}.preview-entry p{font-size:14px;line-height:1.6;color:var(--muted);margin:0;flex:1}.preview-entry .button{flex-shrink:0}.screen--preview .body-copy{max-width:64ch}.screen--preview .device-controls{margin:18px 0;padding:16px}.screen--preview .device-controls>p{display:none}.account-entry{min-height:44px;font-size:13px;padding:8px 16px}.mission-row--unavailable{opacity:.72}.preview-steps{display:grid;gap:20px}.preview-steps .step-card{margin:0}.preview-steps .step-card p{font-size:15px;line-height:1.7}.preview-steps h2{font-size:24px}.prototype-score{margin:0 0 24px}.screen--preview .mission-grid{margin-top:20px}
@media(max-width:650px){.preview-entry{align-items:flex-start;flex-direction:column;gap:12px}}

.screen-enter{animation:none}

/* Native file inputs remain keyboard-operable while the visible control stays English. */
.file-drop:focus-within { outline:3px solid var(--accent-text); outline-offset:4px; }
.consent { min-width:0; }
.consent input[type="checkbox"] { flex:0 0 22px; width:22px; height:22px; margin:1px 0 0; accent-color:var(--accent); }
.consent > span { flex:1; min-width:0; }

/* Recognisable navigation, using local Lucide geometry and the existing brand. */
.scalia-icon { display:block; flex:0 0 auto; width:24px; height:24px; pointer-events:none; }
.nav-button { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; padding:8px 6px; }
.nav-button .nav-symbol { display:grid; place-items:center; width:36px; height:36px; border:1px solid transparent; border-radius:12px; background:var(--surface-2); color:var(--muted); line-height:1; }
.nav-button .nav-symbol--account { border-radius:50%; font-size:16px; font-weight:800; }
.nav-button .scalia-icon { width:23px; height:23px; }
.nav-button[aria-current="page"] .nav-symbol { background:var(--accent); color:var(--accent-ink); border-color:var(--accent); }
.nav-button:hover .nav-symbol { border-color:var(--accent-text); color:var(--text); }
.nav-button[aria-current="page"]:hover .nav-symbol { color:var(--accent-ink); }
@media(min-width:900px) { .nav-button .nav-symbol { width:40px; height:40px; } .nav-button .scalia-icon { width:25px; height:25px; } }
