/* Small additions on top of the site's own compiled stylesheet.
   These only support behaviour that the React runtime provided upstream.
   No design tokens, breakpoints or layout utilities are redefined here --
   in particular `.hidden` is left alone, because the original markup relies
   on `hidden lg:grid` / `lg:hidden` pairs for the responsive header. */

/* Horizontal logo/card tracks: smooth scrolling, no visible scrollbar. */
.overflow-x-auto {
  scroll-behavior: smooth;
}
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* Mobile menu panel, appended under the header by site.js. */
#mobile-menu {
  max-height: calc(100vh - 90px);
  overflow-y: auto;
}

/* Copy-link confirmation. */
.is-copied {
  opacity: 0.55;
}

@media (prefers-reduced-motion: reduce) {
  .overflow-x-auto {
    scroll-behavior: auto;
  }
}

/* ---------------------------------------------------------------- contact form
   The original site has no forms, so its purged Tailwind build contains no form
   utilities at all. These are authored here against the site's own tokens
   (--color-accent-green, --color-border, --color-text-muted, --spacing) so the
   contact page matches the rest of the design without inventing utility classes
   that would silently do nothing. */

/* Direct children only -- the two fields inside a .form-row are laid out by the
   grid and must stay top-aligned, so they take no sibling margin. */
#contact-form > * + * {
  margin-top: calc(var(--spacing) * 6);
}
#contact-form > .form-actions {
  margin-top: calc(var(--spacing) * 8);
}
.form-row > .form-field {
  margin-top: 0;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: calc(var(--spacing) * 6);
}
@media (min-width: 768px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

.form-label {
  display: block;
  margin-bottom: calc(var(--spacing) * 2);
  font-size: 1rem;
  font-weight: 700;
  color: #212529;
}
.form-req {
  color: #d93025;
}
.form-optional {
  font-weight: 400;
  color: var(--color-text-muted);
  opacity: 0.7;
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  font: inherit;
  font-size: 1rem;
  color: #212529;
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  outline: none;
  transition: border-color 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out);
}
.form-control::placeholder {
  color: var(--color-text-muted);
  opacity: 0.55;
}
.form-control:focus {
  border-color: var(--color-accent-green);
  box-shadow: 0 0 0 3px rgb(5 214 90 / 0.25);
}
.form-control[aria-invalid="true"] {
  border-color: #d93025;
}
.form-control[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px rgb(217 48 37 / 0.2);
}

select.form-control {
  cursor: pointer;
  /* Native arrow varies per platform; draw our own for a consistent control. */
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230d1117' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 1.1rem;
  padding-right: 2.6rem;
}

.form-textarea {
  min-height: 180px;
  resize: vertical;
}

.form-file {
  cursor: pointer;
  padding: 0.6rem 1rem;
}
.form-file::file-selector-button {
  margin-right: 1rem;
  padding: 0.5rem 1rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-white);
  background-color: var(--color-cta-green);
  border: 0;
  border-radius: 9999px;
  cursor: pointer;
}
.form-file::file-selector-button:hover {
  opacity: 0.9;
}

.form-hint {
  margin-top: calc(var(--spacing) * 1.5);
  font-size: 0.875rem;
  color: var(--color-text-muted);
  opacity: 0.75;
}
.form-error {
  margin-top: calc(var(--spacing) * 1.5);
  font-size: 0.875rem;
  color: #d93025;
}
.form-error.hidden {
  display: none;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: calc(var(--spacing) * 4);
  margin-top: calc(var(--spacing) * 8);
}
.form-actions button[type="submit"],
.form-actions a {
  transition: opacity 0.15s var(--ease-out);
}
.form-actions button[type="submit"]:hover,
.form-actions a:hover {
  opacity: 0.9;
}

/* Post-submit hand-off panel. */
.contact-handoff {
  padding: calc(var(--spacing) * 8);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  background-color: var(--color-bg);
  color: #212529;
}
.contact-summary {
  margin-bottom: calc(var(--spacing) * 8);
  padding: calc(var(--spacing) * 5);
  border-radius: 0.5rem;
  background-color: #f6f7f8;
  font-size: 0.875rem;
}
.contact-summary dt {
  font-weight: 700;
  color: #212529;
}
.contact-summary dd {
  margin: 0 0 calc(var(--spacing) * 3) 0;
  color: var(--color-text-muted);
  opacity: 0.85;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.contact-summary dd:last-child {
  margin-bottom: 0;
}
.contact-edit {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-cta-green);
  background: none;
  border: 0;
  cursor: pointer;
}
.contact-edit:hover {
  text-decoration: underline;
}

/* Success confirmation -- driven entirely by CSS.
   "Continue to support desk" links to #request-sent, so :target reveals the
   panel and :has() folds away the review step. No script is involved. */
.contact-success {
  display: none;
  text-align: center;
}
#request-sent:target {
  display: block;
}
.contact-handoff:has(#request-sent:target) .handoff-body {
  display: none;
}

.contact-success-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: calc(var(--spacing) * 5);
  color: var(--color-white);
  background-color: var(--color-accent-green);
  border-radius: 9999px;
}
.contact-success-mark svg {
  width: 32px;
  height: 32px;
}
.contact-success .form-actions {
  justify-content: center;
}

/* Browsers without :has() still get a usable confirmation: the panel appears,
   stacked under the review step rather than replacing it. */
@supports not selector(:has(*)) {
  #request-sent:target {
    margin-top: calc(var(--spacing) * 8);
    padding-top: calc(var(--spacing) * 8);
    border-top: 1px solid var(--color-border);
  }
}

/* ------------------------------------------------------------- account pages
   Signup / login / forgot-password. Narrow centred column reusing the .form-*
   controls above. */

.auth-shell {
  max-width: 480px;
  margin: 0 auto;
}

.auth-title {
  margin-bottom: calc(var(--spacing) * 3);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-align: center;
  color: #212529;
}
@media (min-width: 768px) {
  .auth-title {
    font-size: 40px;
  }
}
.auth-sub {
  margin-bottom: calc(var(--spacing) * 8);
  font-size: 1rem;
  line-height: 1.5;
  text-align: center;
  color: var(--color-text-muted);
  opacity: 0.75;
}

/* Page-level message. Error styling by default -- that is what these pages
   surface -- with a success variant for confirmations. */
.auth-alert {
  margin-bottom: calc(var(--spacing) * 6);
  padding: calc(var(--spacing) * 4);
  border: 1px solid #f3b7b2;
  border-left: 4px solid #d93025;
  border-radius: 0.5rem;
  background-color: #fdf3f2;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #8c1d16;
}
.auth-alert.hidden {
  display: none;
}
.auth-alert strong {
  font-weight: 700;
}
.auth-alert.is-success {
  border-color: #a8e6c1;
  border-left-color: var(--color-cta-green);
  background-color: #f1fbf5;
  color: #14663b;
}

.auth-shell .form-actions {
  justify-content: center;
}
.auth-shell .form-actions button {
  width: 100%;
  justify-content: center;
}

.auth-links {
  margin-top: calc(var(--spacing) * 6);
  font-size: 0.9375rem;
  text-align: center;
  color: var(--color-text-muted);
  opacity: 0.85;
}
.auth-links a {
  font-weight: 700;
  color: var(--color-cta-green);
}
.auth-links a:hover {
  text-decoration: underline;
}
.auth-sep {
  margin: 0 calc(var(--spacing) * 2);
  opacity: 0.5;
}
