:root {
  color-scheme: dark;
  --bg: #0f1014;
  --bg-soft: #171820;
  --panel: #1d1f27;
  --panel-strong: #242633;
  --border: rgba(255, 255, 255, 0.11);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #f6f7fb;
  --muted: #a9adba;
  --subtle: #7f8494;
  --accent: #ff8a1f;
  --accent-strong: #f97316;
  --purple: #8b5cf6;
  --green: #4ade80;
  --danger: #ff6b6b;
  --radius: 8px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.34);
  font-family: Pretendard, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="overtone"] {
  color-scheme: light;
  --bg: #f6f3ee;
  --bg-soft: #eee9e2;
  --panel: #ffffff;
  --panel-strong: #f8f3ec;
  --border: rgba(31, 35, 45, 0.13);
  --border-strong: rgba(31, 35, 45, 0.2);
  --text: #151821;
  --muted: #505665;
  --subtle: #747b8a;
  --accent: #ff7a1a;
  --accent-strong: #f97316;
  --purple: #7c3aed;
  --shadow: 0 20px 55px rgba(31, 35, 45, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.12), transparent 32rem),
    linear-gradient(180deg, #111217 0%, #0c0d11 100%);
  color: var(--text);
  letter-spacing: 0;
}

html[data-theme="overtone"] body {
  background:
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.1), transparent 30rem),
    linear-gradient(180deg, #fbfaf7 0%, var(--bg) 100%);
}

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

button,
input,
textarea {
  font: inherit;
}

.shell {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: rgba(15, 16, 20, 0.9);
  backdrop-filter: blur(16px);
}

html[data-theme="overtone"] .header {
  background: rgba(251, 250, 247, 0.88);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1rem;
  white-space: nowrap;
}

.brand img,
.logo-card img {
  display: block;
  object-fit: cover;
  border-radius: 22%;
}

.brand img {
  width: 38px;
  height: 38px;
  box-shadow: 0 10px 28px rgba(249, 115, 22, 0.18);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

html[data-theme="overtone"] .nav-links a:hover,
html[data-theme="overtone"] .nav-links a[aria-current="page"] {
  background: rgba(249, 115, 22, 0.1);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid rgba(249, 115, 22, 0.5);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  font-weight: 800;
  font-size: 0.88rem;
}

.main {
  padding-bottom: 72px;
}

.hero {
  padding: 86px 0 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.78fr);
  gap: 40px;
  align-items: center;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}

.hero h1,
.page-title h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.1rem, 4.4vw, 4rem);
  line-height: 1.06;
  letter-spacing: 0;
  text-wrap: balance;
}

.hero p,
.page-title p {
  max-width: 660px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font-weight: 800;
  font-size: 0.92rem;
}

html[data-theme="overtone"] .button {
  background: #ffffff;
}

.button.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
}

html[data-theme="overtone"] .button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
}

.button:disabled,
.button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.58;
}

.logo-card,
.card,
.plan-card,
.workspace,
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.035));
  box-shadow: var(--shadow);
}

html[data-theme="overtone"] .logo-card,
html[data-theme="overtone"] .card,
html[data-theme="overtone"] .plan-card,
html[data-theme="overtone"] .workspace,
html[data-theme="overtone"] .panel,
html[data-theme="overtone"] .project-sidebar,
html[data-theme="overtone"] .project-main,
html[data-theme="overtone"] .legal-aside,
html[data-theme="overtone"] .legal-card {
  background: var(--panel);
}

.logo-card {
  padding: 28px;
}

.logo-card img {
  width: 108px;
  height: 108px;
  margin-bottom: 26px;
}

.logo-card h2 {
  margin: 0;
  font-size: 1.35rem;
}

.logo-card p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 24px;
}

.metric {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.14);
}

html[data-theme="overtone"] .metric,
html[data-theme="overtone"] .workflow-list li,
html[data-theme="overtone"] .legal-meta span {
  background: rgba(249, 115, 22, 0.055);
}

.metric strong {
  display: block;
  font-size: 1.05rem;
}

.metric span {
  display: block;
  margin-top: 6px;
  color: var(--subtle);
  font-size: 0.78rem;
}

.section {
  padding: 54px 0;
}

.section.muted {
  background: rgba(255, 255, 255, 0.025);
  border-block: 1px solid rgba(255, 255, 255, 0.055);
}

html[data-theme="overtone"] .section.muted {
  background: rgba(255, 122, 26, 0.045);
  border-block-color: rgba(31, 35, 45, 0.08);
}

.section-head {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.section-head span {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-head h2,
.panel h2 {
  margin: 10px 0 0;
  font-size: clamp(1.55rem, 2.4vw, 2.25rem);
  line-height: 1.12;
  text-wrap: balance;
}

.section-head p,
.panel p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

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

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

.card {
  padding: 24px;
}

.card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 18px;
  border-radius: 8px;
  background: rgba(249, 115, 22, 0.16);
  color: var(--accent);
  font-weight: 900;
}

.card h3 {
  margin: 0;
  font-size: 1.08rem;
}

.card p,
.card li {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.7;
}

.card p {
  margin: 12px 0 0;
}

.card ul,
.plan-card ul {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.card li,
.plan-card li {
  position: relative;
  padding-left: 16px;
  margin-top: 10px;
}

.card li::before,
.plan-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--accent);
}

.page-title {
  padding: 72px 0 34px;
}

.page-title.compact {
  padding-bottom: 12px;
  text-align: center;
}

.page-title.compact .kicker,
.page-title.compact h1,
.page-title.compact p {
  margin-left: auto;
  margin-right: auto;
}

.tabs {
  display: flex;
  width: fit-content;
  gap: 4px;
  margin: 0 auto 24px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

html[data-theme="overtone"] .tabs {
  background: rgba(31, 35, 45, 0.06);
}

.tabs button {
  min-width: 130px;
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.tabs button.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.12);
}

html[data-theme="overtone"] .tabs button.is-active {
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(31, 35, 45, 0.08);
}

.plan-grid {
  display: grid;
  width: min(100%, 1040px);
  margin: 0 auto;
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
  gap: 16px;
  align-items: stretch;
  justify-content: center;
}

.plan-card {
  display: flex;
  min-height: 510px;
  flex-direction: column;
  padding: 22px;
  overflow-wrap: break-word;
}

.plan-card-head {
  min-height: 178px;
}

.plan-card.is-featured {
  border-color: rgba(249, 115, 22, 0.58);
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.12), rgba(255, 255, 255, 0.045));
}

html[data-theme="overtone"] .plan-card.is-featured {
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.12), #ffffff 48%);
}

.plan-label {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
}

.plan-card h2 {
  margin: 10px 0 0;
  font-size: 1.28rem;
  line-height: 1.2;
}

.plan-card p {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.price {
  margin: 0;
}

.plan-card-price {
  min-height: 92px;
}

.price strong {
  display: block;
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  line-height: 1;
  white-space: nowrap;
}

.price span {
  display: block;
  margin-top: 8px;
  color: var(--subtle);
  font-size: 0.86rem;
}

.value {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin: 16px 0 8px;
  padding: 8px 11px;
  border-radius: 999px;
  color: #ffe3c7;
  background: rgba(249, 115, 22, 0.18);
  font-size: 0.82rem;
  font-weight: 900;
}

.plan-card-value-row {
  min-height: 56px;
}

html[data-theme="overtone"] .value {
  color: #923f0b;
  background: rgba(249, 115, 22, 0.13);
}

.plan-card-body {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
}

.plan-card-actions {
  flex: 0 0 auto;
  margin-top: auto;
  padding-top: 30px;
}

.plan-card .button {
  flex: 0 0 48px;
  width: 100%;
  height: 48px;
  margin-top: 0;
  padding: 0 16px;
}

.plan-expand {
  grid-column: 1 / -1;
  justify-self: center;
  margin-top: 6px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  padding: 18px;
}

.task-form {
  display: grid;
  gap: 12px;
}

.task-form label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.task-form textarea,
.login-form input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(0, 0, 0, 0.22);
  outline: none;
}

html[data-theme="overtone"] .task-form textarea,
html[data-theme="overtone"] .login-form input {
  background: rgba(255, 255, 255, 0.86);
}

.task-form textarea {
  min-height: 210px;
  padding: 16px;
  resize: vertical;
  line-height: 1.6;
}

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

.workflow-list li {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.workflow-list strong {
  display: block;
  margin-bottom: 6px;
}

.workflow-list span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.project-page {
  min-height: calc(100vh - 74px);
}

.project-title {
  padding-bottom: 24px;
}

.project-title h1 {
  max-width: 900px;
  font-size: clamp(2.1rem, 5vw, 4.4rem);
}

.project-title p {
  max-width: 760px;
}

.project-section {
  padding-top: 0;
}

.project-app {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.project-sidebar,
.project-main {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
}

.project-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 680px;
  padding: 18px;
}

.project-sidebar-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.project-sidebar-head img {
  width: 34px;
  height: 34px;
  border-radius: 12px;
}

.project-sidebar-head strong,
.project-sidebar-head span {
  display: block;
}

.project-sidebar-head span,
.project-profile-note span,
.project-search span,
.project-library-head span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.project-new-button {
  width: 100%;
  justify-content: center;
}

.project-search {
  display: grid;
  gap: 8px;
}

.project-search input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 12px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.2);
  outline: none;
}

html[data-theme="overtone"] .project-search input {
  background: rgba(255, 255, 255, 0.86);
}

.project-search input:focus {
  border-color: rgba(139, 114, 246, 0.65);
}

.project-library {
  display: grid;
  gap: 10px;
  min-height: 0;
  flex: 1;
}

.project-library-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-list {
  display: grid;
  gap: 10px;
  overflow: auto;
  padding-right: 2px;
}

.project-list-item {
  display: grid;
  gap: 6px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  text-align: left;
  cursor: pointer;
}

.project-list-item:hover,
.project-list-item:focus-visible,
.project-list-item.is-active {
  border-color: rgba(139, 114, 246, 0.58);
  background: rgba(139, 114, 246, 0.13);
  outline: none;
}

.project-list-item strong {
  font-size: 0.95rem;
}

.project-list-item span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.project-profile-note {
  display: grid;
  gap: 4px;
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.project-profile-note strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-main {
  display: grid;
  gap: 18px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 32%), var(--bg);
}

.project-hero-panel {
  display: grid;
  gap: 12px;
  min-height: 230px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  background: var(--panel);
}

.project-hero-panel h2 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.8rem);
  letter-spacing: 0;
}

.project-hero-panel p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.project-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.project-prompts button {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  font-weight: 800;
  cursor: pointer;
}

.project-prompts button:hover,
.project-prompts button:focus-visible {
  border-color: rgba(139, 114, 246, 0.58);
  background: rgba(139, 114, 246, 0.13);
  outline: none;
}

.project-composer {
  display: grid;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  background: var(--panel);
}

.project-composer textarea {
  width: 100%;
  min-height: 112px;
  border: 0;
  color: var(--text);
  background: transparent;
  resize: vertical;
  outline: none;
  font: inherit;
  line-height: 1.6;
}

.project-composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.project-composer-actions span {
  color: var(--muted);
  font-size: 0.84rem;
}

.project-output-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.project-output-card {
  min-height: 260px;
}

.project-output-card h3 {
  margin-top: 0;
}

.project-gateway-output {
  min-height: 170px;
  overflow: auto;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.24);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.55;
}

html[data-theme="overtone"] .project-gateway-output {
  background: rgba(255, 255, 255, 0.86);
}

.panel {
  padding: 26px;
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.login-form {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.login-form input {
  min-height: 46px;
  padding: 0 14px;
}

.google-auth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #1f1f1f;
  background: #ffffff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

.google-auth-button:hover,
.google-auth-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(139, 114, 246, 0.65);
  outline: none;
}

.google-auth-button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.google-mark {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 50%;
  color: #4285f4;
  background: #fff;
  font-weight: 900;
}

.auth-status-line {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.auth-status-line[data-status="success"] {
  color: #8ff0b0;
}

.auth-status-line[data-status="error"] {
  color: #ffb4b4;
}

.auth-legal-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.65;
}

.auth-legal-note a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.login-profile-link {
  justify-content: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(74, 222, 128, 0.28);
  border-radius: 999px;
  color: #b8f7c8;
  background: rgba(74, 222, 128, 0.11);
  font-size: 0.78rem;
  font-weight: 900;
}

.footer {
  padding: 30px 0 42px;
  border-top: 1px solid var(--border);
  color: var(--subtle);
  font-size: 0.84rem;
}

.footer .shell {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--text);
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 820px);
  gap: 28px;
  align-items: start;
  padding-bottom: 72px;
}

.legal-aside {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.legal-aside strong {
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.legal-aside a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.legal-aside a:hover,
.legal-aside a[aria-current="page"] {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.legal-doc {
  display: grid;
  gap: 18px;
}

.legal-card {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
}

.legal-card h2 {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.25;
}

.legal-card p,
.legal-card li {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.75;
}

.legal-card p {
  margin: 12px 0 0;
}

.legal-card ul {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding-left: 18px;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.legal-meta span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.78rem;
  font-weight: 800;
}

@media (max-width: 960px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .hero-grid,
  .workspace,
  .project-app,
  .project-output-grid,
  .login-layout,
  .legal-layout,
  .grid,
  .grid.two,
  .plan-grid {
    grid-template-columns: 1fr;
  }

  .legal-aside {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .legal-aside strong {
    grid-column: 1 / -1;
  }

  .plan-card {
    min-height: auto;
  }

  .plan-card-head,
  .plan-card-price,
  .plan-card-value-row {
    min-height: auto;
  }

  .project-sidebar {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 28px, 1160px);
  }

  .hero {
    padding: 54px 0 44px;
  }

  .page-title {
    padding: 48px 0 22px;
  }

  .hero h1,
  .page-title h1 {
    font-size: clamp(2rem, 10.5vw, 3rem);
  }

  .hero p,
  .page-title p {
    font-size: 0.98rem;
  }

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

  .tabs,
  .hero-actions,
  .footer .shell {
    width: 100%;
  }

  .tabs button,
  .button,
  .nav-cta {
    flex: 1;
  }

  .card,
  .panel,
  .logo-card,
  .plan-card,
  .legal-card,
  .project-hero-panel,
  .project-composer,
  .project-sidebar,
  .project-main {
    padding: 20px;
  }

  .project-main {
    gap: 14px;
  }

  .project-hero-panel h2 {
    font-size: clamp(2rem, 11vw, 3.1rem);
  }

  .project-composer-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .project-composer-actions .button {
    width: 100%;
  }

  .legal-aside {
    grid-template-columns: 1fr;
  }
}
