:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #20242c;
  --muted: #667085;
  --line: #d9dee7;
  --accent: #166534;
  --accent-strong: #14532d;
  --danger: #b42318;
  --warn-bg: #fff7d6;
  --warn-text: #775500;
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
}

a {
  color: var(--accent);
}

.topbar {
  min-height: 64px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 2;
}

.brand {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.beta-badge {
  border: 1px solid #f2b84b;
  border-radius: 999px;
  background: #fff4d6;
  color: #8a4b00;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
}

.topnav {
  display: flex;
  gap: 18px;
}

.topnav a {
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

.shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 32px auto 64px;
}

.auth-panel {
  max-width: 440px;
  margin: 64px auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 12px 28px rgba(24, 32, 48, 0.08);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 28px;
  align-items: center;
  min-height: calc(100vh - 160px);
}

.eyebrow {
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  font-size: 54px;
  line-height: 1.02;
}

.lead {
  max-width: 660px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.55;
}

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

.hero-panel,
.price-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 12px 28px rgba(24, 32, 48, 0.08);
}

.step {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 4px 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.step:last-child {
  border-bottom: 0;
}

.step span {
  grid-row: span 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #dcfae6;
  color: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 800;
}

.step p {
  margin: 0;
  color: var(--muted);
}

.feature-band {
  margin-top: 28px;
  padding: 26px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

h1 {
  font-size: 32px;
  line-height: 1.15;
  margin-bottom: 8px;
}

h2 {
  font-size: 18px;
  margin-bottom: 18px;
}

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

.warning,
.error,
.notice,
.error-list {
  border-radius: var(--radius);
  padding: 12px 14px;
}

.warning {
  background: var(--warn-bg);
  color: var(--warn-text);
}

.warning a {
  color: inherit;
  font-weight: 700;
}

.error,
.error-list {
  background: #fff1f0;
  color: var(--danger);
}

.error-list {
  margin-bottom: 20px;
}

.notice {
  background: #eef6f0;
  border: 1px solid #c8dfce;
  margin-bottom: 18px;
}

.error-list p {
  margin: 0 0 6px;
}

.error-list p:last-child {
  margin-bottom: 0;
}

.stack {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 7px;
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  font: inherit;
  color: var(--ink);
  background: #ffffff;
}

.password-control {
  position: relative;
  display: block;
}

.password-control input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  width: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  transform: translateY(-50%);
}

.password-toggle:hover {
  background: #eef2f6;
  color: var(--ink);
}

.password-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

textarea {
  resize: vertical;
}

button,
.button,
.secondary {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button,
.button {
  background: var(--accent);
  color: #ffffff;
}

button:hover,
.button:hover {
  background: var(--accent-strong);
}

.secondary {
  color: var(--ink);
  background: #ffffff;
  border-color: var(--line);
}

.small {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 14px;
  white-space: nowrap;
}

.danger {
  background: #ffffff;
  border-color: #f2b8b5;
  color: var(--danger);
}

.danger:hover {
  background: #fff1f0;
}

.link-button {
  background: transparent;
  color: var(--muted);
  min-height: 0;
  padding: 0;
}

.link-button:hover {
  background: transparent;
  color: var(--ink);
}

.auth-switch {
  margin: 18px 0 0;
  color: var(--muted);
}

.captcha-field {
  min-height: 65px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.inline-form {
  display: inline-flex;
  margin-left: 10px;
  vertical-align: middle;
}

.legal-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  line-height: 1.65;
}

.legal-panel h2 {
  margin-top: 24px;
}

.legal-panel h2:first-child {
  margin-top: 0;
}

.price-card {
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 14px;
}

.price-card.featured {
  border-color: #9bd4aa;
}

.price {
  margin: 0;
  font-size: 32px;
  font-weight: 800;
}

.price-card ul {
  margin: 0;
  padding-left: 20px;
  color: #344054;
  line-height: 1.75;
}

.price-card .button {
  align-self: end;
  width: fit-content;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

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

.table-wrap,
.form-grid section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.table-wrap {
  overflow-x: auto;
}

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

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

th {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

td span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

tr:last-child td {
  border-bottom: 0;
}

.empty {
  color: var(--muted);
  text-align: center;
}

.icon-link {
  font-weight: 700;
  text-decoration: none;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 13px;
  font-weight: 700;
  text-transform: capitalize;
}

.status.draft {
  background: #f2f4f7;
  color: #475467;
}

.status.published {
  background: #dcfae6;
  color: #166534;
}

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

.form-grid section {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 22px;
}

.wide {
  grid-column: 1 / -1;
}

.checks,
.data-grid {
  display: grid;
  gap: 10px;
}

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

.data-grid.compact {
  margin-bottom: 16px;
}

.check {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  font-weight: 500;
  background: #fbfcfd;
}

.check input {
  width: 18px;
  height: 18px;
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.review-grid,
.host-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
  gap: 18px;
  align-items: start;
}

.host-grid {
  grid-template-columns: minmax(320px, 0.7fr) minmax(0, 1.3fr);
}

.editor-panel,
.publish-panel,
.preview-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.editor-panel {
  display: grid;
  gap: 16px;
}

.policy-editor {
  min-height: 620px;
  line-height: 1.55;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
}

.publish-panel,
.preview-panel {
  margin-bottom: 18px;
}

.public-url {
  display: block;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.mini-policy {
  max-height: 560px;
  overflow: auto;
  color: #344054;
  line-height: 1.55;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.mini-policy.tall {
  max-height: 720px;
}

.mini-policy h2 {
  font-size: 16px;
  margin: 20px 0 8px;
  padding: 0;
  border: 0;
}

.mini-policy p {
  margin-bottom: 12px;
}

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

.version-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.version-item summary {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  font-weight: 700;
}

.version-item time {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.version-item .mini-policy {
  border-top: 1px solid var(--line);
  padding: 14px 16px;
  max-height: 420px;
}

.public-page {
  background: #ffffff;
}

.policy-document {
  width: min(780px, calc(100vw - 32px));
  margin: 48px auto 72px;
  line-height: 1.65;
}

.policy-document h1 {
  font-size: 36px;
  margin-bottom: 10px;
}

.policy-document h2 {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

@media (max-width: 760px) {
  .topbar {
    padding: 0 16px;
  }

  .shell {
    width: min(100vw - 24px, 1120px);
    margin-top: 22px;
  }

  .page-head,
  .head-actions,
  .hero-actions,
  .feature-band,
  .inline-form,
  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .inline-form {
    display: flex;
    margin: 12px 0 0;
  }

  .form-grid,
  .hero,
  .pricing-grid,
  .review-grid,
  .host-grid,
  .data-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
  }

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

  .policy-editor {
    min-height: 460px;
  }
}
