:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --ink: #1f2a36;
  --muted: #647487;
  --line: rgba(31, 42, 54, 0.12);
  --accent: #2b78e4;
  --accent-strong: #1e5fb8;
  --shadow: 0 18px 60px rgba(31, 42, 54, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Manrope", sans-serif;
  background: linear-gradient(180deg, #f8fbff 0%, #f1f5fb 100%);
  color: var(--ink);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.marketing-shell,
.app-shell,
.auth-layout {
  min-height: 100vh;
}

.marketing-shell {
  padding-top: 96px;
}

.site-header-shell {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 80;
  backdrop-filter: blur(14px);
  background: rgba(248, 251, 255, 0.9);
  border-bottom: 1px solid rgba(31, 42, 54, 0.08);
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0 12px;
}

.site-header nav {
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: nowrap;
}

.brandmark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brandmark.large {
  width: 56px;
  height: 56px;
}

.button,
.nav-cta {
  border-radius: 999px;
  padding: 13px 20px;
  border: 1px solid transparent;
  transition: transform 0.25s ease, background 0.25s ease;
}

.button {
  cursor: pointer;
}

.button:hover,
.nav-cta:hover,
.chip-button:hover {
  transform: translateY(-1px);
}

.button-primary,
.nav-cta {
  background: var(--ink);
  color: #fff;
}

.button-primary,
.button-primary:visited,
.nav-cta,
.nav-cta:visited {
  color: #fff;
}

.button-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.full {
  width: 100%;
}

.center-link {
  display: inline-flex;
  justify-content: center;
  text-align: center;
}

.eyebrow,
.sidebar-kicker,
.status-chip,
.profile-card span,
.history-list article span,
.demo-grid span,
.tariff-card p,
.stat-tile span {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--muted);
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  padding: 56px 44px 44px;
  align-items: center;
}

.hero-copy h1,
.auth-panel h1,
.workspace-header h1 {
  font-family: "Literata", serif;
  font-size: clamp(2.6rem, 4vw, 5rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
  margin: 10px 0 18px;
  max-width: 11ch;
}

.hero-text,
.auth-copy,
.muted,
.feature-band p,
.history-list p {
  color: var(--muted);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.task-draft-card {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
}

.task-draft-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
}

.task-draft-input,
.task-draft-textarea,
.task-draft-select,
.task-draft-readonly {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(31, 42, 54, 0.14);
  background: #fff;
  color: var(--ink);
  padding: 12px 14px;
}

.task-draft-textarea {
  min-height: 220px;
  resize: vertical;
  line-height: 1.55;
}

.task-draft-readonly {
  background: rgba(244, 247, 251, 0.9);
}

.task-draft-meta,
.task-confirm-box {
  border-radius: 16px;
  background: rgba(244, 247, 251, 0.9);
  padding: 14px 16px;
}

.task-confirm-box p {
  margin: 0 0 8px;
}

.hero-visual {
  min-height: 540px;
  border-radius: 34px;
  background: linear-gradient(145deg, #102132, #1f3652 58%, #275bb5 100%);
  box-shadow: var(--shadow);
  padding: 28px;
  display: grid;
  gap: 20px;
}

.hero-visual-head {
  display: grid;
  gap: 18px;
}

.hero-visual-logo {
  width: 230px;
  max-width: 100%;
  padding: 12px 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
}

.visual-panel {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  color: #f7efe2;
  padding: 22px;
  background: rgba(255, 255, 255, 0.08);
}

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

.hero-metric-card,
.hero-chart-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  color: #f7fbff;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.08);
  min-height: 150px;
}

.hero-metric-card span,
.hero-chart-card span {
  display: block;
  opacity: 0.72;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
}

.hero-metric-card strong {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.hero-metric-card em {
  font-style: normal;
  color: rgba(247, 251, 255, 0.8);
}

.hero-chart-card strong {
  display: block;
  font-size: 1.45rem;
  margin: 8px 0;
}

.hero-chart-card em {
  font-style: normal;
  color: rgba(247, 251, 255, 0.82);
}

.hero-attention-card {
  background: rgba(255, 255, 255, 0.12);
}

.hero-bars {
  display: flex;
  align-items: end;
  gap: 10px;
  height: 120px;
}

.hero-bars i {
  display: block;
  flex: 1;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(180deg, #75a9ff, #2b78e4);
}

.visual-panel span {
  display: block;
  opacity: 0.72;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
}

.visual-panel strong {
  font-size: 1.35rem;
  line-height: 1.35;
  display: block;
}

.feature-band,
.tariff-section {
  padding: 18px 44px 44px;
}

.feature-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-band article,
.tariff-card,
.auth-panel,
.stat-tile,
.query-panel,
.answer-panel,
.history-list article,
.profile-card {
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.feature-band article,
.tariff-card,
.query-panel,
.answer-panel,
.history-list article,
.profile-card,
.stat-tile {
  border-radius: 24px;
  padding: 24px;
}

.feature-band h2,
.tariff-card h3,
.section-heading h2,
.answer-panel h2,
.query-panel h2 {
  font-size: 1.45rem;
  line-height: 1.18;
  margin: 12px 0 10px;
}

.hint-card,
.collapsible-card {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 18px 20px;
}

.hint-card {
  margin: 16px 0;
}

.hint-card p {
  margin: 10px 0;
  color: var(--muted);
}

.settings-layer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0 0;
}

.collapsible-card {
  margin-top: 16px;
}

.collapsible-card summary {
  cursor: pointer;
  font-weight: 700;
}

.collapsible-card[open] summary {
  margin-bottom: 14px;
}

.nowrap-button {
  white-space: nowrap;
}

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

.hint-list div {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.section-heading.compact {
  display: block;
}

.tariff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 20px;
}

.tariff-grid-secondary {
  grid-template-columns: minmax(280px, 420px);
  justify-content: center;
}

.tariff-card-white-label {
  text-align: left;
}

.tariff-card.featured {
  background: linear-gradient(180deg, rgba(183, 106, 45, 0.12), rgba(255, 255, 255, 0.75));
}

.tariff-card ul {
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.auth-layout {
  display: grid;
  place-items: center;
  padding: 32px;
}

.auth-panel {
  max-width: 580px;
  width: 100%;
  border-radius: 34px;
  padding: 34px;
}

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

.auth-form {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.auth-form label {
  display: grid;
  gap: 8px;
}

.auth-form input,
.query-form textarea {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  padding: 16px 18px;
  color: var(--ink);
}

.error-banner {
  background: rgba(175, 54, 38, 0.08);
  color: #7c2c22;
  border: 1px solid rgba(175, 54, 38, 0.18);
  border-radius: 18px;
  padding: 14px 16px;
  margin-top: 18px;
}

.app-shell {
  display: grid;
  grid-template-columns: 290px 1fr;
}

.app-sidebar {
  min-height: 100vh;
  padding: 28px;
  border-right: 1px solid var(--line);
  background: rgba(248, 243, 233, 0.85);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
}

.profile-card strong {
  display: block;
  font-size: 1.2rem;
  margin-top: 10px;
}

.profile-card p {
  color: var(--muted);
}

.workspace {
  padding: 34px;
}

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

.status-chip {
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin: 28px 0;
}

.stat-tile strong {
  display: block;
  font-size: 2rem;
  margin-top: 16px;
}

.query-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
}

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

.voice-panel {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.voice-panel h3 {
  margin: 8px 0 10px;
  font-size: 1.15rem;
}

.voice-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.voice-record-status {
  margin-top: 14px;
  line-height: 1.5;
}

.voice-record-status.warning {
  color: #8a4c1d;
}

.voice-record-status.success {
  color: #2c6b48;
}

.quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chip-button {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  padding: 10px 14px;
  cursor: pointer;
}

.answer-panel ul {
  margin-top: 18px;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.transcript-box {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
}

.voice-warning {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(183, 106, 45, 0.1);
  border: 1px solid rgba(183, 106, 45, 0.22);
  color: #8a4c1d;
}

.confirm-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.history-section {
  margin-top: 28px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 24px;
}

.panel-shell {
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 26px;
  padding: 24px;
}

.mini-grid,
.mini-stack {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.mini-grid {
  grid-template-columns: repeat(3, 1fr);
}

.mini-card {
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  padding: 16px 18px;
}

.mini-card span {
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
}

.mini-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.35rem;
  line-height: 1.15;
}

.mini-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.mini-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
}

.mini-card-head strong {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.mini-card-head span {
  text-align: right;
}

.bar-track {
  margin-top: 12px;
  height: 10px;
  border-radius: 999px;
  background: rgba(24, 21, 17, 0.08);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
}

.bar-fill.warm {
  background: linear-gradient(90deg, #cf7a3a, #e8a45b);
}

.bar-fill.forest {
  background: linear-gradient(90deg, #2d6b53, #4f997b);
}

.bar-fill.ink {
  background: linear-gradient(90deg, #3c342c, #6c5a4a);
}

.risk-red {
  background: rgba(159, 40, 21, 0.08);
}

.risk-yellow {
  background: rgba(183, 106, 45, 0.08);
}

.risk-green {
  background: rgba(45, 107, 83, 0.08);
}

.history-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 18px;
}

.compact-card h2 {
  margin-top: 8px;
}

.export-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.sheet-status {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.sheet-status strong {
  display: block;
  margin-bottom: 6px;
}

.sheet-status p {
  margin: 6px 0 0;
}

.empty-state,
.table-wrap {
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.empty-state {
  padding: 28px;
  margin: 28px 0;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

td {
  color: var(--ink);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

td a {
  color: #8a4c1d;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.inline-settings-form {
  display: contents;
}

select,
input[type="number"] {
  width: 100%;
  min-width: 120px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  padding: 10px 12px;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 28px;
  align-items: start;
  margin-bottom: 18px;
}

.hero-callout,
.hero-state-card,
.kpi-tile,
.attention-card,
.funnel-step,
.empty-card {
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-callout {
  margin-top: 20px;
  padding: 20px 22px;
  border-radius: 24px;
}

.hero-callout strong {
  display: block;
  font-size: 1.2rem;
  line-height: 1.35;
}

.hero-callout p {
  margin: 10px 0 0;
  color: var(--muted);
}

.hero-controls {
  display: grid;
  gap: 16px;
}

.period-tools {
  display: grid;
  gap: 12px;
}

.date-range-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.date-range-form label {
  display: grid;
  gap: 6px;
  min-width: 128px;
}

.date-range-form label span {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.date-range-form input[type="date"] {
  min-width: 0;
}

.google-sheets-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.google-sheets-form label {
  display: grid;
  gap: 8px;
}

.google-sheets-form textarea,
.google-sheets-form input[type="text"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  padding: 12px 14px;
  font: inherit;
}

.checkbox-row {
  display: flex !important;
  align-items: center;
  gap: 10px;
}

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.hero-control-group span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
}

.mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mode-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink);
  font-size: 0.92rem;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

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

.mode-chip.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.mode-chip.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.hero-state-card {
  border-radius: 24px;
  padding: 18px 20px;
}

.hero-state-card strong {
  display: block;
  font-size: 1.25rem;
  margin: 6px 0 8px;
}

.hero-state-card p {
  margin: 0;
}

.dashboard-block {
  margin-top: 40px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.kpi-tile {
  border-radius: 24px;
  padding: 18px 18px 16px;
  position: relative;
  overflow: hidden;
}

.kpi-tile::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  border-radius: 24px;
}

.kpi-tile span {
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
}

.kpi-tile strong {
  display: block;
  font-size: clamp(1.7rem, 2vw, 2.35rem);
  line-height: 1;
  margin: 14px 0 18px;
}

.kpi-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.kpi-foot em {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

.kpi-foot mark {
  background: transparent;
  padding: 0;
  font-weight: 700;
}

.status-good::before,
.rating-good {
  background: #3f7d59;
  color: #2c6b48;
}

.status-warning::before,
.rating-warning {
  background: #d6a63c;
  color: #8d6404;
}

.status-bad::before,
.rating-bad {
  background: #cf5a43;
  color: #a13823;
}

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

.attention-card {
  border-radius: 24px;
  padding: 20px 22px;
}

.attention-card h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  line-height: 1.3;
}

.attention-card p,
.attention-card strong {
  display: block;
  margin: 0;
  line-height: 1.55;
}

.attention-card p {
  color: var(--muted);
  margin-bottom: 10px;
}

.severity-bad {
  border-color: rgba(207, 90, 67, 0.25);
  background: linear-gradient(180deg, rgba(255, 247, 244, 0.98), rgba(255, 255, 255, 0.68));
}

.severity-warning {
  border-color: rgba(214, 166, 60, 0.28);
  background: linear-gradient(180deg, rgba(255, 251, 242, 0.98), rgba(255, 255, 255, 0.68));
}

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

.funnel-step {
  border-radius: 22px;
  padding: 16px;
  min-height: 160px;
}

.funnel-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 78px;
}

.funnel-head span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.funnel-head strong {
  font-size: 1.8rem;
  line-height: 1;
}

.funnel-step p {
  margin: 0 0 12px;
  font-weight: 700;
}

.funnel-meta {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.rating-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(24, 21, 17, 0.08);
  font-weight: 700;
}

.row-good td {
  background: rgba(63, 125, 89, 0.05);
}

.row-warning td {
  background: rgba(214, 166, 60, 0.08);
}

.row-bad td {
  background: rgba(207, 90, 67, 0.08);
}

.sortable-table th[data-sort] {
  cursor: pointer;
}

.sortable-table th[data-sort]:hover {
  color: var(--ink);
}

.empty-card {
  border-radius: 22px;
  padding: 22px;
  color: var(--muted);
}

@media (max-width: 1080px) {
  .hero,
  .feature-band,
  .tariff-grid,
  .settings-layer-grid,
  .query-layout,
  .dashboard-grid,
  .history-list,
  .stat-row,
  .app-shell {
    grid-template-columns: 1fr;
  }

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

  .dashboard-hero,
  .kpi-grid,
  .attention-grid,
  .funnel-grid {
    grid-template-columns: 1fr;
  }

  .site-header,
  .hero,
  .feature-band,
  .tariff-section,
  .workspace {
    padding-left: 24px;
    padding-right: 24px;
  }

  .site-header {
    flex-direction: column;
    gap: 14px;
    align-items: start;
  }

  .app-sidebar {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-lockup.compact {
  gap: 10px;
}

.brand-logo-mark {
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand-logo-mark.full {
  width: 210px;
  height: auto;
}

.brand-lockup.compact .brand-logo-mark {
  width: 42px;
  height: 42px;
}

.brand-lockup-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-lockup-copy strong {
  font-size: 1.05rem;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.brand-lockup-copy span {
  color: var(--muted);
  font-size: 0.85rem;
}

.site-header,
.workspace-topbar-inner,
.workspace-main {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  padding-top: 24px;
  padding-bottom: 6px;
}

.site-header nav a {
  font-weight: 600;
  color: var(--muted);
}

.hero {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
}

.hero-visual {
  background: linear-gradient(145deg, #1f2a36, #264261 62%, #2b78e4 115%);
}

.hero-logo {
  position: absolute;
  top: 28px;
  right: 28px;
  width: 190px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 20px;
  padding: 14px;
}

.auth-brand {
  margin-bottom: 18px;
}

.auth-brand-full {
  display: flex;
  justify-content: center;
}

.auth-brand-full .brand-lockup {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.auth-brand-full .brand-lockup-copy {
  justify-items: center;
  text-align: center;
}

.workspace-shell {
  min-height: 100vh;
}

.workspace-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(248, 251, 255, 0.88);
  border-bottom: 1px solid rgba(31, 42, 54, 0.08);
}

.workspace-topbar-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
}

.workspace-menu {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  min-width: 0;
}

.workspace-menu::-webkit-scrollbar {
  display: none;
}

.workspace-link {
  padding: 10px 13px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
  flex: 0 0 auto;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.workspace-link:hover {
  background: rgba(43, 120, 228, 0.08);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.workspace-link.active {
  background: var(--ink);
  color: #fff;
}

.workspace-userbox {
  display: flex;
  align-items: center;
  gap: 10px;
}

.workspace-usercopy {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.workspace-usercopy span {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.workspace-usercopy strong {
  font-size: 0.92rem;
}

.workspace-main {
  padding: 28px 0 48px;
}

.workspace-main-narrow {
  max-width: 1080px;
}

.workspace-header h1 {
  max-width: 14ch;
}

.dashboard-brandline {
  display: inline-flex;
  align-items: center;
  margin-bottom: 18px;
}

.dashboard-brand-image {
  width: min(320px, 100%);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

.dashboard-hero,
.chat-hero {
  margin-top: 10px;
}

.dashboard-hero {
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.6fr);
}

.hero-state-card,
.kpi-tile,
.attention-card,
.funnel-step,
.empty-card,
.query-panel,
.answer-panel,
.panel-shell,
.history-list article,
.profile-card,
.auth-panel,
.feature-band article,
.tariff-card,
.stat-tile {
  background: rgba(255, 255, 255, 0.84);
}

.button-primary,
.nav-cta,
.mode-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.74);
}

.hero-callout strong,
.hero-state-card strong,
.kpi-foot em,
.rating-pill,
.attention-card strong {
  color: var(--ink);
}

.hero-callout {
  border-top: 4px solid rgba(43, 120, 228, 0.28);
}

.hero-state-card {
  border-top: 4px solid rgba(31, 42, 54, 0.14);
}

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

.dashboard-visual-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.visual-summary-card h2 {
  margin: 8px 0 14px;
  font-size: 1.2rem;
  line-height: 1.3;
}

.summary-bars {
  display: grid;
  gap: 14px;
}

.summary-bar-row {
  display: grid;
  grid-template-columns: minmax(90px, 132px) minmax(120px, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.summary-bar-row span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.3;
}

.summary-bar-row strong {
  font-size: 0.95rem;
  white-space: nowrap;
}

.summary-bar-track {
  height: 12px;
  background: rgba(31, 42, 54, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.summary-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #1f2a36, #2b78e4);
  border-radius: 999px;
}

.summary-bar-fill.accent {
  background: linear-gradient(90deg, #2b78e4, #4d9fff);
}

.attention-summary-card {
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(255, 255, 255, 0.84));
}

.summary-stats {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.summary-stats div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.summary-stats span {
  color: var(--muted);
}

.summary-stats strong {
  font-size: 1.15rem;
}

.history-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.table-wrap,
.empty-state {
  background: rgba(255, 255, 255, 0.8);
}

.site-header,
.feature-band,
.tariff-section {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding-left: 0;
  padding-right: 0;
}

.feature-band,
.tariff-section {
  padding-top: 20px;
  padding-bottom: 36px;
}

@media (max-width: 1080px) {
  .site-header,
  .workspace-topbar-inner,
  .workspace-main,
  .hero,
  .feature-band,
  .tariff-section {
    width: min(1240px, calc(100% - 28px));
  }

  .workspace-topbar-inner {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .workspace-menu {
    justify-content: start;
  }

  .workspace-userbox {
    width: 100%;
    justify-content: space-between;
  }

  .dashboard-brand-image {
    width: 100%;
  }

  .history-list {
    grid-template-columns: 1fr;
  }

  .dashboard-visual-grid {
    grid-template-columns: 1fr;
  }

  .summary-bar-row {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

@media (max-width: 760px) {
  .workspace-topbar {
    position: static;
  }

  .site-header,
  .workspace-topbar-inner,
  .workspace-main,
  .hero,
  .feature-band,
  .tariff-section {
    width: min(1240px, calc(100% - 20px));
  }

  .workspace-topbar-inner {
    gap: 10px;
    padding: 12px 0;
  }

  .workspace-userbox {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .hero-metric-card,
  .hero-chart-card {
    position: static;
    width: auto;
    margin: 12px 18px 0;
  }

  .workspace-usercopy {
    justify-items: start;
  }

  .brand-lockup-copy span {
    display: none;
  }

  .brand-logo-mark {
    width: 44px;
    height: 44px;
  }

  .brand-logo-mark.full {
    width: 170px;
  }

  .workspace-header h1,
  .hero-copy h1,
  .auth-panel h1 {
    font-size: clamp(1.9rem, 8vw, 2.6rem);
    line-height: 1.02;
    max-width: none;
    overflow-wrap: anywhere;
  }

  .hero-text,
  .auth-copy,
  .muted,
  .attention-card p,
  .attention-card strong,
  .hero-callout p,
  .hero-callout strong {
    overflow-wrap: anywhere;
  }

  .hero {
    padding-top: 24px;
    padding-bottom: 28px;
    gap: 20px;
  }

  .hero-visual {
    min-height: 360px;
    padding: 18px;
  }

  .hero-visual-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual-logo {
    width: 180px;
  }

  .visual-panel,
  .hero-metric-card,
  .hero-chart-card {
    min-height: auto;
  }

  .workspace-main {
    padding: 18px 0 30px;
  }

  .query-panel,
  .answer-panel,
  .panel-shell,
  .history-list article,
  .profile-card,
  .auth-panel,
  .feature-band article,
  .tariff-card,
  .stat-tile,
  .kpi-tile,
  .attention-card,
  .funnel-step,
  .empty-card {
    padding: 16px;
    border-radius: 18px;
  }

  .dashboard-brand-image {
    width: 100%;
    padding: 12px 14px;
    border-radius: 18px;
  }

  .mode-switch {
    gap: 8px;
  }

  .mode-chip,
  .workspace-link {
    font-size: 0.85rem;
    padding: 9px 11px;
  }

  .kpi-tile strong,
  .funnel-head strong,
  .stat-tile strong {
    font-size: 1.45rem;
  }

  .kpi-foot,
  .summary-stats div {
    align-items: start;
    flex-direction: column;
  }

  .query-layout,
  .dashboard-grid,
  .dashboard-visual-grid,
  .attention-grid,
  .kpi-grid,
  .funnel-grid,
  .stat-row {
    gap: 12px;
  }

  table {
    min-width: 560px;
    font-size: 0.9rem;
  }

  th,
  td {
    padding: 10px 12px;
  }

  .summary-bar-row strong {
    white-space: normal;
  }
}

@media (max-width: 520px) {
  .site-header,
  .workspace-topbar-inner,
  .workspace-main,
  .hero,
  .feature-band,
  .tariff-section {
    width: min(1240px, calc(100% - 16px));
  }

  .workspace-menu {
    gap: 6px;
  }

  .workspace-link,
  .mode-chip {
    font-size: 0.8rem;
    padding: 8px 10px;
  }

  .workspace-usercopy span {
    display: none;
  }

  .workspace-usercopy strong {
    font-size: 0.85rem;
  }

  .brand-logo-mark.full {
    width: 150px;
  }

  .hero-visual {
    min-height: 320px;
  }

  .visual-panel {
    padding: 16px;
    border-radius: 16px;
  }

  .visual-panel strong {
    font-size: 1.05rem;
  }

  .voice-upload {
    align-items: start;
    flex-direction: column;
  }

  table {
    min-width: 480px;
  }
}
