/* Public /resources/1099-readiness page.
   Built on the --th-* tokens in css/public/modern.css. Everything is scoped under
   .r1099 so the worksheet components (summary boxes, status chips, ledger rows,
   timeline, penalty steps) cannot leak into other pages. Light-only, like the
   other resource pages. */

.r1099 {
    --r-surface: var(--th-bg);
    --r-sunk: var(--th-bg-subtle);
    --r-line: var(--th-border);
    --r-ink: var(--th-text);
    --r-muted: var(--th-text-muted);
    --r-accent: var(--th-accent, #c9952c);
    --r-accent-ink: var(--th-accent-text, #8a6519);
    --r-accent-soft: var(--th-accent-ultra-light, #fdf8ed);
    --r-bad: #b42318;
    --r-bad-soft: #fde8e6;
    --r-good: #1f7a43;
    --r-good-soft: #e3f3e8;
    --r-info-soft: #e6ebf2;
    --r-slate: #1e293b;
    --r-on-slate: #f1f5f9;
}

.r1099 .num { font-variant-numeric: tabular-nums; }
.r1099 .r-eyebrow { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--r-accent-ink); }
.r1099 :focus-visible { outline: 2px solid var(--r-accent); outline-offset: 2px; }
.r1099 .r-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Hero deadline clock (sits on the dark hero) */
.r1099 .r-clock { display: grid; gap: 10px; }
.r1099 .r-tick { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: var(--th-radius-sm); padding: 14px 16px; color: #cbd5e1; }
.r1099 .r-tick b { font-size: 2.5rem; line-height: 1; font-weight: 800; min-width: 3ch; text-align: right; color: #fff; }
.r1099 .r-tick.r-hot b { color: var(--th-accent-light, #e5c367); }
.r1099 .r-tick span { font-size: 0.875rem; line-height: 1.35; }
.r1099 .r-tick span strong { display: block; color: #fff; font-size: 0.9375rem; }

/* Tool shell */
.r1099 .r-tool { background: var(--r-surface); border: 1px solid var(--r-line); border-radius: var(--th-radius); overflow: hidden; box-shadow: var(--th-shadow-md); }
.r1099 .r-tool-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 22px 24px; border-bottom: 1px solid var(--r-line); }
.r1099 .r-tool-head p { color: var(--r-muted); font-size: 0.9375rem; margin: 4px 0 0; max-width: 62ch; }
.r1099 .r-tool-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.r1099 .r-btn { display: inline-flex; align-items: center; gap: 6px; border-radius: var(--th-radius-sm); padding: 6px 12px; font-size: 0.875rem; font-weight: 600; border: 1px solid var(--r-line); background: var(--r-surface); color: var(--r-ink); cursor: pointer; }
.r1099 .r-btn:hover { border-color: var(--r-muted); }

.r1099 .r-summary { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--r-line); }
.r1099 .r-box { padding: 16px 24px; border-right: 1px solid var(--r-line); min-width: 0; }
.r1099 .r-box:last-child { border-right: 0; }
.r1099 .r-box .r-lbl { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--r-muted); display: flex; gap: 8px; }
.r1099 .r-box .r-lbl span { color: var(--r-accent-ink); }
.r1099 .r-box .r-val { font-size: 2.25rem; font-weight: 800; line-height: 1.15; margin-top: 4px; color: var(--r-ink); }
.r1099 .r-box .r-sub { font-size: 0.8125rem; color: var(--r-muted); }
.r1099 .r-box.r-alert .r-val { color: var(--r-bad); }

/* Ledger */
.r1099 .r-ledger { padding: 8px 24px 4px; }
.r1099 .r-row { display: grid; grid-template-columns: minmax(150px, 1.6fr) minmax(150px, 1.3fr) 110px 110px 112px minmax(170px, 1.3fr) 36px; gap: 10px; align-items: center; padding-block: 10px; border-bottom: 1px dashed var(--r-line); }
.r1099 .r-row.r-hdr { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--r-muted); border-bottom: 1px solid var(--r-line); padding-block: 12px 8px; align-items: end; }
.r1099 .r-row.r-hdr small { display: block; text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 0.6875rem; }
.r1099 .r-row input, .r1099 .r-row select { width: 100%; min-width: 0; }
/* modern.css styles every input and select with !important (padding 0.75rem 1rem,
   white background, fixed text color), which truncates the ledger's narrow columns
   and hides the missing-W-9 state. These overrides stay scoped to this page. */
.r1099 .r-row input, .r1099 .r-row select, .r1099 .r-capture input[type="email"] { padding: 7px 8px !important; border: 1px solid var(--r-line) !important; border-radius: 4px !important; background: var(--th-bg-alt) !important; color: var(--r-ink) !important; }
.r1099 .r-row select { padding-right: 24px !important; }
.r1099 .r-row input.r-money { text-align: right; font-variant-numeric: tabular-nums; }
.r1099 .r-row select.r-w9-missing { border-color: var(--r-bad) !important; color: var(--r-bad) !important; }
.r1099 .r-rm { width: 32px; height: 32px; border: 1px solid transparent; background: none; border-radius: 4px; cursor: pointer; color: var(--r-muted); font-size: 1.25rem; line-height: 1; }
.r1099 .r-rm:hover { border-color: var(--r-line); color: var(--r-ink); }
/* Field labels: visually hidden on the desktop grid (the header row labels the
   columns), shown on the stacked mobile cards. Never display:none, so every input
   keeps its programmatic label at every width. */
.r1099 .r-mlabel { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.r1099 .r-status { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.r1099 .r-chip { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 600; padding: 3px 9px; border-radius: var(--th-radius-pill); white-space: nowrap; }
.r1099 .r-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.r1099 .c-req { background: var(--r-info-soft); color: var(--r-ink); }
.r1099 .c-bad { background: var(--r-bad-soft); color: var(--r-bad); }
.r1099 .c-watch { background: var(--r-accent-soft); color: var(--r-accent-ink); }
.r1099 .c-none { background: var(--r-sunk); color: var(--r-muted); }
.r1099 .c-ok { background: var(--r-good-soft); color: var(--r-good); }
.r1099 .r-status .r-note { font-size: 0.75rem; color: var(--r-muted); line-height: 1.3; }
.r1099 .r-copyreq { align-self: flex-start; background: none; border: 0; padding: 0; color: var(--r-accent-ink); font-weight: 600; font-size: 0.8125rem; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.r1099 .r-copybox { width: 100%; min-height: 120px; margin-top: 8px; font-size: 0.8125rem; }
.r1099 .r-ledger-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 0 18px; font-size: 0.8125rem; color: var(--r-muted); }
.r1099 .r-ledger-foot span { flex: 1 1 280px; }

.r1099 .r-after { display: grid; grid-template-columns: 1.3fr 1fr; border-top: 1px solid var(--r-line); }
.r1099 .r-priority { padding: 22px 24px; border-right: 1px solid var(--r-line); min-width: 0; }
.r1099 .r-priority ol { margin: 12px 0 0; padding-left: 22px; display: grid; gap: 10px; }
.r1099 .r-priority .r-empty { margin-top: 12px; color: var(--r-muted); }
.r1099 .r-efile { margin-top: 16px; font-size: 0.875rem; background: var(--r-sunk); border-radius: var(--th-radius-sm); padding: 10px 12px; }
.r1099 .r-capture { padding: 22px 24px; background: var(--r-slate); color: var(--r-on-slate); }
.r1099 .r-capture h3 { color: #fff; }
.r1099 .r-capture p { color: #cbd5e1; margin: 6px 0 0; font-size: 0.9375rem; }
.r1099 .r-capture form { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.r1099 .r-capture input[type="email"] { flex: 1 1 200px; min-width: 0; padding: 10px 12px !important; border-radius: var(--th-radius-sm) !important; border: 1px solid #475569 !important; background: #0f172a !important; color: #f1f5f9 !important; }
.r1099 .r-capture .r-fine { font-size: 0.75rem; color: #94a3b8; margin-top: 10px; }
.r1099 .r-capture .r-fine a { color: #cbd5e1; }
.r1099 .r-capture .r-done { margin-top: 14px; font-size: 0.875rem; background: rgba(201, 149, 44, 0.15); border-left: 3px solid var(--r-accent); padding: 8px 12px; color: #f1f5f9; }
.r1099 .r-capture .r-done a { color: var(--th-accent-light, #e5c367); }
.r1099 .r-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Paperwork cards */
.r1099 .r-forms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.r1099 .r-form-card { background: var(--r-surface); border: 1px solid var(--r-line); border-radius: var(--th-radius-sm); padding: 20px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.r1099 .r-form-id { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--r-ink); padding-bottom: 8px; }
.r1099 .r-form-id b { font-size: 1.75rem; font-weight: 800; }
.r1099 .r-form-id span { font-size: 0.75rem; color: var(--r-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.r1099 .r-form-card dl { margin: 0; display: grid; gap: 8px; font-size: 0.9375rem; }
.r1099 .r-form-card dt { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--r-muted); }
.r1099 .r-form-card dd { margin: 0; }

/* Timeline */
.r1099 .r-timeline { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 3px solid var(--r-ink); margin-top: 8px; }
.r1099 .r-tl { padding: 16px 16px 0 0; position: relative; min-width: 0; }
.r1099 .r-tl::before { content: ""; position: absolute; top: -9px; left: 0; width: 15px; height: 15px; border-radius: 50%; background: var(--th-bg-alt); border: 3px solid var(--r-ink); }
.r1099 .r-tl.r-now::before { background: var(--r-accent); border-color: var(--r-accent); }
.r1099 .r-tl .r-d { font-weight: 800; font-size: 1.25rem; margin-top: 8px; }
.r1099 .r-tl p { font-size: 0.9375rem; color: var(--r-muted); margin: 4px 0 0; }

/* Penalty tiers */
.r1099 .r-pen { margin-top: 40px; background: var(--r-surface); border: 1px solid var(--r-line); border-radius: var(--th-radius-sm); padding: 22px; }
.r1099 .r-pen > p { color: var(--r-muted); margin: 4px 0 0; font-size: 0.9375rem; }
.r1099 .r-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; align-items: end; margin-top: 20px; height: 200px; }
.r1099 .r-step { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-width: 0; }
.r1099 .r-bar { background: var(--r-sunk); border-top: 3px solid var(--r-muted); border-radius: 3px 3px 0 0; display: flex; align-items: flex-start; justify-content: center; padding-top: 6px; font-weight: 800; font-size: 1.25rem; }
.r1099 .r-step.r-max .r-bar { border-top-color: var(--r-bad); color: var(--r-bad); background: var(--r-bad-soft); }
.r1099 .r-step small { display: block; font-size: 0.8125rem; color: var(--r-muted); margin-top: 8px; line-height: 1.3; }
.r1099 .r-pen .r-fine { font-size: 0.8125rem; color: var(--r-muted); margin: 16px 0 0; }

/* True Home section */
.r1099 .r-th { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; background: var(--r-slate); color: var(--r-on-slate); border-radius: var(--th-radius); padding: 36px; }
.r1099 .r-th h2 { color: #fff; }
.r1099 .r-th p { color: #cbd5e1; margin-top: 10px; }
.r1099 .r-th .r-fine { font-size: 0.8125rem; color: #94a3b8; margin-top: 12px; }
/* Deliberately divs, not a <ul>: some public-site list styles force their own colors. */
.r1099 .r-th-points { display: grid; gap: 14px; }
.r1099 .r-th-point { display: grid; grid-template-columns: 28px 1fr; gap: 10px; }
.r1099 .r-th-point::before { content: ""; width: 18px; height: 18px; margin-top: 4px; border: 2px solid var(--r-accent); border-radius: 3px; background: linear-gradient(var(--r-accent), var(--r-accent)) center / 8px 8px no-repeat; }
.r1099 .r-th-point b { display: block; color: #fff; }

/* FAQ */
.r1099 .r-faq { max-width: 780px; }
.r1099 .r-faq details { border-bottom: 1px solid var(--r-line); padding-block: 16px; }
.r1099 .r-faq summary { cursor: pointer; font-weight: 600; font-size: 1.125rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.r1099 .r-faq summary::-webkit-details-marker { display: none; }
.r1099 .r-faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--r-accent-ink); }
.r1099 .r-faq details[open] summary::after { content: "\2212"; }
.r1099 .r-faq details p { margin: 10px 0 0; color: var(--r-muted); max-width: 68ch; }

.r1099 .r-disc { font-size: 0.8125rem; color: var(--r-muted); border-top: 1px solid var(--r-line); padding-block: 24px 48px; }
.r1099 .r-disc p { max-width: 90ch; margin: 0; }
.r1099 .r-disc p + p { margin-top: 8px; }

.r1099 .r-toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--r-ink); color: #fff; padding: 10px 16px; border-radius: var(--th-radius-sm); font-size: 0.875rem; font-weight: 600; z-index: 1050; }

@media (max-width: 900px) {
    .r1099 .r-after, .r1099 .r-th { grid-template-columns: 1fr; }
    .r1099 .r-priority { border-right: 0; border-bottom: 1px solid var(--r-line); }
    .r1099 .r-summary { grid-template-columns: repeat(2, 1fr); }
    .r1099 .r-box:nth-child(2) { border-right: 0; }
    .r1099 .r-box:nth-child(-n+2) { border-bottom: 1px solid var(--r-line); }
    .r1099 .r-forms { grid-template-columns: 1fr; }
    .r1099 .r-timeline { grid-template-columns: 1fr 1fr; row-gap: 28px; }
    .r1099 .r-row { grid-template-columns: 1fr 1fr; gap: 8px 10px; padding: 14px; border: 1px solid var(--r-line); border-radius: var(--th-radius-sm); margin-bottom: 10px; position: relative; }
    .r1099 .r-row.r-hdr { display: none; }
    .r1099 .r-row .f-name, .r1099 .r-row .f-ent, .r1099 .r-row .f-status { grid-column: 1 / -1; }
    .r1099 .r-row .f-name { padding-right: 34px; }
    .r1099 .r-row .f-rm { position: absolute; right: 6px; top: 6px; }
    .r1099 .r-mlabel { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; display: block; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--r-muted); margin-bottom: 3px; }
    .r1099 .r-ledger { padding: 14px; }
    .r1099 .r-th { padding: 24px; }
}

@media (max-width: 480px) {
    .r1099 .r-box { padding: 14px 16px; }
    .r1099 .r-box .r-val { font-size: 1.75rem; }
    .r1099 .r-tool-head, .r1099 .r-priority, .r1099 .r-capture { padding: 18px 16px; }
    .r1099 .r-steps { height: 170px; }
    .r1099 .r-bar { font-size: 1rem; }
    .r1099 .r-tick b { font-size: 2rem; }
}
