/* KWRK Side Projects — shared shell styles */
:root {
  --bg: #1a1a1a;
  --text: #ffffff;
  --accent: #f36310;
  --muted: #a3a3a3;
  --surface: #262626;
  --border: #333333;
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --radius: 12px;
  --max-width: 720px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: var(--accent);
}

.shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.logo {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  line-height: 1.2;
  margin: 0 0 1rem;
}

.hero .lead {
  font-size: 1.125rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.section {
  margin: 2rem 0;
}

.section h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.section p {
  margin: 0 0 0.75rem;
}

.price-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 2rem 0;
}

.price-block .amount {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
}

.disclaimer {
  font-size: 0.8125rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  margin-top: 2.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  width: 100%;
  max-width: 320px;
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.site-footer {
  margin-top: 3rem;
  font-size: 0.8125rem;
  color: var(--muted);
  text-align: center;
}

.site-footer .powered {
  margin-top: 0.5rem;
  opacity: 0.7;
}

/* Chat interface */
.chat-shell {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: 640px;
  margin: 0 auto;
}

.chat-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-header a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
}

.chat-disclaimer {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.25rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.msg {
  max-width: 92%;
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  white-space: pre-wrap;
  word-break: break-word;
}

.msg-ai {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
}

.msg-user {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
}

.chat-input-row {
  padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.5rem;
}

.chat-input-row input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.75rem 1rem;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

.chat-input-row input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
}

.chat-input-row button {
  min-width: 80px;
}

.payment-gate {
  padding: 1.5rem 1.25rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
  text-align: center;
}

.payment-gate.hidden {
  display: none;
}

/* Brief delivery */
.brief-document {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.8125rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-x: auto;
}

.brief-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

@media (min-width: 480px) {
  .brief-actions {
    flex-direction: row;
  }
}

.hidden {
  display: none !important;
}

.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Account auth */
.auth-hero {
  max-width: 420px;
  margin: 0 auto;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.auth-form label {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.75rem;
}

.auth-form input {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
}

.auth-status {
  color: var(--muted);
  font-size: 0.9375rem;
  min-height: 1.5rem;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  margin-top: 0.75rem;
}
