/* Current site header, primary navigation, homepage layout, and responsive structure. */
/* Simplified Coastal navigation and home page — July 2026 review. */
:root {
  --site-max: 1320px;
  --header-main-h: 84px;
  --header-nav-h: 48px;
}

body { background: #f7f8f8; }
body.drawer-open { overflow: hidden; }

.app-shell { min-height: 100vh; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--concrete-light);
}
.header-main { background: #fff; }
.header-main-inner {
  min-height: var(--header-main-h);
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: 220px minmax(300px, 520px) auto;
  align-items: center;
  gap: 34px;
}
.site-header .brand {
  width: 220px;
  min-height: auto;
  padding: 14px 18px;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: #fff;
}
.site-header .brand img,
.mobile-drawer-head .brand img {
  width: 182px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
  margin: 0 auto;
}
.search-wrap {
  width: 100%;
  max-width: 520px;
  position: relative;
  justify-self: center;
}
.search-box {
  width: 100%;
  height: 42px;
  border-radius: 2px;
  background: #fff;
  border: 1px solid var(--concrete-light);
  padding: 0 13px;
  gap: 10px;
}
.search-box > .icon { margin: 0; align-self: center; }
.search-box input { height: 100%; }
.top-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-width: 154px;
}
.topbar-chatgpt { min-width: 146px; }
.desktop-nav-bar {
  min-height: var(--header-nav-h);
  border-top: 1px solid #eef0f0;
  background: #fff;
}
.desktop-nav-inner {
  max-width: var(--site-max);
  min-height: var(--header-nav-h);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: stretch;
}
#desktopNav {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
  gap: 0;
}
.top-nav-link {
  width: auto;
  min-width: 0;
  min-height: var(--header-nav-h);
  padding: 0 clamp(5px, .45vw, 10px);
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #4f5154;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  font-family: Lato, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}
.top-nav-link:hover {
  color: var(--coastal-blue);
  background: #f7f9fb;
  transform: none;
}
.top-nav-link.active {
  color: var(--coastal-blue);
  background: transparent;
  border-left: 0;
  border-bottom-color: var(--coastal-blue);
}

.sidebar {
  display: none;
  width: 304px;
  background: #fff;
  border-right: 1px solid var(--concrete-light);
  box-shadow: 18px 0 42px rgba(33, 43, 52, .14);
  z-index: 160;
}
.mobile-drawer-head {
  min-height: 86px;
  padding: 10px 12px 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--concrete-light);
}
.mobile-drawer-head .brand {
  width: 205px;
  min-height: auto;
  padding: 8px 12px;
  border: 0;
  justify-content: center;
}
.drawer-close {
  width: 40px;
  height: 40px;
  border: 1px solid var(--concrete-light);
  border-radius: 2px;
  background: #fff;
  color: var(--concrete-dark);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(24, 31, 37, .42);
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, visibility .18s ease;
}
.drawer-backdrop.open { opacity: 1; visibility: visible; }

.main { margin-left: 0; width: 100%; min-height: calc(100vh - var(--header-main-h) - var(--header-nav-h)); }
.content { max-width: var(--site-max); padding: 46px 30px 74px; }

.search-results {
  position: fixed;
  top: calc(var(--header-main-h) + 8px);
  left: 50%;
  right: auto;
  width: min(520px, calc(100vw - 36px));
  max-height: min(650px, calc(100vh - 120px));
  overflow-y: auto;
  transform: translateX(-50%);
  border-radius: 4px;
  box-shadow: 0 18px 44px rgba(33, 43, 52, .16);
}
.result-item {
  grid-template-columns: 38px minmax(0, 1fr) 18px;
  gap: 12px;
  padding: 11px 10px;
  border-radius: 2px;
  align-items: center;
}
.result-icon,
.search-result-icon {
  width: 36px !important;
  height: 36px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: #eef4fb !important;
  color: var(--coastal-blue) !important;
  display: grid !important;
  place-items: center !important;
  line-height: 0;
}
.result-icon .icon,
.search-result-icon .icon { width: 17px; height: 17px; margin: auto; }
.result-item > .icon:last-child { justify-self: center; margin: 0; }
.icon-tile {
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 0;
}
.icon-tile > .icon { margin: auto; }

.home-hero {
  position: relative;
  min-height: 310px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  background: #fff;
  border: 1px solid var(--concrete-light);
  border-top: 8px solid var(--coastal-blue);
  overflow: hidden;
}
.home-hero-copy {
  padding: 52px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.home-hero-copy:after { display: none; }
.home-hero .brand-kicker { color: var(--coastal-green); margin-bottom: 8px; }
.home-hero h1 {
  margin: 0;
  color: var(--coastal-blue);
  font-family: Lato, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: .01em;
}
.home-hero-copy > p {
  max-width: 720px;
  margin: 20px 0 0;
  color: var(--concrete-dark);
  font-size: 18px;
  line-height: 1.58;
}
.home-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.home-hero-start {
  position: relative;
  padding: 42px 38px;
  border-left: 1px solid var(--concrete-light);
  background:
    linear-gradient(rgba(247,248,248,.92), rgba(247,248,248,.92)),
    url('../assets/concrete-texture.jpg') center/cover;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.home-hero-start:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--coastal-green);
}
.hero-start-label {
  color: var(--coastal-green);
  font-family: Lato, "Helvetica Neue", sans-serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.home-hero-start h2 {
  margin: 13px 0 10px;
  color: #353638;
  font-size: 27px;
  line-height: 1.18;
}
.home-hero-start p { margin: 0 0 22px; color: var(--concrete-dark); }

.home-section { margin-top: 48px; }
.home-section-head { margin-bottom: 20px; }
.home-section-head h2 { font-size: 29px; }
.home-section-head p { max-width: 460px; }

.quick-grid { gap: 14px; }
.quick-card {
  min-height: 148px;
  padding: 22px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  column-gap: 15px;
  align-content: start;
  border-color: var(--concrete-light);
}
.quick-card .icon-tile {
  width: 44px;
  height: 44px;
  margin: 0;
  grid-row: 1 / span 3;
  align-self: start;
  justify-self: center;
}
.quick-card h3 { margin: 0 0 6px; font-size: 18px; line-height: 1.2; }
.quick-card p { font-size: 13px; line-height: 1.5; }
.quick-card:after {
  grid-column: 2;
  margin-top: 14px;
  align-self: end;
  content: "Explore";
}

.home-feature-grid,
.home-community-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr);
  gap: 22px;
}
.home-feature-card {
  padding: 28px;
  border: 1px solid var(--concrete-light);
  background: #fff;
}
.home-feature-card h2 { font-size: 26px; }
.home-tip-card { border-top: 4px solid var(--coastal-green); }
.home-leaderboard-card { border-top: 4px solid var(--coastal-blue); }
.home-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}
.home-card-head h2 { margin-bottom: 0; }
.home-leader-list { margin-top: 18px; border-top: 1px solid var(--concrete-light); }
.home-leader-row {
  min-height: 62px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid var(--concrete-light);
}
.home-leader-rank {
  color: var(--coastal-green);
  font-family: Lato, "Helvetica Neue", sans-serif;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .06em;
  text-align: center;
}
.home-leader-copy strong { display: block; color: #343638; }
.home-leader-copy small { display: block; color: var(--concrete-dark); margin-top: 1px; }
.home-leader-score {
  color: var(--coastal-blue);
  font-family: Lato, "Helvetica Neue", sans-serif;
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
}
.home-stack { display: grid; gap: 18px; align-content: start; }
.home-compact-card {
  min-height: 0;
  padding: 24px;
  border: 1px solid var(--concrete-light);
  background: #fff;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.home-compact-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  background: #eef4fb;
  color: var(--coastal-blue);
}
.home-compact-icon.green { background: #f0f6ed; color: var(--coastal-green); }
.home-compact-card h3 { margin: 0 0 5px; font-size: 20px; }
.home-compact-card p { margin: 0; color: var(--concrete-dark); }
.home-compact-card .link,
.home-compact-card .btn { margin-left: auto; flex: 0 0 auto; }
.home-governance-card { border-left: 5px solid var(--coastal-green); }
.home-render-targets { display: none !important; }

.sample-label {
  border-radius: 2px;
  background: #f3f4f4;
  color: var(--concrete-dark);
  border-color: var(--concrete-light);
}

@media (max-width: 1120px) {
  .header-main-inner {
    grid-template-columns: auto 188px minmax(220px, 1fr) auto;
    gap: 18px;
    padding: 0 22px;
  }
  .mobile-menu {
    display: grid;
    width: 40px;
    height: 40px;
    border: 1px solid var(--concrete-light);
    border-radius: 2px;
    background: #fff;
    color: var(--coastal-blue);
    place-items: center;
    cursor: pointer;
  }
  .site-header .brand { width: 188px; padding-left: 4px; padding-right: 4px; }
  .site-header .brand img { width: 168px; }
  .desktop-nav-bar { display: none; }
  .sidebar { display: flex; transform: translateX(-103%); }
  .sidebar.open { transform: none; }
  .content { padding: 36px 28px 64px; }
  .home-hero { grid-template-columns: 1fr 300px; }
  .home-hero-copy { padding: 46px 42px; }
  .home-hero-start { padding: 36px 30px; }
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-results { top: calc(var(--header-main-h) + 10px); }
}

@media (max-width: 820px) {
  .header-main-inner {
    grid-template-columns: auto 1fr auto;
    min-height: auto;
    padding: 8px 16px 12px;
    row-gap: 8px;
  }
  .site-header .brand {
    grid-column: 2;
    justify-self: center;
    width: 180px;
    padding: 8px 10px;
  }
  .site-header .brand img { width: 158px; }
  .top-actions { grid-column: 3; min-width: 40px; width: 40px; }
  .topbar-chatgpt { display: none; }
  .search-wrap {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: none;
  }
  .search-box { height: 40px; }
  .search-results { top: 142px; max-height: calc(100vh - 160px); }
  .home-hero { grid-template-columns: 1fr; }
  .home-hero-start { border-left: 0; border-top: 1px solid var(--concrete-light); }
  .home-feature-grid,
  .home-community-grid { grid-template-columns: 1fr; }
  .home-compact-card { flex-wrap: wrap; }
  .home-compact-card .link,
  .home-compact-card .btn { margin-left: 56px; }
}

@media (max-width: 620px) {
  .content { padding: 26px 16px 46px; }
  .home-hero-copy { padding: 38px 26px; }
  .home-hero h1 { font-size: 48px; }
  .home-hero-copy > p { font-size: 16px; }
  .home-hero-start { padding: 30px 26px; }
  .home-section { margin-top: 38px; }
  .home-section-head { display: block; }
  .home-section-head p { margin-top: 8px; text-align: left; }
  .quick-grid { grid-template-columns: 1fr; }
  .quick-card { min-height: 132px; }
  .home-feature-card { padding: 24px 22px; }
  .home-card-head { display: block; }
  .home-card-head .sample-label { margin-top: 10px; }
  .home-leader-row { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; }
  .home-leader-copy small { font-size: 11px; }
  .home-leader-score { font-size: 16px; }
  .home-compact-card .link,
  .home-compact-card .btn { margin-left: 0; width: 100%; justify-content: flex-start; }
  .popover-head { padding-left: 4px; padding-right: 4px; }
  .result-item { grid-template-columns: 36px minmax(0, 1fr) 16px; padding-left: 4px; padding-right: 4px; }
}
