/* The UnitSwitch pages (support at /unitswitch/, privacy, thanks).
   One continuous ground from nav to footer: index.html's hero gradient and
   48px grid, fixed behind the whole page, with no bands of a different colour.
   Figrski palette, Inter throughout. */
:root {
  color-scheme: dark;            /* native selects and file pickers match */
  --navy-dark:  #060F1E;
  --accent:     #3057CA;
  --accent-lt:  #6B8BE8;          /* the brand's blue on dark grounds */
  --txt:        #E6ECF5;
  --txt-sec:    rgba(230, 236, 245, 0.66);
  --hairline:   rgba(255, 255, 255, 0.10);
  --panel:      rgba(255, 255, 255, 0.045);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--navy-dark); }
body {
  min-height: 100vh;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--txt);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  background: linear-gradient(160deg, var(--navy-dark) 0%, #0D1E38 55%, #112240 100%) fixed;
  position: relative;
}
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(48, 87, 202, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(48, 87, 202, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
}
body > * { position: relative; z-index: 1; }
.container { max-width: 760px; margin: 0 auto; padding-left: clamp(1rem, 4vw, 2rem); padding-right: clamp(1rem, 4vw, 2rem); }
a { color: var(--accent-lt); }

/* Nav: index.html's bar, on the page's own ground. */
.nav-inner {
  max-width: 1100px; margin: 0 auto; height: 64px;
  padding: 0 clamp(1rem, 4vw, 3rem);
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { height: 36px; width: auto; display: block; }
.nav-link { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.875rem; font-weight: 500; }
.nav-link:hover { color: #fff; }

/* Brand line and the Support | Privacy switch */
.brand { display: flex; align-items: center; gap: 1.1rem; padding-top: 2.25rem; }
.app-icon { width: 72px; height: 72px; flex-shrink: 0; filter: drop-shadow(0 6px 18px rgba(0,0,0,0.4)); }
.brand > div { min-width: 0; }
/* The UNITSWITCH wordmark (inlined from figrski_brand), sized to sit with the
   icon: about 30px tall, shrinking with the column on narrow phones. */
.wordmark { line-height: 0; }
.wordmark svg { display: block; width: min(100%, 290px); height: auto; }
.brand-sub { color: var(--txt-sec); font-size: 0.9375rem; line-height: 1.4; margin-top: 0.55rem; }
.tabs {
  display: inline-flex; gap: 4px; margin-top: 1.5rem; padding: 4px;
  background: var(--panel); border: 1px solid var(--hairline); border-radius: 999px;
}
.tabs a {
  padding: 0.45rem 1.15rem; border-radius: 999px; text-decoration: none;
  color: rgba(255,255,255,0.72); font-size: 0.9375rem; font-weight: 600;
}
.tabs a:hover { color: #fff; }
.tabs a[aria-current="page"] { background: var(--accent); color: #fff; }

/* Content. main.container, not main: .container's padding would otherwise
   win over main's and leave no gap under the header. */
main.container { padding-top: 2rem; padding-bottom: 4rem; }
.page-title { font-size: 1.5rem; font-weight: 700; color: #fff; margin-bottom: 0.35rem; letter-spacing: -0.01em; }
.updated { color: var(--txt-sec); font-size: 0.875rem; margin-bottom: 1.25rem; }
.summary {
  margin: 1rem 0 1.75rem; padding: 1rem 1.25rem; border-radius: 12px;
  background: rgba(107, 139, 232, 0.10); border-left: 4px solid var(--accent-lt); font-weight: 500;
}
main h2:not(.page-title) {
  font-size: 1.125rem; font-weight: 700; color: #fff;
  margin: 2.25rem 0 0.75rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--hairline);
}
main h3 { font-size: 1rem; font-weight: 600; color: #fff; margin: 1.5rem 0 0.35rem; }
main p { margin-bottom: 0.85rem; }
main ul { margin: 0.25rem 0 0.85rem 1.25rem; }
main li { margin-bottom: 0.35rem; }
main strong { color: #fff; }

/* Contact form (support page) */
.contact { background: var(--panel); border: 1px solid var(--hairline); border-radius: 16px; padding: clamp(1.25rem, 4vw, 2rem); margin-top: 1rem; }
.contact label { display: block; font-weight: 600; font-size: 0.9rem; color: #fff; margin: 1rem 0 0.35rem; }
.contact label:first-of-type { margin-top: 0; }
.contact .opt { font-weight: 400; color: var(--txt-sec); }
.contact input[type=text], .contact input[type=email], .contact select, .contact textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--txt);
  padding: 0.65rem 0.8rem; border: 1px solid rgba(255,255,255,0.16); border-radius: 10px;
  background: rgba(6, 15, 30, 0.55);
}
.contact ::placeholder { color: rgba(230, 236, 245, 0.38); }
.contact textarea { min-height: 150px; resize: vertical; }
.contact input:focus, .contact select:focus, .contact textarea:focus { outline: 2px solid var(--accent-lt); outline-offset: 1px; border-color: var(--accent-lt); }
/* A native select sizes to its content and ignores the inputs' padding, so it
   stood shorter than them: strip its look so it shares their box, and draw
   the chevron the native look took with it (GrowKeep's form does the same). */
.contact select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236B8BE8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.85rem center;
  padding-right: 2.4rem;
}
/* The native Choose file button is about 28px tall and reads as system chrome.
   Restyled as a secondary button at the 44px tap target, as GrowKeep's is.
   Both spellings are needed: Safari answers to ::file-selector-button, older
   iOS only to the -webkit- one, and a rule naming one a browser doesn't know
   is dropped whole, so they stay separate rules. */
.contact input[type=file] { display: block; max-width: 100%; font-size: 1rem; color: var(--txt-sec); }
.contact input[type=file]::file-selector-button {
  -webkit-appearance: none; appearance: none; font: inherit; font-size: 1rem; font-weight: 600;
  color: var(--accent-lt); background: rgba(6, 15, 30, 0.55); border: 1px solid var(--accent-lt);
  border-radius: 10px; min-height: 44px; padding: 0 1.25rem; margin-right: 0.85rem; cursor: pointer;
}
.contact input[type=file]::-webkit-file-upload-button {
  -webkit-appearance: none; appearance: none; font: inherit; font-size: 1rem; font-weight: 600;
  color: var(--accent-lt); background: rgba(6, 15, 30, 0.55); border: 1px solid var(--accent-lt);
  border-radius: 10px; min-height: 44px; padding: 0 1.25rem; margin-right: 0.85rem; cursor: pointer;
}
.contact input[type=file]::file-selector-button:hover { background: rgba(107, 139, 232, 0.14); }
/* The chosen screenshot, big enough to check it's the right one, and a way
   to take it back off: iOS's file control has none. */
.sf-preview { display: block; margin-top: 0.75rem; max-width: 100%; max-height: 240px; width: auto; border-radius: 10px; border: 1px solid var(--hairline); }
.sf-preview[hidden] { display: none; }
.contact button.sf-remove {
  display: block; margin-top: 0.6rem; font: inherit; font-size: 0.95rem; font-weight: 600;
  color: var(--accent-lt); background: transparent; border: 1px solid var(--accent-lt);
  border-radius: 10px; min-height: 44px; padding: 0 1.25rem; cursor: pointer;
}
.contact button.sf-remove[hidden] { display: none; }
.contact button[type=submit] {
  display: block; margin-top: 1.25rem; font: inherit; font-weight: 600; color: #fff; background: var(--accent);
  border: 0; border-radius: 10px; padding: 0.75rem 1.4rem; cursor: pointer;
}
.contact button[type=submit]:disabled { opacity: 0.6; cursor: default; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { display: none; color: #FF9A8F; margin-top: 0.75rem; font-weight: 500; }
.form-note { color: var(--txt-sec); font-size: 0.875rem; margin-top: 0.75rem; }
.form-thanks { display: none; }
.form-thanks .eyebrow { color: var(--accent-lt); font-weight: 600; font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; }

/* Footer: index.html's links and wordmark, on the same ground. */
footer { border-top: 1px solid rgba(255,255,255,0.06); padding: 2.5rem 0; }
.footer-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 clamp(1.5rem, 4vw, 3rem);
  display: flex; flex-direction: column; align-items: center; gap: 1.25rem;
}
.footer-logo { height: 36px; width: auto; opacity: 0.8; }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: rgba(255,255,255,0.4); text-decoration: none; font-size: 0.8rem; transition: color 0.2s; }
.footer-links a:hover { color: rgba(255,255,255,0.75); }
.footer-copy { color: rgba(255,255,255,0.45); font-size: 0.78rem; text-align: center; }
