:root {
  --bg: #FAFAF7;
  --surface: #FFFFFF;
  --ink: #111827;
  --ink-muted: #6B7280;
  --border: #E5E7EB;
  --accent: #F5A623;
  --accent-ink: #111827;
  --success: #16A34A;
  --danger: #DC2626;
  --radius: 10px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B0F14;
    --surface: #12181F;
    --ink: #F3F4F6;
    --ink-muted: #9CA3AF;
    --border: #1F2937;
    --accent: #F5A623;
    --accent-ink: #111827;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  line-height: 1.5;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

header.site {
  padding: 24px 0;
}

.site-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
}

.brand .dot { color: var(--accent); }

.site-nav {
  display: flex;
  gap: 20px;
}

.site-nav a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 600;
}

.site-nav a:hover { color: var(--ink); }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: .82rem;
}

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

main {
  padding: 40px 0 80px;
}

h1 {
  font-size: 2rem;
  margin: 0 0 8px;
}

.subtitle {
  color: var(--ink-muted);
  margin: 0 0 32px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.dropzone {
  display: block;
  position: relative;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.dropzone:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: 0 2px 16px -6px color-mix(in srgb, var(--accent) 25%, transparent);
}

.dropzone.dragover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
}

.dropzone input[type="file"] { display: none; }

.dz-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .18s ease, background .18s ease;
}

.dropzone:hover .dz-icon,
.dropzone.dragover .dz-icon {
  transform: translateY(-3px);
  background: color-mix(in srgb, var(--accent) 22%, var(--surface));
}

.dz-icon svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.dz-title {
  font-weight: 600;
  font-size: 1rem;
}

.dz-title .browse {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dz-hint {
  color: var(--ink-muted);
  font-size: .84rem;
  margin-top: 6px;
}

.dz-picked {
  display: none;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 4px 6px;
}

.dz-picked .file-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dz-picked .file-icon svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.dz-picked .file-meta { flex: 1; min-width: 0; }

.dz-picked .file-name {
  font-weight: 600;
  font-size: .92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dz-picked .file-size {
  color: var(--ink-muted);
  font-size: .8rem;
  margin-top: 1px;
}

.dz-picked .file-change {
  color: var(--ink-muted);
  font-size: .82rem;
  flex-shrink: 0;
}

.dz-picked .file-change:hover { color: var(--accent); }

.options {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
}

.option.selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}

.option input[type="radio"] { margin-top: 4px; }

.option .label {
  font-weight: 600;
}

.option .desc {
  color: var(--ink-muted);
  font-size: .88rem;
  margin-top: 2px;
}

.option .price {
  margin-left: auto;
  font-weight: 700;
  white-space: nowrap;
}

.price-panel {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 24px 0;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.price-panel .total {
  font-size: 1.6rem;
  font-weight: 700;
}

.price-panel .rate {
  color: var(--ink-muted);
  font-size: .82rem;
}

.notice {
  font-size: .85rem;
  color: var(--ink-muted);
  margin-top: 16px;
}

/* ---- status page steps ---- */

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: .75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.step-label {
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---- key value + copy button ---- */

.key-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.key-row code {
  flex: 1;
  min-width: 0;
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  word-break: break-all;
  font-size: .95rem;
}

.copy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  flex-shrink: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--ink-muted);
  cursor: pointer;
  transition: color .12s ease, border-color .12s ease;
}

.copy-btn:hover {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

.copy-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.copy-btn svg { width: 16px; height: 16px; }
.copy-btn .icon-check { display: none; color: var(--success); }
.copy-btn.copied .icon-copy { display: none; }
.copy-btn.copied .icon-check { display: block; }

/* ---- custom checkbox fields ---- */

.field {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: .9rem;
  color: var(--ink-muted);
  cursor: pointer;
  margin-bottom: 16px;
}

.field:last-of-type { margin-bottom: 0; }

.field input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  flex-shrink: 0;
  border: 1.5px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}

.field input[type="checkbox"]:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
}

.field input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.field input[type="checkbox"]:checked::after {
  content: '';
  width: 5px;
  height: 9px;
  border: solid var(--accent-ink);
  border-width: 0 2px 2px 0;
  transform: rotate(40deg) translate(-1px, -1px);
}

.field input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.field .icon {
  width: 14px;
  height: 14px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 1px;
}

.field .field-text strong {
  color: var(--ink);
  font-weight: 600;
}

.field .field-hint {
  font-size: .8rem;
  margin-top: 2px;
  display: block;
}

.primary {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 14px 20px;
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.primary:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.primary:not(:disabled):hover {
  filter: brightness(0.95);
}

.secondary {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 20px;
  background: none;
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  margin-top: 10px;
}

.secondary:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

/* ---- generic form groups / text inputs ---- */

.balance-toggle {
  margin-top: 16px;
  margin-bottom: 16px;
  font-size: .9rem;
}

.balance-toggle summary {
  cursor: pointer;
  color: var(--ink-muted);
  font-weight: 600;
}

.balance-toggle summary:hover { color: var(--ink); }

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.text-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  font-size: .92rem;
  font-family: inherit;
}

.text-input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.text-input.mono {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: .85rem;
}

.field-hint-static {
  font-size: .78rem;
  color: var(--ink-muted);
  margin-top: 5px;
}

.badge {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 8px;
  vertical-align: middle;
}

.errors {
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  border: 1px solid var(--danger);
  color: var(--danger);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: .9rem;
}

footer.site {
  color: var(--ink-muted);
  font-size: .82rem;
  padding: 40px 0;
  text-align: center;
}

/* How it works + FAQ */

.section {
  margin-top: 64px;
}

.section-heading {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 24px;
  text-align: center;
}

/* ---- how it works: interactive walkthrough ---- */

.how {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.how-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.how-tab {
  position: relative;
  background: none;
  border: none;
  text-align: left;
  padding: 18px 18px 16px;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--border);
}

.how-tab + .how-tab { border-left: 1px solid var(--border); }

.how-tab .n {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.how-tab .t {
  display: block;
  font-size: .92rem;
  font-weight: 600;
  color: var(--ink);
  margin-top: 3px;
}

.how-tab .track {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--border);
}

.how-tab .fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: var(--accent);
  transform-origin: left;
}

.how-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  z-index: 1;
}

.how-tab[aria-selected="true"] .n { color: var(--accent); }

.how-tab[aria-selected="true"] .fill.playing {
  animation: fillbar 4.5s linear forwards;
}

.how-tab[aria-selected="true"]:not(.autoplay) .fill {
  width: 100%;
}

@keyframes fillbar {
  from { width: 0%; }
  to { width: 100%; }
}

.how-playpause {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: color-mix(in srgb, var(--surface) 75%, transparent);
  backdrop-filter: blur(2px);
  border: none;
  border-radius: 50%;
  color: var(--ink-muted);
  opacity: .55;
  cursor: pointer;
  transition: opacity .15s ease, color .15s ease;
}

.how-playpause:hover, .how-playpause:focus-visible {
  opacity: 1;
  color: var(--ink);
}

.how-playpause:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.how-playpause svg { width: 11px; height: 11px; flex-shrink: 0; }
.how-playpause .icon-play { display: none; }
.how.paused .how-playpause .icon-play { display: block; }
.how.paused .how-playpause .icon-pause { display: none; }
.how.paused .how-playpause { opacity: .85; }

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

.how-stage {
  position: relative;
  min-height: 220px;
}

.panel {
  display: none;
  grid-template-columns: 1.1fr 1fr;
}

.panel.active {
  display: grid;
  animation: rise .4s ease-out both;
}

@media (max-width: 620px) {
  .panel.active { grid-template-columns: 1fr; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.how-copy {
  padding: 32px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.how-copy .desc {
  color: var(--ink-muted);
  font-size: .95rem;
  max-width: 34ch;
  margin: 0;
}

.how-copy .desc strong {
  color: var(--ink);
  font-weight: 600;
}

.how-visual {
  background: var(--bg);
  border-left: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

@media (max-width: 620px) {
  .how-visual { border-left: none; border-top: 1px solid var(--border); }
}

/* mini mockup: dropzone */

.mock-drop {
  width: 180px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 20px 14px;
  text-align: center;
  background: var(--surface);
}

.mock-file {
  width: 34px;
  height: 40px;
  margin: 0 auto 10px;
  background: var(--surface);
  border: 1.5px solid var(--ink-muted);
  border-radius: 4px;
  position: relative;
  animation: drop-in .5s cubic-bezier(.2,.8,.3,1.2) both;
  animation-delay: .15s;
}

.mock-file::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 10px; height: 10px;
  background: var(--bg);
  border-left: 1.5px solid var(--ink-muted);
  border-bottom: 1.5px solid var(--ink-muted);
}

@keyframes drop-in {
  from { transform: translateY(-16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.mock-price {
  display: inline-block;
  font-size: .76rem;
  font-weight: 700;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 3px 9px;
  border-radius: 999px;
  opacity: 0;
  animation: fade-in .3s ease both;
  animation-delay: .5s;
}

@keyframes fade-in {
  to { opacity: 1; }
}

/* mini mockup: checkout */

.mock-checkout {
  width: 190px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.mock-card-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.mock-card-icon {
  width: 26px;
  height: 18px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--ink)));
  flex-shrink: 0;
}

.mock-dots {
  font-size: .8rem;
  letter-spacing: 2px;
  color: var(--ink-muted);
}

.mock-confirm {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  font-weight: 600;
}

.mock-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  position: relative;
}

.mock-check::after {
  content: '';
  position: absolute;
  left: 5px; top: 3px;
  width: 5px; height: 9px;
  border-right: 2px solid var(--accent-ink);
  border-bottom: 2px solid var(--accent-ink);
  transform: rotate(40deg) scale(0);
  animation: check-in .25s ease-out .35s forwards;
}

@keyframes check-in {
  to { transform: rotate(40deg) scale(1); }
}

/* mini mockup: proof link */

.mock-proof {
  width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.mock-link {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: ui-monospace, monospace;
  font-size: .74rem;
  color: var(--ink-muted);
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  white-space: nowrap;
}

.mock-link .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.mock-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .76rem;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent);
  padding: 4px 10px;
  border-radius: 999px;
  opacity: 0;
  animation: fade-in .3s ease .4s forwards;
}

@media (prefers-reduced-motion: reduce) {
  .panel, .mock-file, .mock-price, .mock-check::after, .mock-badge {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .how-tab .fill.playing { animation: none !important; }
}

.faq {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.faq-item summary::after {
  content: '+';
  color: var(--accent);
  font-size: 1.3rem;
  font-weight: 700;
  transition: transform .15s ease;
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item .faq-answer {
  padding: 0 20px 18px;
  color: var(--ink-muted);
  font-size: .9rem;
  line-height: 1.6;
}

/* ---- cookie consent banner ---- */

.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 14px 0;
  z-index: 50;
  box-shadow: 0 -4px 16px rgba(0,0,0,.08);
}

.cookie-banner-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: .85rem;
  color: var(--ink-muted);
}

.cookie-banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* ---- blog ---- */

.post-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.post-list-item {
  display: block;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}

.post-list-item:last-child { border-bottom: 1px solid var(--border); }

.post-list-item-with-image {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.post-list-thumb {
  width: 96px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: var(--surface);
}

.post-cover {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.post-list-date {
  font-size: .78rem;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.post-list-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.post-list-item:hover .post-list-title { color: var(--accent); }

.post-list-excerpt {
  color: var(--ink-muted);
  font-size: .92rem;
}

.post-body {
  line-height: 1.7;
}

.post-body h2 {
  font-size: 1.3rem;
  margin: 28px 0 12px;
}

.post-body h3 {
  font-size: 1.1rem;
  margin: 22px 0 10px;
}

.post-body p { margin: 0 0 16px; }

.post-body ul, .post-body ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

.post-body a { color: var(--accent); }

.post-body code {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: .9em;
}

.post-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 28px;
  text-decoration: none;
  color: var(--ink);
}

.post-cta:hover {
  border-color: var(--accent);
}

.post-cta-text {
  font-size: .92rem;
}

.post-cta-arrow {
  font-weight: 700;
  color: var(--accent-ink);
  background: var(--accent);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: .85rem;
  white-space: nowrap;
}
