:root {
  --bg: #f5efe4;
  --panel: rgba(255, 250, 242, 0.92);
  --panel-border: rgba(81, 55, 32, 0.14);
  --text: #1f1308;
  --muted: #72573d;
  --accent: #0f7b6c;
  --accent-strong: #0a5a4f;
  --danger: #b33f28;
  --shadow: 0 24px 60px rgba(88, 63, 37, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(15, 123, 108, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(179, 63, 40, 0.16), transparent 25%),
    linear-gradient(180deg, #fbf7f0 0%, var(--bg) 100%);
  min-height: 100vh;
}

a {
  color: inherit;
}

.layout {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 60px;
}

.landing {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 64px;
}

.marketing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 28px;
  align-items: stretch;
}

.marketing-copy,
.marketing-shell,
.marketing-panel {
  padding: 24px;
  border: 1px solid var(--panel-border);
  border-radius: 28px;
  background: rgba(255, 250, 242, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.lede-wide {
  max-width: 860px;
}

.marketing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #fffdf9;
  text-decoration: none;
  font-weight: 700;
  transition: transform 120ms ease, background 120ms ease;
}

.button-link:hover {
  transform: translateY(-1px);
  background: var(--accent-strong);
}

.button-link-secondary {
  background: rgba(15, 123, 108, 0.12);
  color: var(--accent-strong);
  border: 1px solid rgba(15, 123, 108, 0.2);
}

.button-link-secondary:hover {
  background: rgba(15, 123, 108, 0.18);
}

.marketing-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 26px;
}

.highlight-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(81, 55, 32, 0.1);
}

.highlight-card span {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.marketing-window {
  height: 100%;
  display: grid;
  gap: 18px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, #192223 0%, #101617 100%);
  color: #e8f5f3;
}

.window-dots {
  display: flex;
  gap: 8px;
}

.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(232, 245, 243, 0.3);
}

.marketing-code {
  display: grid;
  gap: 10px;
}

.code-title {
  margin: 0;
  color: #9fccc7;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.marketing-code pre {
  margin: 0;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.93rem;
  line-height: 1.55;
}

.marketing-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.marketing-badges span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #d7eeea;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.marketing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.marketing-panel p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.policy-layout {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 64px;
}

.policy-shell {
  padding: 28px;
  border: 1px solid var(--panel-border);
  border-radius: 28px;
  background: rgba(255, 250, 242, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.policy-blocks {
  display: grid;
  gap: 18px;
  margin-top: 26px;
}

.policy-section {
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(81, 55, 32, 0.1);
}

.policy-section p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.policy-list {
  margin: 12px 0 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.6;
}

.policy-list li + li {
  margin-top: 6px;
}

.hero {
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--accent-strong);
}

h1, h2, h3 {
  margin: 0;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 0.95;
}

.lede {
  max-width: 720px;
  margin: 14px 0 0;
  font-size: 1.05rem;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.panel {
  padding: 20px;
  border: 1px solid var(--panel-border);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.panel-wide {
  margin-top: 18px;
}

.panel-narrow {
  max-width: 880px;
  margin-top: 18px;
}

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

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

label {
  display: grid;
  gap: 6px;
  font-size: 0.95rem;
}

.field-with-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(81, 55, 32, 0.18);
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
}

textarea {
  resize: vertical;
}

.checkbox {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
}

.checkbox input {
  width: auto;
  margin: 0;
}

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

button {
  border: 0;
  border-radius: 999px;
  padding: 10px 15px;
  cursor: pointer;
  background: var(--accent);
  color: #fffdf9;
  transition: transform 120ms ease, background 120ms ease;
}

button:hover {
  transform: translateY(-1px);
  background: var(--accent-strong);
}

button.danger {
  background: var(--danger);
}

button.secondary-button {
  background: rgba(15, 123, 108, 0.12);
  color: var(--accent-strong);
  border: 1px solid rgba(15, 123, 108, 0.22);
}

button.secondary-button:hover {
  background: rgba(15, 123, 108, 0.18);
}

.output {
  min-height: 180px;
  margin: 0;
  padding: 14px;
  border-radius: 18px;
  background: #1f2628;
  color: #e8f5f3;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.9rem;
  line-height: 1.5;
}

.device-picker {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(81, 55, 32, 0.12);
  background: rgba(255, 255, 255, 0.62);
}

.device-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.device-list {
  display: grid;
  gap: 10px;
}

.device-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(81, 55, 32, 0.12);
  background: rgba(255, 255, 255, 0.82);
}

.device-option input {
  width: auto;
  margin-top: 2px;
}

.device-option-body {
  display: grid;
  gap: 4px;
}

.device-option-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.api-docs {
  display: grid;
  gap: 14px;
}

.api-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(81, 55, 32, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

.api-route {
  margin: 0 0 8px;
  font-size: 1rem;
}

.api-method {
  display: inline-block;
  min-width: 54px;
  padding: 4px 9px;
  margin-right: 10px;
  border-radius: 999px;
  background: rgba(15, 123, 108, 0.12);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
}

.api-template {
  min-height: 0;
  margin-top: 12px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.stat-card {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(81, 55, 32, 0.12);
}

.stat-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-card strong {
  font-size: 2rem;
}

.table-wrap {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(81, 55, 32, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(81, 55, 32, 0.1);
  text-align: left;
  vertical-align: top;
  font-size: 0.95rem;
}

.data-table th {
  background: rgba(15, 123, 108, 0.08);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-strong);
}

.cell-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

details {
  width: 100%;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

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

.summary-hint {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 400;
}

.details-body {
  margin-top: 16px;
}

.section-note {
  margin: 0 0 14px;
  color: var(--muted);
}

.history-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.history-item {
  border: 1px solid rgba(81, 55, 32, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

.history-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

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

.history-primary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.history-method {
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(15, 123, 108, 0.12);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.history-path {
  font-family: Consolas, "Courier New", monospace;
  word-break: break-all;
}

.history-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

.history-body {
  display: grid;
  gap: 8px;
  padding: 0 16px 16px;
  border-top: 1px solid rgba(81, 55, 32, 0.1);
  font-size: 0.94rem;
}

.history-request-block {
  display: grid;
  gap: 8px;
}

.history-request-body {
  margin: 0;
  padding: 12px;
  border-radius: 14px;
  background: #1f2628;
  color: #e8f5f3;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.88rem;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .policy-layout,
  .landing,
  .layout {
    width: min(100% - 20px, 100%);
    padding-top: 24px;
  }

  .policy-shell,
  .panel {
    padding: 16px;
    border-radius: 18px;
  }

  .panel-header,
  .actions,
  .device-picker-header,
  .field-with-action {
    align-items: stretch;
    flex-direction: column;
  }

  .field-with-action {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .marketing-hero {
    grid-template-columns: 1fr;
  }
}
