/* Canonical Atlas page header. Load last; packaged readers inline this same file.
   Scope ends at the separator above the drawing. Page copy remains page-owned. */
#reader {
  width: min(100%, 1260px);
  max-width: 1260px;
  padding-top: 16px;
  padding-inline: clamp(16px, 2.8vw, 40px);
}

#reader > .masthead {
  position: relative;
  top: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 0;
  padding: 0 0 8px;
  border-bottom: 1.5px solid #243a3e;
  color: #243a3e;
  font: 14px AtlasMono, monospace;
  letter-spacing: .07em;
  flex-shrink: 0;
}

#reader > .masthead > :first-child { min-width: 0; }
#reader > .masthead :is(.mast-sub, small) {
  display: block;
  margin-top: 3px;
  font: 9px AtlasMono, monospace;
  letter-spacing: .12em;
}
#reader > .masthead .publication {
  display: block;
  grid-column: 2;
  text-align: center;
  font: 12px AtlasMono, monospace;
  letter-spacing: .07em;
  white-space: nowrap;
}
#reader > .masthead > button {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 15px;
  min-height: 30px;
  padding: 0 0 0 15px;
  border: 0;
  background: none;
  color: inherit;
  font: 13px AtlasMono, monospace;
  letter-spacing: normal;
}
#reader > .masthead > button :is(b, span) {
  margin: 0;
  font: 200 30px/1 Arial, sans-serif;
}

#reader > .title-row {
  display: block;
  position: relative;
  margin: 0;
  padding: 9px 100px 10px 0;
  border-bottom: 1px solid #c0c8bb;
  color: #243a3e;
  flex-shrink: 0;
}
#reader > .title-row .eyebrow {
  display: block;
  margin: 0 0 10px;
  font: 11px AtlasMono, monospace;
  letter-spacing: .13em;
}
#reader > .title-row :is(h1, h2) {
  display: block;
  margin: 0;
  font: 600 clamp(32px, 3.3vw, 48px)/1.03 'Segoe UI', Arial, sans-serif;
  letter-spacing: -.055em;
  white-space: normal;
}
#reader > .title-row .intro {
  display: block;
  max-width: none;
  margin: 8px 0 0;
  font: 14px/1.4 'Segoe UI', Arial, sans-serif;
  letter-spacing: normal;
  white-space: normal;
}
#reader > .title-row :is(.plate-number, .folio) {
  display: block;
  position: absolute;
  right: 0;
  bottom: 0;
  margin: 0;
  color: #9aaa9e;
  font: 96px/1 Arial, sans-serif;
  letter-spacing: -10px;
}

/* 084 previously placed the same separator on the adjacent figure. */
#reader > .title-row + .plate-body { margin-top: 0; }
#reader > .title-row + .plate-body > figure { border-top: 0; }

/* The figure label shares typography; each reader owns its toolbar and row. */
#reader .drawing-index > #view-name {
  font-family: AtlasMono, monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .6px;
}

@media (max-width: 900px) {
  #reader > .masthead { grid-template-columns: minmax(0, 1fr) auto; }
  #reader > .masthead .publication { display: none; }
  #reader > .title-row { padding-right: 90px; }
  #reader > .title-row :is(h1, h2) { font-size: clamp(26px, 5.5vw, 42px); line-height: 1.02; }
  #reader > .title-row .eyebrow { font-size: 9px; letter-spacing: .07em; }
  #reader > .title-row :is(.plate-number, .folio) { font-size: 76px; }
}

@media (max-width: 640px) {
  #reader { padding-top: 10px; padding-inline: 16px; }
  #reader > .masthead { padding-bottom: 10px; font-size: 11px; letter-spacing: .5px; }
  #reader > .masthead :is(.mast-sub, small) { font-size: 7px; }
  #reader > .masthead > button { min-height: 44px; gap: 9px; font-size: 11px; }
  #reader > .masthead > button :is(b, span) { font-size: 25px; }
  #reader > .title-row { padding: 10px 0 11px; }
  #reader > .title-row .eyebrow { margin-bottom: 7px; font-size: 8px; letter-spacing: .6px; }
  #reader > .title-row :is(h1, h2) { font-size: 26px; letter-spacing: -1.2px; }
  #reader > .title-row :is(.intro, .plate-number, .folio) { display: none; }
  #reader .drawing-index > #view-name { font-size: 9px; letter-spacing: 0; }
}

@media (min-width: 641px) and (max-height: 650px) {
  #reader { padding-top: 8px; padding-inline: 16px; }
  #reader > .masthead { padding-bottom: 5px; font-size: 11px; }
  #reader > .masthead :is(.mast-sub, small) { font-size: 7px; }
  #reader > .masthead > button { min-height: 44px; }
  #reader > .masthead > button :is(b, span) { font-size: 22px; }
  #reader > .title-row { padding: 6px 0 8px; }
  #reader > .title-row .eyebrow { margin-bottom: 4px; font-size: 8px; }
  #reader > .title-row :is(h1, h2) { font-size: 28px; }
  #reader > .title-row :is(.intro, .plate-number, .folio) { display: none; }
}

@media (max-height: 420px) {
  #reader { padding-top: 6px; padding-inline: 16px; }
  #reader > .masthead { padding-bottom: 3px; font-size: 11px; }
  #reader > .masthead > button { min-height: 44px; }
  #reader > .masthead > button :is(b, span) { font-size: 22px; }
  #reader > .masthead :is(.mast-sub, small),
  #reader > .title-row :is(.eyebrow, .intro, .plate-number, .folio) { display: none; }
  #reader > .title-row { padding: 5px 0 7px; }
  #reader > .title-row :is(h1, h2) { font-size: 24px; }
}

/* Shared dismiss control: readable cross, with a 44px pointer target. */
#reader > .masthead > button { min-width:44px; min-height:44px; padding:0; justify-content:center; }
#reader > .masthead > button :is(b,span) { font:200 36px/1 Arial,sans-serif; }
#receipt-close { min-width:44px; min-height:44px; padding:0; font:36px/1 Arial,sans-serif; }
#viewport-tools #service-close { min-width:44px; min-height:44px; padding:0; font:36px/1 Arial,sans-serif; }
