:root {
  --bg-top: #e9eef3;
  --bg-bottom: #f0f9ff;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --accent: #0d9488;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
  --danger: #dc2626;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: linear-gradient(165deg, var(--bg-top) 0%, var(--bg-bottom) 45%, #ffffff 100%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.site-header {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}

.site-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 2.5rem;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0.35rem 0 0.5rem;
  color: var(--text);
}

.hero p {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 32rem;
}

.catalog {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.catalog + .catalog {
  padding-top: 0.5rem;
}

.catalog-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1rem;
}

.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.app-card:hover {
  border-color: rgba(2, 132, 199, 0.35);
  box-shadow: 0 4px 20px rgba(2, 132, 199, 0.1);
}

.app-card--soon {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: none;
}

.app-card--soon:hover {
  border-color: var(--border);
  box-shadow: none;
}

.app-card--beta {
  border-color: rgba(13, 148, 136, 0.35);
  background: linear-gradient(180deg, rgba(240, 253, 250, 0.5) 0%, var(--surface) 100%);
}

.app-card-head {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
}

.app-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.app-icon--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-top);
  color: var(--text-muted);
  font-size: 1.25rem;
}

.app-card h2 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.app-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(2, 132, 199, 0.1);
  color: var(--primary);
}

.tag--muted {
  background: #f1f5f9;
  color: var(--text-muted);
}

.tag--beta {
  background: rgba(13, 148, 136, 0.12);
  color: var(--accent);
}

.app-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  flex: 1;
}

.app-desc code {
  font-size: 0.8125rem;
  background: #f1f5f9;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.app-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 0.875rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  cursor: pointer;
  font-family: inherit;
}

.btn:hover {
  border-color: rgba(2, 132, 199, 0.4);
  color: var(--primary);
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #fff;
}

.btn-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--primary);
  border-color: transparent;
}

.site-footer {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.5rem;
}

.site-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.site-footer a:hover { text-decoration: underline; }

.beta-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(13, 148, 136, 0.12);
  color: var(--accent);
  border: 1px solid rgba(13, 148, 136, 0.25);
}

.login-shell {
  max-width: 420px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-card h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.login-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.field input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9375rem;
  font-family: inherit;
}

.field input:focus {
  outline: 2px solid rgba(2, 132, 199, 0.25);
  border-color: var(--primary);
}

.form-error {
  font-size: 0.8125rem;
  color: var(--danger);
  min-height: 1.25rem;
}

.form-note {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.hidden {
  display: none !important;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.login-section-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.login-card--success {
  border-color: rgba(13, 148, 136, 0.35);
}

/* Beta catalog + login only — soft green so it reads clearly as preview mode */
body.beta-shell {
  --bg-top: #e8f3ea;
  --bg-bottom: #f0fdf4;
  --primary: #059669;
  --primary-hover: #047857;
  background: linear-gradient(165deg, var(--bg-top) 0%, var(--bg-bottom) 45%, #ffffff 100%);
}

body.beta-shell .brand {
  color: var(--primary);
}

body.beta-shell .app-card:hover {
  border-color: rgba(5, 150, 105, 0.35);
  box-shadow: 0 4px 20px rgba(5, 150, 105, 0.1);
}

body.beta-shell .tag {
  background: rgba(5, 150, 105, 0.1);
  color: var(--primary);
}

body.beta-shell .btn:hover {
  border-color: rgba(5, 150, 105, 0.4);
  color: var(--primary);
}

body.beta-shell .field input:focus {
  outline-color: rgba(5, 150, 105, 0.25);
  border-color: var(--primary);
}

body.beta-shell .site-footer a {
  color: var(--primary);
}

/* Support / contact page */
.support-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.support-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.support-card h2 {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.support-card > p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.support-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.support-list a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.support-list a:hover {
  text-decoration: underline;
}

.support-form {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin-top: 0.25rem;
}

.field select,
.field textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9375rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
}

.field textarea {
  resize: vertical;
  min-height: 8rem;
  line-height: 1.45;
}

.field select:focus,
.field textarea:focus {
  outline: 2px solid rgba(2, 132, 199, 0.25);
  border-color: var(--primary);
}

.form-success {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 500;
  min-height: 1.25rem;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.site-header .brand {
  text-decoration: none;
}
