/* Volos NFC report. Light, restrained, built for reading. */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --ink: #15181c;
  --ink-2: #353a42;
  --muted: #676c75;          /* 5.3:1 on white */
  --faint: #6f737b;          /* 4.8:1 on white, still lighter than --muted */
  --rule: #e6e5e0;
  --rule-strong: #d2d1ca;
  --tint: #f6f5f1;
  --accent: #1f3550;
  --accent-soft: #e9edf2;
  --video-bg: #0e1013;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Charter, Georgia, serif;

  --measure: 37rem;          /* about 70 characters at the body size */
  --rail: 12.5rem;
  --gap: 3.5rem;
  --frame: calc(var(--measure) + 2 * var(--rail) + 2 * var(--gap));
  --tabbar-h: 3.5rem;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 50;
  padding: .5rem .875rem;
  background: var(--ink);
  color: #fff;
  font-size: .875rem;
  text-decoration: none;
  border-radius: 3px;
}
.skip:focus { top: 1rem; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- masthead */

.masthead { border-bottom: 1px solid var(--rule); }

.masthead-inner,
.colophon-inner {
  max-width: calc(var(--frame) + 3rem);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.masthead-inner { padding-top: 1.75rem; padding-bottom: 1.75rem; }

.masthead h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.875rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -.005em;
  color: var(--ink);
}

/* optional name and logo (report-config.json); not shown when empty */
.brand {
  display: flex;
  align-items: center;
  gap: .625rem;
  min-height: 2.25rem;
}
.brand-header { margin-bottom: 1.25rem; }

.brand-logo { height: 2.25rem; width: auto; display: block; }

.brand-name {
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--ink-2);
}

/* ---------------------------------------------------------------- tabs */

.tabbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--rule);
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
  backdrop-filter: saturate(1.4) blur(8px);
}

.tablist {
  display: flex;
  gap: .25rem;
  max-width: calc(var(--frame) + 3rem);
  margin: 0 auto;
  padding: 0 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.tablist::-webkit-scrollbar { display: none; }

/* a soft fade tells the reader there are more tabs to the side */
.tablist.more-right {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 3rem), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 3rem), transparent);
}
.tablist.more-left {
  -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 3rem), transparent);
  mask-image: linear-gradient(to left, #000 calc(100% - 3rem), transparent);
}
.tablist.more-left.more-right {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 3rem, #000 calc(100% - 3rem), transparent);
  mask-image: linear-gradient(to right, transparent, #000 3rem, #000 calc(100% - 3rem), transparent);
}

.nw { white-space: nowrap; }

/* no lonely last words in headings or short last lines in paragraphs (where supported) */
.masthead h1, .doc-head h2, .doc-body h3, .doc-body h4 { text-wrap: balance; }
.doc-body p, .structure li, .clip figcaption { text-wrap: pretty; }

[role="tab"] {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: var(--tabbar-h);
  margin: 0;
  padding: .5rem .875rem;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: .875rem;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
[role="tab"]:first-child { margin-left: -.875rem; }
[role="tab"]:hover { color: var(--ink); }
[role="tab"][aria-selected="true"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}
[role="tab"]:focus-visible { outline-offset: -4px; }

.tab-label { font-weight: 600; white-space: nowrap; }
.tab-sub {
  display: none;
  margin-top: .125rem;
  font-size: .75rem;
  color: var(--faint);
  white-space: nowrap;
}
[role="tab"][aria-selected="true"] .tab-sub { color: var(--muted); }

/* ---------------------------------------------------------------- panel layout */

.panel {
  display: grid;
  grid-template-columns: minmax(0, var(--measure));
  grid-template-areas:
    "head"
    "menu"
    "body";
  justify-content: center;
  padding: 2.5rem 1.5rem 5rem;
}
.panel:focus { outline: none; }
.panel:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.doc-head { grid-area: head; }
.secnav  { grid-area: menu; }
.doc-body { grid-area: body; min-width: 0; }

/* ---------------------------------------------------------------- document head */

.doc-head {
  padding-bottom: 1.5rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--rule);
}

.eyebrow {
  margin: 0;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}

.doc-head h2 {
  margin: .5rem 0 .5rem;
  font-family: var(--serif);
  font-size: 2.25rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.01em;
}

.doc-meta {
  margin: 0;
  font-size: .9375rem;
  color: var(--muted);
}
.doc-meta .dot {
  display: inline-block;
  width: 3px;
  height: 3px;
  margin: 0 .375rem;
  border-radius: 50%;
  background: var(--faint);
  vertical-align: middle;
}

/* ---------------------------------------------------------------- section menu */

.secnav {
  margin: 0 0 2.25rem;
  padding: .875rem 1rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-size: .875rem;
}

.secnav-title {
  margin: 0 0 .5rem;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
}

.secnav ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .125rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.secnav a {
  display: block;
  padding: .3rem 0;
  color: var(--ink-2);
  text-decoration: none;
  line-height: 1.35;
}
.secnav a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.secnav a[aria-current="true"] { color: var(--accent); font-weight: 600; }

/* ---------------------------------------------------------------- body text */

.doc-body h3 {
  margin: 3rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.005em;
  color: var(--ink);
  scroll-margin-top: calc(var(--tabbar-h) + 1.5rem);
}
.doc-body > h3:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.doc-body h4 {
  margin: 2rem 0 .75rem;
  font-size: 1.0625rem;
  font-weight: 650;
  scroll-margin-top: calc(var(--tabbar-h) + 1.5rem);
}

.doc-body p {
  margin: 0 0 1.125rem;
  hyphens: manual;
}

.doc-body strong {
  font-weight: 650;
  color: var(--ink);
}

.doc-body ul:not(.structure) { margin: 0 0 1.125rem; padding-left: 1.25rem; }

/* Team structures: a compact box instead of bullets */
.structure {
  margin: 0 0 1.75rem;
  padding: .75rem 1rem;
  list-style: none;
  background: var(--tint);
  border-left: 3px solid var(--accent);
  border-radius: 0 3px 3px 0;
  font-size: .875rem;
  line-height: 1.5;
}
.structure li { padding: .2rem 0; }
.structure li + li { border-top: 1px solid #e9e8e2; }
.structure .k { color: var(--muted); }
.structure .v {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- videos */

.clip { margin: 2rem 0 2.25rem; }

.frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 3px;
  background: var(--video-bg);
}

.frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 3px;
  background: var(--video-bg);
}
.frame video:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.clip figcaption {
  margin-top: .625rem;
  padding-left: .75rem;
  border-left: 2px solid var(--rule-strong);
  font-size: .875rem;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------------------------------------------------------------- footer */

.colophon { border-top: 1px solid var(--rule); }
.colophon-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-top: 1.75rem;
  padding-bottom: 2.5rem;
}
.colophon-title {
  margin: 0;
  font-size: .8125rem;
  color: var(--faint);
}

/* ---------------------------------------------------------------- wide screens */

@media (min-width: 1180px) {
  .panel {
    grid-template-columns: var(--rail) minmax(0, var(--measure)) var(--rail);
    grid-template-areas:
      "menu head ."
      "menu body .";
    grid-template-rows: auto 1fr;
    column-gap: var(--gap);
    padding-top: 3rem;
  }

  .secnav {
    position: sticky;
    top: calc(var(--tabbar-h) + 2rem);
    align-self: start;
    margin: .25rem 0 0;
    padding: 0;
    border: 0;
    border-radius: 0;
  }
  .secnav ol {
    display: block;
    border-left: 1px solid var(--rule);
  }
  .secnav a {
    margin-left: -1px;
    padding: .375rem 0 .375rem 1rem;
    border-left: 2px solid transparent;
  }
  .secnav a:hover { text-decoration: none; }
  .secnav a[aria-current="true"] { border-left-color: var(--accent); }

  .tab-sub { display: block; }
  [role="tab"] { min-height: 4rem; }
  :root { --tabbar-h: 4rem; }
}

/* ---------------------------------------------------------------- single column */

@media (max-width: 1179px) {
  /* header, tabs and footer line up with the text column */
  .masthead-inner,
  .colophon-inner,
  .tablist { max-width: calc(var(--measure) + 3rem); }
}

/* ---------------------------------------------------------------- small screens */

@media (max-width: 720px) {
  body { font-size: 1rem; line-height: 1.62; }
  .masthead-inner { padding: 1.125rem 1rem 1.25rem; }
  .masthead h1 { font-size: 1.5rem; }
  .brand-header { margin-bottom: 1rem; }
  .tablist { padding: 0 1rem; gap: 0; }
  [role="tab"] { padding: .5rem .75rem; }
  [role="tab"]:first-child { margin-left: -.75rem; }
  .panel { padding: 1.75rem 1rem 3.5rem; }
  .doc-head h2 { font-size: 1.75rem; }
  .doc-body h3 { font-size: 1.3125rem; margin-top: 2.5rem; }
  .clip { margin: 1.5rem 0 1.75rem; }
  .colophon-inner { padding: 1.5rem 1rem 2rem; }
}

@media (max-width: 420px) {
  .secnav ol { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .secnav { padding: .75rem .875rem .875rem; }
}

@media (prefers-reduced-motion: no-preference) {
  [role="tab"], .secnav a { transition: color .15s ease, border-color .15s ease; }
}

@media print {
  .tabbar, .secnav, .skip, .clip { display: none !important; }
  .panel[hidden] { display: grid !important; }
  .panel { padding: 1.5rem 0; break-before: page; }
  body { font-size: 11pt; }
}
