/* alphaVFX look for the PUBLIC pages (upload, download, password, link-gone,
   recipient sign-in): the studio's dark ground, one blue accent for the
   primary action, Segoe UI, the alpha mark. Dark only — these pages carry no
   theme toggle, so nothing floats over the content. ONE sheet for all of
   them: a page's own <style> holds only what is unique to that page.

   Every page also inlines the two ground colours, so it never flashes white
   if this sheet is slow. Layout rule: nothing is absolutely positioned over
   anything else — every block owns its own row. */
:root {
  color-scheme: dark;
  --bg:            #0a0d12;
  --surface:       #12161d;
  --surface-2:     #1a1f28;
  --surface-3:     #222935;
  --border:        #232a35;
  --border-strong: #303a48;
  --text:          #e7ecf2;
  --text-2:        #c2ccd7;
  --muted:         #8d99a7;
  --faint:         #626e7c;
  --accent:        #6cb6e8;
  --accent-hover:  #8bc7ef;
  --accent-ink:    #06131d;
  --accent-soft:   rgba(108, 182, 232, .12);
  --accent-line:   rgba(108, 182, 232, .45);
  --ok:            #6fcf8e;
  --ok-soft:       rgba(111, 207, 142, .12);
  --warn:          #e8b45a;
  --warn-soft:     rgba(232, 180, 90, .12);
  --bad:           #ef8579;
  --bad-soft:      rgba(239, 133, 121, .10);
  --radius:        12px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { background: var(--bg); color: var(--text); }
body { margin: 0; font: 15px/1.5 var(--font); min-height: 100vh; overflow-wrap: anywhere; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Header: the alpha mark + wordmark. */
.av-top { border-bottom: 1px solid var(--border); background: var(--bg); }
.av-top-in { max-width: 1120px; margin: 0 auto; padding: 14px 24px;
             display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.av-brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; min-width: 0; }
.av-brand img { width: 30px; height: 30px; display: block; flex: none; }
.av-word { font-size: 17px; font-weight: 600; letter-spacing: .01em; white-space: nowrap; }
.av-top-note { color: var(--muted); font-size: 13px; white-space: nowrap; }
@media (max-width: 520px) {
  .av-top-in { padding: 12px 16px; }
  .av-top-note { display: none; }
}

/* Cards. */
.av-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.av-pad { padding: 24px; }
@media (max-width: 520px) { .av-pad { padding: 18px 16px; } }

h1.av-h1 { font-size: 26px; line-height: 1.25; font-weight: 600; letter-spacing: -.01em; margin: 0 0 8px; }
.av-lede { color: var(--text-2); margin: 0; max-width: 62ch; }
@media (max-width: 520px) { h1.av-h1 { font-size: 22px; } }

/* Buttons: blue = the primary action; secondary = outlined; quiet = text. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
       min-height: 40px; padding: 8px 18px; border-radius: 8px; border: 1px solid transparent;
       font: 600 14px/1.25 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
       transition: background-color .12s, border-color .12s, color .12s; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-primary:disabled, .btn-primary[aria-disabled="true"] {
  background: var(--surface-2); color: var(--faint); border-color: var(--border); cursor: not-allowed; }
.btn-secondary { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-3); color: var(--text); }
.btn-secondary:disabled { color: var(--faint); background: transparent; border-color: var(--border); cursor: not-allowed; }
.btn-quiet { background: transparent; color: var(--muted); font-weight: 500; padding: 8px 12px; }
.btn-quiet:hover { color: var(--text); background: var(--surface-2); }
.btn-quiet:disabled { color: var(--faint); background: transparent; cursor: not-allowed; }
.btn-block { width: 100%; }

/* Small square icon buttons (reorder, remove). */
.icon-btn { display: inline-flex; align-items: center; justify-content: center; flex: none;
            width: 32px; height: 32px; padding: 0; border-radius: 7px; border: 1px solid transparent;
            background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.icon-btn:disabled { opacity: .3; cursor: default; background: transparent; border-color: transparent; }
.icon-btn svg { width: 16px; height: 16px; display: block; }

/* Form fields. */
.av-field { display: block; width: 100%; min-height: 40px; padding: 9px 12px; border-radius: 8px;
            background: var(--bg); color: var(--text); border: 1px solid var(--border-strong);
            font: 14px/1.4 var(--font); }
.av-field::placeholder { color: var(--faint); }
.av-field:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* Progress bars. */
.av-bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.av-bar > span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 3px;
                 transition: width .25s ease; }
.av-bar.ok > span { background: var(--ok); }

/* Notices: one row each, never floating. */
.av-note { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 10px;
           border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); font-size: 14px; }
.av-note > .grow { flex: 1 1 0; min-width: 0; }
.av-note b { color: var(--text); font-weight: 600; }
.av-note.ok { border-color: rgba(111, 207, 142, .35); background: var(--ok-soft); }
.av-note.warn { border-color: rgba(232, 180, 90, .35); background: var(--warn-soft); }
.av-note.bad { border-color: rgba(239, 133, 121, .35); background: var(--bad-soft); }
.av-note .btn { flex: none; }
@media (max-width: 520px) { .av-note { flex-wrap: wrap; } .av-note .btn { flex: 1 1 100%; } }

.av-muted { color: var(--muted); }
.av-faint { color: var(--faint); }
.av-ok { color: var(--ok); }
.av-bad { color: var(--bad); }

/* Inline text button (show files, try again). */
.linkbtn { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: var(--accent); cursor: pointer; }
.linkbtn:hover { color: var(--accent-hover); text-decoration: underline; }

/* Page frame: a main column with a fixed side card beside it on desktop; one
   column on phones — main, then the side card, then the rest ("more"). */
.av-wrap { max-width: 1120px; margin: 0 auto; padding: 32px 24px 56px; }
.av-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px 28px;
           grid-template-areas: "main side" "more side"; align-items: start; }
.av-main { grid-area: main; min-width: 0; }
.av-side { grid-area: side; min-width: 0; }
.av-more { grid-area: more; min-width: 0; }
@media (max-width: 880px) {
  .av-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "side" "more"; }
}
@media (max-width: 520px) { .av-wrap { padding: 22px 16px 40px; } }

/* Side card: who it is from and what to know about the link. */
.av-side-title { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.av-side-title img { width: 22px; height: 22px; display: block; flex: none; }
.av-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; color: var(--text-2); font-size: 14px; }
.av-facts li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 10px; align-items: start; }
.av-facts svg { width: 16px; height: 16px; margin-top: 3px; color: var(--accent); display: block; }
.av-facts b { color: var(--text); font-weight: 600; }
.av-side-help { margin: 18px 0 0; padding: 14px 0 0; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.av-side-small { margin: 8px 0 0; color: var(--faint); font-size: 12px; }
.av-side-small a { color: var(--muted); }
.av-side-small a:hover { color: var(--text); }

/* Pages that are one card in the middle (password, link gone, sign-in):
   header, the card centred in what is left, the footer. */
body.av-page { display: flex; flex-direction: column; }
.av-center { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.av-narrow { width: 100%; max-width: 440px; }
@media (max-width: 520px) { .av-center { align-items: flex-start; padding: 24px 16px; } }
.av-badge { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin: 0 0 18px;
            background: var(--surface-2); border: 1px solid var(--border); color: var(--accent); }
.av-badge svg { width: 22px; height: 22px; display: block; }
.av-badge.warn { color: var(--warn); }
.av-badge.ok { color: var(--ok); }
h1.av-h1.av-h1-sm { font-size: 22px; }
.av-label { display: block; margin: 18px 0 6px; color: var(--text-2); font-size: 13px; font-weight: 600; }
.av-card .av-note { margin: 16px 0 0; }
.av-card .btn-block { margin: 20px 0 0; }
.av-help { margin: 20px 0 0; padding: 14px 0 0; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.av-steps { margin: 18px 0 0; padding: 14px 16px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.av-steps-title { font-weight: 600; font-size: 14px; margin: 0 0 6px; }
.av-steps ul { margin: 0; padding: 0 0 0 18px; display: grid; gap: 6px; color: var(--text-2); font-size: 14px; }
.av-strong { color: var(--text); font-weight: 600; }

/* "Get the app" (alpha_parts.html av-app): alphaBridge for the visitor's
   computer, on top of a client's own pages, then the browser way under a
   quiet "Or in your browser". On a once-off link it is one quiet line under
   the card instead (av-app-line). */
.av-app { padding: 20px 24px; margin: 0 0 24px; display: grid; gap: 10px; }
.av-app-title { margin: 0; font-size: 17px; font-weight: 600; }
.av-app-text { margin: 0; color: var(--text-2); font-size: 14px; max-width: 66ch; }
.av-app-text b { color: var(--text); font-weight: 600; }
.av-app-get { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 0; }
.av-app-switch { margin: 0; font-size: 13px; }
.av-app-switch:not(:has(> a:not([hidden]))) { display: none; }
.av-browser-title { margin: 0 0 12px; color: var(--muted); font-size: 12px; font-weight: 600;
                    letter-spacing: .04em; text-transform: uppercase; }
.av-app-line { margin: 12px 2px 0; color: var(--muted); font-size: 13px; }
.av-app-line a, .av-app-switch a { white-space: nowrap; }
@media (max-width: 520px) {
  .av-app { padding: 18px 16px; }
  .av-app-get { display: grid; grid-template-columns: minmax(0, 1fr); }
  .av-app-get .btn { width: 100%; white-space: normal; }
}

.av-foot { color: var(--faint); font-size: 12px; text-align: center; padding: 24px 16px 32px; }
