/* Eric Meyer's 2008 reset, kept at about a third of its size.
   Scrutinised rule by rule; see migration/plans/scss-purge.md, D9 and D19. */

/* Every width calculation in the app assumes this. The -moz- prefix went with
   Firefox 29 in 2014. */
* {
  box-sizing: border-box;
}

/* The whole stylesheet corpus was authored against zeroed margins, so this is
   load-bearing: drop it and every heading, list and paragraph moves.

   Removed from the original list, each checked against the UA defaults in
   Chromium rather than assumed:

   - applet, font, center, strike, acronym. Obsolete, and Chromium gives each of
     them zero margin, padding and border at font-size 16px, so zeroing them
     changes nothing either way. Measured, not assumed. center and applet are
     both live in templates, which is why it was worth measuring.
   - xmp. Chromium gives it a 16px block margin, so this one would be a real
     change — but no template has an <xmp> element. The only match in the tree
     is inside a string in vendored YUI.

   dialog was on the list to remove and is NOT removed. The reasoning for
   dropping it was that the UA gives it margin:auto for centring, padding and a
   border, so zeroing them fights the UA — and that no <dialog> was in the
   codebase, making it a landmine rather than a live bug. The second half was
   wrong: fine_uploader_templates.tt carries three, for the upload alert,
   confirm and prompt. The old reset zeroed them, so leaving it out changes what
   those three dialogs look like. Fighting the UA is what the app does today and
   restyling it is not this work.

   tt and big were on the list to remove and are NOT removed. Both are obsolete
   HTML and both are live in the templates. big is load-bearing: Chromium sizes
   it at 19.2px and font-size:100% here is what holds it at 16px, so dropping it
   would grow the function-sheet headings. tt measures 16px either way wherever
   an ancestor states a font size, which is everywhere in this app, so keeping it
   costs nothing and reproduces today exactly. */
a, abbr, address, article, aside, audio, b, big, blockquote, body, canvas,
caption, cite, code, dd, del, details, dfn, dialog, div, dl, dt, em, embed,
fieldset, figcaption, figure, footer, form, h1, h2, h3, h4, h5, h6, header,
hgroup, hr, html, i, iframe, img, ins, kbd, label, legend, li, mark, menu,
meter, nav, object, ol, output, p, pre, progress, q, rp, rt, ruby, s, samp,
section, small, span, strong, sub, summary, sup, table, tbody, td, tfoot, th,
thead, time, tr, tt, u, ul, var, video {
  border: 0;
  margin: 0;
  padding: 0;
  font-size: 100%;
}

/* Not a frameset-era leftover. Arrange.scss sets body.session-arrange to
   height:100% with a main{height:100%} inside, and a percentage height on body
   resolves against the viewport only if html carries one too. Remove this and
   every percentage-height layout chained off body collapses to content height.
   min-height:100dvh would be the modern spelling and is not equivalent, so it is
   outside this work's scope guard. See D19. */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

th, td, caption {
  font-weight: 400;
  vertical-align: top;
}

q {
  quotes: none;
}

/* The doubled content declaration was a 2008 IE7 hack. */
q::before,
q::after {
  content: none;
}

sub, sup, small {
  font-size: 75%;
}

/* position:relative with no offset moves nothing, and it is not inert: it makes
   the element a containing block for any absolutely positioned descendant. No
   template puts one inside a sub or sup today, and finding out the hard way is
   not worth the two words this would save. */
sub, sup {
  line-height: 0;
  position: relative;
}

/* Kept exactly as the bundle had it, pseudo-elements and all.
   `display: flow-root` is the modern spelling and it is NOT equivalent: it makes
   the element a block formatting context, which changes its own height and the
   position of what sits beside it. Rendered both ways over the 161 pages whose
   only difference was this rule, 24 of them moved -- one amersa container is
   43px tall as flow-root and collapses to nothing with the hack, and text beside
   it shifted several hundred pixels. */
.clearfix::before, .clearfix::after {
  content: '.';
  display: block;
  overflow: hidden;
  visibility: hidden;
  font-size: 0;
  line-height: 0;
  width: 0;
  height: 0;
}

.clearfix::after {
  clear: both;
}

/* Deleted, and why:
   - article,aside,details,… { display:block } was the HTML5 shiv for IE8,
     native everywhere since 2011.
   - b,strong { font-weight:700 } restated the UA default.
   - A commented-out second clearfix variant at the end of the file. */
