/* NewsML-G2 documentation site — Specification, Guidelines and schema reference.
   IPTC house style, shared with the Media Provenance guide
   (media-provenance-guide.iptc.org): Montserrat display / Lora body, navy and
   blue with green accents. Built by tools/sitestyle; see its README. */

@font-face { font-family: Montserrat; font-weight: 400; src: url(fonts/montserrat-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: Montserrat; font-weight: 400; font-style: italic; src: url(fonts/montserrat-latin-400-italic.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: Montserrat; font-weight: 600; src: url(fonts/montserrat-latin-600-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: Montserrat; font-weight: 700; src: url(fonts/montserrat-latin-700-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: Montserrat; font-weight: 800; src: url(fonts/montserrat-latin-800-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: Lora; font-weight: 400; src: url(fonts/lora-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: Lora; font-weight: 400; font-style: italic; src: url(fonts/lora-latin-400-italic.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: Lora; font-weight: 700; src: url(fonts/lora-latin-700-normal.woff2) format("woff2"); font-display: swap; }

:root {
  --blue: #2C55AA; --navy: #1B3F8A; --tint: #EAF1F8; --tint2: #F4F7FB;
  --green: #2F7A2B; --green-dark: #1F5A22; --green-tint: #EEF7E8;
  --ink: #21272A; --grey: #5B6770; --line: #D8E1EE; --sky: #9DC3EA;
  --sans: Montserrat, "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --serif: Lora, Georgia, serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --bar: 64px;
}

* { box-sizing: border-box; }
/* No smooth scrolling: with it, Chromium can skip the jump to a #fragment on
   page load, which every old single-page link and search result relies on. */
body {
  margin: 0; font-family: var(--serif); color: var(--ink);
  font-size: 17px; line-height: 1.65; background: #FFFFFF;
}
[id] { scroll-margin-top: calc(var(--bar) + 12px); }

/* ---- draft bar + top bar ---- */
.draftbar {
  background: var(--green-tint); color: var(--green-dark);
  font-family: var(--sans); font-size: 12.5px; font-weight: 600;
  text-align: center; padding: 6px 16px; border-bottom: 1px solid #CFE6B8;
}
.topbar {
  display: flex; align-items: center; gap: 24px;
  height: var(--bar); padding: 0 28px; background: var(--navy);
  position: sticky; top: 0; z-index: 40; font-family: var(--sans);
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; flex: none; }
.logo { height: 40px; width: 40px; }
.brand-text { color: #fff; font-size: 16px; line-height: 1.3; white-space: nowrap; }
.brand-text .for { display: block; color: var(--sky); font-size: 12.5px; font-weight: 400; }
.parts { display: flex; gap: 20px; flex: 1; justify-content: flex-end; overflow-x: auto; }
.parts a {
  color: #C9D8EC; text-decoration: none; white-space: nowrap; font-size: 14px;
  font-weight: 600; padding: 6px 0; border-bottom: 2px solid transparent;
}
.parts a:hover { color: #fff; }
.parts a.here { color: #fff; border-bottom-color: #B7DC6A; }
.parts a.ext::after { content: "↗"; font-size: 10px; opacity: .6; margin-left: 3px; vertical-align: super; }
.menu-toggle {
  display: none; font-size: 13px; font-weight: 700;
  color: #fff; border: 1px solid #3D63B0; border-radius: 6px;
  padding: 6px 14px; cursor: pointer; user-select: none;
}

/* ---- search ---- */
.search { position: relative; flex: none; }
.search input {
  width: 260px; padding: 7px 12px; border-radius: 6px; font-family: var(--sans);
  border: 1px solid #3D63B0; background: #24498F; color: #fff; font-size: 13px;
}
.search input::placeholder { color: var(--sky); }
.search input:focus { outline: 2px solid var(--sky); outline-offset: -1px; }
.results {
  position: absolute; top: 42px; right: 0; width: 440px; max-height: 70vh; overflow: auto;
  background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 32px rgba(27, 63, 138, .2); display: none;
}
.results.open { display: block; }
.results a {
  display: block; padding: 9px 14px; text-decoration: none; color: var(--ink);
  border-bottom: 1px solid var(--tint2); font-size: 14px; line-height: 1.4;
}
.results a:last-child { border-bottom: 0; }
.results a:hover, .results a.sel { background: var(--tint); }
.results .t { font-weight: 700; color: var(--navy); }
.results .kind {
  float: right; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--green); margin-left: 10px; padding-top: 2px;
}
.results .x {
  display: block; font-size: 12.5px; color: var(--grey);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.results .none { padding: 14px; color: var(--grey); font-size: 13px; }

/* ---- layout ---- */
.layout {
  display: grid; grid-template-columns: 300px minmax(0, 1fr) 240px;
  max-width: 1480px; margin: 0 auto; align-items: start;
}
.sidebar, nav.toc {
  position: sticky; top: var(--bar); max-height: calc(100vh - var(--bar));
  overflow-y: auto; font-family: var(--sans);
}
.sidebar { padding: 28px 20px 40px 28px; border-right: 1px solid var(--line); height: calc(100vh - var(--bar)); }
.sidebar a {
  display: flex; gap: 10px; align-items: baseline;
  padding: 6px 10px; margin: 1px 0; border-radius: 6px;
  color: var(--ink); text-decoration: none; font-size: 13.5px; line-height: 1.35;
}
.sidebar a:hover { background: var(--tint2); }
.sidebar a.active { background: var(--tint); color: var(--navy); font-weight: 600; }
.sidebar a .n {
  flex: 0 0 18px; text-align: right;
  color: var(--blue); font-weight: 700; font-size: 12.5px;
}
.sidebar .subs { margin: 2px 0 8px 0; }
.sidebar .subs a { padding: 4px 10px 4px 38px; font-size: 12.5px; color: var(--grey); }
.sidebar .subs a:hover { color: var(--navy); }
.sidebar .nav-part {
  margin: 18px 0 4px 0; font-size: 11px; font-weight: 700; line-height: 1.4;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--green);
}
.sidebar .nav-part:first-child { margin-top: 0; }
.sidebar code { font-family: var(--mono); font-size: 12.5px; background: none; padding: 0; }
.sidebar a.active code { color: var(--navy); }

nav.toc { padding: 40px 24px 40px 8px; font-size: 13px; line-height: 1.4; }
nav.toc h2 {
  font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--green); margin: 0 0 10px 0;
}
nav.toc a {
  display: block; color: var(--grey); text-decoration: none;
  padding: 4px 0 4px 12px; border-left: 2px solid var(--line);
}
nav.toc a:hover { color: var(--navy); }
nav.toc a.l3 { padding-left: 24px; font-size: 12.5px; }
nav.toc a.active { color: var(--navy); border-left-color: var(--blue); font-weight: 600; }

main { min-width: 0; padding: 40px 48px 56px 48px; }
article { max-width: 820px; }

/* ---- page header ---- */
.kicker {
  font-family: var(--sans); font-weight: 600; font-size: 12.5px;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--green);
  margin: 0 0 6px 0;
}
h1 {
  font-family: var(--sans); font-weight: 800; font-size: 34px; line-height: 1.2;
  color: var(--navy); margin: 0 0 22px 0;
}
h1 .chnum {
  display: inline-block; margin-right: 14px; color: var(--blue); opacity: 0.35;
  font-weight: 300; font-size: 44px; vertical-align: -3px;
}
h1 code { font-family: var(--mono); font-size: .9em; background: none; padding: 0; }

/* ---- content ----
   The books number their sections from h3 down (the chapter title is the
   page's h1); the reference uses h2 and h3. */
article h2, .book h3 {
  font-family: var(--sans); font-weight: 700; font-size: 21px; color: var(--blue);
  margin: 40px 0 10px 0; line-height: 1.3;
}
article h3, .book h4 {
  font-family: var(--sans); font-weight: 700; font-size: 16.5px; color: var(--navy);
  margin: 30px 0 8px 0; line-height: 1.35;
}
.book h5, .book h6 {
  font-family: var(--sans); font-weight: 700; font-size: 15px; color: var(--ink);
  margin: 24px 0 6px 0; line-height: 1.4;
}
p { margin: 0 0 14px 0; }
a { color: var(--blue); text-decoration-color: var(--sky); text-underline-offset: 2px; }
a:hover { color: var(--navy); }
h2 a.anchor, h3 a.anchor, h4 a.anchor, h5 a.anchor, h6 a.anchor { display: none; }
ul, ol { margin: 0 0 14px 0; padding-left: 26px; }
li { margin-bottom: 7px; }
li > p { margin-bottom: 4px; }
li::marker { color: var(--blue); }
ol.loweralpha { list-style-type: lower-alpha; }
strong { font-weight: 700; }
hr { border: none; border-top: 1px solid var(--line); margin: 28px 0; }
dl { margin: 0 0 14px 0; }
dt, .hdlist1 { font-family: var(--sans); font-weight: 700; font-size: 15px; color: var(--navy); }
dd { margin: 2px 0 12px 22px; }
kbd {
  font-family: var(--mono); font-size: .8em; border: 1px solid var(--line);
  border-bottom-width: 2px; border-radius: 4px; padding: 1px 6px;
}

code {
  font-family: var(--mono); font-size: 0.82em;
  background: #F1F4F9; padding: 1px 5px; border-radius: 4px;
}
a code { background: var(--tint); }
pre {
  font-family: var(--mono); font-size: 13px; line-height: 1.55;
  background: #F6F8F8; border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  padding: 16px 18px; border-radius: 6px;
  overflow-x: auto; margin: 0 0 18px 0;
}
pre code { background: none; padding: 0; font-size: 13px; }
/* CodeRay, as Asciidoctor emits it for the XML examples */
pre .tag { color: var(--navy); }
pre .attribute-name { color: var(--green-dark); }
pre .string, pre .attribute-value { color: var(--blue); }
pre .delimiter { color: #6E7E8A; }
pre .comment { color: var(--grey); font-style: italic; }
pre .preprocessor { color: #8A5A00; }
pre .error { color: inherit; background: none; }
.conum { font-family: var(--sans); font-weight: 700; color: var(--green); }

/* block titles: table and figure captions, example names */
.title {
  font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--grey);
  margin: 18px 0 6px 0; line-height: 1.5;
}

/* ---- tables ---- */
table {
  width: 100%; border-collapse: collapse; margin: 0 0 22px 0;
  font-size: 14.5px; font-family: var(--sans); line-height: 1.45;
}
table.fit-content { width: auto; }
caption.title { caption-side: top; text-align: left; }
th {
  background: var(--blue); color: #fff; text-align: left;
  font-size: 13px; font-weight: 700; padding: 9px 12px; vertical-align: top;
}
th a, th code { color: #fff; }
td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:nth-child(even) > td { background: var(--tint2); }
td p.tableblock, td .paragraph p { margin: 0 0 6px 0; }
td p.tableblock:last-child, td .paragraph:last-child p { margin-bottom: 0; }
td code { font-size: 0.86em; }
td pre { margin: 6px 0; }
/* reference: the "declared in" and group rows that divide an attribute table */
td[colspan] {
  background: var(--tint) !important; color: var(--navy); font-weight: 700;
  font-size: 12.5px; letter-spacing: .02em;
}
:target { background: #FFF6D8; transition: background .6s ease; }
i.fa-check::before { content: "✓"; color: var(--green); font-style: normal; font-weight: 700; }
i.fa-close::before { content: "✗"; color: #B3261E; font-style: normal; font-weight: 700; }

/* ---- admonitions and sidebars ---- */
.admonitionblock { margin: 24px 0; }
.admonitionblock > table {
  background: var(--tint); border-left: 4px solid var(--blue);
  border-radius: 0 8px 8px 0; margin: 0;
}
.admonitionblock td { display: block; border: 0; background: none !important; padding: 0 20px; }
.admonitionblock td.icon { padding-top: 14px; }
.admonitionblock td.content { padding-bottom: 12px; font-family: var(--serif); font-size: 16px; line-height: 1.6; }
.admonitionblock td.icon i::before, .admonitionblock td.icon .title {
  content: attr(title); font-family: var(--sans); font-weight: 700; font-size: 12px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--blue); font-style: normal;
}
.admonitionblock td.icon .title { margin: 0; }
.admonitionblock.warning > table { background: #FFF4E5; border-left-color: #C26A00; }
.admonitionblock.warning td.icon i::before { color: #A15800; }
.admonitionblock p:last-child { margin-bottom: 0; }
.sidebarblock {
  margin: 24px 0; padding: 18px 22px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--tint2);
}
.sidebarblock > .content > .title { margin-top: 0; color: var(--navy); font-size: 14px; }
.exampleblock > .content { border: 1px solid var(--line); border-radius: 8px; padding: 14px 18px; }
.quoteblock { margin: 20px 0; padding-left: 16px; border-left: 3px solid var(--blue); font-style: italic; color: var(--grey); }

/* ---- figures ---- */
.imageblock { margin: 26px 0; }
.imageblock .content { border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.imageblock img { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.imageblock .title { margin-top: 8px; }
img { max-width: 100%; height: auto; }

/* ---- prev/next ---- */
.pagenav {
  display: flex; gap: 16px; justify-content: space-between; max-width: 820px;
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line);
  font-family: var(--sans);
}
.pagenav a {
  flex: 1; max-width: 48%; text-decoration: none; color: var(--navy);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px;
  font-weight: 600; font-size: 14.5px; line-height: 1.35;
}
.pagenav a:hover { border-color: var(--blue); background: var(--tint2); }
.pagenav a span {
  display: block; font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--grey); margin-bottom: 3px;
}
.pagenav a.next { margin-left: auto; text-align: right; }

/* ---- footer ---- */
footer {
  border-top: 1px solid var(--line); margin-top: 20px;
  padding: 22px 28px 34px 28px; text-align: center;
  font-family: var(--sans); font-size: 13px; color: var(--grey);
}
footer p { margin: 0 0 6px 0; }

/* ---- schema reference landing page ---- */
.stats { display: flex; flex-wrap: wrap; gap: 14px 34px; margin: 6px 0 26px 0; font-family: var(--sans); }
.stats .stat b { display: block; font-size: 28px; font-weight: 800; color: var(--navy); line-height: 1.2; }
.stats .stat span {
  font-size: 11px; font-weight: 700; color: var(--green);
  text-transform: uppercase; letter-spacing: .12em;
}
.arch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 16px 0 26px 0; }
.arch .item.wide { grid-column: 1 / -1; text-align: center; }
.arch .item {
  display: block; text-decoration: none; color: var(--ink); font-family: var(--sans);
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
}
.arch .item:hover { background: var(--tint2); border-color: var(--blue); }
.arch .item code { background: none; padding: 0; color: var(--navy); font-weight: 700; font-size: 14px; }
.arch .item .d { display: block; font-size: 13px; margin: 6px 0 8px 0; line-height: 1.45; }
.arch .item .n {
  display: block; font-size: 11px; font-weight: 700; color: var(--green);
  text-transform: uppercase; letter-spacing: .1em;
}
.dls { display: flex; gap: 14px; flex-wrap: wrap; }
a.dl {
  display: inline-block; text-decoration: none; color: var(--navy); font-family: var(--sans);
  border: 1.5px solid var(--blue); border-radius: 10px; padding: 11px 18px;
}
a.dl:hover { background: var(--tint2); }
a.dl b { display: block; font-size: 14px; }
a.dl span { display: block; font-size: 12px; color: var(--grey); margin-top: 2px; font-weight: 400; }

/* ---- responsive ---- */
@media (max-width: 1320px) {
  .layout { grid-template-columns: 290px minmax(0, 1fr); max-width: 1280px; }
  nav.toc { display: none; }
}
@media (max-width: 1150px) {
  .arch { grid-template-columns: repeat(2, 1fr); }
  .parts a.ext { display: none; }
  .search input { width: 200px; }
}
@media (max-width: 900px) {
  :root { --bar: 0px; }
  .topbar { position: static; height: auto; flex-wrap: wrap; gap: 10px 16px; padding: 12px 20px; }
  .brand { flex: 1; }
  .menu-toggle { display: inline-block; }
  .parts { order: 3; flex: 1 1 100%; justify-content: flex-start; }
  .parts a.ext { display: inline; }
  .search { order: 4; flex: 1 1 100%; }
  .search input { width: 100%; }
  .results { width: 100%; }
  .layout { display: block; }
  .sidebar {
    display: none; position: static; height: auto; max-height: none; border-right: none;
    border-bottom: 1px solid var(--line); padding: 18px 24px;
  }
  #navtoggle:checked ~ .layout .sidebar { display: block; }
  main { padding: 28px 22px 40px 22px; }
  h1 { font-size: 27px; }
  h1 .chnum { font-size: 34px; }
  .pagenav { flex-direction: column; }
  .pagenav a { max-width: 100%; }
  .pagenav a.next { text-align: left; }
  table { display: block; overflow-x: auto; }
  .admonitionblock > table { display: table; }
}
@media (max-width: 620px) {
  .arch { grid-template-columns: 1fr; }
}
