/* FileForMeNY family portal. Layout follows the brand board: welcome column beside one white upload card. */
@font-face {
  font-family: "Rubik";
  src: url("fonts/rubik-latin.b65daadded74.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #18344a;
  --navy-dark: #0f2433;
  --sage: #a7c4b5;
  --ivory: #f8f6f0;
  --white: #ffffff;
  --ink: #1c2b36;
  --muted: #4f6070;
  --line: #e3e1d8;
  --sage-tint: #e9f1ec;
  --ok-bg: #e6f2eb;
  --ok-ink: #1e6b46;
  --need-bg: #fbe9e7;
  --need-ink: #a33b2e;
  --copy-bg: #fdf1dc;
  --copy-ink: #875400;
  --todo-bg: #fff1c2;
  --todo-ink: #5a4500;
  --font: "Rubik", "Helvetica Neue", Arial, sans-serif;
  --radius-control: 8px;
  --radius-card: 14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; color: var(--navy); font-weight: 700; line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 1.5rem + 3.2vw, 3.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 1.875rem); letter-spacing: -0.01em; }
h3 { font-size: 1.0625rem; font-weight: 600; }
.h-small { font-size: clamp(1.625rem, 1.3rem + 1.2vw, 2rem); letter-spacing: -0.01em; }
p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; border-radius: 3px; }

.wrap {
  width: min(1180px, 100%);
  margin-inline: auto;
  padding-inline: 16px;
}
.skip {
  position: absolute;
  inset-inline-start: 16px;
  top: -60px;
  padding: 10px 16px;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-control);
}
.skip:focus { top: 8px; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.todo { padding: 0.05em 0.35em; background: var(--todo-bg); color: var(--todo-ink); border-radius: 4px; }
.muted { color: var(--muted); }
.small { font-size: 0.9375rem; }

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; padding-block: 12px 0; }
.brand { display: inline-flex; align-items: center; gap: 12px; margin-inline-end: auto; padding-block-end: 8px; color: var(--navy); font-size: 1.125rem; font-weight: 500; letter-spacing: -0.01em; text-decoration: none; }
.brand img { width: 40px; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0 24px; }
.site-nav a { display: inline-block; padding: 8px 0 10px; border-bottom: 3px solid transparent; color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--navy); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--navy); color: var(--navy); font-weight: 500; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 26px;
  background: var(--navy);
  border: 2px solid var(--navy);
  border-radius: var(--radius-control);
  color: var(--white);
  font-family: inherit;
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.btn:hover { background: var(--navy-dark); border-color: var(--navy-dark); }
.btn-block { width: 100%; }
.btn-quiet { background: transparent; color: var(--navy); }
.btn-quiet:hover { background: var(--sage-tint); border-color: var(--navy); }
.btn-small { min-height: 44px; padding: 0 18px; font-size: 1rem; }
.link-button { padding: 0; background: none; border: 0; color: var(--navy); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Forms */
label, .label { display: block; margin-block-end: 6px; font-weight: 500; }
input[type="text"], input[type="email"], input[type="tel"], select {
  width: 100%;
  min-height: 52px;
  padding: 10px 14px;
  background: var(--white);
  border: 1px solid #8d9aa5;
  border-radius: var(--radius-control);
  color: var(--ink);
  font: inherit;
}
.field { display: grid; gap: 2px; }
.field .hint { margin-block-start: 4px; }
.hint { color: var(--muted); font-size: 0.9375rem; }
.errorlist { display: grid; gap: 4px; color: var(--need-ink); font-size: 0.9375rem; font-weight: 500; }
.notice { padding: 12px 16px; border-radius: var(--radius-control); font-weight: 500; }
.notice-success { background: var(--ok-bg); color: var(--ok-ink); }
.notice-error { background: var(--need-bg); color: var(--need-ink); }

/* Card */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: 0 1px 2px rgba(24, 52, 74, 0.04), 0 10px 28px rgba(24, 52, 74, 0.06);
}

/* Log in and sign up */
.entrance { display: grid; justify-items: center; padding-block: 32px 56px; }
.entrance-card { display: grid; gap: 18px; width: min(460px, 100%); padding: 26px 20px; }
.entrance-card form { display: grid; gap: 16px; }

/* Documents page */
.portal-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding-block: 24px 48px; }
.welcome { display: grid; gap: 12px; align-content: start; }
.welcome-name { color: var(--muted); font-weight: 500; }
progress.progress-bar { width: 100%; height: 10px; overflow: hidden; background: var(--line); border: 0; border-radius: 999px; appearance: none; }
progress.progress-bar::-webkit-progress-bar { background: var(--line); border-radius: 999px; }
progress.progress-bar::-webkit-progress-value { background: var(--navy); border-radius: 999px; }
progress.progress-bar::-moz-progress-bar { background: var(--navy); border-radius: 999px; }
.welcome-art { justify-self: center; width: min(200px, 55%); margin: 0; }
.welcome-art img { width: 100%; height: auto; }

#upload-form { display: grid; gap: 12px; }
.dropzone {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 24px 16px;
  border: 2px dashed #c7cdc9;
  border-radius: 12px;
  text-align: center;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.dropzone.is-over { background: var(--sage-tint); border-color: var(--navy); }
.dropzone-icon { width: 58px; height: 58px; color: #7fa694; }
.drop-text { color: var(--muted); font-size: 1.125rem; font-weight: 500; }
.drop-actions { display: grid; gap: 10px; width: 100%; }
.drop-actions .btn { width: 100%; margin: 0; }
.native-picker { display: grid; gap: 6px; width: 100%; text-align: start; }
.js .native-picker input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.js .native-picker > span { display: none; }
.js .no-js-only { display: none; }
html:not(.js) .js-only { display: none; }
input[type="file"]:focus-visible + .btn { outline: 3px solid var(--navy); outline-offset: 2px; }
.camera-action { display: none; }

/* Upload queue */
.upload-queue { display: grid; gap: 10px; }
.upload-queue:empty { display: none; }
.queue-row { display: grid; gap: 6px; padding: 10px 12px; background: var(--ivory); border-radius: var(--radius-control); font-size: 0.9375rem; }
.queue-name { overflow-wrap: anywhere; font-weight: 500; }
.queue-row.is-done .queue-message { color: var(--ok-ink); font-weight: 500; }
.queue-row.is-error { background: var(--need-bg); }
.queue-row.is-error .queue-message { color: var(--need-ink); font-weight: 500; }

/* Document status */
.check-message { color: var(--copy-ink); font-size: 0.9375rem; font-weight: 500; }
.check-files { display: grid; gap: 4px; width: 100%; font-size: 0.9375rem; }
.check-file { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-block: 8px; border-top: 1px solid var(--line); color: var(--ink); }
.file-name { min-width: 0; overflow-wrap: anywhere; }
.file-delete { flex: none; color: var(--need-ink); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 7px; border-radius: 999px; font-size: 0.875rem; font-weight: 500; line-height: 1.2; white-space: nowrap; }
.pill svg { width: 18px; height: 18px; flex: none; }
.pill-needed { background: var(--need-bg); color: var(--need-ink); }
.pill-received { background: var(--ok-bg); color: var(--ok-ink); }
.pill-reviewed { background: var(--sage-tint); color: var(--navy); }
.pill-new_copy { background: var(--copy-bg); color: var(--copy-ink); }
.pill-optional { padding-inline-start: 12px; background: var(--ivory); color: var(--muted); }

/* Start screen */
.start-card { display: grid; gap: 16px; padding: 24px 20px; }

/* Step screens: progress on top, the list on the left, one document on the right */
.wizard { display: grid; gap: 16px; padding-block: 20px 48px; }
.wizard-progress { display: grid; gap: 6px; }
.progress-text { color: var(--navy); font-size: 0.9375rem; font-weight: 500; }
.wizard-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.wizard-nav { display: none; }
.wizard-nav-phone { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-control); }
.wizard-nav-phone summary { min-height: 48px; padding: 12px 16px; color: var(--navy); font-weight: 500; cursor: pointer; }
.wizard-nav-phone .step-list { padding: 0 8px 8px; }
.step-list { display: grid; gap: 2px; list-style: none; }
.step-link { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 10px; border-radius: var(--radius-control); color: var(--ink); line-height: 1.25; text-decoration: none; }
.step-link:hover { background: var(--sage-tint); }
.step-link[aria-current="step"] { background: var(--white); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; }
.step-icon { flex: none; width: 22px; height: 22px; color: #8d9aa5; }
.step-done .step-icon { color: var(--ok-ink); }
.step-attention .step-icon { color: var(--copy-ink); }
.step-optional { color: var(--muted); }
.step-title { min-width: 0; }
.step-detail { color: var(--copy-ink); font-size: 0.875rem; font-weight: 500; white-space: nowrap; }
.step-card { display: grid; gap: 16px; padding: 24px 20px; }
/* On a phone the count already shows above, on the button that opens the list. */
.step-count { display: none; color: var(--muted); font-size: 0.9375rem; font-weight: 500; }
.step-help { max-width: 40em; }
.step-status { display: grid; gap: 8px; justify-items: start; }
.step-actions { display: flex; gap: 10px; padding-block-start: 4px; }
.step-actions .step-next { flex: 1 1 0; min-width: 0; }
.step-actions .step-back { flex: none; }
.step-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.remaining-list { display: grid; gap: 8px; }
.programs-form { display: grid; gap: 16px; }
.check-group { display: grid; gap: 2px; margin: 0; padding: 0; border: 0; }
.check-group legend { margin-block-end: 8px; padding: 0; font-weight: 500; }
.check-option { display: flex; align-items: flex-start; gap: 12px; margin: 0; padding-block: 9px; font-weight: 400; cursor: pointer; }
.check-option input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--navy); }

/* Simple pages */
.page { display: grid; gap: 24px; max-width: 44em; padding-block: 32px 56px; }
.page-card { display: grid; gap: 14px; padding: 24px 20px; }
.plain-list { display: grid; gap: 6px; }
.detail-list { display: grid; gap: 12px; }
.detail-list dt { color: var(--muted); font-size: 0.9375rem; }
.detail-list dd { font-weight: 500; overflow-wrap: anywhere; }
.qa { display: grid; gap: 18px; }
.qa h3 { margin-block-end: 2px; }

/* Footer */
.site-footer { padding-block: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; }

/* Phones: show the camera option, and hide wording about dragging files. */
@media (pointer: coarse) {
  .camera-action { display: block; }
  .drop-text { display: none; }
  .dropzone-icon { display: none; }
}

@media (min-width: 720px) {
  .wrap { padding-inline: 32px; }
  .brand { font-size: 1.5rem; }
  .brand img { width: 46px; }
  .start-card, .step-card, .page-card { padding: 30px 32px; }
  .entrance-card { padding: 32px; }
}

@media (min-width: 960px) {
  .portal-grid {
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
    grid-template-areas: "welcome card" "art card";
    grid-template-rows: auto 1fr;
    column-gap: clamp(36px, 5vw, 72px);
    row-gap: 24px;
    padding-block: 44px;
    align-items: start;
  }
  .welcome { grid-area: welcome; }
  .start-card { grid-area: card; }
  .welcome-art { grid-area: art; justify-self: start; width: 240px; }
  .wizard { gap: 24px; padding-block: 32px 56px; }
  .step-count { display: block; }
  .wizard-grid { grid-template-columns: minmax(250px, 300px) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); }
  .wizard-nav { display: block; position: sticky; top: 16px; }
  .wizard-nav-phone { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .dropzone { transition: none; }
}

/* Authorization */
.authorization-text { margin: 0; padding: 16px; background: var(--ivory); border-radius: 8px; white-space: pre-line; }
.authorization-form { display: grid; gap: 16px; }
.authorization-form input[type="text"] { width: 100%; }
