/* Unified shell theme derived from the current FastFrame M² Guide. */
:root {
  --m2-orange: #f4a126;
  --m2-orange-dark: #c97400;
  --m2-navy: #0b3048;
  --m2-navy-mid: #0d3955;
  --m2-navy-deep: #071f31;
  --m2-ink: #182630;
  --m2-muted: #667681;
  --m2-paper: #eef3f6;
  --m2-panel: #ffffff;
  --m2-line: #dbe3e8;
  --m2-soft: #fff7e9;
  --m2-shadow: 0 18px 50px rgba(13, 43, 61, .09);
  --navy-950: var(--m2-navy-deep);
  --navy-900: var(--m2-navy);
  --navy-800: var(--m2-navy-mid);
  --cyan: var(--m2-orange);
  --cyan-soft: #ffc86e;
  --ink: var(--m2-ink);
  --muted: var(--m2-muted);
  --canvas: var(--m2-paper);
  --line: var(--m2-line);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
}

html,
body {
  background:
    radial-gradient(circle at 92% 2%, rgba(244, 161, 38, .12), transparent 24rem),
    linear-gradient(180deg, #f7f9fa 0, var(--m2-paper) 42rem);
}

.app-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  column-gap: 8px;
  top: 12px;
  width: calc(100% - 28px);
  height: calc(86px + var(--safe-top));
  margin: 12px 14px 0;
  padding: var(--safe-top) 18px 0;
  color: #fff;
  background: linear-gradient(118deg, var(--m2-navy-mid) 0%, var(--m2-navy-deep) 76%);
  border: 0;
  border-top: 4px solid var(--m2-orange);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(7, 31, 49, .18);
}

.brand {
  gap: 14px;
}

.app-header .brand {
  grid-column: 2;
  justify-self: center;
}

.app-header .connection-pill {
  grid-column: 3;
  justify-self: end;
}

.brand img {
  display: block;
  width: clamp(150px, 37vw, 230px);
  height: auto;
  filter: brightness(0) invert(1);
}

.brand-divider {
  width: 1px;
  height: 39px;
  background: rgba(255, 255, 255, .17);
}

.brand small {
  max-width: 72px;
  margin: 0;
  color: #b8cad6;
  font-size: 9px;
  line-height: 1.25;
  letter-spacing: .14em;
}

.connection-pill {
  color: #d5e0e7;
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .16);
}

.connection-dot {
  background: var(--m2-orange);
  box-shadow: 0 0 0 4px rgba(244, 161, 38, .16);
}

.home-main {
  padding-top: 0;
}

.hero {
  min-height: 0;
  padding: 54px 24px 42px;
  color: var(--m2-ink);
  background: transparent;
  border: 0;
}

.hero::before {
  display: none;
}

.hero::after {
  right: -90px;
  bottom: -145px;
  width: 330px;
  height: 330px;
  border: 50px solid rgba(244, 161, 38, .08);
  box-shadow: none;
}

.hero-glow {
  display: none;
}

.eyebrow {
  color: var(--m2-orange-dark);
  font-size: 10px;
  letter-spacing: .18em;
}

.hero h1 {
  max-width: 710px;
  color: var(--m2-navy);
  font-size: clamp(42px, 10vw, 70px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.045em;
}

.hero h1 span {
  color: var(--m2-navy);
}

.hero h1 span::after {
  display: inline-block;
  width: .22em;
  height: .22em;
  margin-left: .08em;
  content: "";
  background: var(--m2-orange);
}

.hero-copy {
  max-width: 570px;
  color: var(--m2-muted);
  font-size: 15px;
}

.primary-button,
.secondary-button {
  min-height: 48px;
  border-radius: 9px;
}

.primary-button {
  color: #172a35;
  background: var(--m2-orange);
  border: 1px solid var(--m2-orange);
  box-shadow: 0 12px 24px rgba(201, 116, 0, .16);
}

.secondary-button {
  color: var(--m2-navy);
  background: #fff;
  border: 1px solid #cbd7de;
}

.tool-section {
  padding-top: 18px;
}

.eyebrow.dark {
  color: var(--m2-orange-dark);
}

.section-heading h2 {
  color: var(--m2-navy);
  font-size: 27px;
  font-weight: 800;
}

.version-label {
  padding: 7px 10px;
  color: #8a5100;
  background: #fff4df;
  border-radius: 999px;
}

.tool-grid {
  gap: 16px;
}

.tool-card {
  grid-template-columns: 58px minmax(0, 1fr) 28px;
  min-height: 116px;
  padding: 20px;
  background: var(--m2-panel);
  border: 1px solid rgba(197, 210, 218, .88);
  border-radius: 17px;
  box-shadow: var(--m2-shadow);
}

.tool-card::before {
  top: 0;
  right: 0;
  bottom: auto;
  width: auto;
  height: 4px;
  background: linear-gradient(90deg, var(--m2-orange) 0 112px, #dfe7eb 112px);
}

.accessories-card,
.wind-card,
.guide-card,
.checklist-card,
.locator-card {
  --card-accent: var(--m2-orange-dark);
  --card-tint: var(--m2-soft);
}

.tool-icon {
  width: 58px;
  height: 58px;
  color: var(--m2-orange);
  background: linear-gradient(145deg, var(--m2-navy-mid), var(--m2-navy-deep));
  border-radius: 14px;
  box-shadow: 0 10px 20px rgba(7, 31, 49, .16);
}

.tool-kicker {
  color: var(--m2-orange-dark);
}

.tool-copy strong {
  color: var(--m2-navy);
  font-size: 18px;
  font-weight: 800;
}

.tool-copy small {
  color: var(--m2-muted);
}

.card-arrow {
  color: var(--m2-orange-dark);
}

.support-card {
  color: #fff;
  background: linear-gradient(118deg, var(--m2-navy-mid), var(--m2-navy-deep));
  border-top: 4px solid var(--m2-orange);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(7, 31, 49, .15);
}

.support-icon {
  color: #172a35;
  background: var(--m2-orange);
  border-radius: 10px;
}

.support-card span {
  color: #9db1bf;
}

.support-card strong {
  color: #fff;
}

.support-card a {
  color: #172a35;
  background: var(--m2-orange);
  border: 0;
  border-radius: 9px;
}

.bottom-nav {
  background: rgba(7, 31, 49, .98);
  border-top: 4px solid var(--m2-orange);
}

.bottom-nav a {
  color: #a8bac6;
}

.bottom-nav a::before {
  top: -11px;
  height: 4px;
  border-radius: 0 0 4px 4px;
}

.bottom-nav a.active {
  color: #ffc86e;
}

.bottom-nav a.active::before {
  background: var(--m2-orange);
}

.tool-header {
  height: calc(66px + var(--safe-top));
  color: #fff;
  background: linear-gradient(118deg, var(--m2-navy-mid), var(--m2-navy-deep));
  border: 0;
  border-top: 4px solid var(--m2-orange);
  box-shadow: 0 12px 30px rgba(7, 31, 49, .2);
}


.tool-heading small {
  color: #ffc86e;
}

.tool-heading strong {
  color: #fff;
  font-weight: 750;
}

.tool-stage {
  top: calc(66px + var(--safe-top));
  background: var(--m2-paper);
}

.loader {
  border-color: #cbd7de;
  border-top-color: var(--m2-orange);
}

.toast {
  color: #fff;
  background: var(--m2-navy-deep);
  border-top: 4px solid var(--m2-orange);
  border-radius: 12px;
}

@media (min-width: 680px) {
  .hero {
    padding-top: 68px;
    padding-bottom: 52px;
  }
}

@media (min-width: 980px) {
  .app-header {
    width: min(calc(100% - 48px), 1100px);
    margin-right: auto;
    margin-left: auto;
    padding-right: 24px;
    padding-left: 24px;
  }

  .bottom-nav {
    border: 1px solid rgba(255, 255, 255, .1);
    border-top: 4px solid var(--m2-orange);
    border-radius: 16px;
  }
}

@media (max-width: 430px) {
  .app-header {
    width: calc(100% - 20px);
    margin-right: 10px;
    margin-left: 10px;
    padding-right: 13px;
    padding-left: 13px;
  }

  .brand img {
    width: 145px;
  }

  .brand-divider,
  .brand small {
    display: none;
  }

  .hero {
    padding-right: 20px;
    padding-left: 20px;
  }
}

/* Centred hero layout fix. */
.hero {
  display: flex;
  align-items: center;
  flex-direction: column;
  text-align: center;
}

.hero h1,
.hero-copy {
  margin-right: auto;
  margin-left: auto;
}

.hero-actions {
  width: 100%;
  align-items: center;
  justify-content: center;
}

.hero-actions .primary-button,
.hero-actions .secondary-button {
  flex: 0 1 auto;
}

@media (max-width: 430px) {
  .hero h1 {
    width: 100%;
    font-size: clamp(38px, 11vw, 48px);
  }

  .hero-copy {
    width: min(100%, 330px);
  }

  .hero-actions {
    width: min(100%, 340px);
    flex-direction: column;
  }

  .hero-actions .primary-button,
  .hero-actions .secondary-button {
    width: 100%;
  }
}

/* Centred home section heading fix. */
.section-heading {
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  text-align: center;
}

.section-heading > div {
  text-align: center;
}

.section-heading .version-label {
  margin: 0;
  text-align: center;
}

/* Keep the centred logo clear of the connection status on narrow phones. */
@media (max-width: 360px) {
  .app-header .brand img {
    width: 120px;
  }
}
