/* GA Drawings Agent — CAD line weights and drawing typography.
   Consumed by site/js/sheets.js. Monochrome throughout; the single exception is
   .t-status, the red italic issue line in the titleblock.

   Every stroke carries vector-effect:non-scaling-stroke so the weight hierarchy
   is preserved whether a sheet is shown at 1400px or 200px wide. */

:root {
  --cad-ink:    #17181a;   /* line colour — near black, never pure #000 */
  --cad-soft:   #4a4d52;   /* light linework */
  --cad-ghost:  #9aa0a6;   /* ceiling grid, hatch */
  --cad-paper:  #ffffff;
  --cad-red:    #ed1c24;

  --w-cut:   1.6px;        /* cut walls, view-title rule, ground line */
  --w-med:   1.05px;       /* internal partitions, sills, secondary profile */
  --w-obj:   0.8px;        /* object lines: joinery, openings, fittings */
  --w-fine:  0.35px;       /* hatch, swings, sub-divisions */
  --w-hair:  0.5px;        /* titleblock and sheet furniture */
}

/* ------------------------------------------------------------------ *
 * container
 * ------------------------------------------------------------------ */

svg.rv {
  display: block;
  width: 100%;
  height: auto;
  font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
  color: var(--cad-ink);
  shape-rendering: geometricPrecision;
  text-rendering: geometricPrecision;
}
svg.rv-sheet { background: var(--cad-paper); }
svg.rv-thumb { background: transparent; }

/* ------------------------------------------------------------------ *
 * line weights
 * ------------------------------------------------------------------ */

svg.rv .l-cut,
svg.rv .l-med,
svg.rv .l-obj,
svg.rv .l-fine,
svg.rv .l-thin,
svg.rv .l-hair,
svg.rv .l-grid,
svg.rv .l-dash,
svg.rv .l-cl {
  fill: none;
  stroke: var(--cad-ink);
  vector-effect: non-scaling-stroke;
  stroke-linecap: butt;
  stroke-linejoin: miter;
}

svg.rv .l-cut  { stroke-width: var(--w-cut); }
svg.rv .l-med  { stroke-width: var(--w-med); }
svg.rv .l-obj  { stroke-width: var(--w-obj); }
svg.rv .l-fine { stroke-width: var(--w-fine); stroke: var(--cad-soft); }
svg.rv .l-thin { stroke-width: var(--w-hair); }
svg.rv .l-hair { stroke-width: var(--w-hair); stroke: var(--cad-soft); }

/* ceiling grid — the lightest line on the sheet */
svg.rv .l-grid {
  stroke-width: var(--w-fine);
  stroke: var(--cad-ghost);
}

/* dashed / centre lines for the legend and datum lines */
svg.rv .l-dash {
  stroke-width: var(--w-obj);
  stroke-dasharray: 4 2.2;
}
svg.rv .l-cl {
  stroke-width: var(--w-fine);
  stroke: var(--cad-ghost);
  stroke-dasharray: 9 2 1.4 2;
}

/* an opening punched through a wall run before the jambs are drawn */
svg.rv .punch { fill: var(--cad-paper); stroke: none; }

svg.rv .sheet-bg { fill: var(--cad-paper); stroke: none; }

/* ------------------------------------------------------------------ *
 * greeked sheet notes — illegible at sheet scale, as they are in reality
 * ------------------------------------------------------------------ */

svg.rv .f-greek { fill: #3c4046; stroke: none; }
svg.rv .f-head  { fill: #17181a; stroke: none; }
svg.rv .f-key   { fill: #17181a; stroke: none; }

/* ------------------------------------------------------------------ *
 * drawing typography — Arial, as Revit ships it
 * ------------------------------------------------------------------ */

svg.rv text {
  fill: var(--cad-ink);
  stroke: none;
  font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
}

/* room name — the only text permitted inside a view.
   Carries a white halo, as a Revit room tag does, so it stays readable over a
   ceiling grid or furniture at small sizes. */
svg.rv .t-room,
svg.rv .t-room-sm,
svg.rv .t-room-ga {
  paint-order: stroke;
  stroke: #ffffff;
  stroke-width: 2.6px;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
svg.rv .t-room {
  font-size: 5.6px;
  letter-spacing: 0.6px;
  font-weight: 400;
}
svg.rv .t-room-sm {
  font-size: 4.2px;
  letter-spacing: 0.4px;
}
svg.rv .t-room-ga {
  font-size: 8px;
  letter-spacing: 0.7px;
}

/* view titles */
svg.rv .t-vnum   { font-size: 6.4px; font-weight: 700; }
svg.rv .t-vname  { font-size: 7px; font-weight: 700; letter-spacing: 0.35px; }
svg.rv .t-vname-s { font-size: 5.7px; letter-spacing: 0.15px; }
svg.rv .t-vscale { font-size: 4.6px; fill: var(--cad-soft); letter-spacing: 0.3px; }

/* titleblock */
svg.rv .t-lbl {
  font-size: 3.1px;
  letter-spacing: 0.42px;
  fill: #5c6067;
}
svg.rv .t-mini {
  font-size: 3.1px;
  letter-spacing: 0.34px;
  fill: #5c6067;
}
svg.rv .t-proj   { font-size: 9.4px; font-weight: 700; letter-spacing: 0.2px; }
svg.rv .t-dtitle { font-size: 7.6px; font-weight: 700; letter-spacing: 0.2px; }
svg.rv .t-status {
  font-size: 5.4px;
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0.28px;
  fill: var(--cad-red);
}
svg.rv .t-init { font-size: 5.6px; font-weight: 700; }
svg.rv .t-val  { font-size: 5.6px; font-weight: 700; }
svg.rv .t-dwg  { font-size: 15px; font-weight: 700; letter-spacing: 0.3px; }
svg.rv .t-rev  { font-size: 15px; font-weight: 700; }

/* GA lockup */
svg.rv .t-logo {
  font-size: 10.4px;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.2px;
}
svg.rv .t-lock {
  font-size: 4.2px;
  font-weight: 700;
  letter-spacing: 1.1px;
  fill: #34383e;
}

/* ------------------------------------------------------------------ *
 * paper presentation for previews
 * ------------------------------------------------------------------ */

.rv-paper {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .12);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 18px 44px -18px rgba(16, 24, 40, .22);
}
