:root {
  --bg: #fffef9;
  --bg-soft: #fff5cc;
  --card: #ffffff;
  --card-hero: linear-gradient(135deg, #ffd95f 0%, #ffc526 100%);
  --surface: #fff8df;
  --surface-soft: #fffbed;
  --surface-strong: #ffe59a;
  --text: #10100d;
  --muted: #5f5846;
  --primary: #ffc526;
  --primary-hover: #ffb400;
  --border: rgba(16, 16, 13, 0.14);
  --border-soft: rgba(16, 16, 13, 0.1);
  --border-strong: rgba(16, 16, 13, 0.22);
  --shadow: 0 18px 42px rgba(106, 80, 0, 0.12);
  --shadow-lg: 0 24px 60px rgba(106, 80, 0, 0.18);
  --radius: 18px;
  --link: #8a6400;
  --overlay: rgba(16, 16, 13, 0.36);
  --modal-bg: #fffef7;
  --accent-soft: rgba(255, 197, 38, 0.22);
  --accent-border: rgba(255, 180, 0, 0.35);
  --accent-text: #7a5600;
  --success-bg: #eaf8eb;
  --success-border: rgba(34, 120, 54, 0.24);
  --success-text: #176534;
  --warning-bg: #fff3d3;
  --warning-border: rgba(180, 111, 0, 0.24);
  --warning-text: #9a6400;
  --error-bg: #ffe6dd;
  --error-border: rgba(186, 51, 20, 0.22);
  --error-text: #b03b1f;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(255, 197, 38, 0.26), transparent 28%),
    linear-gradient(180deg, #fff5cc 0%, #fffef8 180px, #ffffff 100%);
  color: var(--text);
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body.has-splash-screen {
  overflow: hidden;
}

a {
  color: inherit;
}

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

::selection {
  background: rgba(255, 197, 38, 0.35);
  color: var(--text);
}

.shell {
  width: min(1100px, calc(100% - 32px));
  margin: 32px auto;
  flex: 1;
}

.shell > * + * {
  margin-top: 24px;
}

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 44px;
  background: var(--card-hero);
  border-color: rgba(16, 16, 13, 0.16);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -120px -140px auto;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.36), transparent 68%);
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.app-splash {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.34), transparent 32%),
    linear-gradient(180deg, #ffdb67 0%, #ffc526 100%);
  z-index: 5000;
  transition: opacity 0.42s ease;
}

.app-splash.is-leaving {
  opacity: 0;
  pointer-events: none;
}

.app-splash-shell {
  display: grid;
  gap: 18px;
  justify-items: center;
  text-align: center;
}

.app-splash-logo {
  width: clamp(180px, 34vw, 360px);
  max-width: 100%;
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  filter: drop-shadow(0 20px 34px rgba(16, 16, 13, 0.18));
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
}

.app-splash.is-visible .app-splash-logo {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.app-splash-copy {
  margin: 0;
  color: rgba(16, 16, 13, 0.78);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.3s ease 0.14s,
    transform 0.3s ease 0.14s;
}

.app-splash.is-visible .app-splash-copy {
  opacity: 1;
  transform: translateY(0);
}

.badge {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(16, 16, 13, 0.92);
  color: #fffdf7;
  font-size: 14px;
  margin-bottom: 18px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.section-kicker,
.card-tag {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(16, 16, 13, 0.92);
  color: #fffdf7;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

h1,
h2 {
  margin-top: 0;
}

h1 {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.02;
  margin-bottom: 16px;
}

h2 {
  font-size: 24px;
  margin-bottom: 12px;
}

.lead {
  font-size: 18px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 760px;
}

.hero .lead {
  color: rgba(16, 16, 13, 0.82);
}

.hero-home {
  padding-bottom: 30px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 32px;
  align-items: end;
}

.hero-copy {
  max-width: 640px;
}

.hero-kicker {
  margin: 0 0 16px;
  color: rgba(16, 16, 13, 0.72);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.title-band {
  padding-right: 8px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  background: linear-gradient(transparent 60%, rgba(255, 255, 255, 0.5) 60%);
}

.hero-aside {
  display: grid;
  gap: 16px;
  padding: 24px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(16, 16, 13, 0.12);
  box-shadow: 0 20px 40px rgba(106, 80, 0, 0.12);
}

.hero-aside-label {
  margin: 0;
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.hero-list li {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(16, 16, 13, 0.08);
}

.hero-list strong {
  font-size: 15px;
}

.hero-list span {
  color: var(--muted);
  line-height: 1.6;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.hero-stat {
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(16, 16, 13, 0.08);
  border: 1px solid rgba(16, 16, 13, 0.08);
}

.hero-stat strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
}

.hero-stat span {
  color: rgba(16, 16, 13, 0.72);
  line-height: 1.6;
  font-size: 14px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}

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

.grid-two .card {
  padding: 28px;
  background: linear-gradient(180deg, #ffffff 0%, #fffdf4 100%);
}

.feature-card {
  position: relative;
  overflow: hidden;
}

.feature-card::after {
  content: "";
  position: absolute;
  top: 18px;
  right: -14px;
  width: 88px;
  height: 88px;
  border-radius: 26px;
  background: rgba(255, 197, 38, 0.28);
  transform: rotate(16deg);
}

.feature-card > * {
  position: relative;
  z-index: 1;
}

.home-grid {
  margin-top: 0;
}

.grid-two .card h2 {
  display: inline-block;
  padding: 0 6px 4px 0;
  background: linear-gradient(transparent 56%, rgba(255, 197, 38, 0.7) 56%);
}

.manifesto-card {
  position: relative;
  overflow: hidden;
  padding: 34px;
  background:
    linear-gradient(90deg, rgba(16, 16, 13, 0.95) 0, rgba(16, 16, 13, 0.95) 22px, #fffdf4 22px, #fffdf4 100%);
}

.manifesto-card::after {
  content: "";
  position: absolute;
  inset: auto -40px -52px auto;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 197, 38, 0.26), transparent 68%);
}

.manifesto-card > * {
  position: relative;
  z-index: 1;
}

.manifesto-card h2 {
  max-width: 760px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.08;
}

.manifesto-copy {
  max-width: 780px;
}

.manifesto-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 17px;
}

.install-panel {
  display: grid;
  gap: 18px;
  background: linear-gradient(180deg, #fffef9 0%, #fff8df 100%);
}

.install-panel.is-installed {
  border-color: var(--success-border);
}

.install-panel-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.install-panel-icon {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: var(--shadow);
  flex: 0 0 auto;
}

.install-panel-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.install-actions {
  margin-top: 0;
}

.install-actions button {
  appearance: none;
  border: 0;
  cursor: pointer;
}

.install-panel-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.install-panel-note[data-state="ready"] {
  color: var(--accent-text);
  font-weight: 700;
}

.install-panel-note[data-state="manual"] {
  color: var(--warning-text);
}

.install-panel-note[data-state="installed"] {
  color: var(--success-text);
  font-weight: 700;
}

.actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  transition: 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: var(--text);
  border: 1px solid rgba(16, 16, 13, 0.1);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(255, 180, 0, 0.2);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
  background: var(--surface-soft);
  transform: translateY(-1px);
}

.hero .btn-secondary {
  background: rgba(255, 255, 255, 0.78);
}

.hero .btn-secondary:hover {
  background: #ffffff;
}

.btn:focus-visible,
.back-link:focus-visible,
.site-footer-link:focus-visible,
.consent-links a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(255, 197, 38, 0.42);
  outline-offset: 3px;
}

input::placeholder,
textarea::placeholder {
  color: rgba(95, 88, 70, 0.82);
}

.footer {
  padding: 18px 16px 28px;
  text-align: center;
  color: var(--muted);
}

.page {
  width: min(900px, calc(100% - 32px));
  margin: 32px auto;
  flex: 1;
}

.page > .card:first-child,
.entry-panel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #fffef9 0%, #fff7d9 100%);
}

.page > .card:first-child::before,
.entry-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 10px;
  background: linear-gradient(90deg, rgba(16, 16, 13, 0.96) 0 82px, var(--primary) 82px, rgba(255, 197, 38, 0.2) 100%);
}

.page > .card:first-child::after,
.entry-panel::after {
  content: "";
  position: absolute;
  top: 22px;
  right: 18px;
  width: 80px;
  height: 80px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.46);
  box-shadow: inset 0 0 0 1px rgba(16, 16, 13, 0.08);
  transform: rotate(14deg);
}

.page > .card:first-child > *,
.entry-panel > * {
  position: relative;
  z-index: 1;
}

.page .card {
  padding: 32px;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--link);
  text-decoration: none;
  font-weight: 700;
}

.back-link:hover {
  text-decoration: underline;
}

.placeholder-list {
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.site-footer {
  padding: 22px 16px 28px;
  color: var(--muted);
}

.site-footer-inner {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  text-align: center;
  line-height: 1.8;
  font-size: 14px;
}

.site-footer-link {
  color: var(--link);
  text-decoration: none;
}

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

.site-footer-sep {
  display: inline-block;
  margin: 0 8px;
  color: rgba(16, 16, 13, 0.24);
}

.legal-page {
  display: grid;
  gap: 24px;
}

.legal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.legal-sections {
  display: grid;
  gap: 18px;
}

.legal-section {
  padding: 22px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.legal-section h2,
.legal-section p,
.legal-section li {
  margin-top: 0;
}

.legal-section p,
.legal-section li {
  color: var(--muted);
  line-height: 1.75;
}

.legal-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
}

.consent-dialog {
  width: min(100%, 640px);
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: transparent;
}

.consent-dialog::backdrop {
  background: var(--overlay);
  backdrop-filter: blur(4px);
}

.consent-dialog-card {
  display: grid;
  gap: 18px;
  padding: 26px;
  border-radius: 20px;
  background: var(--modal-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.consent-dialog-card h2,
.consent-dialog-card p {
  margin: 0;
}

.consent-dialog-card p {
  color: var(--muted);
  line-height: 1.7;
}

.consent-checks {
  display: grid;
  gap: 12px;
}

.consent-checkbox {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text);
  line-height: 1.6;
}

.consent-checkbox input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  flex: 0 0 auto;
}

.consent-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.consent-links a {
  color: var(--link);
  text-decoration: none;
}

.consent-links a:hover {
  text-decoration: underline;
}

.consent-error {
  min-height: 22px;
  color: var(--error-text);
}

.consent-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.consent-actions button {
  appearance: none;
  border: 0;
  cursor: pointer;
}

.btn-worker {
  background: #17cc6c;
  color: #ffffff;
  border: 1px solid rgba(0, 110, 55, 0.12);
  box-shadow: 0 0 0 3px rgba(23, 204, 108, 0.2), 0 4px 16px rgba(23, 204, 108, 0.28);
}

.btn-worker:hover {
  background: #14b860;
  transform: translateY(-1px);
  box-shadow: 0 0 0 5px rgba(23, 204, 108, 0.25), 0 8px 24px rgba(23, 204, 108, 0.38);
}

.hero-home .actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 800px) {
  .hero {
    padding: 28px;
  }

  .hero-grid,
  .hero-meta,
  .hero-home .actions,
  .install-panel-head {
    grid-template-columns: 1fr;
  }

  .grid-two {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 34px;
  }

  .lead {
    font-size: 16px;
  }

  .site-footer-sep {
    display: none;
  }

  .site-footer-inner {
    display: grid;
    gap: 4px;
  }

  .manifesto-card {
    padding: 28px;
    background:
      linear-gradient(180deg, rgba(16, 16, 13, 0.95) 0, rgba(16, 16, 13, 0.95) 18px, #fffdf4 18px, #fffdf4 100%);
  }

  .app-splash {
    padding: 20px;
  }

  .page > .card:first-child::after,
  .entry-panel::after {
    width: 64px;
    height: 64px;
  }
}
