:root {
  color-scheme: light;
  --background: #ffffff;
  --foreground: #0f172a;
  --muted-foreground: #64748b;
  --card: #ffffff;
  --border: #e2e8f0;
  --input: #cbd5e1;
  --primary: #0f172a;
  --primary-foreground: #ffffff;
  --ring: #94a3b8;
  --destructive: #ef4444;
  --chart-2: #22c55e;
  --chart-4: #f59e0b;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--background);
  color: var(--foreground);
}

button,
input {
  font: inherit;
}

.page-shell {
  width: 100%;
  max-width: 56rem;
  margin: 0 auto;
  padding: 3rem 1rem;
}

.page-header {
  margin-bottom: 2rem;
  text-align: center;
}

h1,
h2,
p,
pre {
  margin: 0;
}

h1 {
  margin-bottom: 0.75rem;
  color: var(--foreground);
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 800;
  letter-spacing: 0;
}

.page-header p,
.page-footer p {
  color: var(--muted-foreground);
  font-size: 1rem;
  line-height: 1.5rem;
}

.input-card,
.prompt-card {
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--card);
}

.input-card {
  margin-bottom: 1.5rem;
  padding: 1.5rem;
}

h2 {
  margin-bottom: 1rem;
  color: var(--foreground);
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-weight: 700;
  letter-spacing: 0;
}

.ticker-form {
  width: 100%;
  max-width: 20rem;
}

.field {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 0.75rem;
}

label {
  width: fit-content;
  color: var(--foreground);
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
}

input {
  width: 100%;
  min-width: 0;
  height: 2.25rem;
  border: 1px solid var(--input);
  border-radius: 0.375rem;
  padding: 0.25rem 0.75rem;
  background: transparent;
  color: var(--foreground);
  font-size: 1rem;
  line-height: 1.5rem;
  outline: none;
  text-transform: uppercase;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

input::placeholder {
  color: var(--muted-foreground);
  text-transform: none;
}

input:focus-visible {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.28);
}

.copy-row {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: flex-end;
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 700;
  white-space: nowrap;
  transition:
    background-color 150ms ease,
    opacity 150ms ease;
}

.primary-button {
  height: 2.25rem;
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: var(--primary-foreground);
}

.primary-button:hover {
  opacity: 0.9;
}

.copy-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.prompt-card {
  overflow: hidden;
}

.prompt-titlebar {
  display: flex;
  min-height: 3rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
}

.traffic-lights {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.light {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
}

.red {
  background: rgba(239, 68, 68, 0.6);
}

.yellow {
  background: rgba(245, 158, 11, 0.6);
}

.green {
  background: rgba(34, 197, 94, 0.6);
}

#preview-title {
  color: var(--muted-foreground);
  font-size: 0.75rem;
  line-height: 1rem;
}

.prompt-scroll {
  max-height: 600px;
  overflow-y: auto;
  padding: 1.5rem;
}

.prompt-preview {
  color: rgba(15, 23, 42, 0.9);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875rem;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.page-footer {
  margin-top: 2rem;
  text-align: center;
}

.page-footer p {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

@media (min-width: 768px) {
  .page-shell {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }

  h1 {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }

  input {
    font-size: 0.875rem;
    line-height: 1.25rem;
  }
}
