:root {
  color-scheme: light;
  --ink: #11131a;
  --muted: #677084;
  --line: #dfe5ee;
  --surface: #f5f7fb;
  --panel: rgba(232, 240, 250, 0.95);
  --panel-strong: rgba(218, 230, 246, 0.98);
  --dark: #0c1018;
  --blue: #073a63;
  --cyan: #0f8db3;
  --pink: #f1264f;
  --green: #0d7a5f;
  --orange: #c45a20;
  --shadow: 0 18px 52px rgba(16, 20, 28, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 308px minmax(0, 1fr);
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(245, 247, 251, 0.92), rgba(245, 247, 251, 0.98)),
    url("/assets/dashboard-background.jpg");
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
}

.login-body {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  padding: 24px;
}

.login-shell {
  width: min(100%, 430px);
  padding: 0;
}

.login-card {
  display: grid;
  gap: 14px;
  padding: 26px;
  border: 1px solid rgba(174, 194, 220, 0.95);
  border-radius: 8px;
  background: rgba(245, 247, 251, 0.95);
  box-shadow: var(--shadow);
}

.login-card img {
  width: 235px;
  max-width: 100%;
  margin-bottom: 12px;
}

.login-card h1 {
  margin: 0;
  font-size: 38px;
}

.login-card form {
  display: grid;
  gap: 4px;
}

#loginStatus {
  min-height: 22px;
  margin: 0;
  color: var(--pink);
}

.sidebar {
  min-height: 100vh;
  padding: 22px;
  background: rgba(255, 255, 255, 0.88);
  border-right: 1px solid rgba(223, 229, 238, 0.94);
  position: sticky;
  top: 0;
  backdrop-filter: blur(18px);
}

.logo-wrap {
  display: flex;
  align-items: center;
  min-height: 72px;
  margin-bottom: 18px;
}

.logo-wrap img {
  width: 210px;
  max-width: 100%;
  display: block;
}

small,
p {
  color: var(--muted);
}

.client-picker span,
label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 760;
  margin-bottom: 16px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  background: rgba(226, 236, 249, 0.98);
  color: #0f1724;
  outline-color: var(--cyan);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

input:focus,
select:focus,
textarea:focus {
  background: rgba(214, 229, 247, 0.98);
  border-color: var(--cyan);
}

textarea {
  resize: vertical;
  line-height: 1.5;
}

nav {
  display: grid;
  gap: 7px;
  margin: 20px 0;
}

button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  font-weight: 820;
  cursor: pointer;
}

nav button {
  text-align: left;
}

button.active,
button.primary {
  background: linear-gradient(135deg, var(--dark), var(--blue));
  border-color: var(--dark);
  color: #fff;
}

button:hover {
  border-color: var(--cyan);
  transform: translateY(-1px);
}

#status {
  min-height: 22px;
  color: var(--pink);
}

.session-card {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(200, 214, 231, 0.96);
  border-radius: 8px;
  background: rgba(232, 240, 250, 0.86);
}

.session-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
  text-transform: uppercase;
}

.session-card strong {
  color: var(--ink);
  font-size: 14px;
}

.session-card button {
  min-height: 34px;
  margin-top: 6px;
}

main {
  padding: 28px;
  min-width: 0;
}

.hero {
  min-height: 220px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 30px;
  margin-bottom: 24px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(7, 16, 29, 0.88), rgba(7, 58, 99, 0.64), rgba(241, 38, 79, 0.22)),
    url("/assets/dashboard-background.jpg");
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero p,
.hero .eyebrow {
  color: rgba(255, 255, 255, 0.82);
}

.hero h1 {
  margin: 6px 0;
  font-size: 46px;
}

.hero-stack {
  display: grid;
  gap: 10px;
  min-width: 220px;
}

.ai-pill {
  min-height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  padding: 0 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-weight: 820;
}

.eyebrow {
  display: inline-block;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 860;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-title {
  max-width: 900px;
  margin-bottom: 20px;
}

h1,
h2,
h3 {
  margin: 0 0 8px;
}

.grid,
.metric-grid,
.client-action-grid,
.focus-grid,
.command-grid,
.launcher-grid,
.pipeline,
.tool-layout {
  display: grid;
  gap: 18px;
}

.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.client-home {
  display: none;
  margin-bottom: 18px;
}

.client-mode [data-admin-only] {
  display: none !important;
}

.client-mode .context-strip {
  display: none;
}

.client-mode .client-home {
  display: block;
}

.admin-mode .client-home {
  display: none;
}

.client-action-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 16px;
}

.client-action-grid button {
  min-height: 62px;
  background: linear-gradient(180deg, #f9fbfe, var(--panel-strong));
}

.metric-grid article,
.panel,
.tool-editor,
.tool-result {
  background: var(--panel);
  border: 1px solid rgba(174, 194, 220, 0.95);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(16, 20, 28, 0.07);
  backdrop-filter: blur(10px);
}

.metric-grid span,
.panel-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.metric-grid strong {
  display: block;
  margin: 8px 0;
  font-size: 25px;
  color: var(--dark);
  line-height: 1.05;
}

.metric-grid small,
.panel p,
.section-title p,
.action-list {
  font-size: 14px;
  font-weight: 500;
}

.panel h2,
.tool-editor h2,
.tool-result h2,
.section-title h2 {
  color: var(--dark);
  font-size: 24px;
  font-weight: 860;
}

label {
  color: #242a36;
  font-size: 14px;
  font-weight: 840;
}

label textarea,
label input,
label select {
  margin-top: 2px;
}

.focus-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
}

.command-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(380px, 0.75fr);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.pipeline {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 18px;
}

.pipeline span {
  min-height: 76px;
  display: flex;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #f9fbfe, var(--panel-strong));
  font-weight: 820;
}

.action-list {
  margin: 0;
  padding-left: 20px;
  color: var(--ink);
  line-height: 1.7;
}

.version-control {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 210px 160px;
  gap: 14px;
  align-items: end;
}

.version-control label {
  margin-bottom: 0;
}

.learning-switch-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.32fr) minmax(0, 0.68fr);
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid #c8d6e7;
  border-radius: 8px;
  background: #eef5fc;
}

.learning-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  cursor: pointer;
}

.learning-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.switch-track {
  width: 54px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  background: #8b2430;
  border: 1px solid rgba(7, 20, 36, 0.18);
  transition: background 160ms ease;
}

.switch-track span {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(7, 20, 36, 0.22);
  transition: transform 160ms ease;
}

.learning-switch input:checked + .switch-track {
  background: #0f8db3;
}

.learning-switch input:checked + .switch-track span {
  transform: translateX(24px);
}

.learning-switch strong {
  color: #071424;
  font-size: 16px;
  font-weight: 880;
}

#learningModeCopy {
  margin: 0;
  color: #526174;
  font-size: 14px;
  line-height: 1.45;
}

button.danger {
  color: #831f2c;
  background: #fff3f5;
  border-color: #efb7b7;
}

button.danger:hover {
  border-color: #d43b52;
  background: #ffe6ea;
}

.brain-badge {
  display: inline-grid;
  place-items: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 880;
}

.brain-badge.learning {
  color: #8a1f1f;
  background: #ffe5e5;
  border: 1px solid #efb7b7;
}

.brain-badge.learned {
  color: #075e35;
  background: #dff7eb;
  border: 1px solid #a8dfc1;
}

.panel-copy {
  margin: 16px 0 0;
  max-width: 860px;
  color: #526174;
}

.review-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.review-source {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid #c8d6e7;
  border-radius: 8px;
  background: #eef5fc;
  color: #526174;
  font-size: 13px;
  line-height: 1.45;
}

.monitor-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 12px;
  align-items: center;
  margin: 14px 0 16px;
  padding: 14px;
  border: 1px solid #c8d6e7;
  border-radius: 8px;
  background: #eef5fc;
}

.monitor-card strong {
  display: block;
  margin: 4px 0;
  color: #071424;
  font-size: 18px;
  font-weight: 880;
}

.monitor-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.compact-grid {
  gap: 12px;
}

.image-layout {
  align-items: start;
}

.image-layout .tool-editor {
  min-height: 640px;
}

.image-layout .tool-result {
  align-self: start;
  min-height: auto;
}

.generated-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 340px));
  gap: 14px;
  justify-content: center;
  align-content: start;
}

.generated-image-grid article {
  display: grid;
  gap: 10px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #c8d6e7;
  border-radius: 8px;
  background: #eef5fc;
}

.asset-preview {
  display: grid;
  place-items: center;
  width: 100%;
  background: #071424;
}

.asset-preview img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.asset-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 0 10px 10px;
}

.asset-actions span {
  color: #526174;
  font-size: 12px;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.download-button {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #071424;
  border-radius: 8px;
  background: #071424;
  color: #fff;
  font-size: 12px;
  font-weight: 820;
  text-decoration: none;
}

.download-button:hover {
  border-color: #0f8db3;
}

.activity-feed {
  display: grid;
  gap: 10px;
}

.activity-item {
  display: grid;
  grid-template-columns: minmax(120px, 0.22fr) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid #c8d6e7;
  border-radius: 8px;
  background: rgba(226, 236, 249, 0.92);
}

.activity-item span {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 860;
  text-transform: uppercase;
}

.activity-item strong {
  display: block;
  color: var(--dark);
  font-size: 16px;
}

.activity-item small {
  color: var(--muted);
  font-weight: 740;
}

.activity-empty {
  padding: 20px;
  border: 1px dashed #b5c7dd;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 720;
}

.readiness-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.readiness-list li {
  padding: 0;
  border: 0;
  background: transparent;
}

.readiness-list button {
  width: 100%;
  min-height: 0;
  padding: 12px;
  border: 1px solid #d5e1ee;
  border-radius: 8px;
  background: #eef5fc;
  color: #172235;
  font-size: 14px;
  font-weight: 560;
  line-height: 1.4;
  text-align: left;
}

.readiness-list button:hover {
  border-color: #168aae;
  background: #e3f2fb;
  transform: none;
}

.readiness-list b {
  color: #071424;
}

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

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.screenshot-grid img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.tab {
  display: none;
  max-width: 1540px;
}

.tab.active {
  display: block;
}

.tool-layout {
  grid-template-columns: minmax(300px, 0.46fr) minmax(0, 0.54fr);
  align-items: start;
}

.scheduler-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 18px;
  align-items: start;
}

.calendar-panel {
  background: var(--panel);
  border: 1px solid rgba(174, 194, 220, 0.95);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(16, 20, 28, 0.07);
  backdrop-filter: blur(10px);
}

.calendar-head,
.calendar-weekdays,
.month-calendar {
  display: grid;
  gap: 10px;
}

.calendar-head {
  grid-template-columns: 120px 1fr 120px;
  align-items: center;
  margin-bottom: 14px;
}

.calendar-head h2 {
  text-align: center;
  margin: 0;
}

.calendar-weekdays,
.month-calendar {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 840;
  text-transform: uppercase;
}

.calendar-day {
  min-height: 126px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 251, 255, 0.92);
}

.calendar-day.muted {
  opacity: 0.36;
}

.day-number {
  display: block;
  margin-bottom: 8px;
  color: var(--dark);
  font-weight: 860;
}

.calendar-item {
  display: block;
  margin: 6px 0;
  padding: 6px 7px;
  border-radius: 7px;
  color: #fff;
  font-size: 12px;
  font-weight: 780;
  line-height: 1.25;
  border: 0;
  width: 100%;
  min-height: 0;
  text-align: left;
}

.calendar-item.reel {
  background: var(--pink);
}

.calendar-item.story {
  background: var(--cyan);
}

.calendar-item.carousel {
  background: var(--blue);
}

.calendar-item.post {
  background: var(--green);
}

.calendar-item.sale {
  background: var(--orange);
}

.schedule-detail {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #f9fbff, var(--panel-strong));
}

.schedule-detail span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 860;
  text-transform: uppercase;
}

.schedule-detail strong {
  color: var(--dark);
  font-size: 18px;
  font-weight: 880;
}

.schedule-detail p {
  margin: 0;
  font-size: 14px;
}

.tool-editor,
.tool-result {
  min-height: 520px;
}

.tool-editor button {
  width: 100%;
}

#promptContext,
.tool-result textarea {
  font-family: Consolas, Monaco, monospace;
  font-size: 13px;
}

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

  .sidebar {
    min-height: auto;
    position: relative;
  }

  .hero,
  .focus-grid,
  .command-grid,
  .metric-grid,
  .two,
  .tool-layout,
  .scheduler-layout,
  .pipeline {
    grid-template-columns: 1fr;
    display: grid;
  }

  .hero {
    align-items: start;
  }
}

/* Intelligence workspace pass */
:root {
  --workspace-bg: #edf3f8;
  --sidebar-bg: #071424;
  --sidebar-line: #18304c;
  --field-bg: #e8f1fb;
  --field-focus: #dceafa;
  --field-border: #b7c7da;
  --panel-bg: #f8fbff;
  --panel-border: #c8d6e7;
}

body {
  grid-template-columns: 282px minmax(0, 1fr);
  background: var(--workspace-bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(237, 243, 248, 0.98), rgba(237, 243, 248, 0.9)),
    url("/assets/dashboard-background.jpg");
  background-size: cover;
  background-position: center top;
  opacity: 0.18;
  z-index: -1;
}

.sidebar {
  padding: 18px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-line);
  color: #eaf2fb;
  backdrop-filter: none;
}

.logo-wrap {
  min-height: 0;
  height: 58px;
  padding: 10px 12px;
  margin-bottom: 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #d9e3ee;
  border-radius: 8px;
}

.logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.client-picker span,
.sidebar label {
  color: #9fb4cd;
}

.sidebar select {
  background: #10233a;
  border-color: #274363;
  color: #f7fbff;
}

nav {
  gap: 6px;
}

nav button {
  min-height: 40px;
  background: transparent;
  border-color: transparent;
  color: #b9c8da;
  font-size: 14px;
}

nav button:hover {
  background: #10233a;
  border-color: #274363;
  transform: none;
}

nav button.active {
  background: #eaf2fb;
  border-color: #eaf2fb;
  color: #071424;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}

.sidebar .primary {
  background: #2bb7cf;
  border-color: #2bb7cf;
  color: #05111d;
}

#status {
  color: #9ee7f3;
  font-size: 13px;
}

main {
  padding: 22px 28px 36px;
}

.hero {
  min-height: 126px;
  align-items: center;
  padding: 22px 26px;
  margin-bottom: 12px;
  background:
    linear-gradient(135deg, rgba(7, 20, 36, 0.94), rgba(13, 47, 78, 0.86)),
    url("/assets/dashboard-background.jpg");
  background-size: cover;
  background-position: center;
  box-shadow: 0 16px 42px rgba(7, 20, 36, 0.24);
}

.hero h1 {
  font-size: 38px;
  line-height: 1;
}

.hero p {
  margin: 0;
  font-size: 15px;
}

.hero-stack {
  min-width: 300px;
}

.ai-pill {
  justify-content: start;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.12);
}

.context-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: var(--panel-border);
  box-shadow: 0 10px 26px rgba(7, 20, 36, 0.07);
}

.context-strip span {
  display: grid;
  gap: 4px;
  min-height: 64px;
  padding: 12px 14px;
  background: #f9fbfe;
}

.context-strip b {
  color: #5e7189;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.context-strip em {
  color: #0a1728;
  font-size: 14px;
  font-style: normal;
  font-weight: 780;
}

.section-title {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #d8e3ef;
}

.section-title h2 {
  font-size: 28px;
}

.section-title p {
  max-width: 760px;
  margin: 0;
  color: #526174;
}

#tab-profile.active,
#tab-learning.active,
#tab-voice.active,
#tab-knowledge.active,
#tab-prompt.active {
  padding: 22px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  box-shadow: 0 14px 38px rgba(7, 20, 36, 0.08);
}

.metric-grid article,
.panel,
.tool-editor,
.tool-result,
.calendar-panel {
  background: var(--panel-bg);
  border-color: var(--panel-border);
  box-shadow: 0 14px 38px rgba(7, 20, 36, 0.08);
  backdrop-filter: none;
}

label {
  gap: 9px;
  color: #182436;
  font-size: 13px;
  font-weight: 860;
}

input,
select,
textarea {
  border-color: var(--field-border);
  background: var(--field-bg);
  color: #0c1624;
  font-size: 15px;
  font-weight: 520;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 1px 0 rgba(7, 20, 36, 0.03);
}

input:focus,
select:focus,
textarea:focus {
  background: var(--field-focus);
  border-color: #168aae;
  box-shadow: 0 0 0 3px rgba(22, 138, 174, 0.14);
}

.metric-grid strong {
  color: #071424;
  font-size: 24px;
}

.metric-grid span,
.panel-head span {
  color: #60748d;
}

.pipeline span,
.schedule-detail {
  background: #eef5fc;
  border-color: #c8d6e7;
}

.calendar-day {
  background: #f5f9fd;
  border-color: #d3dfed;
}

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

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

/* Mobile product shell */
@media (max-width: 760px) {
  body {
    display: block;
    min-width: 0;
    overflow-x: hidden;
    background: #edf3f8;
  }

  body::before {
    opacity: 0.08;
  }

  .sidebar {
    min-height: auto;
    padding: 12px;
    position: sticky;
    top: 0;
    z-index: 20;
    border-right: 0;
    border-bottom: 1px solid var(--sidebar-line);
  }

  .logo-wrap {
    height: 42px;
    width: 172px;
    margin-bottom: 10px;
    padding: 7px 9px;
  }

  .client-picker {
    margin-bottom: 10px;
  }

  .client-picker span {
    font-size: 11px;
  }

  .sidebar select {
    min-height: 42px;
    font-size: 14px;
  }

  nav {
    display: flex;
    gap: 8px;
    margin: 8px -12px 10px;
    padding: 0 12px 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  nav::-webkit-scrollbar {
    display: none;
  }

  nav button {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid #274363;
    border-radius: 999px;
    white-space: nowrap;
    font-size: 13px;
  }

  nav button.active {
    box-shadow: none;
  }

  .sidebar .primary {
    width: 100%;
    min-height: 42px;
  }

  #status {
    margin: 8px 0 0;
    min-height: 0;
  }

  main {
    padding: 12px;
    overflow-x: hidden;
  }

  .hero {
    min-height: 0;
    display: grid;
    gap: 14px;
    padding: 18px;
    margin-bottom: 10px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero p {
    font-size: 14px;
    line-height: 1.45;
  }

  .hero-stack {
    min-width: 0;
  }

  .ai-pill,
  .hero-stack button {
    width: 100%;
    min-height: 40px;
    font-size: 14px;
  }

  .context-strip {
    grid-template-columns: 1fr 1fr;
    margin-bottom: 12px;
  }

  .context-strip span {
    min-height: 58px;
    padding: 10px;
  }

  .context-strip b {
    font-size: 10px;
  }

  .context-strip em {
    font-size: 12px;
    line-height: 1.25;
  }

  .metric-grid,
  .command-grid,
  .client-action-grid,
  .focus-grid,
  .two,
  .tool-layout,
  .scheduler-layout,
  .pipeline {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .metric-grid article,
  .panel,
  .tool-editor,
  .tool-result,
  .calendar-panel,
  #tab-profile.active,
  #tab-learning.active,
  #tab-voice.active,
  #tab-knowledge.active,
  #tab-prompt.active {
    padding: 14px;
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(7, 20, 36, 0.08);
  }

  .metric-grid strong {
    font-size: 24px;
  }

  .metric-grid small {
    font-size: 13px;
    line-height: 1.35;
  }

  .session-card {
    margin-top: 8px;
  }

  .activity-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .section-title {
    margin-bottom: 14px;
    padding-bottom: 12px;
  }

  .section-title h2,
  .panel h2,
  .tool-editor h2,
  .tool-result h2 {
    font-size: 24px;
    line-height: 1.1;
  }

  .eyebrow {
    font-size: 10px;
  }

  .version-control {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .learning-switch-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }

  .learning-switch strong {
    font-size: 15px;
  }

  .panel-copy {
    font-size: 13px;
    line-height: 1.45;
  }

  .readiness-list button {
    font-size: 13px;
  }

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

  .monitor-card {
    grid-template-columns: 1fr;
  }

  label {
    font-size: 12px;
  }

  input,
  select,
  textarea {
    min-height: 42px;
    font-size: 14px;
  }

  textarea {
    max-width: 100%;
  }

  .tool-editor,
  .tool-result {
    min-height: auto;
  }

  .calendar-head {
    grid-template-columns: 1fr;
  }

  .calendar-head h2 {
    order: -1;
  }

  .calendar-weekdays {
    display: none;
  }

  .month-calendar {
    grid-template-columns: 1fr;
  }

  .calendar-day {
    min-height: 76px;
  }

  .calendar-day.muted {
    display: none;
  }

  .screenshot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
