/* ==========================================================================
   public.css: the redesign look for the pages that still use styles.css.

   It loads straight after css/styles.css on eight pages (subcontractors,
   contact, faq, privacy, terms, quote, project, coverage) and the dashboard
   never loads it. That is why the rules here need no admin-safe scoping:
   admin.html reads styles.css, so every styles.css rule has to be proved
   against the dashboard, and nothing in this file does.

   The target is the redesign family (index, projects, 404: tokens.css +
   chrome.css + site.css): sentence-case headings at weight 500, white page
   headers with a hairline, one button system, one field style.

   Corners follow var(--radius), which is 0px since the 2026-10-20
   sharp-edges pass. True circles (dots, numbered discs) stay round.
   ========================================================================== */

/* ---------- Column and rhythm ----------
   Content sits on the header's column: chrome.css pads the header, the
   Report a problem row and site.css's .wrap with var(--gut), and the
   styles.css .container used a fixed 24px, so the text sat 10px left of the
   logo edge on a desktop and 4px right of it on a phone. Sections drop to
   40px on a phone, as they already do on the homepage (site.css).
   section.tight and the class-qualified section rules still win. */
.container { padding-left: var(--gut); padding-right: var(--gut); }
/* styles.css glides every in-page jump. Not for someone whose device asks
   for less motion; the rule lives here so the dashboard stays as it was. */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
main section { padding: var(--section-y) 0; }
@media (max-width: 640px) {
  :root { --section-y: 40px; }
}
/* A form card kept its 28px desktop sides on a phone, leaving the fields
   about 270px wide. The contact page's two other cards stack with it there,
   so they take the same inner edge. */
@media (max-width: 560px) {
  .form-card, .contact-info-card, .moment-phone { padding: 22px 16px; }
}

/* ---------- Type ----------
   Sentence case at weight 500 on the redesign's scale, instead of bold
   capitals. :where() keeps these at element weight, so every
   class-qualified heading rule still wins. h4 keeps 600: at 17px, weight 500
   cannot be told from body text. */
:where(main) :is(h1, h2, h3, h4) { text-transform: none; font-weight: 500; letter-spacing: -0.02em; }
:where(main) h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); letter-spacing: var(--tr-h1); }
:where(main) h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); letter-spacing: var(--tr-h2); }
:where(main) h3 { font-size: var(--fs-title); line-height: var(--lh-title); letter-spacing: var(--tr-title); }
:where(main) h4 { font-size: 17px; letter-spacing: -0.01em; font-weight: 600; }
/* Set like site.css's .kicker, and it stays uppercase as that does. */
.eyebrow { font-size: var(--fs-label); font-weight: 400; letter-spacing: .14em; }

/* ---------- Page header ----------
   White with a hairline under it, like .phead on Projects, in place of the
   lavender band or the stock photo washed to 28%. */
.page-header { background: var(--bg); color: var(--text); border-bottom: 1px solid var(--line); }
.page-header .eyebrow { color: var(--accent); }
/* The 64px accent rule under the eyebrow, as under .kicker on Projects, Home
   and 404 (site.css .draw), and like there only when motion is welcome:
   there it draws itself in, here it simply stands. */
@media (prefers-reduced-motion: no-preference) {
  .page-header .eyebrow { position: relative; display: inline-block; margin-bottom: 20px; }
  .page-header .eyebrow::after { content: ""; position: absolute; left: 0; bottom: -11px; width: 64px; height: 1px; background: var(--accent); }
}
.page-header p { font-size: var(--fs-sub); line-height: var(--lh-sub); color: var(--n-300); max-width: 52ch; }
.page-header .breadcrumb { font-size: 12.5px; color: var(--n-500); margin-bottom: 20px; }
/* Projects' .crumb (site.css): a gap either side of the slash and the page
   you are on a shade darker, rather than one run of grey text. The markup is
   the same nav of separate spans on every page. */
.page-header .breadcrumb { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.page-header .breadcrumb .here { color: var(--n-300); }
.page-header .breadcrumb a { color: var(--n-500); }
.page-header .breadcrumb a:hover { color: var(--accent-300); text-decoration: none; }

/* ---------- Buttons ----------
   One system, matching site.css's .btn / .btn-solid / .btn-quiet: labels
   as written (Title Case, like the homepage's "Capability Statement"), no
   uppercase tracking, and no hover lift on any of them. */
/* line-height is the homepage body's 1.55: a link button inherited this
   page's 1.62 and a <button> the browser's "normal", so the two came out 49
   and 44px tall side by side; now both are the homepage's 48. */
.btn {
  min-height: 44px; padding: 12px 21px; border-radius: var(--radius);
  font-family: var(--font); font-size: 14.5px; font-weight: 500; line-height: 1.55;
  letter-spacing: normal; text-transform: none;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 600; }
.btn-primary:hover { background: var(--accent-300); border-color: var(--accent-300); color: var(--bg); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--n-700); }
.btn-outline:hover { background: var(--n-900); border-color: var(--text); transform: none; }
/* Was a lavender box with a black edge that lost the edge on hover. Now the
   accent outline the homepage uses, so Next and Submit stay the one filled
   button on a page. */
.btn-navy { background: transparent; color: var(--accent-300); border-color: var(--accent); }
.btn-navy:hover { background: var(--accent-900); border-color: var(--accent); transform: none; box-shadow: none; }
.btn:disabled, .btn[disabled] { opacity: .55; cursor: default; transform: none; }
.capsheet-pick-label { font-size: 14.5px; border-radius: var(--radius); }

/* ---------- Fields ----------
   One field style: white, a --n-700 edge (3.3:1, where the --line edge was
   1.2:1 on the grey card), an accent edge on focus. styles.css's input:focus
   came from the dark site and turned the focused field the card's grey with
   no ring, so the one being typed in looked disabled, and checkboxes showed
   no focus at all. On a phone fields are 16px, or an iPhone zooms the page
   in on every tap. .field-invalid keeps its red (styles.css, !important). */
main input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]),
main select,
main textarea {
  border: 1px solid var(--n-700); background: var(--bg); border-radius: var(--radius);
}
/* One height for every one-line field, on a computer as on a phone. A text
   field drew 41px beside a 43px date or select in the same row (Quote Amount
   next to Valid Until on quote.html). A textarea keeps its own minimum. */
main input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]),
main select { min-height: 44px; }
main input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]):focus,
main select:focus,
main textarea:focus,
.ref-row input:focus,
.dyn-row input:focus {
  border-color: var(--accent); background: var(--bg); box-shadow: 0 0 0 1px var(--accent); outline: none;
}
/* The focus rule above outranks styles.css's .field-invalid:focus, so the
   red ring is restated here with the same !important that rule uses. */
.field-invalid:focus { box-shadow: 0 0 0 1px var(--danger) !important; }
main input[type=checkbox], main input[type=radio] { accent-color: var(--accent); }
main input[type=checkbox]:focus-visible, main input[type=radio]:focus-visible { outline: 2px solid var(--accent-200); outline-offset: 2px; }
/* The open-bids email box sits beside (or, on a phone, over) its own button:
   the same height, so it does not look shorter than the button it belongs
   to. The id lifts it over the phone rule's 44px below. */
.bid-gate-return input { padding: 10px 13px; min-height: 45px; }
#bid-gate .bid-gate-return input { min-height: 48px; }
@media (max-width: 640px) {
  main input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]),
  main select { font-size: 16px; min-height: 44px; }
  /* Font size only: a textarea keeps its own taller minimum. */
  main textarea { font-size: 16px; }
}

/* ---------- The result line under a form ----------
   Always in the page (role="status" in the markup), so a screen reader
   announces the text when it arrives; empty, it takes no room. */
#form-status { display: block; border-radius: var(--radius); }
#form-status:empty { margin: 0; padding: 0; }

/* ---------- Contact page ---------- */
/* Both panels are white-on-grey cards with a hairline, like the form card
   beside them, instead of two lavender blocks. The call block sits under
   the info card on a desktop, filling the column beside the taller form;
   on a phone the order is info, form, call. The first row is only as tall
   as the info card (the 1fr row takes the rest of the form's height), so
   when choosing "Subcontractor" makes the form taller the call block stays
   right under the info card instead of sliding away from it. */
.contact-info-card, .moment-phone { background: var(--surface); border: 1px solid var(--border); }
.contact-grid { grid-template-areas: "info form" "phone form"; grid-template-rows: auto 1fr; }
.contact-info-card { grid-area: info; }
.contact-grid > .form-card { grid-area: form; }
.contact-grid > .moment-phone { grid-area: phone; margin-top: 0; }
/* The call block took styles.css's 36px 40px, so its words started 12px in
   from the info card's right above it. One inner edge for the two; a phone
   already gives both 22px 16px (the 560px rule at the top). */
@media (min-width: 561px) {
  .contact-grid > .moment-phone { padding: 32px 28px; }
}
/* A grid item is never narrower than its longest word by default, and the
   email address is one long word: at 320px it pushed all three cards 18px
   past the column, almost to the edge of the screen. */
.contact-grid > * { min-width: 0; }
.contact-info-card .info-row a { overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .contact-grid { grid-template-areas: "info" "form" "phone"; grid-template-rows: none; }
}
.moment-phone { gap: 10px 40px; }
.moment-phone p { margin: 0; }
@media (max-width: 700px) {
  .moment-phone-number { padding-block: 6px; margin-block: -6px; }
}
/* The phone and email links read as links, not as the plain text above
   them (a phone has no hover to reveal an underline). */
.contact-info-card .info-row a,
.help-line a { color: var(--accent-300); text-decoration: underline; text-underline-offset: 2px; }
.contact-info-card .info-row a:hover,
.help-line a:hover { color: var(--accent-200); }
/* The homepage's credentials pattern: the value on top, set in mono, and a
   small label under it. */
.credential-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; }
.credential-list .cl-v { font-family: var(--mono); font-size: 15px; font-variant-numeric: tabular-nums; color: var(--text); }
.credential-list .cl-v.on { font-family: var(--font); font-weight: 600; color: var(--accent-300); }
.credential-list .cl-l { margin-top: 3px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--n-500); }
/* A note inside a form: a tint, so it does not read as one more white field. */
.form-note.form-callout {
  background: var(--accent-900); border-left: 3px solid var(--accent);
  padding: 12px 14px; margin: -6px 0 18px; border-radius: var(--radius); color: var(--n-300);
}
.form-callout a { color: var(--accent-300); text-decoration: underline; }
.form-callout a:hover { color: var(--accent-200); }
/* NAICS tables: the 560px minimum cut descriptions off mid-word inside a
   scroll box nobody could see on a phone. */
@media (max-width: 640px) {
  table.naics-table { min-width: 0; }
  table.naics-table thead th, table.naics-table tbody td { padding: 10px 12px; }
}
/* The header row was the same lavender as the primary row. */
table.naics-table thead th { background: var(--bg); color: var(--n-500); border-bottom: 1px solid var(--n-800); font-weight: 700; }
/* The primary table and the full list sit one under the other, and each
   sized its code column from its own content, so the Description column
   jogged 13px between them. One width for the code column in both. */
table.naics-table thead th:first-child, table.naics-table td.code { width: 6.5em; }
/* The "View all" toggle uses the FAQ's accent +/- marker, at a 44px height. */
details.naics-details summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 10px 0; font-weight: 700; color: var(--heading);
}
details.naics-details summary::-webkit-details-marker { display: none; }
details.naics-details summary::before {
  content: '+'; flex: 0 0 1em; text-align: center;
  font-size: var(--type-lg); line-height: 1; color: var(--accent-300);
}
details.naics-details[open] summary::before { content: '\2212'; }
details.naics-details summary:hover { color: var(--accent-300); }

/* ---------- Call to action band ----------
   Left-aligned with the column above it; on a phone the two buttons stack
   at one width instead of two. */
.cta-band { text-align: left; }
.cta-band p { margin: 0 0 26px; }
.cta-band-actions { justify-content: flex-start; }
@media (max-width: 560px) {
  /* Full width, so the stacked buttons end where the cards above them do. */
  .cta-band .cta-band-actions { flex-direction: column; align-items: stretch; max-width: none; }
}

/* ---------- Privacy and terms ----------
   A reading column on the header's left edge: headings at the redesign's
   22px title size with room above them, about 70 characters a line, and
   bullets that end where the paragraphs do. Never call this .legal:
   chrome.css's footer uses that name. */
.legal-prose { max-width: 712px; }
.legal-prose h2 {
  font-size: var(--fs-title); line-height: var(--lh-title); letter-spacing: var(--tr-title);
  font-weight: 500; text-transform: none; margin: 44px 0 10px;
}
.legal-prose p, .legal-prose ul { max-width: 34rem; }
/* .check-list in the selector: styles.css's ul.check-list li sets 15px and
   would outrank a plain .legal-prose li. */
.legal-prose p, .legal-prose .check-list li { font-size: var(--fs-body-2); line-height: var(--lh-body-2); }
.legal-prose ul.check-list li::before { top: 10px; }
.legal-prose a { color: var(--accent-300); text-decoration: underline; text-underline-offset: 2px; }
.legal-prose a:hover { color: var(--accent-200); }
/* The Contact us email and phone measured 17px tall. The box grows; the
   text and its bullet stay where they were. */
.legal-prose .check-list a { display: inline-block; padding-block: 4px; margin-block: -4px; }

/* ---------- Quote and project pages ----------
   A document name is stored with underscores for spaces, and a browser will
   not wrap at an underscore, so a long one pushed the page sideways on a
   phone. */
#quote-body, #project-body { overflow-wrap: anywhere; }
.pp-meta.pp-dates { display: block; margin: 0 0 4px; }
.pp-meta.pp-dates > div {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline;
  gap: 2px 16px; padding: 10px 0; border-bottom: 1px solid var(--border);
}
/* The first date starts level with the first line of the other cards: its
   top padding added 10px under the card's own. */
.pp-meta.pp-dates > div:first-child { padding-top: 0; }
.pp-meta.pp-dates div span { margin: 0; }
.pp-meta.pp-dates div strong { color: var(--accent); }
@media (max-width: 720px) {
  .pp-meta-3 > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  /* Every date stacks, label over date. A short row (Site visit) stayed side
     by side while the long ones wrapped, so one block read as two layouts. */
  .pp-meta.pp-dates > div { flex-direction: column; align-items: flex-start; }
  .page-header-job { padding: 32px 0 28px; }
  /* A 1.75rem floor: at 1.5rem the job's title was 24px over 22px card
     headings, and did not read as the title. Long names still wrap. */
  .page-header-job h1 { font-size: clamp(1.75rem, 7.5vw, 2rem); line-height: 1.2; }
  .page-header-job + section { padding-top: 32px; }
}

/* ---------- Open bids ----------
   A job's status is the same square outlined label as Projects' badge, in
   the body face; each keeps its own colour (green means open for bids). */
.pp-card { border-radius: var(--radius); }
/* Flat like every other panel: the accent edge is the hover cue, and the
   lifted shadow stuck after a tap on a phone. */
.pp-card:hover { box-shadow: none; }
.pp-card .pp-status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font); font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 12px; border: 1px solid currentColor; border-radius: var(--radius);
}
.pp-card .pp-status.active { background: #e8f5e9; color: #1b6e2c; border-color: #b7dfbc; }

/* ---------- Bid-list page (subcontractors.html) ----------
   The FAQ line, the open bids and the form sit on an 820px column. Centred,
   that column started 180px right of the title above it, so the page had two
   left edges. It starts on the page column now, where the logo and the title
   do: the gutter is the container's own padding, and the margin is whatever
   the page column leaves on a wide screen. */
.page-col { margin-left: max(0px, calc((100% - var(--page)) / 2)); margin-right: auto; }
/* Once the application is sent, the form folds down to its thank-you
   (#form-status), and the grey card around it was left as a box round a box. */
.form-card:has(> #subcontractor-form.is-sent) { padding: 0; border: 0; background: none; box-shadow: none; }
/* Add and Remove on the reference rows are buttons, which do not inherit the
   page face: they came out Arial bold beside every other control's Public
   Sans 500. Scoped to the form, because the dashboard has .btn-add-ref too
   (and never loads this file anyway). */
#subcontractor-form :is(.btn-add-ref, .btn-remove-ref) { font-family: var(--font); font-weight: 500; letter-spacing: normal; }
