/* ============================================================================
   ATLAS REDESIGN — Seller Net Sheet (calculator) styles  ·  Wave-3 polish 2026-07-04
   Branch: atlas-redesign-2026-06-29

   Prefix: .rd-seller-net-sheet. Tokens only (--r-*) so Calm (almanac) +
   Operator themes both work automatically. No hardcoded hex except the
   print-media overrides (paper is always white/black regardless of theme).
   No class substrings -card/-panel/-badge/status-/rail. Two-column
   calculator: inputs | output, with a dark hero result (matches the Deal
   Analyzer) and a line-item breakdown with hint sub-labels.
   ========================================================================== */

.rd-seller-net-sheet {
  font-family: var(--r-font-body);
  color: var(--r-body);
  padding: var(--r-gutter);
  max-width: var(--r-page-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ---- page header --------------------------------------------------------- */
.rd-net-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rd-net-eyebrow {
  font-family: var(--r-font-mono);
  font-size: var(--r-fs-eyebrow);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--r-clay);
}
.rd-net-h1 {
  font-family: var(--r-font-display);
  font-size: var(--r-fs-h1);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.01em;
  color: var(--r-ink);
  margin: 0;
}
.rd-net-sub {
  margin: 2px 0 0;
  font-size: var(--r-fs-body);
  line-height: 1.5;
  color: var(--r-muted);
  max-width: 640px;
}

/* ---- two-column grid ----------------------------------------------------- */
.rd-net-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
  min-height: 0;
}

/* ---- shared card --------------------------------------------------------- */
.rd-net-tile {
  background: var(--r-surface);
  border: 1px solid var(--r-border);
  border-radius: var(--r-radius-card);
  box-shadow: var(--r-shadow-card);
  padding: 20px 22px;
}

/* ---- inputs column ------------------------------------------------------- */
.rd-net-card-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.rd-net-card-title {
  margin: 0;
  font-family: var(--r-font-display);
  font-size: var(--r-fs-h2);
  font-weight: 600;
  color: var(--r-ink);
}

/* prefill picker (hidden until usable real listings exist) */
.rd-net-prefill {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}
.rd-net-prefill[data-empty="1"] { display: none; }
.rd-net-prefill[data-error="true"] {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--r-alert);
  padding: 6px 11px;
  border-radius: var(--r-radius-control);
  background: color-mix(in srgb, var(--r-alert) 8%, var(--r-surface-2));
}
.rd-net-prefill[data-error="true"] label,
.rd-net-prefill[data-error="true"] .rd-net-select {
  display: none;
}
.rd-net-prefill[data-error="true"]::after {
  content: "Couldn't load listings — try again";
}
.rd-net-prefill-label {
  font-family: var(--r-font-mono);
  font-size: var(--r-fs-eyebrow);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--r-faint);
}
.rd-net-select {
  appearance: none;
  font-family: var(--r-font-body);
  font-size: 12.5px;
  color: var(--r-body);
  background: var(--r-surface-2);
  border: 1px solid var(--r-border);
  border-radius: var(--r-radius-control);
  padding: 7px 30px 7px 11px;
  max-width: 240px;
  cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--r-faint) 50%),
    linear-gradient(135deg, var(--r-faint) 50%, transparent 50%);
  background-position: right 13px center, right 8px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  transition: border-color var(--r-dur) var(--r-ease);
}
.rd-net-select:hover { border-color: var(--r-primary); }
.rd-net-select:focus-visible { outline: var(--r-focus); outline-offset: 2px; }

/* field grid (2-up; a field can span the full row via inline style) */
.rd-net-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.rd-net-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.rd-net-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--r-muted);
}
.rd-net-input {
  width: 100%;
  height: 42px;
  box-sizing: border-box;
  border: 1px solid var(--r-border);
  border-radius: var(--r-radius-control);
  padding: 0 13px;
  font-size: 14px;
  font-family: var(--r-font-mono);
  color: var(--r-ink);
  background: var(--r-surface-2);
  outline: none;
  transition: border-color var(--r-dur) var(--r-ease),
              box-shadow var(--r-dur) var(--r-ease);
}
.rd-net-input::placeholder { color: var(--r-faint); font-family: var(--r-font-body); }
.rd-net-input:hover { border-color: color-mix(in srgb, var(--r-primary) 40%, var(--r-border)); }
.rd-net-input:focus {
  border-color: var(--r-primary);
  box-shadow: 0 0 0 3px var(--r-select);
}
.rd-net-input:focus-visible { outline: var(--r-focus); outline-offset: 2px; }
/* strip native number spinners for a cleaner calculator feel */
.rd-net-input::-webkit-outer-spin-button,
.rd-net-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rd-net-input[type="number"] { -moz-appearance: textfield; }

.rd-net-hint {
  font-size: var(--r-fs-meta);
  color: var(--r-faint);
  line-height: 1.4;
}
.rd-net-note {
  margin: 16px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--r-faint);
}

/* ---- output column ------------------------------------------------------- */
.rd-net-output {
  border-color: color-mix(in srgb, var(--r-primary) 26%, var(--r-border));
}

/* hero "estimated net to seller" tile — dark result surface, matches the
   Deal Analyzer's rd-da-hero treatment. */
.rd-net-hero {
  background: var(--r-dock-bg);
  border-radius: var(--r-radius-card);
  padding: 22px 22px;
  color: var(--r-dock-ink);
}
.rd-net-out-eyebrow {
  font-family: var(--r-font-mono);
  font-size: var(--r-fs-eyebrow);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--r-dock-muted);
}
.rd-net-out-value {
  font-family: var(--r-font-display);
  font-size: clamp(34px, 4vw, 44px);
  font-weight: 600;
  line-height: 1.05;
  color: var(--r-dock-ink);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}
.rd-net-out-value[data-tone="neg"] { color: var(--r-alert); }
.rd-net-hero-org {
  font-family: var(--r-font-mono);
  font-size: var(--r-fs-meta);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--r-dock-muted);
  margin-top: 6px;
}
.rd-net-hero-note {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--r-dock-muted);
}

/* value change tick (matches Deal Analyzer's rd-da-tick) */
@keyframes rd-net-tick { from { opacity: .35; transform: translateY(2px); } to { opacity: 1; transform: none; } }
.rd-net-out-value.is-tick, .rd-net-line-val.is-tick { animation: rd-net-tick var(--r-dur) var(--r-ease); }

/* breakdown lines */
.rd-net-breakdown {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.rd-net-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--r-body);
  padding-top: 9px;
  border-top: 1px solid var(--r-hairline-2);
}
.rd-net-line:first-child { padding-top: 0; border-top: none; }
.rd-net-line-lab { display: flex; flex-direction: column; gap: 2px; }
.rd-net-line-hint {
  font-family: var(--r-font-body);
  font-size: 10.5px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--r-faint);
}
.rd-net-line-val {
  font-family: var(--r-font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--r-ink);
  white-space: nowrap;
  padding-top: 1px;
}
.rd-net-line-neg { color: var(--r-clay-2); }

/* generate PDF button */
.rd-net-pdf {
  appearance: none;
  width: 100%;
  height: 42px;
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--r-primary);
  color: var(--r-primary-ink);
  border: none;
  border-radius: var(--r-radius-control);
  font-family: var(--r-font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: filter var(--r-dur) var(--r-ease),
              transform var(--r-dur) var(--r-ease),
              box-shadow var(--r-dur) var(--r-ease);
}
.rd-net-pdf i { font-size: 16px; }
.rd-net-pdf:hover:not(:disabled) {
  filter: brightness(1.06);
  box-shadow: var(--r-shadow-hover);
  transform: translateY(-2px);
}
.rd-net-pdf:active:not(:disabled) { transform: translateY(0); }
.rd-net-pdf:focus-visible { outline: var(--r-focus); outline-offset: 2px; }
.rd-net-pdf:disabled { opacity: .5; cursor: not-allowed; }

.rd-net-disclaimer {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--r-faint);
}

/* ---- responsive ---------------------------------------------------------- */
@media (max-width: 980px) {
  .rd-net-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .rd-net-fields { grid-template-columns: 1fr; }
  .rd-net-out-value { font-size: 34px; }
  .rd-net-card-head { align-items: flex-start; }
  .rd-net-prefill { align-items: flex-start; }
}

/* ---- print: clean one-page summary for the seller ------------------------ */
@media print {
  .rd-net-prefill, .rd-net-pdf { display: none !important; }
  .rd-seller-net-sheet { gap: 10px; }
  .rd-net-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .rd-net-hero { background: #fff; border: 2px solid #000; color: #000; }
  .rd-net-out-eyebrow, .rd-net-hero-note, .rd-net-hero-org { color: #333; }
  .rd-net-out-value, .rd-net-out-value[data-tone] { color: #000; }
  .rd-net-tile { border-color: #ccc; box-shadow: none; }
}
