/* Shared marketing shell for static Turfgrass resource pages.
   Keep header dimensions, colors and CTA rules aligned with src/components/navbar.tsx,
   src/components/hero.tsx and src/components/footer.tsx when those change. */
:root {
  --resource-header-bg: rgba(255, 255, 255, .95);
  --resource-header-line: #e5e7eb;
  --resource-control-bg: rgba(0, 0, 0, .05);
  --resource-control-ink: #555;
  --resource-nav-ink: #555;
  --resource-menu-bg: #fff;
  --resource-menu-line: #e5e7eb;
  --resource-menu-ink: #111;
  --resource-menu-hover: rgba(0, 0, 0, .04);
  --resource-menu-divider: #f3f4f6;
  --resource-brand-green: #0a7a3d;
}
:root[data-theme="dark"] {
  --resource-header-bg: rgba(8, 8, 18, .95);
  --resource-header-line: #1e1e30;
  --resource-control-bg: rgba(255, 255, 255, .07);
  --resource-control-ink: #d1d5db;
  --resource-nav-ink: #9ca3af;
  --resource-menu-bg: #12121e;
  --resource-menu-line: #2a2a40;
  --resource-menu-ink: #e5e7eb;
  --resource-menu-hover: rgba(255, 255, 255, .06);
  --resource-menu-divider: #2a2a40;
  --resource-brand-green: #4ade80;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--resource-header-bg);
  border-bottom: 1px solid var(--resource-header-line);
  backdrop-filter: blur(10px);
}
.topbar .site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  height: 64px;
  min-height: 0;
  margin-inline: auto;
  padding: 0 48px;
  gap: 24px;
}
.topbar .brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  min-height: 0;
  padding: 0;
  border: 0;
  white-space: nowrap;
  font: 700 20px/1.2 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -.025em;
  text-decoration: none;
}
.topbar .brand img {
  display: block;
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 0 5px rgba(74, 222, 128, .45)) drop-shadow(0 0 12px rgba(56, 189, 248, .22));
}
.topbar .brand span,
.topbar .brand .brand-name {
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
  letter-spacing: -.025em;
  background: linear-gradient(120deg, #4ade80 0%, #38bdf8 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 7px rgba(74,222,128,.35)) drop-shadow(0 0 16px rgba(56,189,248,.18));
}
.topbar .site-links {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-inline: auto;
  font: 500 14px/1.25 ui-sans-serif, system-ui, sans-serif;
}
.topbar .site-links > a,
.topbar .resources-menu > summary {
  color: var(--resource-nav-ink);
  border: 0;
  padding: 0 0 2px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
}
.topbar .site-links > a:hover,
.topbar .resources-menu > summary:hover { color: var(--resource-brand-green); }
.topbar .resources-menu > summary[aria-current="page"] {
  position: relative;
  color: var(--resource-brand-green);
}
.topbar .resources-menu > summary[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -2px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--resource-brand-green);
}
.topbar .resources-menu > summary,
.topbar .mobile-resources > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.25;
}
.topbar .resources-menu,
.topbar .site-menu { position: relative; }
.topbar .resources-menu > summary,
.topbar .site-menu > summary,
.topbar .mobile-resources > summary { list-style: none; cursor: pointer; }
.topbar .resources-menu > summary::-webkit-details-marker,
.topbar .site-menu > summary::-webkit-details-marker,
.topbar .mobile-resources > summary::-webkit-details-marker { display: none; }
.topbar .mobile-resources > summary { display: flex; width: 100%; padding: 10px 16px; font-weight: 500; line-height: 20px; }
.topbar .mobile-resources { display: none; border-bottom: 1px solid var(--resource-menu-divider); }
.topbar .resource-chevron {
  display: block;
  flex: none;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .18s ease;
}
.topbar .resources-menu[open] > summary .resource-chevron,
.topbar .mobile-resources[open] > summary .resource-chevron { transform: rotate(180deg); }
.topbar .mobile-resources > summary .resource-chevron { margin-left: auto; }
.topbar .resources-panel,
.topbar .menu-panel {
  display: none;
  position: absolute;
  z-index: 80;
  padding: 6px;
  background: var(--resource-menu-bg);
  border: 1px solid var(--resource-menu-line);
  border-radius: 10px;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);
}
.topbar .resources-panel { top: calc(100% + 15px); right: 0; }
.topbar .menu-panel { top: calc(100% + 8px); right: 0; padding: 0; overflow: hidden; font: 500 14px/20px ui-sans-serif, system-ui, sans-serif; }
.topbar .resources-menu[open] > .resources-panel,
.topbar .site-menu[open] > .menu-panel { display: block; }
.topbar .resources-panel { min-width: 224px; }
.topbar .menu-panel { width: 224px; }
.topbar .resources-panel a { display: block; padding: 10px 12px; border-radius: 6px; }
.topbar .mobile-resources > a { display: block; padding: 10px 28px; line-height: 20px; }
.topbar .resources-panel a,
.topbar .mobile-resources > a,
.topbar .mobile-resources summary {
  color: var(--resource-menu-ink);
  border: 0;
  font-size: 14px;
  text-decoration: none;
}
.topbar .resources-panel a:hover,
.topbar .resources-panel a[aria-current="page"],
.topbar .mobile-resources > a:hover,
.topbar .mobile-resources > a[aria-current="page"] {
  background: var(--resource-menu-hover);
  color: var(--resource-brand-green);
}
.topbar .header-actions {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar .header-actions button,
.topbar .header-actions a.control,
.topbar .header-actions .site-menu > summary {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  height: 36px;
  min-height: 36px;
  width: 36px;
  min-width: 36px;
  padding: 0;
  gap: 4px;
  background: var(--resource-control-bg);
  color: var(--resource-control-ink);
  border: 0;
  border-radius: 6px;
  font: 700 12px/1 ui-sans-serif, system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
}
.topbar .header-actions a.control {
  width: auto;
  min-width: 50px;
  padding-inline: 8px;
}
.topbar .header-actions .site-menu { margin-left: 4px; }
.topbar .header-actions svg,
.topbar .header-actions .lang svg {
  display: block;
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.topbar .header-actions .lang svg { width: 14px; height: 14px; }
.topbar .header-actions .resource-chevron { width: 14px; height: 14px; }
.topbar .header-actions .site-menu > summary .menu-close-icon,
.topbar .header-actions .site-menu[open] > summary .menu-open-icon { display: none; }
.topbar .header-actions .site-menu[open] > summary .menu-close-icon { display: block; }
.topbar .header-actions .theme-sun,
:root[data-theme="dark"] .topbar .header-actions .theme-moon { display: none; }
:root[data-theme="dark"] .topbar .header-actions .theme-sun { display: block; }
.topbar .header-actions button:hover,
.topbar .header-actions a.control:hover { color: var(--resource-brand-green); }
.topbar .resource-account-fallback { display: grid; gap: 8px; padding: 12px; }
.topbar .resource-account-fallback a { padding: 10px 12px; color: var(--resource-menu-ink); text-align: center; text-decoration: none; }
.topbar :focus-visible,
.resource-cta a:focus-visible,
.resource-footer a:focus-visible { outline: 2px solid var(--resource-brand-green); outline-offset: 3px; }

/* Shared contextual conversion band. */
.resource-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px 36px;
  width: 100%;
  max-width: none;
  margin: 26px 0 32px;
  padding: 28px 32px;
  border: 1px solid rgba(74, 222, 128, .28);
  border-radius: 16px;
  background: radial-gradient(ellipse at 5% 0%, rgba(74, 222, 128, .13), transparent 48%), linear-gradient(160deg, #101a2d, #0a1020);
  color: #f8fafc;
}
.resource-cta .resource-cta-copy { width: 100%; max-width: 740px; }
.resource-cta .resource-cta-kicker {
  margin: 0 0 5px;
  color: #86efac;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.resource-cta h2,
.resource-cta h3 { margin: 0; color: #fff; font-size: clamp(20px, 2vw, 26px); line-height: 1.2; }
.resource-cta p:not(.resource-cta-kicker) { margin: 8px 0 0; color: #cbd5e1; font-size: 15px; line-height: 1.6; }
.resource-cta .resource-cta-actions { width: auto; text-align: right; }
.resource-cta .resource-cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 32px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #4ade80;
  color: #0f1423;
  font: 600 16px/1.25 ui-sans-serif, system-ui, sans-serif;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity .18s ease;
}
.resource-cta .resource-cta-button:hover { opacity: .9; color: #0f1423; }
.resource-cta .resource-cta-note { margin: 7px 0 0; color: #94a3b8; font-size: 12px; text-align: right; }
.resource-guide-cta { width: calc(100% - 96px); max-width: 1184px; margin: 32px auto 48px; }
.resource-inline-cta {
  margin-top: 22px;
  padding: 16px 18px;
  border: 1px solid rgba(10, 122, 61, .25);
  border-radius: 12px;
  background: rgba(10, 122, 61, .06);
  color: inherit;
}
.resource-inline-cta a { font-weight: 700; white-space: nowrap; }
:root[data-theme="dark"] .resource-inline-cta { border-color: rgba(74, 222, 128, .28); background: rgba(74, 222, 128, .08); }

/* Resource footer uses the same palette and logo treatment as the homepage. */
.resource-footer {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: radial-gradient(ellipse at 5% 0%, rgba(74, 222, 128, .075), transparent 48%), linear-gradient(160deg, #101a2d, #0b1425 48%, #0a1020);
  color: #cbd5e1;
}
.resource-footer-inner {
  max-width: 1200px;
  margin: auto;
  padding: 30px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  flex-wrap: wrap;
}
.resource-footer-brand { display: inline-flex; align-items: center; gap: 12px; color: #f8fafc; font-size: 18px; font-weight: 700; border: 0; text-decoration: none; }
.resource-footer-brand img { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 0 8px rgba(74, 222, 128, .35)); }
.resource-footer nav { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.resource-footer nav a { color: #cbd5e1; border: 0; font-size: 14px; text-decoration: none; }
.resource-footer nav a:hover { color: #fff; }
.resource-footer .resource-footer-bottom { border-top: 1px solid rgba(148, 163, 184, .18); color: #94a3b8; font-size: 13px; }
.resource-footer .resource-footer-bottom .resource-footer-inner { padding-block: 14px; }

/* The course photo follows the entire resource page, as on the homepage. */
body.resource-guide,
body.resource-tool {
  background: linear-gradient(rgba(255,255,255,.82), rgba(255,255,255,.82)), url('/hero-bg.webp') center / cover fixed;
}
body.resource-tool { container-type: inline-size; }
:root[data-theme="dark"] body.resource-guide,
:root[data-theme="dark"] body.resource-tool {
  background: linear-gradient(rgba(10,14,26,.84), rgba(10,14,26,.84)), url('/hero-bg.webp') center / cover fixed;
}

/* Resource introductions use the same course-green card as sprayer calibration. */
.resource-guide .hero {
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  width: calc(100% - 96px);
  max-width: 1184px;
  margin: 28px auto 0;
  padding: 42px clamp(24px, 5vw, 60px);
  border: 0;
  border-radius: 24px;
  background: radial-gradient(circle at 88% 18%, #277b56, transparent 37%), linear-gradient(120deg, #143d2c, #10251f);
  color: #f5fff8;
}
.resource-guide .hero-inner { position: relative; z-index: 1; }
.resource-guide .hero::after,
.resource-tool .page-head::after {
  content: "";
  position: absolute;
  right: -35px;
  bottom: -120px;
  width: 250px;
  height: 250px;
  border: 1px solid #a8f3bd55;
  border-radius: 50%;
  box-shadow: 0 0 0 30px #a8f3bd12, 0 0 0 60px #a8f3bd0a;
  pointer-events: none;
}
.resource-guide .hero h1 em { color: inherit; }
.resource-guide .hero .kicker,
.resource-tool .page-head .eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: #9af4b8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.resource-tool .page-head {
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  left: auto;
  width: 100%;
  max-width: none;
  margin: 28px 0 24px;
  padding: 42px clamp(24px, 5vw, 60px);
  border: 0;
  border-radius: 24px;
  background: radial-gradient(circle at 88% 18%, #277b56, transparent 37%), linear-gradient(120deg, #143d2c, #10251f);
  color: #f5fff8;
  transform: none;
}
.resource-tool .page-head h1 { position: relative; z-index: 1; max-width: 20ch; margin-top: 12px; color: #f5fff8; font-size: clamp(2rem, 4.7vw, 3.5rem); line-height: 1.1; letter-spacing: -.04em; }
.resource-tool .page-head h1 span { color: inherit; }
.resource-tool .page-head .lede { position: relative; z-index: 1; max-width: 63ch; margin-top: 12px; color: #e1f0e5; font-size: 17px; }
.resource-guide .hero h1 { color: #f5fff8; max-width: 20ch; }
.resource-guide .hero .sub { color: #e1f0e5; }
.resource-tool main.wrap { box-sizing: border-box; width: 100%; max-width: 1280px; margin-inline: auto; padding: 0 48px 64px; }
body.resource-guide { --maxw: 1280px; }

/* A single full-width conversion card on every resource. */
body.resource-tool .resource-cta { width: 100%; max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; margin: 26px 0 32px; }
body.resource-tool .resource-cta .resource-cta-note { text-align: right; }
.service-checklist-cta { width: calc(100% - 96px); max-width: 1184px; }

/* Calculator: the smaller conversion card fills the space beneath the inputs. */
.resource-foc .tool { grid-template-areas: "inputs" "result"; }
.resource-foc .tool > .panel { grid-area: inputs; }
.resource-foc .tool > .result { grid-area: result; }

/* Creator: edit on the left while the printable sheet stays visible at right. */
.resource-checklist main.wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  grid-template-areas: "head head" "machine preview" "checklist preview" "parts preview" "print print";
  align-items: start;
  gap: 10px 18px;
  padding-bottom: 24px;
}
.resource-checklist .page-head { grid-area: head; margin-bottom: 4px; }
.resource-checklist section[aria-labelledby="machine-heading"] { grid-area: machine; }
.resource-checklist section[aria-labelledby="items-heading"] { grid-area: checklist; }
.resource-checklist section[aria-labelledby="parts-heading"] { grid-area: parts; }
.resource-checklist section[aria-labelledby="sheet-heading"] { grid-area: preview; }
.resource-checklist #printable-sheet { grid-area: print; }
.resource-checklist main.wrap > .panel { margin-top: 0; }

@media (min-width: 900px) {
  .resource-checklist section[aria-labelledby="sheet-heading"] { position: sticky; top: 80px; }
  .resource-checklist #sheet-frame { width: min(100%, 500px); }
}

@media (min-width: 62rem) {
  .resource-foc .tool { grid-template-areas: "inputs result"; }
}
@media (max-width: 899px) {
  .resource-checklist main.wrap {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "head" "machine" "checklist" "parts" "preview" "print";
  }
}

@media (max-width: 1279px) {
  .topbar .site-header-inner { max-width: 1024px; padding-inline: 40px; }
  .resource-tool main.wrap { max-width: 1024px; padding-inline: 40px; }
  .resource-guide .hero,
  .resource-guide-cta,
  .service-checklist-cta { width: calc(100% - 80px); max-width: 944px; }
}
@media (max-width: 1023px) {
  .topbar .site-links { display: none; }
  .topbar .mobile-resources { display: block; }
  .topbar .site-header-inner { max-width: 768px; padding-inline: 32px; }
  .resource-tool main.wrap { max-width: 768px; padding-inline: 32px; }
  .resource-guide .hero,
  .resource-guide-cta,
  .service-checklist-cta { width: calc(100% - 64px); max-width: 704px; }
}
@media (max-width: 850px) {
  .topbar .site-header-inner { gap: 10px; }
  .topbar .header-actions { margin-left: auto; }
}
@media (max-width: 767px) {
  .topbar .site-header-inner { max-width: 640px; height: 48px; padding-inline: 24px; }
  .resource-tool main.wrap { max-width: 640px; padding-inline: 24px; }
  .resource-guide .hero,
  .resource-guide-cta,
  .service-checklist-cta { width: calc(100% - 48px); max-width: 592px; }
  .topbar .brand img { width: 28px; height: 28px; }
  .topbar .brand span,
  .topbar .brand .brand-name { font-size: 16px; line-height: 24px; }
  .topbar .header-actions button,
  .topbar .header-actions a.control,
  .topbar .header-actions .site-menu > summary { height: 32px; min-height: 32px; }
  .topbar .header-actions button,
  .topbar .header-actions .site-menu > summary { width: 32px; min-width: 32px; }
}
@media (max-width: 639px) {
  .topbar .site-header-inner { max-width: none; }
}
@media (max-width: 639px) {
  .topbar .brand span,
  .topbar .brand .brand-name { display: none; }
}
@media (max-width: 700px) {
  .resource-tool main.wrap { padding: 0 16px 48px; }
  .resource-tool .page-head { margin: 16px 0 24px; padding: 30px 24px; }
  .resource-guide .hero { width: calc(100% - 32px); margin-top: 16px; padding: 30px 24px; }
  .resource-guide-cta,
  .service-checklist-cta { width: calc(100% - 32px); }
  body.resource-tool .resource-cta,
  .resource-guide .resource-cta { grid-template-columns: minmax(0, 1fr); }
  body.resource-tool .resource-cta .resource-cta-actions,
  .resource-guide .resource-cta .resource-cta-actions { width: 100%; text-align: left; }
  body.resource-tool .resource-cta .resource-cta-note,
  .resource-guide .resource-cta .resource-cta-note { text-align: left; }
  .resource-cta .resource-cta-button { width: 100%; }
}
@media (max-width: 600px) {
  .resource-cta { padding: 22px 20px; }
  .resource-footer-inner { padding-inline: 24px; }
}
@media print {
  .resource-footer { display: none !important; }
  .resource-checklist main.wrap { display: block; }
  .resource-cta { display: none !important; }
  .resource-tool .page-head,
  .resource-guide .hero { margin: 0 0 18px; padding: 0; border: 0; border-radius: 0; background: none !important; color: #111; }
  .resource-tool .page-head::after,
  .resource-guide .hero::after { display: none; }
  .resource-tool .page-head h1,
  .resource-guide .hero h1,
  .resource-tool .page-head .lede,
  .resource-guide .hero .sub,
  .resource-tool .page-head .eyebrow,
  .resource-guide .hero .kicker { color: #111 !important; }
}
