#intake-form { margin-top: 22px; }
#intake-retry, #intake-another { margin-top: 12px; }
.contact [hidden] { display: none; }
#intake-form:not([hidden]), .intake-name { display: grid; gap: 16px; }
.intake-name { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#intake-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
#intake-form input, #intake-form textarea, #intake-form select, .review-search input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #8b9980;
  border-radius: 8px;
  background: #f7f5ed;
  color: #252b24;
  font: inherit;
  font-size: 16px;
  font-weight: 400;
}
#intake-form textarea { resize: vertical; }
#intake-documents { min-width: 0; margin: 0; padding: 10px 16px 16px; border: 1px solid #8b9980; border-radius: 8px; }
#intake-documents legend { padding-inline: 4px; font-weight: 600; }
#intake-documents p { margin: 0 0 12px; font-size: 14px; }
#intake-form .small { margin: 0; }
#intake-form button { justify-self: start; }
#intake-form button:disabled { opacity: .7; cursor: wait; }
#intake-status:empty { display: none; }
#intake-status { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .intake-name { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Reviewer pages ----------
   Server-rendered under a strict CSP (no scripts, no web fonts, no external images),
   styled to follow the public site: cream ground, ink text, red pill buttons,
   logo + TerpTax wordmark header, eyebrow + short heading section heads, dark footer.
   Georgia/system stacks stand in for Fraunces/Inter, which the CSP blocks. */
.review-body {
  --rv-cream: #f7f5ed; --rv-paper: #fffdf7; --rv-ink: #252b24; --rv-muted: #5c6358;
  --rv-line: #dcded2; --rv-red: #bb252b; --rv-red-dark: #9c1d22; --rv-green: #e6ebdb;
  --rv-serif: Georgia, "Times New Roman", serif;
  --rv-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--rv-cream); color: var(--rv-ink); font: 16px/1.65 var(--rv-sans);
}
.review-body *, .review-body *::before, .review-body *::after { box-sizing: border-box; }
.review-body h1, .review-body h2 { font-family: var(--rv-serif); font-weight: 400; letter-spacing: -.015em; margin: 0; }
.review-body p { margin: 0; }
.review-body a { color: var(--rv-red-dark); text-underline-offset: 3px; }
.review-body a:hover { color: var(--rv-red); }
.review-body :focus-visible { outline: 3px solid #bd8a11; outline-offset: 3px; }
.review-muted { color: var(--rv-muted); }

/* Buttons: red pills like the public site */
.review-button, .review-body button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px;
  padding: 12px 22px; border: 1px solid var(--rv-red); border-radius: 6px; background: var(--rv-red);
  color: #fff; font: 600 14px/1.3 var(--rv-sans); text-decoration: none; cursor: pointer;
  transition: background .18s, border-color .18s, color .18s;
}
.review-body a.review-button { color: #fff; }
.review-button:hover, .review-body button:hover { background: var(--rv-red-dark); border-color: var(--rv-red-dark); color: #fff; }
.review-button-ghost, .review-sign-out button { background: transparent; color: var(--rv-ink); border-color: var(--rv-ink); }
.review-body a.review-button-ghost { color: var(--rv-ink); }
.review-button-ghost:hover, .review-sign-out button:hover,
.review-body a.review-button-ghost:hover { background: var(--rv-ink); border-color: var(--rv-ink); color: var(--rv-cream); }

/* Header: logo, then the TerpTax wordmark, linking home */
.review-bar { position: sticky; top: 0; z-index: 2; background: rgba(247, 245, 237, .95); border-bottom: 1px solid var(--rv-line); }
.review-bar-inner { max-width: 1100px; margin: 0 auto; padding: 14px 32px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.review-brand-group { display: flex; align-items: center; gap: 12px; min-width: 0; }
.review-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.review-logo { display: block; width: auto; height: 42px; flex-shrink: 0; }
.review-wordmark { font: 600 26px/1 var(--rv-serif); letter-spacing: -.04em; color: var(--rv-ink); }
.review-wordmark > span { color: var(--rv-red); }
.review-tag { padding: 4px 10px; border: 1px solid var(--rv-line); border-radius: 4px; background: var(--rv-paper); color: var(--rv-muted); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.review-nav { display: flex; align-items: center; gap: 22px; font-size: 14px; font-weight: 600; }
.review-nav > a { text-decoration: none; }
.review-body .review-nav > a { color: var(--rv-ink); }
.review-body .review-nav > a:hover { color: var(--rv-red); }
.review-sign-out { margin: 0; }
.review-home { min-height: 42px; padding: 10px 18px; font-size: 13px; }

/* Section heads: red eyebrow, short serif heading, optional side note */
.review-eyebrow { color: var(--rv-red); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 10px; }
.review-body p.review-eyebrow { margin-bottom: 10px; }
.review-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 36px; margin-bottom: 28px; }
.review-head h1 { font-size: clamp(34px, 4vw, 46px); line-height: 1.08; overflow-wrap: anywhere; }
.review-lede { max-width: 360px; color: var(--rv-muted); font-size: 15px; line-height: 1.7; }

/* Cards */
.review-card { background: var(--rv-paper); border: 1px solid var(--rv-line); border-radius: 12px; padding: 26px; }
.review-card h2 { font-size: 22px; margin-bottom: 12px; }

/* Text inputs, styled like the public contact form */
.review-login input, .review-search input {
  width: 100%; min-width: 0; min-height: 48px; padding: 12px 14px; border: 1px solid #9ba88d; border-radius: 8px;
  background: var(--rv-cream); color: var(--rv-ink); font: 400 16px/1.5 var(--rv-sans);
}
.review-login input:focus, .review-search input:focus { outline: none; border-color: var(--rv-red); background: #fff; box-shadow: 0 0 0 3px rgba(187, 37, 43, .14); }

/* Signed out: a centered card */
.review-auth { flex: 1; display: grid; place-items: center; padding: 56px 20px; }
.review-auth-card { width: 100%; max-width: 440px; padding: 36px 34px 28px; box-shadow: 0 18px 40px rgba(37, 43, 36, .06); }
.review-auth-card h1 { font-size: 40px; line-height: 1.08; }
.review-intro { margin-top: 12px !important; color: var(--rv-muted); font-size: 15px; line-height: 1.7; }
.review-login { display: grid; gap: 16px; margin-top: 26px; }
.review-login label { display: grid; gap: 7px; font-size: 14px; font-weight: 600; }
.review-login button { width: 100%; margin-top: 6px; min-height: 50px; font-size: 15px; }
.review-login [role="alert"] { padding: 12px 14px; border: 1px solid #e8b9bb; border-radius: 8px; background: #fbeceb; color: var(--rv-red-dark); font-size: 14px; font-weight: 600; }
.review-back { margin-top: 24px !important; padding-top: 18px; border-top: 1px solid var(--rv-line); color: var(--rv-muted); font-size: 14px; text-align: center; }

/* Signed in */
.review-page { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 48px 32px 72px; }
.review-crumb { margin-bottom: 18px !important; font-size: 14px; }
.review-crumb a { font-weight: 600; text-decoration: none; }
.review-crumb a:hover { text-decoration: underline; }
.review-crumb-end { margin: 26px 0 0 !important; }

/* Search */
.review-search { padding: 20px 22px; }
.review-search label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.review-search div { display: flex; gap: 10px; max-width: 620px; }
.review-count { margin-top: 12px !important; color: var(--rv-muted); font-size: 14px; }

/* Submissions table */
.review-table { overflow-x: auto; margin-top: 18px; background: var(--rv-paper); border: 1px solid var(--rv-line); border-radius: 12px; }
.review-table table { width: 100%; border-collapse: collapse; text-align: left; font-size: 15px; }
.review-table th { padding: 13px 18px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--rv-muted); border-bottom: 1px solid var(--rv-line); white-space: nowrap; }
.review-table td { padding: 15px 18px; border-bottom: 1px solid var(--rv-line); vertical-align: top; }
.review-table tbody tr { position: relative; transition: background .12s; }
.review-table tbody tr:last-child td { border-bottom: 0; }
.review-table tbody tr:hover { background: var(--rv-green); }
.review-table td:first-child a { font-weight: 600; text-decoration: none; }
.review-table td:first-child a::after { content: ""; position: absolute; inset: 0; } /* whole row opens the submission */
.review-table tbody tr:hover td:first-child a { text-decoration: underline; }
.review-table td:last-child { white-space: nowrap; color: var(--rv-muted); font-size: 14px; }
.review-table .review-email { overflow-wrap: anywhere; position: relative; z-index: 1; } /* stays selectable for copying */
.review-pager { margin-top: 20px !important; }
.review-empty { margin-top: 18px; padding: 40px 24px; text-align: center; }
.review-empty p + p { margin-top: 6px; font-size: 14px; }

/* Submission details */
.review-page .review-card + .review-card { margin-top: 16px; }
.review-summary dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 28px; margin: 0; }
.review-summary dt { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--rv-muted); padding-top: 4px; }
.review-summary dd { margin: 0; overflow-wrap: anywhere; }
.review-message { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
.review-doc-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 14px; }
.review-doc-head h2 { margin: 0; }
.review-doc-head .review-button { margin-left: auto; }
.review-chip { display: inline-flex; align-items: center; min-height: 26px; padding: 3px 11px; border-radius: 4px; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.review-chip-ok { background: var(--rv-green); color: #3f5326; }
.review-chip-wait { background: #f4ecd2; color: #6b5512; }
.review-chip-warn { background: #f6e4cc; color: #7a4510; }
.review-chip-bad { background: #fbeceb; color: var(--rv-red-dark); }
.review-doc details { border: 1px solid var(--rv-line); border-radius: 8px; background: var(--rv-cream); }
.review-doc summary { min-height: 46px; display: flex; align-items: center; padding: 10px 14px; font-weight: 600; cursor: pointer; }
.review-doc pre { margin: 0; padding: 14px; border-top: 1px solid var(--rv-line); max-height: 420px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 14px/1.6 ui-monospace, "Cascadia Mono", Consolas, monospace; }

/* Footer: dark ink band like the public site */
.review-footer { margin-top: auto; background: var(--rv-ink); color: #d6dccf; }
.review-footer-inner { max-width: 1100px; margin: 0 auto; padding: 26px 32px; display: flex; justify-content: space-between; gap: 24px; font-size: 13px; line-height: 1.7; }
.review-footer-meta { color: #a9b0a0; white-space: nowrap; }

/* Phones */
@media (max-width: 760px) {
  .review-bar-inner { padding: 10px 16px; gap: 10px; }
  .review-logo { height: 36px; }
  .review-wordmark { font-size: 22px; }
  .review-tag { display: none; }
  .review-nav { gap: 14px; }
  .review-sign-out button, .review-home { min-height: 44px; padding: 10px 14px; font-size: 13px; }
  .review-head { display: block; margin-bottom: 22px; }
  .review-head .review-lede { margin-top: 10px; }
  .review-page { padding: 30px 16px 52px; }
  .review-auth { padding: 32px 16px; }
  .review-auth-card { padding: 28px 22px 22px; }
  .review-auth-card h1 { font-size: 34px; }
  .review-search div { flex-direction: column; }
  .review-table { overflow: visible; background: transparent; border: 0; }
  .review-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .review-table table, .review-table tbody, .review-table tr, .review-table td { display: block; }
  .review-table tbody tr { background: var(--rv-paper); border: 1px solid var(--rv-line); border-radius: 12px; padding: 14px 16px; }
  .review-table tbody tr + tr { margin-top: 10px; }
  .review-table td { padding: 2px 0; border: 0; }
  .review-table td:first-child { font-size: 17px; margin-bottom: 4px; }
  .review-table td:last-child { white-space: normal; margin-top: 4px; }
  .review-table td:nth-child(2)::before { content: "Email · "; color: var(--rv-muted); font-size: 13px; }
  .review-table td:nth-child(3)::before { content: "Subject · "; color: var(--rv-muted); font-size: 13px; }
  .review-summary dl { grid-template-columns: 1fr; gap: 2px; }
  .review-summary dd + dt { margin-top: 12px; }
  .review-doc-head .review-button { margin-left: 0; width: 100%; }
  .review-footer-inner { display: block; padding: 22px 16px; }
  .review-footer-meta { margin-top: 8px !important; }
}
