/* ────────────────────────────────────────────────────────────────────────
 * ASCENT — Phase 10 CSS split (2026-08-20, PARALLEL_DEV_PLAN.md).
 *
 * WARNING -- READ BEFORE TOUCHING <link> TAGS IN Ascent_Dashboard.html --
 * This file is one of twelve pieces of what used to be a single 2,142-line
 * <style> block inside Ascent_Dashboard.html. The split is a byte-exact,
 * order-preserving cut -- verified by concatenating all twelve files back
 * together and diffing against the original block (identical, zero bytes
 * different). That means the CSS cascade today is unchanged from before
 * the split, PROVIDED the <link rel="stylesheet"> tags for these files
 * stay in the exact order listed in ARCHITECTURE.md's "File split in
 * Phase 10" section.
 *
 * Several rules across these files reuse the same class name with a
 * different definition in a different file (this was already true inside
 * the single original block -- see this repo's shell-duplicate-and-
 * agent-cards.css for the clearest example). Same-specificity CSS
 * resolves by *source order*: whichever rule loads last wins. Reordering
 * these <link> tags -- alphabetizing them, "cleaning up" the <head>,
 * inserting a new file in the middle -- can silently flip which rule
 * wins, with no error and no obvious symptom beyond something looking
 * subtly wrong on one tab. If you add new CSS, prefer appending a new
 * file at the END of the <link> list over inserting into this sequence.
 * ──────────────────────────────────────────────────────────────────────── */

/* Source: original Ascent_Dashboard.html lines 658-763 (pre-split). */
/* Riley -- Transaction Intake form styling, plus the Milestone 6 draft-persistence/validation/review styles added on top of it. */

  /* ── RILEY INTAKE FORM ───────────────────────────────────── */
  :root { --flag:#ef4444; --flag-light:rgba(239,68,68,0.1); --warning-light:rgba(245,158,11,0.1); --accent-light:rgba(232,96,58,0.1); }
  .r-intro { background:rgba(232,96,58,0.06); border:1px solid rgba(232,96,58,0.2); border-radius:10px; padding:14px 18px; margin-bottom:20px; display:flex; align-items:center; justify-content:space-between; }
  .r-intro-text { font-size:14px; color:var(--dim); }
  .r-intro-badge { display:flex; align-items:center; gap:7px; font-size:14px; font-weight:600; color:var(--coral); }
  .r-intro-actions { display:flex; align-items:center; gap:10px; }
  @media (max-width:720px) { .r-intro,.r-intro-actions { align-items:flex-start; flex-direction:column; } }
  .r-section { background:var(--card); border:1px solid var(--border); border-radius:12px; margin-bottom:16px; overflow:hidden; }
  .r-section-header { padding:15px 20px 13px; border-bottom:1px solid var(--border); display:flex; align-items:center; gap:12px; }
  .r-section-num { width:24px; height:24px; border-radius:50%; background:var(--coral); color:white; font-size:13.5px; font-weight:800; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
  .r-section-title { font-size:14px; font-weight:700; color:var(--white); }
  .r-section-sub { font-size:13.5px; color:var(--dim); margin-top:1px; }
  .r-section-body { padding:18px 20px; background:var(--dark); }
  .r-field { margin-bottom:14px; position:relative; }
  .r-field:last-child { margin-bottom:0; }
  .r-label { display:block; font-size:13.5px; font-weight:700; letter-spacing:0.06em; text-transform:uppercase; color:var(--white); margin-bottom:6px; }
  .r-info-btn { padding:0; border:0; background:none; color:var(--dim); cursor:pointer; display:inline-flex; align-items:center; justify-content:center; vertical-align:-2px; margin-left:4px; font-size:14px; line-height:1; }
  .r-info-btn:hover { color:var(--coral); }
  .r-info-popover { display:none; position:absolute; z-index:40; top:100%; left:0; margin-top:4px; width:260px; max-width:calc(100vw - 40px); padding:10px 12px; background:var(--card); border:1px solid var(--border); border-radius:8px; box-shadow:0 8px 24px rgba(0,0,0,0.35); font-size:14px; font-weight:400; text-transform:none; letter-spacing:normal; color:var(--text); line-height:1.5; }
  .r-info-popover.open { display:block; }
  .r-input,.r-select,.r-textarea { width:100%; background:var(--dark); border:1px solid var(--border); border-radius:8px; padding:10px 12px; font-size:14px; color:var(--text); font-family:'Inter',sans-serif; outline:none; transition:border-color 0.15s; }
  .r-input:focus,.r-select:focus,.r-textarea:focus { border-color:var(--coral); }
  .r-input::placeholder,.r-textarea::placeholder { color:var(--dim); }
  .r-textarea { resize:vertical; min-height:80px; line-height:1.5; }
  .r-hint { font-size:13.5px; color:var(--dim); margin-top:4px; display:block; }
  /* Resize-affordance for textareas (Mark, 2026-09-14: "make it more
     obvious the window can be resized" -- the native browser drag-corner
     alone is too subtle).
     Two design passes on 2026-09-14/09-15 tried drawing a bigger/bolder
     icon *on top of* the browser's own native resize corner
     (pointer-events:none, so the native drag underneath still worked).
     That approach has a structural ceiling: a browser's native resize hit
     area is a fixed, tiny hotspot (~15x15px in Chrome) that CSS can't
     enlarge -- so however big the drawn icon got, most of it was never
     actually grabbable, which is exactly the "hover area doesn't match
     the icon" mismatch Mark flagged on the third pass. Researched how
     other resizable-textarea implementations handle this (CSS-Tricks'
     "Tricky Textarea Pulltab", interact.js's resizable module, and
     several custom-resize-handle write-ups) -- the standard fix is to
     stop relying on native `resize` entirely and drive it from JS
     instead, so the visible icon and the actual drag target are the same
     element. That's what this does now: the wrapped textarea is
     `resize:none` (see the `.r-resize-wrap textarea` rule below) and
     `.r-resize-grip` itself is the live drag handle (pointer events
     enabled, sized to match its own icon exactly, `touch-action:none` for
     touch/pen), driven by `tcInitResizeGrips()`'s pointer-event handler
     in dashboard.js. Kept deliberately subtle at rest (lower opacity) and
     brightens on hover/drag, rather than a constantly-loud icon, per
     Mark's "now they are too obtrusive" note on the second pass -- the
     hover state itself is now real feedback, not just decoration, since
     hovering this exact box is what starts a real drag. A permanent
     `.r-hint` caption underneath still explains the corner is draggable
     for anyone who doesn't hover it. The pointer-driven drag itself is a
     delegated `pointerdown` listener on `document` in dashboard.js (not
     a named init function -- there's nothing to initialize per-instance).
     Follow-up 2026-09-15 (Mark, after seeing it live): the grip looked
     visibly misaligned, sitting a few pixels below the textarea's own
     bottom border instead of flush in the corner. Root cause, confirmed
     via getBoundingClientRect() on the live page: `.r-resize-wrap` is a
     plain <div> and the whitespace text node in the HTML source between
     the textarea and the (absolutely-positioned, out-of-flow) grip span
     was still generating a small residual inline "line box" using the
     wrap's inherited line-height -- about 6px in practice -- stretching
     the wrap taller than its own textarea child and pushing the
     bottom:0-anchored grip that far below the textarea's real corner.
     Fixed with `line-height:0` on `.r-resize-wrap` itself, which zeroes
     out that phantom strut without affecting the textarea's own
     `line-height:1.55` (set directly on the textarea, so it isn't
     inherited from the wrap). Verified live: the wrap's height now
     matches the textarea's height exactly and the grip sits flush with
     the true corner, 0px offset (was ~6.2px). */
  .r-resize-wrap { position:relative; line-height:0; }
  .r-resize-wrap textarea { resize:none !important; }
  .r-resize-grip {
    position:absolute; right:0; bottom:0; width:24px; height:24px;
    cursor:nwse-resize; touch-action:none;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B616B' stroke-width='1.75' stroke-linecap='round'%3E%3Cline x1='5' y1='19' x2='19' y2='5'/%3E%3Cline x1='12' y1='19' x2='19' y2='12'/%3E%3C/svg%3E");
    background-repeat:no-repeat; background-size:100% 100%; opacity:.45;
    transition:opacity .15s ease;
  }
  .r-resize-grip:hover, .r-resize-grip:active, .r-resize-grip.r-resizing {
    opacity:.9;
  }
  .r-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
  .r-grid-3 { display:grid; grid-template-columns:1fr 1fr 1fr; gap:14px; }
  .r-address-grid { display:grid; grid-template-columns:2fr 1fr 1.3fr 0.55fr 0.85fr; gap:10px; }
  @media (max-width:720px) { .r-address-grid { grid-template-columns:1fr 1fr; } }
  .r-toggle-row { display:flex; border:1px solid var(--border); border-radius:8px; overflow:hidden; margin-top:6px; }
  .r-toggle-btn { flex:1; padding:9px 8px; text-align:center; font-size:14px; font-weight:600; color:var(--dim); cursor:pointer; background:var(--card-hi); border:none; font-family:'Inter',sans-serif; transition:all 0.15s; }
  .r-toggle-btn:hover { background:var(--border); }
  .r-toggle-btn.active { background:var(--coral); color:white; }
  .r-spq-group { margin-bottom:20px; }
  .r-spq-group-title { font-size:13.5px; font-weight:700; letter-spacing:0.08em; text-transform:uppercase; color:var(--coral-500); margin-bottom:10px; padding:9px 12px; background:var(--coral-50); border-radius:7px; }
  .r-spq-item { display:flex; align-items:flex-start; gap:14px; padding:10px 0; border-bottom:1px solid var(--border); }
  .r-spq-item:last-child { border-bottom:none; }
  .r-spq-q { flex:1; font-size:14px; color:var(--text); line-height:1.5; padding-top:2px; }
  .r-spq-q small { display:block; font-size:13.5px; color:var(--dim); margin-top:2px; }
  .r-spq-controls { display:flex; gap:6px; flex-shrink:0; }
  .r-spq-btn { padding:5px 14px; font-size:14px; font-weight:700; border-radius:6px; border:1px solid var(--border); background:var(--card-hi); color:var(--dim); cursor:pointer; font-family:'Inter',sans-serif; transition:all 0.15s; }
  .r-spq-btn.yes-active { background:var(--flag-light); border-color:var(--flag); color:var(--flag); }
  .r-spq-btn.no-active { background:rgba(10,158,138,0.1); border-color:var(--green); color:var(--green); }
  .r-spq-exp { display:none; margin-top:8px; padding:10px 12px; background:var(--flag-light); border:1px solid rgba(239,68,68,0.2); border-radius:6px; }
  .r-spq-exp textarea { width:100%; background:transparent; border:none; font-size:14px; color:var(--text); font-family:'Inter',sans-serif; outline:none; resize:vertical; min-height:56px; }
  .r-spq-exp-label { font-size:13.5px; font-weight:700; color:var(--flag); margin-bottom:4px; }
  .r-docs { margin-top:0; }
  .r-doc-item { display:flex; align-items:center; gap:10px; padding:9px 0; border-bottom:1px solid var(--border); font-size:14px; }
  .r-doc-item:last-child { border-bottom:none; }
  .r-doc-badge { font-size:13px; font-weight:800; padding:2px 7px; border-radius:4px; text-transform:uppercase; letter-spacing:0.06em; flex-shrink:0; }
  .r-req { background:rgba(239,68,68,0.1); color:#ef4444; border:1px solid rgba(239,68,68,0.25); }
  .r-cond { background:var(--coral-50); color:var(--coral-500); border:1px solid var(--coral-200); }
  .r-doc-name { color:var(--text); font-size:14px; font-weight:500; }
  .r-doc-when { font-size:13.5px; color:var(--dim); margin-top:2px; }
  .r-doc-code { font-size:13.5px; color:var(--dim); font-family:monospace; }
  .r-output { display:none; background:var(--card); border:1px solid var(--border); border-radius:12px; margin-bottom:16px; overflow:hidden; }
  .r-output.visible { display:block; }
  .r-output-head { padding:14px 20px; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; }
  .r-output-title { font-size:14px; font-weight:700; color:var(--white); }
  .r-copy-btn { font-size:14px; font-weight:600; padding:6px 14px; border:1px solid var(--border); border-radius:6px; background:var(--card-hi); color:var(--text); cursor:pointer; font-family:'Inter',sans-serif; }
  .r-output-body { padding:20px; }
  .r-output-text { font-size:14px; line-height:1.7; color:var(--text); white-space:pre-wrap; font-family:'SF Mono','Fira Code',monospace; background:var(--surface); border:1px solid var(--border); border-radius:8px; padding:16px; max-height:400px; overflow-y:auto; }
  .r-submit-bar { background:var(--mid); border-top:1px solid var(--border); padding:16px 20px; display:flex; align-items:center; justify-content:space-between; border-radius:10px; margin-top:4px; }
  .r-submit-info { font-size:14px; color:var(--dim); }
  .r-submit-info strong { color:var(--text); }
  .r-btn-generate { background:var(--coral); color:white; border:none; border-radius:8px; padding:11px 24px; font-size:14px; font-weight:700; cursor:pointer; font-family:'Inter',sans-serif; }
  .r-btn-generate:hover { background:var(--coral-d); }
  /* ── Milestone 6: draft persistence / validation / review (Riley intake) ── */
  .r-btn-secondary { background:var(--card-hi); color:var(--text); border:1px solid var(--border); }
  .r-btn-secondary:hover { background:var(--card); }
  .r-btn-generate.r-save-flash, .r-btn-generate.r-save-flash:disabled { background:var(--teal-100); color:var(--teal-600); border:1px solid var(--teal-600); opacity:1; }
  .r-input.r-invalid, .r-textarea.r-invalid { border-color:#c53f2e; background:rgba(197,63,46,0.07); }
  .r-input.r-invalid:focus, .r-textarea.r-invalid:focus { border-color:#c53f2e; }
  .r-error-text { font-size:13.5px; color:#c53f2e; margin-top:4px; display:block; }
  .r-party-email-override { color:#c53f2e; text-decoration:underline; cursor:pointer; font-weight:700; margin-left:4px; white-space:nowrap; }
  .r-party-row { display:flex; gap:8px; align-items:flex-start; margin-bottom:8px; flex-wrap:wrap; }
  .r-party-row .r-field { flex:1; min-width:140px; margin-bottom:0; }
  .r-party-remove { flex-shrink:0; background:var(--card-hi); border:1px solid var(--border); border-radius:8px; width:38px; height:38px; color:var(--dim); cursor:pointer; font-size:16px; line-height:1; font-family:inherit; }
  .r-party-remove:hover { border-color:#D85A30; color:#D85A30; }
  .r-add-party-btn { background:none; border:1px dashed var(--border); border-radius:8px; padding:8px 14px; font-size:14px; font-weight:700; color:var(--coral); cursor:pointer; font-family:inherit; margin-top:2px; }
  .r-add-party-btn:hover { border-color:var(--coral); background:rgba(232,96,58,0.08); }
  .r-resume-banner { display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; background:var(--card-hi); border:1px solid var(--coral); border-radius:10px; padding:12px 16px; margin-bottom:14px; }
  .r-resume-banner-text { font-size:14px; color:var(--text); }
  .r-resume-banner-actions { display:flex; gap:8px; flex-shrink:0; }
  .r-status-row { display:flex; align-items:center; gap:9px; margin-bottom:14px; flex-wrap:wrap; }
  .r-status-detail { font-size:13.5px; color:var(--dim); }
  .r-missing-summary { background:#fff4dc; border:1px solid rgba(164,103,24,0.28); border-radius:8px; padding:12px 14px; margin-bottom:16px; }
  .r-missing-summary.clear { background:var(--teal-100,#e3f6f2); border-color:rgba(10,158,138,0.28); }
  .r-missing-summary.save-failed { background:#fde7e2; border-color:rgba(197,63,46,0.3); }
  .r-missing-title { font-size:13.5px; font-weight:800; text-transform:uppercase; letter-spacing:0.04em; color:#a46718; margin-bottom:6px; }
  .r-missing-summary.clear .r-missing-title { color:var(--green); }
  .r-missing-summary.save-failed .r-missing-title { color:#c53f2e; }
  .r-missing-list { font-size:14px; color:var(--text); line-height:1.8; margin:0; padding-left:18px; }
  .r-review-table { width:100%; border-collapse:collapse; font-size:14px; margin-top:2px; }
  .r-review-table td { padding:7px 6px; border-bottom:1px solid var(--border); vertical-align:top; }
  .r-review-table tr:last-child td { border-bottom:none; }
  .r-review-table td:first-child { color:var(--dim); width:36%; white-space:nowrap; }
  .r-review-table td:last-child { color:var(--white); }
  .r-review-table tr.r-review-section-row td { padding:16px 12px 9px; border-bottom:none; border-radius:7px; font-size:13px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; color:var(--coral-500); background:var(--coral-50); }
  .r-review-table tr.r-review-section-row:first-child td { padding-top:9px; }
  .nl-wiz-btn-secondary { background:var(--card); color:var(--text); border:1px solid var(--border); border-radius:8px; padding:10px 18px; font-size:14px; font-weight:600; cursor:pointer; font-family:inherit; transition:background 0.15s,border-color 0.15s; }
  .nl-wiz-btn-secondary:hover { background:var(--card-hi); }
  .nl-wiz-btn-secondary:active { background:var(--border); }
  .nl-tag { padding:6px 13px; font-size:14px; font-weight:600; border-radius:20px; border:1px solid var(--border); background:var(--card-hi); color:var(--dim); cursor:pointer; font-family:'Inter',sans-serif; transition:all 0.15s; white-space:nowrap; }
  .nl-tag:hover { border-color:var(--coral); color:var(--coral); }
  .nl-tag.nl-tag-active { background:rgba(232,96,58,0.15); border-color:var(--coral); color:var(--coral); }

/* Inline note under a field (2026-10-03: close-of-escrow date moved off a
   weekend per Settings > Escrow closing days). */
.r-field-note { margin-top:6px; font-size:13.5px; line-height:1.45; color:var(--ink); background:var(--coral-50); border:1px solid var(--coral-200); border-radius:7px; padding:6px 8px; }
