:root {
  color-scheme: light;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;

  --bg: #f6f7f8;
  --surface: #ffffff;
  --surface-soft: #eef3f1;
  --surface-strong: #111417;
  --line: #dce2e0;
  --line-strong: #bac7c2;

  --text: #111417;
  --muted: #5f6b66;
  --muted-strong: #34403b;
  --inverse: #f7faf8;

  --green: #1f8a63;
  --green-soft: #dff3eb;
  --blue: #3157c8;
  --blue-soft: #e4ebff;
  --coral: #d85d42;
  --coral-soft: #ffe5de;
  --amber: #ad741d;
  --amber-soft: #f8ead0;

  --shadow: 0 18px 60px rgba(17, 20, 23, 0.1);
  --shadow-soft: 0 10px 30px rgba(17, 20, 23, 0.08);
  --radius: 8px;
  --radius-sm: 6px;
  --max-page: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(31, 138, 99, 0.12), transparent 32rem),
    linear-gradient(225deg, rgba(49, 87, 200, 0.1), transparent 34rem),
    var(--bg);
}

.auth-pending body {
  visibility: hidden;
}

body,
button,
input,
textarea,
select {
  font: inherit;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button {
  border: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid rgba(49, 87, 200, 0.35);
  outline-offset: 3px;
}

.page {
  width: min(100% - 32px, var(--max-page));
  margin: 0 auto;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0;
}

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: var(--inverse);
  font-weight: 800;
  letter-spacing: 0;
}

.brand-text {
  min-width: 0;
}

.brand-name {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-weight: 800;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-caption {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.nav-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.icon-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.icon-button {
  width: 42px;
  padding: 0;
  font-size: 1.15rem;
}

.text-button {
  gap: 8px;
  padding: 0 14px;
  font-weight: 700;
}

.icon-button:hover,
.text-button:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted-strong);
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: var(--green);
}

.status-dot.blue {
  background: var(--blue);
}

.status-dot.coral {
  background: var(--coral);
}

.muted {
  color: var(--muted);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  letter-spacing: 0;
  line-height: 1.12;
}

.section-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 30px 0 42px;
  color: var(--muted);
  font-size: 0.92rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 720px) {
  .page {
    width: min(100% - 24px, var(--max-page));
  }

  .topbar {
    align-items: flex-start;
    padding: 18px 0;
  }

  .nav-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand-caption {
    display: none;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}
