:root {
  --blue: #4b7bf5;
  --blue-deep: #315cc4;
  --green: #1ae06b;
  --leaf: #159b43;
  --paper: #f4ecd8;
  --paper-warm: #e8ddc2;
  --ink: #16130f;
  --muted: #675e50;
  --line: #282016;
  --white-soft: rgba(255, 255, 255, 0.74);
  --shadow: 0 16px 34px rgba(4, 17, 50, 0.22);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 255, 255, 0.08), transparent 22rem),
    linear-gradient(180deg, var(--blue), #4778ee 56%, #3e72df);
  color: #fff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

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

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: -80px;
  z-index: 30;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
}

.skip-link:focus {
  top: 12px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px clamp(18px, 4vw, 42px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(75, 123, 245, 0.88);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  font-size: clamp(1.4rem, 6vw, 2rem);
  letter-spacing: -0.03em;
}

.brand span span {
  color: rgba(255, 255, 255, 0.42);
}

.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background:
    radial-gradient(circle at 50% 78%, #fff 0 12%, transparent 13%),
    linear-gradient(72deg, transparent 40%, #fff 41% 48%, transparent 49%),
    radial-gradient(ellipse at 32% 45%, var(--green) 0 24%, transparent 25%),
    radial-gradient(ellipse at 68% 37%, #9be957 0 22%, transparent 23%),
    var(--blue);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.22);
}

main {
  width: min(1120px, 100%);
  max-width: 100vw;
  margin: 0 auto;
  overflow: hidden;
}

.section-pad {
  padding: 48px clamp(18px, 4vw, 42px) 24px;
  max-width: 100vw;
}

.hero {
  position: relative;
  min-height: 390px;
  display: grid;
  align-content: center;
  overflow: hidden;
}

.hero h1 {
  margin: 8px 0 12px;
  max-width: 680px;
  font-size: clamp(3rem, 14vw, 8rem);
  line-height: 0.9;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
}

.lead {
  max-width: min(680px, calc(100vw - 40px));
  margin: 0;
  color: var(--white-soft);
  font-size: clamp(1rem, 4.4vw, 1.25rem);
  line-height: 1.55;
  overflow-wrap: break-word;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(26, 224, 107, 0.45);
  color: var(--green);
  background: rgba(26, 224, 107, 0.08);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-strip {
  margin-top: 22px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--white-soft);
}

.tool-tabs {
  position: sticky;
  top: 64px;
  z-index: 18;
  display: flex;
  gap: 8px;
  padding: 8px 14px;
  overflow-x: auto;
  background: rgba(75, 123, 245, 0.92);
  border-block: 1px solid rgba(255,255,255,0.11);
  scrollbar-width: none;
}

.tool-tabs::-webkit-scrollbar {
  display: none;
}

.tool-tabs a {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 10px 13px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
}

.tool-card {
  width: calc(100vw - 28px);
  margin: 18px 14px;
  padding: clamp(18px, 4.5vw, 34px);
  border-radius: 18px;
  border: 2px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.tool-heading {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.tool-card h2 {
  margin: 0;
  font-size: clamp(1.65rem, 7vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

.tool-card h3 {
  margin: 22px 0 10px;
  font-size: 1.15rem;
}

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

.cloud-card::before,
.cloud-card::after,
.sky .cloud {
  content: "";
  position: absolute;
  z-index: 0;
  width: 140px;
  height: 54px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 22% 40%, rgba(255,255,255,0.88) 0 28px, transparent 29px),
    radial-gradient(circle at 48% 20%, rgba(255,255,255,0.82) 0 36px, transparent 37px),
    radial-gradient(circle at 74% 42%, rgba(255,255,255,0.88) 0 30px, transparent 31px);
  opacity: 0.25;
  animation: drift 18s linear infinite;
  pointer-events: none;
}

.cloud-card::before {
  right: -32px;
  top: 22px;
}

.cloud-card::after {
  left: -40px;
  bottom: 34px;
  animation-duration: 24s;
}

.sky {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.sky .cloud-a {
  top: 18%;
  right: 4%;
}

.sky .cloud-b {
  bottom: 14%;
  left: 8%;
  animation-duration: 26s;
}

.drop {
  position: absolute;
  width: 7px;
  height: 18px;
  border-radius: 999px 999px 999px 0;
  background: rgba(26, 224, 107, 0.66);
  transform: rotate(38deg);
  animation: rain 4.5s linear infinite;
}

.drop-a { top: 24%; left: 76%; }
.drop-b { top: 42%; left: 52%; animation-delay: 1.1s; }
.drop-c { top: 36%; left: 18%; animation-delay: 2s; }

.search-box {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.search-box input,
select {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 2px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: #fff8e7;
  outline: none;
}

.search-box input:focus,
select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(26,224,107,0.18);
}

.primary,
.ghost {
  min-height: 48px;
  border-radius: 999px;
  border: 2px solid var(--line);
  padding: 0 18px;
  font-weight: 900;
  cursor: pointer;
}

.primary {
  background: var(--green);
  color: var(--ink);
}

.ghost {
  background: rgba(255,255,255,0.76);
  color: var(--ink);
}

.tiny {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.86rem;
}

.small {
  min-height: 36px;
  padding: 0 14px;
}

.quick-wishes {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.quick-wishes::-webkit-scrollbar { display: none; }

.quick-wishes button {
  flex: 0 0 auto;
  border: 1px solid rgba(40,32,22,0.34);
  border-radius: 999px;
  background: rgba(232,221,194,0.8);
  color: var(--ink);
  padding: 9px 12px;
  font-weight: 800;
}

.state-line,
.muted {
  color: var(--muted);
  line-height: 1.45;
}

.state-line {
  margin-top: 14px;
  font-weight: 800;
}

.garden-meter {
  margin-top: 14px;
  height: 34px;
  border: 2px solid var(--line);
  background: #fff8e7;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.garden-meter span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 42%;
  background: linear-gradient(90deg, var(--green), #99de57);
  animation: grow 1.1s ease-in-out infinite alternate;
}

.garden-meter small {
  position: relative;
  z-index: 1;
  display: grid;
  height: 100%;
  place-items: center;
  color: var(--ink);
  font-weight: 900;
}

.results-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.role-card {
  border: 2px solid rgba(40,32,22,0.88);
  border-radius: 16px;
  background: #fff8e7;
  padding: 14px;
}

.role-card h3 {
  margin: 6px 0;
  font-size: 1.22rem;
  line-height: 1.15;
}

.role-meta,
.chips,
.role-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  border: 1px solid rgba(40,32,22,0.35);
  background: var(--paper-warm);
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.source-line {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 7px 0 10px;
}

.role-actions {
  margin-top: 12px;
}

.role-actions a,
.role-actions button {
  min-height: 38px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 8px 12px;
  text-decoration: none;
  font-weight: 900;
}

.load-more {
  display: block;
  margin: 16px auto 0;
}

.newspaper {
  background: #f4ecd8;
}

.edition-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-block: 2px solid var(--line);
  padding: 9px 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.newspaper > h2 {
  text-align: center;
  margin: 22px 0 4px;
  font-size: clamp(2.4rem, 12vw, 6rem);
}

.edition-subtitle {
  text-align: center;
  color: var(--muted);
  margin: 0 0 18px;
}

.domain-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-block: 8px 14px;
}

.domain-pills button {
  flex: 0 0 auto;
  min-height: 38px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff8e7;
  color: var(--ink);
  padding: 8px 12px;
  font-weight: 900;
}

.domain-pills button.active {
  background: var(--ink);
  color: #fff;
}

.edition-body {
  column-count: 1;
  column-gap: 26px;
}

.edition-body h3 {
  break-after: avoid;
  border-top: 2px solid var(--line);
  padding-top: 10px;
}

.edition-body p,
.edition-body li {
  color: var(--muted);
  line-height: 1.55;
}

.checker-grid {
  display: grid;
  gap: 12px;
}

.field-label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 900;
}

.upload-zone {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  align-items: center;
  min-height: 92px;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: #fff8e7;
  cursor: pointer;
}

.upload-icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--line);
  font-weight: 900;
  font-size: 1.45rem;
}

.upload-zone small {
  color: var(--muted);
  line-height: 1.35;
}

.resume-result {
  margin-top: 14px;
}

.score-card {
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: #fff8e7;
}

.score-ring {
  display: inline-grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  border: 3px solid var(--line);
  background: var(--green);
  font-weight: 1000;
  font-size: 1.7rem;
}

.fix-list {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.save-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.alert-panel {
  display: grid;
  gap: 12px;
  border: 2px solid rgba(40,32,22,0.26);
  border-radius: 16px;
  padding: 14px;
  background: #fff8e7;
}

.saved-list {
  display: grid;
  gap: 8px;
}

.saved-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1.5px solid rgba(40,32,22,0.38);
  border-radius: 14px;
  background: #fff8e7;
}

.saved-item button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
}

.coming-soon {
  margin-bottom: 42px;
  background:
    radial-gradient(circle at 86% 18%, rgba(26,224,107,0.16), transparent 14rem),
    var(--paper);
}

.soon-badge {
  display: inline-flex;
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--green);
  color: var(--ink);
  font-weight: 1000;
  border: 2px solid var(--line);
}

.hidden {
  display: none !important;
}

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

@keyframes drift {
  0% { transform: translateX(-10px); }
  50% { transform: translateX(18px); }
  100% { transform: translateX(-10px); }
}

@keyframes rain {
  0% { transform: translateY(-8px) rotate(38deg); opacity: 0; }
  18% { opacity: 0.8; }
  100% { transform: translateY(92px) rotate(38deg); opacity: 0; }
}

@keyframes grow {
  from { width: 28%; }
  to { width: 82%; }
}

@media (min-width: 680px) {
  .tool-card {
    width: auto;
    margin: 18px clamp(12px, 3.5vw, 28px);
  }

  .hero h1 {
    overflow-wrap: normal;
  }

  .tool-card h2 {
    overflow-wrap: normal;
  }

  .search-box {
    grid-template-columns: 1fr auto;
  }

  .results-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .checker-grid {
    grid-template-columns: 0.8fr 1.2fr;
  }
}

@media (max-width: 440px) {
  #installButton {
    display: none !important;
  }
}

@media (min-width: 920px) {
  .results-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .edition-body {
    column-count: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
