*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #fafafa;
  --bg-card: #ffffff;
  --text: #111111;
  --text-muted: #888888;
  --text-faint: #cccccc;
  --border: #e5e5e5;
  --accent: #111111;
  --radius: 4px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111111;
    --bg-card: #1a1a1a;
    --text: #f0f0f0;
    --text-muted: #777777;
    --text-faint: #444444;
    --border: #2a2a2a;
    --accent: #f0f0f0;
  }
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  min-height: 100vh;
  line-height: 1.5;
}

a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--text-muted);
}

/* Layout */
.page {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Nav */
nav {
  padding: 24px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-tier {
  font-size: 11px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  text-transform: lowercase;
}

.nav-tier.basic { border-color: var(--text); color: var(--text); }
.nav-tier.premium { border-color: var(--text); background: var(--text); color: var(--bg); }

/* Hero */
.hero {
  padding: 80px 0 60px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(36px, 7vw, 56px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.style-toggle {
  display: flex;
  gap: 4px;
}

.style-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.03em;
}

.style-btn.active {
  border-color: var(--text);
  color: var(--text);
  background: var(--text);
  color: var(--bg);
}

.style-btn.locked {
  opacity: 0.35;
  cursor: not-allowed;
}

.style-btn:hover:not(.active):not(.locked) {
  border-color: var(--text-muted);
  color: var(--text-muted);
}

.input-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.hero .subhead {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 420px;
  margin: 0 auto 48px;
  line-height: 1.6;
}

/* Input area */
.input-wrap {
  position: relative;
  margin-bottom: 16px;
}

.input-wrap textarea {
  width: 100%;
  padding: 16px 20px;
  padding-right: 56px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
  resize: none;
  min-height: 64px;
  max-height: 200px;
  transition: border-color 0.15s;
  line-height: 1.5;
}

.input-wrap textarea:focus {
  outline: none;
  border-color: var(--text);
}

.input-wrap textarea::placeholder {
  color: var(--text-faint);
}

.submit-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--text);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s;
  color: var(--bg);
}

.submit-btn:hover { opacity: 0.75; }
.submit-btn:disabled { opacity: 0.3; cursor: default; }

.submit-btn svg {
  width: 16px;
  height: 16px;
  fill: white;
}

/* Preset buttons */
.presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 0;
}

.preset-btn {
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: transparent;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  white-space: nowrap;
}

.preset-btn:hover {
  border-color: var(--text);
  color: var(--text);
}

/* Response area */
.response-area {
  margin-top: 40px;
  min-height: 80px;
  text-align: center;
  display: none;
}

.response-area.visible {
  display: block;
}

.response-text {
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 12px;
}

.response-tier-label {
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.not-enough {
  margin-top: 10px;
  font-size: 12px;
}

.not-enough a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.not-enough a:hover {
  color: var(--text);
}

.tomorrow-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
  font-style: italic;
}

.share-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  justify-content: center;
  flex-wrap: wrap;
}

.share-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-family: 'Courier New', monospace;
}

.share-link {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  transition: color 0.15s;
}

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

.bookmark-nudge {
  margin-top: 8px;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-faint);
  display: none;
}

.upgrade-nudge {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 16px;
}

.upgrade-nudge a {
  color: var(--text);
  font-weight: 500;
}

/* Loading dots */
.dots {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.dots span {
  width: 5px;
  height: 5px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: blink 1.2s infinite;
}

.dots span:nth-child(2) { animation-delay: 0.2s; }
.dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
  0%, 80%, 100% { opacity: 0.2; }
  40% { opacity: 1; }
}

/* Divider */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 60px 0;
}

/* Pricing page */
.pricing-hero {
  padding: 80px 0 48px;
  text-align: center;
}

.pricing-hero h1 {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.pricing-hero .subhead {
  font-size: 14px;
  color: var(--text-muted);
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 48px;
}

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

.pricing-card {
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 28px 20px 24px;
  text-align: center;
  background: var(--bg-card);
}

.pricing-card.featured {
  border-color: var(--text);
}

.pricing-card .plan-name {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.pricing-card .price {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.pricing-card .price sub {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
}

.pricing-card .price-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.4;
  font-style: italic;
}

.pricing-card .cta-btn {
  width: 100%;
  padding: 10px;
  border: 1.5px solid var(--text);
  border-radius: var(--radius);
  background: transparent;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--text);
  text-decoration: none;
  display: block;
}

.pricing-card.featured .cta-btn {
  background: var(--text);
  color: var(--bg);
}

.pricing-card .cta-btn:hover {
  background: var(--text);
  color: var(--bg);
}

.pricing-note {
  text-align: center;
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 80px;
}

/* Success state */
.success-msg {
  text-align: center;
  padding: 80px 0;
}

.success-msg h2 {
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.success-msg p {
  color: var(--text-muted);
  font-size: 14px;
}

.success-msg a {
  color: var(--text);
}

/* Footer */
footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--text-faint);
}
