:root {
  --bg: #f6f0e3;
  --bg-strong: #fffaf0;
  --surface: rgba(255, 252, 245, 0.78);
  --surface-strong: rgba(255, 253, 248, 0.94);
  --surface-soft: rgba(239, 245, 226, 0.76);
  --ink: #1d2718;
  --ink-soft: #4f5947;
  --ink-faint: #687361;
  --accent: #26411f;
  --accent-strong: #11170e;
  --accent-soft: #456836;
  --badge: #9570be;
  --border: rgba(29, 35, 25, 0.12);
  --border-strong: rgba(29, 35, 25, 0.18);
  --radius: 24px;
  --radius-sm: 16px;
  --shadow: 0 26px 90px -48px rgba(92, 86, 65, 0.34);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100dvh;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Geist", "Inter", sans-serif;
  background:
    radial-gradient(circle at 12% 16%, rgba(180, 201, 137, 0.34) 0%, transparent 34%),
    radial-gradient(circle at 84% 8%, rgba(223, 191, 137, 0.24) 0%, transparent 30%),
    linear-gradient(135deg, #f6f0e3 0%, #ecdfc9 100%);
}

a {
  color: inherit;
}

.shell {
  position: relative;
  max-width: 1220px;
  margin: 0 auto;
  padding: 28px 18px 72px;
  display: grid;
  gap: 18px;
}

.brand-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.72);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #f7f0e0;
  border: 1px solid #d6c7a7;
  padding: 5px;
  flex: 0 0 auto;
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-name {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 30px;
  line-height: 0.88;
  letter-spacing: -0.04em;
}

.brand-tagline {
  color: var(--ink-faint);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.62);
  padding: 9px 14px;
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero {
  display: grid;
  gap: 22px;
}

.hero-home,
.hero-dashboard {
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  align-items: stretch;
}

.hero-copy,
.hero-panel {
  border: 1px solid var(--border);
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-copy {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 252, 244, 0.94) 0%, rgba(236, 244, 219, 0.96) 100%);
  padding: 36px 36px 34px;
}

.hero-copy::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -55px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(149, 112, 190, 0.12) 0%, rgba(149, 112, 190, 0) 72%);
}

.hero-panel {
  background: var(--surface-strong);
  padding: 28px 26px;
}

.eyebrow {
  margin: 0;
  color: #75806c;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.04em;
}

h1 {
  margin: 12px 0 14px;
  font-size: clamp(52px, 7vw, 86px);
  line-height: 0.95;
}

h2 {
  margin: 0 0 12px;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 0.98;
}

.subhead {
  margin: 0;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.8;
  max-width: 640px;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-pills span,
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(29, 35, 25, 0.12);
  background: rgba(255, 255, 255, 0.6);
  padding: 8px 12px;
  color: #33402d;
  font-size: 13px;
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(12px);
  padding: 24px 26px;
  box-shadow: var(--shadow);
}

.panel-soft {
  background: var(--surface-soft);
}

.panel-subtle {
  background: rgba(255, 255, 255, 0.42);
}

.panel-kicker {
  margin: 0 0 12px;
  color: var(--ink-faint);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.panel-lead {
  margin: 0 0 18px;
  color: var(--ink-soft);
  line-height: 1.75;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

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

.feature-number {
  display: inline-flex;
  margin-bottom: 14px;
  border-radius: 999px;
  background: rgba(149, 112, 190, 0.12);
  color: var(--badge);
  padding: 7px 11px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.feature-card p {
  margin: 10px 0 0;
  color: var(--ink-soft);
  line-height: 1.72;
}

.section-head {
  margin-bottom: 18px;
  max-width: 760px;
}

.section-head p {
  margin: 0;
}

.section-head .subhead {
  margin-top: 8px;
  font-size: 17px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.workspace-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.workspace-head h2 {
  margin-top: 4px;
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 15px;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  outline: none;
}

input:focus {
  border-color: rgba(38, 65, 31, 0.4);
  box-shadow: 0 0 0 4px rgba(69, 104, 54, 0.1);
}

button {
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  font: 600 15px/1 "Geist", sans-serif;
  color: #f7f8f1;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  box-shadow: 0 18px 40px -20px rgba(70, 105, 55, 0.45);
  cursor: pointer;
}

button.secondary {
  color: var(--accent);
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: none;
}

button:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

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

.stat-value {
  margin: 14px 0 10px;
  font-size: clamp(40px, 5vw, 58px);
  line-height: 0.96;
  font-family: "Instrument Serif", Georgia, serif;
}

.stat-meta {
  margin: 0;
  color: var(--ink-faint);
  font-size: 13px;
  line-height: 1.6;
}

.output {
  margin: 12px 0 0;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  font: 13px/1.6 "IBM Plex Mono", "SFMono-Regular", monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: rgba(255, 255, 255, 0.78);
}

.activity-feed {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.activity-item {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 14px 15px;
  background: var(--surface-strong);
}

.activity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.activity-event {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(149, 112, 190, 0.2);
  padding: 4px 9px;
  background: rgba(149, 112, 190, 0.08);
  color: var(--badge);
  font: 600 11px/1.2 "IBM Plex Mono", monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.activity-time {
  font: 500 12px/1.2 "IBM Plex Mono", monospace;
  color: var(--ink-faint);
}

.activity-summary {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.55;
}

.activity-meta {
  margin: 8px 0 0;
  color: var(--ink-faint);
  font: 12px/1.45 "IBM Plex Mono", monospace;
}

.activity-empty {
  border: 1px dashed var(--border);
  border-radius: 20px;
  padding: 14px 15px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--ink-faint);
  font: 13px/1.55 "IBM Plex Mono", monospace;
}

.activity-empty.error {
  border-color: #ddb7b7;
  background: #fff5f5;
  color: #8f2f2f;
}

.inline-stack {
  display: grid;
  gap: 10px;
}

.welcome-banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(232, 243, 210, 0.94) 0%, rgba(246, 250, 234, 0.98) 100%);
  border: 1px solid rgba(127, 157, 85, 0.24);
  box-shadow: var(--shadow);
}

.welcome-banner-content {
  flex: 1;
}

.welcome-banner h3 {
  margin: 0 0 6px;
  font-size: 28px;
}

.welcome-banner p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.7;
}

.welcome-banner-dismiss {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 4px 8px;
  font-size: 18px;
  color: var(--ink-faint);
  cursor: pointer;
  line-height: 1;
}

.welcome-banner-dismiss:hover {
  color: var(--ink);
}

.auth-status,
.verify-status {
  margin-top: 12px;
  min-height: 22px;
  font-size: 14px;
  color: var(--ink-faint);
  line-height: 1.6;
}

.auth-status.error,
.verify-status.error {
  color: #b42318;
}

.auth-status.success,
.verify-status.success {
  color: var(--accent);
}

code {
  border-radius: 999px;
  padding: 3px 7px;
  background: rgba(29, 35, 25, 0.06);
  font-size: 0.94em;
}

@media (max-width: 960px) {
  .hero-home,
  .hero-dashboard,
  .feature-grid,
  .grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .shell {
    padding: 18px 14px 54px;
  }

  .brand-bar,
  .workspace-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-chip {
    align-self: stretch;
    justify-content: center;
  }

  .hero-copy,
  .hero-panel,
  .panel {
    padding: 22px 20px;
  }

  h1 {
    font-size: clamp(42px, 13vw, 62px);
  }

  h2 {
    font-size: clamp(28px, 10vw, 40px);
  }
}
