/*
PANELTRONICS TECH BRIEFS (ABYC E-11 Compliance Series)
Load after the site stylesheets:
  https://platform.atimo.us/ctm/31000/structure.css   (--gray0..5, reset, .content typography)
  https://www.paneltronics.com/library/css/main.css   (--color1000..5000, .content h1/h2/h3, blockquote, lists)

Markup avoids <header>, <footer> and <aside> inside the brief: the site styles
those as page chrome (black bars, flex sidebars).

INDEX
- TOKENS
- LAYOUT
- LABELS
- MASTHEAD
- META STRIP
- AT A GLANCE
- CLAUSE REFERENCE
- HEADINGS
- REQUIREMENT / DEFINITION BOX
- CHECKLIST GRID
- STEPS
- TABLES
- CALLOUT (PULL QUOTE / FORMULA)
- ENGINEERING SUPPORT
- SERIES NOTE
- CLOSING BAND
- SERIES INDEX
- RESPONSIVE
- PRINT
*/

/*-----------------------------------------------------------  TOKENS  -------------------------*/
:root {
  --tb-green: #166534;
  --tb-green-line: #86b89a;
  --tb-green-bg: #f0fdf4;
  --tb-mono: "Courier New", Courier, monospace;
}

/*-----------------------------------------------------------  LAYOUT  -------------------------*/
.techbrief {
  max-width: 900px;
  margin: 0 auto;
  padding: 30px 40px 40px;
  line-height: 1.6;
  color: var(--color1000);
}

/*-----------------------------------------------------------  LABELS  -------------------------*/
.tb-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/*-----------------------------------------------------------  MASTHEAD  -----------------------*/
.techbrief a.back {
  margin-bottom: 9px;
  border: 1px solid var(--gray4);
}

.tb-kicker {
  margin: 0 0 6px;
  color: var(--gray4);
}

.tb-band {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 20px;
  padding: 10px 14px;
  background-color: var(--color5000);
  color: #fff;
  border-bottom: 3px solid var(--color2000);
  clear: right; /* starts below the site's floated BACK link */
}

.tb-band .tb-label:last-child {
  font-weight: 400;
  color: var(--gray3);
}

.content.techbrief h1 {
  margin: 26px 0 6px;
}

.content.techbrief p.tb-subtitle {
  margin: 0 0 18px;
  font-size: 18px;
  color: var(--gray5);
}

/*-----------------------------------------------------------  META STRIP  ---------------------*/
.tb-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 0 22px;
}

/* Briefs without a subtitle */
.content.techbrief h1 + .tb-meta { margin-top: 18px; }

.tb-meta div {
  margin: 0;
  padding: 9px 12px;
  background-color: var(--gray0);
  border-top: 3px solid var(--color1000);
  border-right: 1px solid var(--gray2);
  border-bottom: 1px solid var(--gray2);
}

.tb-meta div:last-child { border-right: none; }

.tb-meta dt {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--gray4);
}

.tb-meta dd {
  margin: 2px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--color1000);
}

/*-----------------------------------------------------------  AT A GLANCE  --------------------*/
.tb-glance {
  margin: 0 0 8px;
  padding: 14px 16px 8px 20px;
  background-color: var(--gray0);
  border: 1px solid var(--gray2);
  border-left: 3px solid var(--color1000);
}

.tb-glance .tb-label { margin-bottom: 8px; }

.content.techbrief ul.tb-bullets {
  margin: 0;
  padding: 0;
  list-style: none;
}

.content.techbrief ul.tb-bullets li {
  position: relative;
  margin: 0 0 6px;
  padding-left: 1.4em;
}

/* Site bullet: small arrow in --color4000 (the site draws it with Font Awesome \f061) */
.content.techbrief ul.tb-bullets li::before {
  content: "";
  font-size: inherit; /* main.css sets 0.5em for the Font Awesome glyph */
  position: absolute;
  left: 0.15em;
  top: 0.68em;
  bottom: auto;
  width: 0.62em;
  height: 0.62em;
  background-color: var(--color4000);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z'/%3E%3C/svg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z'/%3E%3C/svg%3E") no-repeat center / contain;
}

/*-----------------------------------------------------------  CLAUSE REFERENCE  ---------------*/
.content.techbrief code.tb-clause {
  margin: 0;
  padding: 1px 5px;
  font-family: var(--tb-mono);
  font-size: 0.9em;
  line-height: inherit;
  color: var(--color5000);
  background-color: var(--gray0);
  border: 1px solid var(--gray2);
  border-radius: 2px;
  white-space: nowrap;
}

/*-----------------------------------------------------------  HEADINGS  -----------------------*/
/* Colors come from main.css: h2 --color2000, h3 --color3000, h4 #000 */
.content.techbrief h2 {
  margin: 34px 0 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--gray2);
  line-height: 1.3;
}

.content.techbrief h3 {
  margin: 26px 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

.content.techbrief h4 {
  margin: 20px 0 6px;
  font-size: 16px;
  line-height: 1.4;
}

.tb-num {
  display: inline-block;
  min-width: 2.6em;
  font-family: var(--tb-mono);
  font-weight: 700;
  font-size: 0.9em;
}

/*-----------------------------------------------------------  REQUIREMENT / DEFINITION BOX  ---*/
.tb-req {
  margin: 0 0 18px;
  border: 1px solid var(--gray2);
  border-bottom: 1px solid var(--color1000);
}

.tb-req .tb-label {
  padding: 8px 14px;
  background-color: var(--color1000);
  color: #fff;
}

.content.techbrief .tb-req p {
  margin: 0;
  padding: 14px 20px;
  background-color: #fff;
}

/*-----------------------------------------------------------  CHECKLIST GRID  -----------------*/
.content.techbrief ul.tb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.content.techbrief ul.tb-grid li {
  margin: 0;
  padding: 8px 14px;
  background-color: var(--gray0);
  border-bottom: 1px solid var(--gray2);
}

.content.techbrief ul.tb-grid li:nth-child(odd) { border-right: 1px solid var(--gray2); }
.content.techbrief ul.tb-grid li::before { content: none; }

/*-----------------------------------------------------------  STEPS  --------------------------*/
.content.techbrief ol.tb-steps {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  counter-reset: tb-step;
}

.content.techbrief ol.tb-steps li {
  position: relative;
  margin: 0;
  padding: 8px 14px 8px 3.4em;
  list-style: none;
  border-bottom: 1px solid var(--gray2);
  counter-increment: tb-step;
}

.content.techbrief ol.tb-steps li::before {
  content: counter(tb-step);
  position: absolute;
  left: 14px;
  top: 8px;
  font-family: var(--tb-mono);
  font-weight: 700;
  color: var(--color2000);
}

/*-----------------------------------------------------------  TABLES  -------------------------*/
/* Site specs-table header style, Word left alignment */
.tb-table {
  width: 100%;
  margin: 0 0 18px;
  border-collapse: collapse;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.tb-table thead th {
  padding: 8px 14px;
  background-color: var(--color1000);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

.tb-table td,
.tb-table tbody th {
  padding: 8px 14px;
  font-size: 14px;
  color: var(--color5000);
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--gray2);
}

/* Row labels (e.g. Factor / Question) */
.tb-table tbody th { font-weight: 700; }

.tb-table tbody tr:nth-child(even) > * { background-color: #fafafa; }
.tb-table tbody tr > :first-child { width: 30%; }

/* Two equal columns (e.g. Separate vs. Integrated) */
.tb-table.tb-table-even tr > :first-child { width: 50%; }

/*-----------------------------------------------------------  CALLOUT (PULL QUOTE / FORMULA)  -*/
/* Same look as the site .content blockquote rule; also used on <div> for formulas */
.content.techbrief .tb-pull {
  margin: 0 0 16px;
  padding: 6px 20px;
  color: var(--color4000);
  border-left: 5px solid var(--color4000);
  clear: both;
}

.content.techbrief .tb-pull p {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
}

/*-----------------------------------------------------------  ENGINEERING SUPPORT  ------------*/
.tb-support {
  margin: 22px 0 6px;
  padding: 12px 16px 12px 20px;
  background-color: var(--tb-green-bg);
  border: 1px solid var(--tb-green-line);
  border-left: 5px solid var(--tb-green);
}

.tb-support .tb-label { margin-bottom: 4px; color: var(--tb-green); }

.content.techbrief .tb-support h3 {
  margin: 0 0 6px;
  font-size: 19px;
  color: var(--color1000);
}

.content.techbrief .tb-support p { font-size: 15px; margin-bottom: 8px; }

.content.techbrief .tb-support p.tb-contact {
  margin: 0;
  padding-top: 8px;
  border-top: 1px dotted var(--tb-green-line);
  font-size: 13px;
  color: var(--tb-green);
}

.tb-contact a { color: var(--tb-green); }
.tb-contact a:hover { color: var(--color4000); }

/*-----------------------------------------------------------  SERIES NOTE  --------------------*/
.tb-series {
  margin: 0 0 3px;
  border: 1px solid var(--gray2);
  border-top: 2px solid var(--color1000);
}

.tb-series .tb-label {
  padding: 8px 20px;
  background-color: #ececed;
  color: var(--color1000);
}

.tb-series-body {
  padding: 14px 20px;
  background-color: var(--gray0);
}

.content.techbrief .tb-series-body p { font-size: 15px; }

.content.techbrief .tb-series-body p.tb-disclaimer {
  margin: 0;
  padding-top: 8px;
  border-top: 1px dotted var(--gray3);
  font-size: 12px;
  line-height: 1.5;
  color: var(--gray5);
}

/* Placeholder links still to be filled in */
.tb-todo { font-weight: 700; }

/*-----------------------------------------------------------  CLOSING BAND  -------------------*/
.tb-band-end {
  border-bottom: none;
  border-top: 3px solid var(--color2000);
}

/*-----------------------------------------------------------  SERIES INDEX  -------------------*/
.content.techbrief h1.tb-rule {
  margin-top: 4px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color2000);
}

.content.techbrief h1.tb-rule + .tb-subtitle { margin-top: 10px; }

.tb-entry { margin: 28px 0 0; }

.tb-entry-band {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 4px 18px;
  padding: 8px 14px;
  background-color: var(--color1000);
  color: #fff;
}

.tb-entry-id {
  font-family: var(--tb-mono);
  font-size: 16px;
  font-weight: 700;
}

.tb-entry-band .tb-label {
  font-size: 11px;
  font-weight: 400;
  color: var(--gray3);
}

.tb-entry-clause {
  font-family: var(--tb-mono);
  font-size: 13px;
  text-align: right;
}

.content.techbrief .tb-entry h2 {
  margin: 12px 0 8px;
  padding: 0;
  border: none;
  font-size: 20px;
}

.content.techbrief p.tb-readmore { font-weight: 700; }
.tb-readmore a { color: var(--color2000); }
.tb-readmore a:hover { color: var(--color4000); }

.content.techbrief p.tb-index-foot {
  margin: 34px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--color2000);
  font-size: 13px;
  color: var(--gray5);
}

/*-----------------------------------------------------------  RESPONSIVE  ---------------------*/
/* Site section already supplies the 15px side gutter below 880px */
@media screen and (max-width: 879px) {
  .techbrief { padding: 20px 0 30px; }
}

@media screen and (max-width: 560px) {
  .tb-meta { grid-template-columns: 1fr; }
  .tb-meta div { border-right: none; }
  .content.techbrief ul.tb-grid { grid-template-columns: 1fr; }
  .content.techbrief ul.tb-grid li:nth-child(odd) { border-right: none; }
  .content.techbrief ul.tb-grid li:empty { display: none; }
  .tb-table tbody tr > :first-child { width: auto; }
  .tb-entry-band { grid-template-columns: auto 1fr; }
  .tb-entry-clause { grid-column: 1 / -1; text-align: left; }
}

/*-----------------------------------------------------------  PRINT  --------------------------*/
/* Matches the Word page: US Letter, 0.9in side margins */
@page { size: letter; margin: 0.45in 0.9in 0.45in; }

@media print {
  html, body { background: #fff; }
  section { width: auto; margin: 0; }
  .techbrief { max-width: none; padding: 0; }
  .techbrief * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tb-req, .tb-grid, .tb-steps li, .tb-table tr, .tb-pull, .tb-support, .tb-series, .tb-entry-band { break-inside: avoid; }
  .content.techbrief h2, .content.techbrief h3, .content.techbrief h4, .tb-entry-band { break-after: avoid; }
}
