/* materiales-mh.org */

:root {
  --brand: #4f7f96;
  --brand-light: #7ca8bd;
  --brand-pale: #eaf2f6;
  --text: #1d2327;
  --muted: #6b7378;
  --missing: #9aa1a6;
  --line: #d7dfe3;
  --bg: #fff;
  --st-draft-in-process: #00e5ee;
  --st-draft-complete: #ffe600;
  --st-revision-in-process: #2ecc40;
  --st-revision-complete: #e040e0;
  --st-final: #ff9933;
}

* { box-sizing: border-box; }

html { font-size: 100%; }

body {
  margin: 0 auto;
  max-width: 72rem;
  padding: 0 1rem 3rem;
  background: var(--bg);
  color: var(--text);
  font: 1rem/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17rem;
  grid-template-areas: "header header" "tabs tabs" "main side";
  column-gap: 2.5rem;
}

a { color: var(--brand); }
a:hover, a:focus { color: var(--text); }

/* header */

.site-header {
  grid-area: header;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 0;
}
.site-header img { width: 108px; height: auto; flex: none; }
.site-title { margin: 0; font-size: 1.75rem; line-height: 1.2; font-weight: 600; }
.site-title a { color: var(--brand); text-decoration: none; }

/* section tabs; the current one comes from the body class tab-<slug> */

.tabs {
  grid-area: tabs;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  border-bottom: 3px solid var(--brand-light);
  margin-bottom: 1.5rem;
}
.tabs a {
  padding: .5rem 1.1rem;
  border-radius: .4rem .4rem 0 0;
  background: var(--brand-pale);
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
}
.tabs a:hover, .tabs a:focus { background: var(--brand-light); color: #fff; }
.tab-index .tabs .tab-index,
.tab-recommended .tabs .tab-recommended,
.tab-assembly .tabs .tab-assembly { background: var(--brand-light); color: #fff; }

/* the document list */

main { grid-area: main; min-width: 0; }
main h1 { margin: 0 0 1rem; font-size: 1.5rem; font-weight: 600; }

.doc-group {
  margin: 1.75rem 0 .5rem;
  padding-bottom: .25rem;
  border-bottom: 1px solid var(--line);
  font-size: 1.1rem;
  color: var(--brand);
}
main h1 + .doc-group { margin-top: 0; }

.doc {
  margin: 0;
  padding: .35rem 0 .35rem 2.1rem;
  position: relative;
}
.doc-size { color: var(--muted); font-size: .85em; white-space: nowrap; }
.doc-missing { color: var(--missing); }

.doc-tag {
  display: inline-block;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 .2rem;
  border-radius: .25rem;
  background: var(--line);
  color: #000;
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.5rem;
  text-align: center;
  vertical-align: middle;
}
.doc .doc-tag { position: absolute; left: 0; top: .35rem; }

.status-draft-in-process .doc-tag { background: var(--st-draft-in-process); }
.status-draft-complete .doc-tag { background: var(--st-draft-complete); }
.status-revision-in-process .doc-tag { background: var(--st-revision-in-process); }
.status-revision-complete .doc-tag { background: var(--st-revision-complete); }
.status-final .doc-tag { background: var(--st-final); }

/* side column */

.side { grid-area: side; font-size: .92rem; }
.side h2 {
  margin: 0 0 .5rem;
  font-size: 1rem;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.side ul { list-style: none; margin: 0; padding: 0; }

.languages { margin-bottom: 2rem; }
.languages li { padding: .15rem 0; }
.languages a { text-decoration: none; }
.languages a:hover, .languages a:focus { text-decoration: underline; }
.languages span { color: var(--muted); }
.languages span::before { content: "· "; }

/* the current language; the body carries lang-<folder> */
.lang-en .l-en a, .lang-es .l-es a, .lang-fr .l-fr a, .lang-pt .l-pt a, .lang-de .l-de a,
.lang-hu .l-hu a, .lang-nl .l-nl a, .lang-da .l-da a, .lang-fi .l-fi a, .lang-it .l-it a,
.lang-el .l-el a, .lang-ru .l-ru a, .lang-cs .l-cs a, .lang-tr .l-tr a, .lang-ar .l-ar a,
.lang-he .l-he a, .lang-po .l-po a, .lang-ro .l-ro a, .lang-ca .l-ca a {
  color: var(--text);
  font-weight: 700;
}

.legend li { display: flex; align-items: center; gap: .5rem; padding: .15rem 0; }
.legend li.doc-missing { padding-left: 2rem; }
.legend p { display: flex; align-items: flex-start; gap: .5rem; margin: .75rem 0 0; color: var(--muted); }
.legend p .doc-tag { flex: none; }

/* the root page, while it redirects */
body.redirect { display: block; padding-top: 2rem; }

@media (max-width: 52rem) {
  body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "header" "tabs" "main" "side";
  }
  .side { margin-top: 2.5rem; border-top: 1px solid var(--line); padding-top: 1.5rem; }
  .languages ul { columns: 2; column-gap: 1.5rem; }
  .site-header img { width: 72px; }
  .site-title { font-size: 1.35rem; }
}

@media (max-width: 30rem) {
  .languages ul { columns: 1; }
  .tabs a { padding: .45rem .7rem; }
}
