:root {
  color-scheme: light;
  --ink: #0d1714;
  --ink-soft: #26332f;
  --paper: #f2efe6;
  --white: #fffefa;
  --line: #d7d8ce;
  --muted: #68736e;
  --accent: #d7ff58;
  --accent-dark: #a9d21d;
  --orange: #f9784b;
  --danger: #b83333;
  --shadow: 0 20px 55px rgba(13, 23, 20, 0.12);
  --radius: 24px;
  --radius-sm: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

button,
input,
textarea {
  font: inherit;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--white);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-dark {
  color: var(--ink);
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  color: var(--ink);
  background: var(--accent);
}

.brand-mark svg {
  width: 27px;
  height: 27px;
  fill: var(--ink);
}

.brand-mark svg path + path {
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}

.brand-mark-large {
  width: 64px;
  height: 64px;
  border-radius: 20px;
}

.brand-mark-large svg {
  width: 45px;
  height: 45px;
}

.eyebrow {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 750;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

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

.button-primary {
  color: var(--ink);
  background: var(--accent);
  border-color: var(--accent);
}

.button-primary:hover {
  background: #c9f444;
}

.button-accent {
  color: var(--ink);
  background: var(--accent);
}

.button-outline {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.04);
}

.button-outline:hover {
  border-color: rgba(255, 255, 255, 0.65);
}

.button-light {
  color: var(--ink);
  background: var(--white);
}

.button-secondary {
  color: var(--ink);
  background: #e5e8df;
}

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

.button-danger {
  min-height: 38px;
  padding: 0 13px;
  color: var(--danger);
  background: #fff4f1;
  border-color: #eed0ca;
}

.button-wide {
  width: 100%;
}

.notice {
  padding: 13px 15px;
  border: 1px solid;
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.45;
}

.notice-success {
  color: #285c3e;
  background: #e8f6e9;
  border-color: #b9dfc0;
}

.notice-error {
  color: #7c2424;
  background: #fff0ed;
  border-color: #efc4bc;
}

.notice-warning {
  color: #72551d;
  background: #fff9df;
  border-color: #e9d897;
}

/* Public page */

.public-body {
  min-width: 320px;
  background: var(--paper);
}

.public-header {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1160px) / 2));
  color: var(--white);
  background: var(--ink);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: #b9c4bf;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-chip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a7b0ac;
}

.status-chip.is-active i {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(215, 255, 88, 0.12);
}

.status-chip.is-paused i {
  background: var(--orange);
}

.section-shell {
  max-width: 1160px;
  margin: 0 auto;
  padding-right: 24px;
  padding-left: 24px;
}

.hero-section {
  display: grid;
  max-width: none;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 70px;
  align-items: center;
  padding-top: 80px;
  padding-bottom: 90px;
  color: var(--white);
  background: var(--ink);
  border-bottom-right-radius: 52px;
  border-bottom-left-radius: 52px;
}

.hero-copy,
.subscription-card {
  width: 100%;
  max-width: 545px;
}

.hero-copy {
  justify-self: end;
}

.hero-copy .eyebrow {
  color: var(--accent);
}

.hero-copy h1 {
  max-width: 620px;
  margin: 17px 0 24px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(46px, 6.2vw, 82px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.96;
}

.hero-copy > p {
  max-width: 500px;
  margin: 0;
  color: #aeb9b4;
  font-size: 18px;
  line-height: 1.65;
}

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

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 32px;
  color: #87938e;
  font-size: 12px;
  font-weight: 650;
}

.trust-row i {
  display: inline-grid;
  width: 18px;
  height: 18px;
  margin-right: 5px;
  place-items: center;
  color: var(--ink);
  background: var(--accent);
  border-radius: 50%;
  font-style: normal;
}

.subscription-card {
  justify-self: start;
  padding: 29px;
  color: var(--ink);
  background: var(--white);
  border-radius: 30px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.22);
}

.subscription-card-top,
.usage-head,
.usage-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.subscription-card-top h2 {
  max-width: 290px;
  margin: 7px 0 0;
  overflow: hidden;
  font-size: 19px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.round-check {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--ink);
  background: var(--accent);
  border-radius: 50%;
  font-weight: 900;
}

.subscription-card .notice {
  margin-top: 18px;
}

.usage-head {
  margin-top: 31px;
  font-size: 13px;
  font-weight: 700;
}

.usage-head strong {
  font-size: 26px;
  letter-spacing: -0.04em;
}

progress {
  width: 100%;
  height: 10px;
  margin: 16px 0 10px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #e7eadf;
  appearance: none;
}

progress::-webkit-progress-bar {
  background: #e7eadf;
  border-radius: 999px;
}

progress::-webkit-progress-value {
  background: var(--accent-dark);
  border-radius: 999px;
}

progress::-moz-progress-bar {
  background: var(--accent-dark);
  border-radius: 999px;
}

.usage-foot {
  color: var(--muted);
  font-size: 11px;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 27px 0 0;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.mini-stats div {
  min-width: 0;
  padding: 16px 13px;
  background: #f7f6f0;
}

.mini-stats dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.mini-stats dd {
  margin: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-section,
.clients-section,
.setup-section {
  padding-top: 96px;
  padding-bottom: 96px;
}

.section-heading {
  max-width: 620px;
  margin-bottom: 40px;
}

.section-heading.centered {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.section-heading h2,
.link-section h2 {
  margin: 12px 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.quick-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.925fr 0.925fr;
  gap: 16px;
}

.quick-card {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.quick-card-primary {
  color: var(--white);
  background: var(--ink);
  border-color: var(--ink);
}

.quick-number {
  color: var(--orange);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.quick-card h3 {
  margin: 12px 0 9px;
  font-size: 23px;
  letter-spacing: -0.035em;
}

.quick-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.quick-card-primary p {
  color: #aeb9b4;
}

.quick-file-links {
  display: grid;
  gap: 9px;
  align-items: start;
  justify-items: start;
}

.protocol-pill {
  display: inline-flex;
  margin: 7px 5px 0 0;
  padding: 4px 7px;
  color: var(--ink);
  background: #e9eddf;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}

.text-button,
.inline-action {
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-weight: 800;
}

.text-button:hover,
.inline-action:hover {
  text-decoration: underline;
}

.clients-section {
  border-top: 1px solid var(--line);
}

.client-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.client-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 17px;
  align-items: center;
  padding: 21px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: border-color 160ms ease, transform 160ms ease;
}

.client-card:hover {
  transform: translateY(-2px);
}

.client-card.is-recommended {
  border-color: var(--accent-dark);
  box-shadow: inset 4px 0 0 var(--accent-dark);
}

.client-icon {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  color: var(--white);
  background: var(--ink);
  border-radius: 15px;
  font-size: 20px;
  font-weight: 800;
}

.client-copy {
  min-width: 0;
}

.client-copy h3 {
  margin: 4px 0 2px;
  font-size: 19px;
}

.client-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: #e9eddf;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 900;
}

.stats-section {
  max-width: none;
  padding-top: 78px;
  padding-bottom: 78px;
  color: var(--white);
  background: var(--ink);
}

.stats-section .section-heading {
  max-width: 1112px;
  margin-right: auto;
  margin-left: auto;
}

.section-heading.light .eyebrow {
  color: var(--accent);
}

.stats-grid {
  display: grid;
  max-width: 1112px;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 0 auto;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
}

.stats-grid div {
  padding: 28px;
  background: #14211d;
}

.stats-grid span {
  display: block;
  margin-bottom: 14px;
  color: #8c9993;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stats-grid strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.stats-refresh {
  display: block;
  margin: 24px auto 0;
  padding: 9px 14px;
  color: #aab5b0;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  cursor: pointer;
}

.platform-tabs {
  display: flex;
  width: fit-content;
  margin: 0 auto 28px;
  padding: 4px;
  background: #e0e2d8;
  border-radius: 999px;
}

.platform-tabs button {
  padding: 10px 18px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 750;
}

.platform-tabs button.is-active {
  color: var(--white);
  background: var(--ink);
}

.instruction-panel {
  display: none;
  max-width: 860px;
  margin: 0 auto;
}

.instruction-panel.is-active {
  display: block;
}

.instruction-panel ol {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.instruction-panel li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.instruction-panel li > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--ink);
  background: var(--accent);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
}

.instruction-panel strong {
  display: block;
  margin: 4px 0 7px;
}

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

.instruction-panel .inline-action {
  display: inline-block;
  margin-top: 12px;
  color: #668600;
}

.link-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 20px 60px;
  align-items: end;
  padding-top: 68px;
  padding-bottom: 68px;
  border-top: 1px solid var(--line);
}

.link-section h2 {
  margin-bottom: 0;
  font-size: 38px;
}

.copy-field {
  display: flex;
  min-width: 0;
  padding: 5px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.copy-field input {
  min-width: 0;
  flex: 1;
  padding: 0 14px;
  overflow: hidden;
  color: var(--muted);
  background: transparent;
  border: 0;
  outline: none;
  text-overflow: ellipsis;
}

.copy-field button {
  padding: 11px 17px;
  color: var(--white);
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 750;
}

.link-section > p {
  grid-column: 2;
  margin: -8px 5px 0;
  color: var(--muted);
  font-size: 11px;
}

.public-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  padding-bottom: 28px;
  border-top: 1px solid var(--line);
}

.public-footer p {
  color: var(--muted);
  font-size: 12px;
}

.qr-dialog {
  width: min(92vw, 410px);
  padding: 32px;
  color: var(--ink);
  background: var(--white);
  border: 0;
  border-radius: 26px;
  box-shadow: var(--shadow);
  text-align: center;
}

.qr-dialog::backdrop {
  background: rgba(5, 12, 10, 0.78);
}

.qr-dialog h2 {
  margin: 10px 0 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 31px;
  font-weight: 500;
}

.qr-dialog p {
  margin: 19px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--ink);
  background: #e9eddf;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
}

.qr-code {
  display: grid;
  min-height: 256px;
  place-items: center;
  padding: 15px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.qr-code img,
.qr-code canvas {
  max-width: 100%;
  height: auto;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10;
  padding: 12px 16px;
  color: var(--white);
  background: var(--ink);
  border-radius: 999px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.copy-fallback {
  position: fixed;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.android-action,
.android-copy {
  display: none;
}

body[data-platform="android"] .android-action,
body[data-platform="android"] .android-copy {
  display: inline-flex;
}

body[data-platform="android"] .desktop-action,
body[data-platform="android"] .desktop-copy {
  display: none;
}

/* Admin */

.admin-body {
  min-height: 100vh;
  background: #f0f1eb;
}

.admin-header {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-header form,
.profile-actions form {
  margin: 0;
}

.mode-badge {
  padding: 7px 10px;
  color: #52625b;
  background: #e8ebe3;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.admin-main,
.form-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 54px 24px 80px;
}

.form-shell {
  max-width: 960px;
}

.admin-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 31px;
}

.admin-title-row.compact {
  margin-bottom: 24px;
}

.admin-title-row h1 {
  margin: 8px 0;
  font-size: clamp(36px, 5vw, 54px);
  letter-spacing: -0.055em;
}

.admin-title-row p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.admin-main > .notice,
.form-shell > .notice {
  margin-bottom: 18px;
}

.admin-panel {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 14px 45px rgba(13, 23, 20, 0.06);
}

.table-head,
.profile-row {
  display: grid;
  grid-template-columns: 50px minmax(220px, 1.2fr) minmax(180px, 0.9fr) auto;
  gap: 18px;
  align-items: center;
}

.table-head {
  padding: 13px 22px;
  color: var(--muted);
  background: #f4f5f0;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.profile-row {
  padding: 18px 22px;
  border-bottom: 1px solid #e7e8e1;
}

.profile-row:last-child {
  border-bottom: 0;
}

.status-dot {
  width: 11px;
  height: 11px;
  margin-left: 6px;
  background: #afb6b2;
  border-radius: 50%;
}

.status-dot.is-online {
  background: #83b316;
  box-shadow: 0 0 0 5px rgba(131, 179, 22, 0.12);
}

.profile-main {
  display: grid;
  gap: 4px;
}

.profile-main span {
  color: var(--muted);
  font-size: 13px;
}

.profile-token {
  overflow: hidden;
  color: #54605b;
  font-size: 12px;
  text-overflow: ellipsis;
}

.profile-actions {
  display: flex;
  gap: 7px;
}

.profile-actions .button {
  min-height: 38px;
  padding: 0 13px;
  font-size: 12px;
}

.empty-state {
  padding: 65px 24px;
  text-align: center;
}

.empty-state strong {
  font-size: 22px;
}

.empty-state p {
  margin: 8px 0 0;
  color: var(--muted);
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-content: center;
  padding: 30px;
}

.login-card {
  width: min(92vw, 440px);
  padding: 36px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.login-copy {
  margin: 42px 0 25px;
}

.login-copy h1 {
  margin: 9px 0;
  font-size: 39px;
  letter-spacing: -0.05em;
}

.login-copy p,
.login-foot {
  color: var(--muted);
  line-height: 1.55;
}

.login-card > .notice {
  margin-bottom: 16px;
}

.login-foot {
  margin: 18px 0 0;
  font-size: 11px;
  text-align: center;
}

.stack-form {
  display: grid;
  gap: 15px;
}

.stack-form label,
.form-grid label {
  display: grid;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 750;
}

input,
textarea {
  width: 100%;
  padding: 12px 13px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid #cdd1c8;
  border-radius: 11px;
  outline: none;
}

input:focus,
textarea:focus {
  border-color: #8cae22;
  box-shadow: 0 0 0 3px rgba(140, 174, 34, 0.13);
}

textarea {
  resize: vertical;
}

label small {
  color: var(--muted);
  font-weight: 500;
}

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

.form-card {
  padding: 27px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.form-card-head {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  margin-bottom: 27px;
  padding-bottom: 22px;
  border-bottom: 1px solid #e6e8e0;
}

.step-number {
  padding: 6px 8px;
  color: var(--ink);
  background: var(--accent);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 900;
}

.form-card-head h2 {
  margin: 0 0 5px;
  font-size: 21px;
}

.form-card-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

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

.form-grid-full {
  grid-column: 1 / -1;
}

.check-row {
  display: flex !important;
  gap: 11px !important;
  align-items: flex-start;
  padding: 13px;
  background: #f6f7f2;
  border: 1px solid #e2e5dc;
  border-radius: 12px;
  cursor: pointer;
}

.check-row input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: #719500;
}

.check-row span {
  display: grid;
  gap: 3px;
}

.check-row small {
  line-height: 1.35;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 5px;
}

.json-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 14px;
}

.json-toolbar .button {
  min-height: 38px;
  padding: 0 14px;
  font-size: 12px;
}

.json-status {
  flex: 1 1 280px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.json-status[data-state="success"] {
  color: #487100;
}

.json-status[data-state="error"] {
  color: var(--danger);
}

.json-editor-label {
  display: grid;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 750;
}

.json-editor {
  min-height: 420px;
  tab-size: 2;
  color: #dce8e2;
  background: #101a17;
  border-color: #263b34;
  border-radius: 14px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre;
}

.json-editor:focus {
  border-color: var(--accent-dark);
  box-shadow: 0 0 0 3px rgba(169, 210, 29, 0.15);
}

.form-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.fatal,
.missing-page {
  display: grid;
  min-height: 100vh;
  max-width: 620px;
  margin: 0 auto;
  place-content: center;
  padding: 30px;
  text-align: center;
}

.missing-page .brand-mark {
  margin: 0 auto 28px;
}

.fatal h1,
.missing-page h1 {
  margin: 9px 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 48px;
  font-weight: 500;
  letter-spacing: -0.05em;
}

.fatal p,
.missing-page p {
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 900px) {
  .hero-section {
    grid-template-columns: 1fr;
    gap: 50px;
    padding-top: 65px;
  }

  .hero-copy,
  .subscription-card {
    max-width: 650px;
    justify-self: center;
  }

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

  .quick-card-primary {
    grid-column: 1 / -1;
  }

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

  .table-head {
    display: none;
  }

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

  .profile-token,
  .profile-actions {
    grid-column: 2;
  }

  .profile-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 680px) {
  .public-header,
  .admin-header {
    min-height: 66px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .public-header .brand > span:last-child {
    display: none;
  }

  .status-chip {
    font-size: 10px;
  }

  .section-shell {
    padding-right: 16px;
    padding-left: 16px;
  }

  .hero-section {
    padding-top: 48px;
    padding-bottom: 55px;
    border-bottom-right-radius: 30px;
    border-bottom-left-radius: 30px;
  }

  .hero-copy h1 {
    font-size: clamp(43px, 14vw, 64px);
  }

  .hero-copy > p {
    font-size: 16px;
  }

  .hero-actions .button {
    width: 100%;
  }

  .trust-row {
    gap: 11px 17px;
  }

  .subscription-card {
    padding: 22px;
    border-radius: 23px;
  }

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

  .quick-section,
  .clients-section,
  .setup-section {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .quick-grid,
  .client-grid,
  .instruction-panel ol,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .quick-card-primary {
    grid-column: auto;
  }

  .client-card {
    gap: 12px;
  }

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

  .stats-grid div {
    padding: 22px;
  }

  .platform-tabs {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
  }

  .platform-tabs button {
    flex: 0 0 auto;
  }

  .link-section {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .link-section > p {
    grid-column: 1;
  }

  .public-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .admin-header .brand > span:last-child,
  .mode-badge {
    display: none;
  }

  .admin-main,
  .form-shell {
    padding: 36px 16px 60px;
  }

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

  .admin-title-row .button {
    width: 100%;
  }

  .profile-row {
    padding: 17px;
  }

  .profile-actions .button,
  .profile-actions form {
    flex: 1 1 auto;
  }

  .profile-actions form .button {
    width: 100%;
  }

  .form-card {
    padding: 20px;
  }

  .form-grid-full {
    grid-column: auto;
  }

  .form-actions .button {
    flex: 1;
  }

  .login-card {
    padding: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
