/* Labeltaglab — independent educational site. No JavaScript required. */
:root {
  --navy: #12324f;
  --navy-deep: #0c2438;
  --navy-soft: #1c4568;
  --teal: #1a9aa3;
  --teal-dark: #147880;
  --teal-soft: #e6f5f6;
  --paper: #ffffff;
  --mist: #f4f7f9;
  --ink: #243240;
  --muted: #5b6b7a;
  --line: #d5dee6;
  --line-strong: #b7c4d0;
  --warn: #8a4b12;
  --warn-bg: #fff6ec;
  --focus: #0f6b9c;
  --max: 70rem;
  --wide: 78rem;
  --radius: 0.5rem;
  --shadow: 0 1px 2px rgba(18, 50, 79, 0.06), 0 8px 24px rgba(18, 50, 79, 0.05);
  --font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", Times, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--teal-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--navy);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3.5rem;
  z-index: 100;
  background: var(--navy);
  color: #fff;
  padding: 0.5rem 0.85rem;
  border-radius: 0 0 0.35rem 0.35rem;
}

.skip-link:focus {
  top: 0;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.wrap-wide {
  width: min(100% - 2rem, var(--wide));
  margin-inline: auto;
}

/* Header */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--navy);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.15rem;
}

.logo img {
  width: 2.1rem;
  height: 2.1rem;
}

.logo:hover {
  color: var(--teal-dark);
}

.desktop-nav {
  display: none;
}

.nav-panel {
  position: relative;
}

.nav-panel > summary {
  list-style: none;
  cursor: pointer;
  background: var(--navy);
  color: #fff;
  border: 0;
  border-radius: 0.35rem;
  padding: 0.45rem 0.9rem;
  font: inherit;
  font-weight: 600;
}

.nav-panel > summary::-webkit-details-marker {
  display: none;
}

.mobile-nav-links {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: min(92vw, 22rem);
  padding: 1.1rem 1.2rem 1.25rem;
  display: grid;
  gap: 1rem;
  max-height: 70vh;
  overflow: auto;
}

.site-nav .nav-heading,
.mobile-nav-links .nav-heading {
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: var(--font);
  font-weight: 700;
}

.site-nav ul,
.mobile-nav-links ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a,
.mobile-nav-links a {
  display: block;
  padding: 0.22rem 0;
  color: var(--navy);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-nav a:hover,
.site-nav a[aria-current="page"],
.mobile-nav-links a:hover,
.mobile-nav-links a[aria-current="page"] {
  color: var(--teal-dark);
}

@media (min-width: 1100px) {
  .nav-panel {
    display: none;
  }

  .desktop-nav {
    display: flex;
    gap: 1.6rem;
    align-items: flex-start;
  }

  .nav-group {
    position: relative;
  }

  .nav-group > .nav-heading {
    margin: 0;
    font-size: 0.92rem;
    letter-spacing: 0;
    text-transform: none;
    color: var(--navy);
    font-weight: 650;
  }

  .nav-group ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 0.65rem 0.9rem;
    min-width: 15rem;
    z-index: 30;
  }

  .nav-group:hover ul,
  .nav-group:focus-within ul {
    display: block;
  }
}

/* Banner / hero */
.hero {
  background: linear-gradient(180deg, var(--mist) 0%, var(--paper) 100%);
  border-bottom: 1px solid var(--line);
  padding: 2.4rem 0 2.6rem;
}

.hero-grid {
  display: grid;
  gap: 1.75rem;
  align-items: center;
}

@media (min-width: 860px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.eyebrow {
  display: inline-block;
  color: var(--teal-dark);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

h1,
.h1 {
  font-family: var(--serif);
  color: var(--navy);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.85rem;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
}

h1::after {
  content: "";
  display: block;
  width: 3.2rem;
  height: 3px;
  background: var(--teal);
  margin-top: 0.7rem;
  border-radius: 2px;
}

.lede {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 42rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.2rem;
}

.btn {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  padding: 0.55rem 1rem;
  border-radius: 0.35rem;
  font-weight: 650;
  font-family: inherit;
  font-size: 1rem;
  border: 0;
  cursor: pointer;
}

.btn:hover {
  background: var(--navy-soft);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--line-strong);
}

.btn-secondary:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
  background: var(--teal-soft);
}

/* Breadcrumbs */
.breadcrumbs {
  background: var(--mist);
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  padding: 0.55rem 0;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.45rem;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--muted);
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 0.45rem;
  color: var(--line-strong);
}

.breadcrumbs a {
  color: var(--navy-soft);
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

/* Layout */
.page {
  padding: 2rem 0 3.2rem;
}

.page-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 960px) {
  .page-grid {
    grid-template-columns: minmax(0, 1fr) 16.5rem;
    align-items: start;
  }
}

article h2 {
  font-family: var(--serif);
  color: var(--navy);
  font-size: 1.45rem;
  margin: 2rem 0 0.7rem;
  line-height: 1.25;
}

article h3 {
  color: var(--navy-soft);
  font-size: 1.12rem;
  margin: 1.4rem 0 0.5rem;
}

article p,
article li {
  max-width: 68ch;
}

article ul,
article ol {
  padding-left: 1.2rem;
}

.figure {
  margin: 1.4rem 0 1.6rem;
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
}

.figure figcaption {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.6rem;
}

.callout {
  background: var(--teal-soft);
  border-left: 4px solid var(--teal);
  padding: 0.9rem 1rem;
  border-radius: 0 0.4rem 0.4rem 0;
  margin: 1.3rem 0;
}

.callout.note {
  background: var(--mist);
  border-left-color: var(--navy);
}

.callout.warn {
  background: var(--warn-bg);
  border-left-color: var(--warn);
}

.disclaimer {
  font-size: 0.95rem;
  color: var(--muted);
}

/* Cards */
.card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  margin: 1.4rem 0 0.4rem;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.05rem 1.1rem 1.15rem;
  box-shadow: var(--shadow);
}

.card h2,
.card h3 {
  margin-top: 0.35rem;
  font-size: 1.08rem;
  font-family: var(--serif);
  color: var(--navy);
}

.card p {
  color: var(--muted);
  margin-bottom: 0.7rem;
  font-size: 0.96rem;
}

.card a.more {
  font-weight: 650;
  text-decoration: none;
}

.topic-list {
  display: grid;
  gap: 0.55rem;
  margin: 1rem 0 0;
}

.topic-list a {
  display: block;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  padding: 0.7rem 0.9rem;
  text-decoration: none;
  color: var(--navy);
  font-weight: 650;
}

.topic-list a:hover {
  border-color: var(--teal);
  background: var(--teal-soft);
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 1.1rem 0 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 32rem;
}

th,
td {
  text-align: left;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  background: var(--navy);
  color: #fff;
  font-weight: 650;
}

tr:nth-child(even) td {
  background: var(--mist);
}

caption {
  text-align: left;
  font-weight: 650;
  color: var(--navy);
  padding: 0.5rem 0.2rem 0.7rem;
  caption-side: top;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 5rem;
}

.sidebar-box {
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.05rem 1.15rem;
  margin-bottom: 1rem;
}

.sidebar h2 {
  font-size: 0.95rem;
  margin: 0 0 0.55rem;
  font-family: var(--font);
  color: var(--navy);
}

.sidebar ul {
  margin: 0;
  padding-left: 1.1rem;
}

.sidebar li {
  margin: 0.3rem 0;
}

/* FAQ */
.faq details {
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  padding: 0.55rem 0.85rem;
  margin: 0.55rem 0;
  background: var(--paper);
}

.faq summary {
  cursor: pointer;
  font-weight: 650;
  color: var(--navy);
}

.faq details p {
  margin: 0.55rem 0 0.35rem;
}

/* Contact form */
.contact-form {
  position: relative;
  margin: 1.1rem 0 1.6rem;
  max-width: 36rem;
}

.contact-form p {
  margin: 0 0 0.95rem;
}

.contact-form label {
  display: block;
  font-weight: 650;
  color: var(--navy);
  margin-bottom: 0.28rem;
}

.contact-form .optional {
  font-weight: 400;
  color: var(--muted);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
  width: 100%;
  max-width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 0.35rem;
  padding: 0.5rem 0.65rem;
}

.contact-form textarea {
  resize: vertical;
  min-height: 9rem;
}

.contact-form .hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Sources */
.sources {
  font-size: 0.92rem;
}

.sources li {
  margin: 0.35rem 0;
}

/* Footer */
.site-footer {
  background: var(--navy-deep);
  color: #d7e3ee;
  padding: 2.2rem 0 1.4rem;
  margin-top: 0.5rem;
}

.site-footer a {
  color: #9fe3e6;
}

.footer-grid {
  display: grid;
  gap: 1.3rem;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  margin-bottom: 1.4rem;
}

.site-footer h2 {
  color: #fff;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin: 0.28rem 0;
}

.footer-note {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1rem;
  font-size: 0.9rem;
  color: #b7c6d4;
}

.footer-note p {
  max-width: 70ch;
}

/* Home sections */
.band {
  padding: 2.2rem 0;
}

.band-alt {
  background: var(--mist);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-title {
  font-family: var(--serif);
  color: var(--navy);
  font-size: 1.6rem;
  margin: 0 0 0.5rem;
}

.section-intro {
  color: var(--muted);
  max-width: 46rem;
  margin-bottom: 1.2rem;
}

/* 404 */
.error-page {
  text-align: left;
  padding: 3rem 0 4rem;
}

.error-code {
  font-family: var(--serif);
  font-size: 4rem;
  color: var(--teal);
  margin: 0;
  line-height: 1;
}

/* Utilities */
.muted {
  color: var(--muted);
}

.small {
  font-size: 0.92rem;
}

.illust {
  width: 100%;
  display: block;
}

@media (max-width: 640px) {
  body {
    font-size: 1rem;
  }

  .site-nav {
    grid-template-columns: 1fr;
    min-width: min(92vw, 20rem);
    max-height: 70vh;
    overflow: auto;
  }

  table {
    min-width: 28rem;
  }
}

@media print {
  .site-header,
  .site-footer,
  .hero-actions,
  .nav-panel,
  .sidebar {
    display: none !important;
  }

  a[href]::after {
    content: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }
}
