/* Homepage chrome: keep desktop/mobile brand and navigation geometry identical. */
:root {
  --chrome-green: #00fb88;
  --chrome-ink: #181818;
  --chrome-gutter: clamp(1.25rem, 3.4vw, 4rem);
  --chrome-top: 1.75rem;
  --header-h: calc(2 * var(--chrome-top) + 46px);
}
.login-top,
.site-header {
  width: 100%;
  max-width: none;
  height: auto;
  min-height: var(--header-h);
  margin: 0 auto;
  padding: var(--chrome-top)
    max(var(--chrome-gutter), calc((100% - 1600px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  border: 0;
  color: var(--chrome-ink);
  background: var(--chrome-green);
}
.login-top {
  padding-bottom: 0;
  min-height: 0;
}
.site-left {
  gap: 25px;
}
.site-header .brand,
.login-top .brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  width: auto;
  height: auto;
  flex-shrink: 0;
  text-decoration: none;
}
.site-header .brand svg,
.login-top .brand svg {
  display: block;
  width: 60px;
  height: auto;
}
.site-header .brand {
  align-self: center;
}
.header-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3.2vw, 3rem);
  flex-wrap: wrap;
  justify-content: flex-end;
  row-gap: 0.5rem;
}
.site-header .header-nav a,
.site-header .header-nav button,
.header-nav a,
.header-nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.25;
  text-decoration: none;
}
:is(.site-header, .login-top) .header-nav .login {
  border: 1px solid var(--chrome-ink);
  border-radius: 3px;
  padding: 0.75rem 1.55rem;
  transition:
    background-color 0.15s,
    color 0.15s;
  white-space: nowrap;
}
:is(.site-header, .login-top) .header-nav .login:hover {
  background: var(--chrome-ink);
  color: var(--chrome-green);
}
.header-nav .contact:hover,
.header-nav .header-link:hover {
  text-decoration: underline;
}
.login-options {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  white-space: nowrap;
}
.login-label {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.015em;
}
body.login-mode,
.login-shell {
  background: var(--chrome-green);
}
.login-shell {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
.login-layout {
  flex: 1 0 auto;
  padding-inline: var(--chrome-gutter);
}
.public-footer {
  width: calc(100% - 2 * var(--chrome-gutter));
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 0 1.25rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 1.25rem 2rem;
  font-size: 0.8125rem;
  line-height: 1.6;
  letter-spacing: -0.005em;
  color: var(--chrome-ink);
}
.public-footer .company p {
  margin: 0;
}
.company-name {
  font-weight: 500;
}
.company-address {
  font-style: normal;
  margin-top: 0.12rem;
}
.footer-actions,
.legal-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.footer-actions {
  justify-content: flex-end;
  gap: 0.4rem 1.75rem;
}
/* Reserve the homepage's animation-control space without exposing an inactive control. */
.footer-actions::after {
  content: "Pause motion";
  box-sizing: border-box;
  visibility: hidden;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.3rem 0 0.3rem 22px;
  font-size: 0.8125rem;
  letter-spacing: normal;
  white-space: nowrap;
}
.legal-nav {
  gap: 0.25rem 1.5rem;
}
.legal-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  text-decoration: none;
  white-space: nowrap;
}
.legal-nav a:hover {
  text-decoration: underline;
}
.terms-acknowledgement {
  margin: 1rem 0;
}
.terms-acknowledgement .checkline {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-weight: 400;
}
.terms-acknowledgement input[type="checkbox"] {
  flex: 0 0 auto;
  margin: 0.25rem 0 0;
}
.terms-acknowledgement p {
  margin: 0.5rem 0;
  font-size: 0.875rem;
}
@media (max-width: 800px) {
  .public-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
  }
  .footer-actions {
    width: 100%;
    justify-content: space-between;
  }
}
@media (max-width: 600px) {
  :root {
    --chrome-top: 1.125rem;
    --header-h: calc(2 * var(--chrome-top) + 44px);
  }
  .login-top,
  .site-header {
    gap: 0.75rem;
  }
  .login-top {
    min-height: 0;
  }
  .site-header .brand svg,
  .login-top .brand svg {
    width: 49px;
  }
  .site-left {
    gap: 8px;
  }
  .header-nav {
    gap: 1rem;
    row-gap: 0.5rem;
  }
  .site-header .header-nav a,
  .site-header .header-nav button,
  .header-nav a,
  .header-nav button,
  .login-label {
    font-size: 0.875rem;
  }
  :is(.site-header, .login-top) .header-nav .login {
    padding: 0.7rem 0.6rem;
  }
  .login-options {
    gap: 0.45rem;
  }
  .public-footer {
    padding-bottom: 0.875rem;
    font-size: 0.75rem;
  }
  .company-address {
    max-width: 30rem;
  }
  .footer-actions {
    gap: 0 1.1rem;
  }
  .footer-actions::after {
    font-size: 0.75rem;
  }
  .legal-nav {
    gap: 0 1.25rem;
  }
  .header-label {
    display: none;
  }
}
@media (max-width: 360px) {
  :is(.site-header, .login-top) .header-nav .login {
    font-size: 0.75rem;
    padding: 0.65rem 0.5rem;
  }
  .login-label {
    font-size: 0.8125rem;
  }
  .login-options {
    gap: 0.35rem;
  }
}
@media (max-height: 580px) and (min-width: 700px) {
  :root {
    --chrome-top: 1rem;
  }
}

@media (max-width: 396px) {
  :root {
    --header-h: calc(2 * var(--chrome-top) + 96px);
  }
  .site-header .header-nav {
    min-height: 96px;
    align-content: flex-end;
  }
}

/* Authenticated CLIENT action follows the protected brief route. */
:is(.site-header, .login-top) .header-nav .create-brief {
  background: #163d2a;
  border-color: #163d2a;
  color: #fff;
}
:is(.site-header, .login-top) .header-nav .create-brief:hover {
  background: #0e2f20;
  color: #fff;
}

.footer-actions::after {
  display: none;
}
.login-help {
  flex-direction: column;
  align-items: flex-start;
}
.public-footer .motion-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  padding: 0.3rem 0;
  min-height: 36px;
  background: none;
  font-size: 0.8125rem;
  font-weight: 400;
  cursor: pointer;
  white-space: nowrap;
}
.public-footer .motion-toggle:hover {
  text-decoration: underline;
  text-underline-offset: 0.22em;
}
.public-footer .motion-toggle svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.motion-paused *,
.motion-paused *::before,
.motion-paused *::after {
  animation-play-state: paused !important;
  transition: none !important;
}
@media (max-width: 600px) {
  .public-footer .motion-toggle {
    font-size: 0.75rem;
  }
}
