:root {
  --bg: #f5f5f5;
  --surface: #ffffff;
  --surface-soft: #f0f0f0;
  --surface-strong: #e6e6e6;
  --text: #111111;
  --muted: #666666;
  --line: #d9d9d9;
  --line-strong: #c8c8c8;
  --accent: #111111;
  --accent-soft: #efefef;
  --success: #111111;
  --radius-xl: 0px;
  --radius-lg: 0px;
  --radius-md: 0px;
  --radius-sm: 0px;
  --shadow: 0 10px 30px rgba(17, 17, 17, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: Inter, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea,
select {
  font: inherit;
}

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

img {
  display: block;
  max-width: 100%;
}

code {
  padding: 0.16rem 0.42rem;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  font-size: 0.92em;
}

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

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 30;
}

.header-inner {
  width: min(1380px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  height: 30px;
  width: auto;
  display: block;
  object-fit: contain;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  flex: 1;
}

.header-nav a,
.footer-links a,
.footer-meta a,
.doc-actions a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.header-nav a:hover,
.footer-links a:hover,
.footer-meta a:hover,
.doc-actions a:hover {
  color: var(--text);
}

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

.chat-nav-btn {
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn.chat-nav-btn.is-active {
  background: #111111;
  color: #ffffff;
  border-color: #111111;
}

.btn.chat-nav-btn.is-active:hover {
  background: #222222;
  color: #ffffff;
  border-color: #222222;
}

.header-menu-toggle,
.mobile-nav-drawer,
.mobile-nav-backdrop {
  display: none;
}

.header-menu-toggle {
  appearance: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  padding: 0;
  cursor: pointer;
}

.header-menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(17, 17, 17, 0.35);
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: min(320px, calc(100vw - 24px));
  height: 100vh;
  z-index: 51;
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: -12px 0 32px rgba(17, 17, 17, 0.12);
  transition: right 0.24s ease;
  padding: 18px 16px 20px;
}

.mobile-nav-drawer.open {
  right: 0;
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.mobile-nav-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.mobile-nav-close {
  appearance: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 26px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.mobile-nav-links {
  display: grid;
  gap: 10px;
  padding: 18px 0;
}

.mobile-nav-links a {
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.mobile-nav-actions {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.mobile-nav-actions .chat-nav-btn {
  width: 100%;
}

.app {
  width: min(1380px, calc(100% - 40px));
  margin: 22px auto 40px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) 400px;
  gap: 22px;
  align-items: start;
}

.app.app-full {
  width: min(1680px, calc(100% - 40px));
  grid-template-columns: 1fr;
}

.app.app-full > .panel {
  grid-column: 1 / -1;
}

.app.app-full > .side-column {
  display: none;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero {
  padding: 28px 28px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 0;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.01em;
  margin-bottom: 14px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  max-width: 820px;
  font-weight: 700;
}

.hero p {
  margin: 18px 0 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  min-width: 220px;
}

.btn,
.chip,
.submit,
.secondary-btn {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  border-radius: 0;
  padding: 12px 16px;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn:hover,
.chip:hover,
.submit:hover,
.secondary-btn:hover {
  transform: translateY(-1px);
  background: #f7f7f7;
  border-color: #bdbdaf;
}

.btn.primary,
.btn.success,
.submit {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.btn.primary:hover,
.btn.success:hover,
.submit:hover {
  background: #222222;
  border-color: #222222;
}

.btn.ghost,
.secondary-btn {
  background: transparent;
}

.btn.full,
.submit.full,
.secondary-btn.full {
  width: 100%;
}

.btn:disabled,
.chip:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.store-area {
  padding: 22px;
  display: grid;
  gap: 22px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-bottom: 14px;
}

.section-title h2,
.section-title h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.section-title p {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.carousel-shell {
  display: grid;
  gap: 14px;
}

.carousel-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, #fafafa, #f1f1f1);
}

.carousel-track {
  display: flex;
  transition: transform 0.35s ease;
  width: 100%;
}

.slide {
  min-width: 100%;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 18px;
  align-items: stretch;
}

.product-visual {
  min-height: 420px;
  border-radius: 0;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.85), transparent 28%),
    linear-gradient(180deg, #ededed, #dcdcdc 60%, #d2d2d2 100%);
}

.product-visual::after {
  content: "";
  position: absolute;
  inset: auto -50px -80px auto;
  width: 240px;
  height: 240px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.45);
  filter: blur(4px);
}

.product-stack {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
}

.product-copy {
  display: grid;
  gap: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(17, 17, 17, 0.08);
  color: #3f3f3f;
  font-size: 12px;
}

.product-visual h3 {
  margin: 0;
  font-size: clamp(32px, 3vw, 44px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  max-width: 580px;
}

.product-visual p {
  margin: 0;
  max-width: 560px;
  color: #4f4f4f;
  font-size: 16px;
  line-height: 1.65;
}

.product-browser-frame {
  position: relative;
  z-index: 1;
  margin-top: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(17, 17, 17, 0.12);
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(17, 17, 17, 0.08);
}

.product-browser-shot {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  object-position: center top;
  background: #ffffff;
  cursor: zoom-in;
}

.product-browser-frame-card {
  margin-bottom: 14px;
}

.feature-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.feature-pills span {
  padding: 9px 12px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(17, 17, 17, 0.08);
  font-size: 13px;
  color: #434343;
}

.product-price {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
}

.product-price-copy {
  display: grid;
  gap: 0;
}

.product-cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.price {
  font-size: 40px;
  line-height: 1;
  letter-spacing: -0.05em;
  font-weight: 700;
}

.price-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.product-side {
  display: grid;
  gap: 14px;
  align-content: start;
}

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

.mini-card h4 {
  margin: 0 0 10px;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.mini-card p {
  margin: 0;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  color: var(--muted);
  line-height: 1.55;
}

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

.legal-inline-link {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-inline-link:hover {
  color: var(--text);
}

.carousel-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
}

.carousel-wrap + .carousel-controls {
  margin: 14px 0 0;
}

.dots {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 0;
  border: none;
  background: #c9c9bc;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
  display: inline-block;
}

.dot.active {
  background: #111111;
  transform: scale(1.1);
}

.details-card {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 22px;
}

.details-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.details-copy {
  max-width: 760px;
}

.details-title {
  margin: 14px 0 10px;
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.details-intro,
.details-card-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 15px;
}

.details-price {
  font-size: 32px;
}

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

.details-stack {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.details-block {
  padding: 16px;
}

.details-card-actions {
  margin-top: 10px;
}

.details-mobile-buybar {
  display: none;
}

.metric {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
}

.metric .label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.metric .value {
  font-size: 15px;
  line-height: 1.45;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.side-column {
  display: grid;
  gap: 22px;
  align-content: start;
  position: sticky;
  top: 18px;
}

.login-panel,
.purchases-panel,
.flow-panel {
  padding: 20px;
}

.chat-input:focus,
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: #8f8f8f;
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.05);
}

.auth-status {
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.6;
}

.form-grid,
.checkout-form-proto {
  display: grid;
  gap: 12px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 14px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: #fcfcfc;
  color: var(--text);
  outline: none;
}

.field input[readonly] {
  background: #f3f3f3;
  color: #444444;
}

.helper,
.footer-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

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

.topbar-small h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.user-pill {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 0;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.user-pill.visible {
  display: inline-flex;
}

.purchase-card {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: grid;
  gap: 12px;
}

.purchase-card h4 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.purchase-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

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

.purchase-actions .open-product-btn {
  background: #ffd400;
  border-color: #111111;
  color: #000000;
  font-weight: 800;
}

.purchase-actions .open-product-btn:hover {
  background: #ffbf00;
  border-color: #000000;
  color: #000000;
}

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

.purchase-usage-card {
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  display: grid;
  gap: 6px;
}

.purchase-usage-label {
  font-size: 12px;
  color: var(--muted);
}

.purchase-usage-value {
  font-size: 22px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.empty-state {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--line-strong);
  background: #f7f7f7;
  color: var(--muted);
  line-height: 1.6;
}

.flow-steps {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.step-number {
  width: 34px;
  height: 34px;
  border-radius: 0;
  display: grid;
  place-items: center;
  background: #111111;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.step h4 {
  margin: 0 0 6px;
  font-size: 15px;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.alert {
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  background: var(--surface-soft);
  color: var(--text);
  line-height: 1.6;
}

.alert-error {
  border-color: #111111;
}

.alert-info {
  border-color: var(--line-strong);
}

.popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(17, 17, 17, 0.5);
  isolation: isolate;
}

.popup-backdrop.hidden {
  display: none;
}

.popup-card {
  position: relative;
  z-index: 10001;
  width: min(560px, 100%);
  padding: 28px;
  border: 3px solid #111111;
  outline: 1px solid #ffffff;
  outline-offset: -8px;
  background: #ffffff;
  box-shadow: 0 28px 90px rgba(17, 17, 17, 0.3);
}

.login-prompt-card {
  width: min(520px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  padding: 16px;
}

.login-prompt-panel {
  border: 0;
  box-shadow: none;
  padding: 16px;
}

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

.popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 36px;
  min-height: 36px;
  border: 1px solid var(--line-strong);
  background: #ffffff;
  color: #111111;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.popup-eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.popup-card h3 {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.popup-copy {
  color: var(--muted);
  line-height: 1.7;
}

.popup-actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.popup-meta {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
}

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

.popup-field textarea {
  min-height: 150px;
  resize: vertical;
}

.popup-status {
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  background: var(--surface-soft);
  color: var(--text);
  line-height: 1.55;
}

.popup-status.is-success {
  border-color: var(--line-strong);
}

.popup-status.is-error {
  border-color: #111111;
}

.image-preview-backdrop {
  padding: 18px;
  background: rgba(17, 17, 17, 0.78);
}

.image-preview-card {
  position: relative;
  z-index: 10001;
  width: min(1200px, 100%);
  height: min(92vh, 980px);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.image-preview-stage {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 0;
  background: #ffffff;
}

.image-preview-stage img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: center center;
}

.image-preview-close {
  top: 12px;
  right: 12px;
  z-index: 2;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(17, 17, 17, 0.72);
  color: #ffffff;
}

.captcha-proto-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 12px;
}

.captcha-box {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.captcha-box img {
  width: 80%;
  height: 80%;
  max-width: 100%;
  max-height: none;
  object-fit: contain;
}

.check-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  align-items: start;
  color: var(--muted);
  line-height: 1.55;
}

.check-row input {
  margin: 2px 0 0;
}

.check-row a {
  text-decoration: underline;
}

.proto-doc-stack {
  display: grid;
  gap: 12px;
}

.legal-doc {
  border: 1px solid var(--line);
  background: var(--surface);
}

.legal-doc summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text);
}

.legal-doc summary::-webkit-details-marker {
  display: none;
}

.legal-doc[open] summary {
  border-bottom: 1px solid var(--line);
  background: #fbfbfb;
}

.doc-body {
  padding: 16px;
}

.doc-body p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.65;
}

.doc-body p:last-child {
  margin-bottom: 0;
}

.doc-frame-wrap {
  border: 1px solid var(--line);
  background: #ffffff;
}

.doc-frame {
  width: 100%;
  min-height: 420px;
  border: 0;
  background: #ffffff;
}

.doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 0 16px 16px;
}

.doc-missing {
  margin: 0 16px 16px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.message-card {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  padding: 22px;
}

.admin-runtime-box {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 14px;
}

.admin-runtime-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  flex-wrap: wrap;
}

.admin-runtime-box h4,
.admin-runtime-title {
  margin: 0 0 8px;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.admin-runtime-box p,
.admin-runtime-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.admin-runtime-form {
  display: flex;
  justify-content: flex-start;
}

.admin-panel-card {
  overflow: hidden;
}

.admin-create-order {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.admin-create-order h4 {
  margin: 0 0 8px;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.admin-create-order p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.6;
}

.admin-create-form {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.admin-table-shell {
  width: 100%;
  overflow-x: auto;
}

.admin-toolbar {
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-status {
  color: var(--muted);
  font-size: 14px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

.admin-table th,
.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

.admin-table th {
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface);
}

.admin-actions-cell {
  white-space: nowrap;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-inline-badge {
  display: inline-flex;
  margin-top: 8px;
  padding: 4px 8px;
  border: 1px solid #111111;
  background: #111111;
  color: #ffffff;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-row-blocked td {
  background: #f4f4f4;
  color: #555555;
}

.admin-filter-row th {
  background: var(--surface-soft);
  padding-top: 10px;
  padding-bottom: 10px;
}

.admin-filter-input {
  width: 100%;
  min-width: 120px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  font-size: 13px;
}

@media (max-width: 980px) {
  .admin-create-form {
    grid-template-columns: 1fr;
  }
}

.message-card h2 {
  margin: 0 0 14px;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.message-copy {
  color: var(--muted);
  line-height: 1.7;
}

.message-copy p {
  margin: 0 0 12px;
}

.message-copy p:last-child {
  margin-bottom: 0;
}

.message-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.status-card {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  padding: 16px;
  display: grid;
  gap: 8px;
}

.status-card h3,
.status-card p {
  margin: 0;
}

.status-card.success {
  border-color: #111111;
}

.status-card.error {
  border-color: #111111;
  background: #f3f3f3;
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  background: #000000;
}

.footer-payments-strip {
  background: #ffffff;
  max-height: 240px;
  overflow: hidden;
}

.footer-payments-image {
  display: block;
  width: 100%;
  height: 240px;
  object-fit: contain;
  object-position: center;
}

.footer-inner {
  width: min(1380px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 34px;
  display: grid;
  gap: 24px;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 24px;
  align-items: start;
}

.footer-description {
  max-width: 760px;
}

.footer-description h3 {
  margin: 0 0 12px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.footer-description p,
.footer-legal,
.footer-company {
  margin: 0;
  color: #d6d6d6;
  line-height: 1.7;
  font-size: 14px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 12px 18px;
  align-content: start;
}

.footer-bottom {
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  display: grid;
  gap: 12px;
}

.details-browser-frame {
  margin-top: 18px;
}

.details-price-box {
  min-width: 280px;
  max-width: 360px;
  text-align: right;
  display: grid;
  justify-items: end;
  gap: 10px;
}

.details-price-note {
  max-width: 320px;
  margin-left: auto;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-description h3,
.footer-links a,
.footer-meta a {
  color: #f5f5f5;
}

.site-footer .footer-links a:hover,
.site-footer .footer-meta a:hover {
  color: #d6d6d6;
}

.ai-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #111111;
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(17, 17, 17, 0.24);
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 1000;
}

.ai-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(17, 17, 17, 0.3);
}

.ai-fab.hidden {
  display: none;
}

.ai-panel {
  --chat-panel-width: 336px;
  --chat-open-right: 0px;
  position: fixed;
  bottom: 0;
  right: var(--chat-open-right);
  width: var(--chat-panel-width);
  max-width: calc(100vw - 24px);
  height: 70vh;
  background: var(--surface);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 1001;
  transform: translateX(calc(100% + 44px));
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.06);
}

.ai-panel.open {
  transform: translateX(0);
}

.ai-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  flex-shrink: 0;
}

.ai-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.ai-panel-actions {
  display: flex;
  gap: 4px;
}

.ai-close-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}

.ai-close-btn:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.ai-panel-context {
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.ai-context-label {
  font-size: 11px;
  color: var(--muted);
}

.ai-context-label span {
  color: #111111;
  font-weight: 600;
}

.ai-panel-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-welcome {
  text-align: center;
  padding: 12px 8px 18px;
  color: var(--muted);
}

.ai-welcome p {
  font-size: 13px;
  line-height: 1.6;
  max-width: 300px;
  margin: 0 auto 14px;
}

.ai-msg {
  max-width: 90%;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.6;
  word-break: break-word;
  white-space: pre-wrap;
}

.ai-msg-user {
  align-self: flex-end;
  background: #111111;
  color: #ffffff;
}

.ai-msg-ai {
  align-self: flex-start;
  background: #f7f7f7;
  border: 1px solid var(--line);
  color: var(--text);
}

.ai-panel-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 12px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.ai-panel-quick-actions .btn {
  padding: 10px 12px;
  font-size: 12px;
}

.ai-panel-input {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  flex-shrink: 0;
}

.ai-panel-input textarea {
  flex: 1;
  border: 1px solid var(--line);
  padding: 8px 12px;
  font-size: 13px;
  font-family: inherit;
  background: #fcfcfc;
  color: var(--text);
  resize: none;
  outline: none;
  max-height: 120px;
  line-height: 1.5;
  min-height: 40px;
}

.ai-panel-input textarea:focus {
  border-color: #8f8f8f;
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.05);
}

.ai-send-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: #111111;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}

.ai-send-btn:hover {
  background: #2a2a2a;
}

.ai-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#produkty,
#szczegoly,
#konto,
#zakupy,
#jak-to-dziala,
#chatbot,
#documents,
#checkout {
  scroll-margin-top: 96px;
}

.hidden {
  display: none !important;
}

@media (max-width: 1200px) {
  .app {
    grid-template-columns: 1fr;
  }

  .side-column {
    position: static;
  }
}

@media (max-width: 860px) {
  .slide {
    grid-template-columns: 1fr;
  }

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

  .details-price-box {
    min-width: 100%;
    max-width: none;
    text-align: left;
    justify-items: start;
  }

  .details-price-note {
    max-width: none;
    margin-left: 0;
  }
}

@media (max-width: 980px) {
  .header-inner,
  .footer-top {
    grid-template-columns: 1fr;
  }

  .header-inner {
    width: min(100% - 18px, 1380px);
    padding: 14px 0;
    min-height: auto;
    flex-direction: column;
    align-items: stretch;
  }

  .header-nav,
  .header-actions {
    justify-content: flex-start;
  }

  .footer-links {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  body.mobile-nav-open {
    overflow: hidden;
  }

  .app {
    width: min(100% - 18px, 1380px);
    margin-top: 10px;
    gap: 14px;
  }

  .hero,
  .store-area,
  .login-panel,
  .purchases-panel,
  .flow-panel,
  .chat-panel {
    padding: 16px;
  }

  .site-header {
    position: sticky;
    top: 0;
  }

  .header-inner {
    width: min(100% - 18px, 1380px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
  }

  .brand {
    min-width: 0;
  }

  .brand span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
  }

  .brand-mark {
    height: 26px;
  }

  .header-menu-toggle {
    display: block;
    grid-column: 2;
    grid-row: 1;
  }

  .header-actions {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
  }

  .header-actions .btn.ghost {
    display: none;
  }

  .header-actions .btn {
    min-height: 44px;
    padding: 11px 14px;
    white-space: nowrap;
  }

  .header-nav {
    display: none;
  }

  .mobile-nav-backdrop,
  .mobile-nav-drawer {
    display: block;
  }

  .hero {
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px 12px;
  }

  .eyebrow {
    display: none;
  }

  .hero h1 {
    font-size: clamp(24px, 7vw, 30px);
    line-height: 1.02;
    max-width: none;
  }

  .hero p {
    margin-top: 8px;
    max-width: none;
    font-size: 13px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .carousel-wrap {
    border: none;
    background: transparent;
  }

  .slide {
    padding: 0;
    gap: 12px;
  }

  .product-visual {
    min-height: auto;
    padding: 16px;
    background: var(--surface-soft);
    border-color: var(--line);
  }

  .product-visual::after {
    display: none;
  }

  .product-copy,
  .product-stack {
    gap: 14px;
  }

  .product-visual h3 {
    max-width: none;
    font-size: clamp(26px, 8vw, 34px);
  }

  .product-visual p {
    max-width: none;
    font-size: 14px;
    line-height: 1.6;
  }

  .product-browser-frame {
    margin-top: 0;
    box-shadow: none;
  }

  .feature-pills {
    gap: 8px;
  }

  .feature-pills span {
    padding: 8px 10px;
    font-size: 12px;
  }

  .product-side {
    display: none;
  }

  .product-price {
    display: grid;
    justify-content: stretch;
    align-items: start;
    gap: 12px;
  }

  .product-cta-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .product-cta-row .btn {
    width: 100%;
    min-height: 46px;
  }

  .price {
    font-size: 34px;
  }

  .details-card {
    padding: 16px;
    background: var(--surface);
  }

  .details-card.has-mobile-buybar {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }

  .details-head {
    display: grid;
    gap: 14px;
  }

  .details-copy {
    max-width: none;
  }

  .details-title {
    margin: 10px 0 8px;
    font-size: clamp(28px, 8vw, 34px);
    line-height: 1.02;
  }

  .details-intro,
  .details-card-copy {
    font-size: 14px;
    line-height: 1.65;
  }

  .details-price-box {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
  }

  .details-price {
    font-size: 30px;
  }

  .details-price-note {
    font-size: 12px;
  }

  .details-stack {
    gap: 10px;
  }

  .details-gate-card,
  .details-checkout-card {
    order: -1;
  }

  .details-card-actions .btn {
    width: 100%;
    min-height: 46px;
  }

  .details-mobile-buybar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px max(16px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--line);
    box-shadow: 0 -10px 24px rgba(17, 17, 17, 0.08);
    backdrop-filter: blur(10px);
  }

  .details-mobile-buybar-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
  }

  .details-mobile-buybar-label {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: var(--muted);
  }

  .details-mobile-buybar-price {
    font-size: 20px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text);
  }

  .details-mobile-buybar-link {
    display: inline-flex;
    width: fit-content;
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.2;
    color: var(--muted);
    text-decoration: underline;
    text-underline-offset: 2px;
  }

  .details-mobile-buybar .btn {
    flex: 0 0 auto;
    min-height: 46px;
    padding-inline: 18px;
  }

  .section-title {
    align-items: start;
    flex-direction: column;
  }

  .topbar-small {
    align-items: start;
    flex-direction: column;
  }

  .topbar-small h3 {
    font-size: 20px;
  }

  .user-pill.visible {
    display: inline-flex;
  }

  .purchase-card {
    gap: 10px;
  }

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

  .purchase-actions .btn {
    width: 100%;
  }

  .purchase-usage-grid {
    grid-template-columns: 1fr;
  }

  .chat-input-row,
  .captcha-proto-row {
    grid-template-columns: 1fr;
  }

  .check-row {
    gap: 10px;
    grid-template-columns: 18px minmax(0, 1fr);
  }

  .doc-frame {
    min-height: 300px;
  }

  .ai-panel {
    --chat-open-right: 0px;
    width: 100vw;
    max-width: 100vw;
    right: 0;
    height: 100vh;
  }

  .ai-fab {
    bottom: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 420px) {
  .app {
    width: min(100% - 14px, 1380px);
  }

  .header-inner {
    width: min(100% - 14px, 1380px);
  }

  .header-actions .btn {
    min-width: auto;
    padding: 10px 12px;
    font-size: 13px;
  }

  .details-mobile-buybar {
    padding-inline: max(14px, env(safe-area-inset-left)) max(14px, env(safe-area-inset-right));
  }

  .details-mobile-buybar-label {
    max-width: 130px;
  }

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

  .carousel-controls {
    display: grid;
    gap: 10px;
  }

  .carousel-controls > div:first-child {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
  }

  .popup-backdrop {
    padding: 12px;
  }

  .popup-card {
    padding: 20px;
  }

  .image-preview-card {
    height: min(94vh, 820px);
  }
}
