:root {
  --ink: #1a2330;
  --muted: #445062;
  --paper: #f4f1eb;
  --white: #fffcf8;
  --line: #ddd6cb;
  --teal: #0e4d5c;
  --teal-deep: #0a3944;
  --orange: #c45112;
  --focus: #1a4f86;
  --sans: "Segoe UI", "Helvetica Neue", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.6;
}

a { color: var(--orange); text-underline-offset: 0.16em; }
a:visited { color: var(--orange); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.skip {
  position: absolute;
  left: 0.75rem;
  top: 0.5rem;
  transform: translateY(-150%);
  background: #fff;
  color: var(--ink);
  padding: 0.35rem 0.6rem;
  z-index: 30;
}
.skip:focus { transform: none; }

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 3px solid var(--teal);
}

.top-inner {
  position: relative;
  max-width: 68rem;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--teal);
  text-decoration: none;
  font-weight: 750;
  letter-spacing: -0.03em;
  font-size: 1.25rem;
}
.brand:visited { color: var(--teal); }

.mark {
  width: 1.7rem;
  height: 1.7rem;
  background: var(--teal);
  color: var(--paper);
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 750;
}

.nav { display: flex; gap: 1.1rem; align-items: center; }
.nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
}
.nav a:visited { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--orange); font-weight: 650; }

.menu-btn {
  display: none;
  background: var(--teal);
  color: var(--paper);
  border: 0;
  font: inherit;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
}

.who {
  margin: 0;
  background: var(--teal-deep);
  color: #e7eef0;
  font-size: 0.92rem;
  padding: 0.45rem 1.25rem;
  text-align: center;
}
.who a, .who a:visited { color: #fff; }

.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2.2rem 1.25rem 3.5rem;
}

.wide {
  max-width: 68rem;
  margin: 0 auto;
  padding: 2.2rem 1.25rem 3.5rem;
}

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.03em; font-weight: 680; }
h1 { margin: 0.2rem 0 1rem; font-size: clamp(1.9rem, 4vw, 2.7rem); }
h2 { margin: 2.1rem 0 0.55rem; font-size: 1.45rem; }
h3 { margin: 0 0 0.3rem; font-size: 1.12rem; }
p { margin: 0.7rem 0; }

.kicker {
  margin: 0;
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.roles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.7rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
.roles li { background: var(--white); border: 1px solid var(--line); padding: 0.85rem 0.9rem; }
.roles li:nth-child(2) { background: var(--teal); color: #f3f7f8; border-color: var(--teal); }
.roles a { color: inherit; text-decoration: none; }
.roles strong { display: block; margin-bottom: 0.3rem; }

.tools { list-style: none; margin: 0.4rem 0 0; padding: 0; }
.tools li {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.95rem 0;
  border-top: 1px solid var(--line);
}
.tools li:last-child { border-bottom: 1px solid var(--line); }
.n { color: var(--orange); font-weight: 750; font-variant-numeric: tabular-nums; }
.tools h3 a { color: var(--ink); text-decoration: none; }
.tools h3 a:visited { color: var(--ink); }
.tools h3 a:hover { color: var(--orange); }

.order { list-style: none; margin: 0.6rem 0 0; padding: 0; display: grid; gap: 0.6rem; }
.order li { background: var(--white); border: 1px solid var(--line); padding: 0.8rem 0.95rem; }

.switch {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.3rem;
  margin: 0 0 1.2rem;
}
.switch a {
  white-space: nowrap;
  text-decoration: none;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  padding: 0.25rem 0.55rem;
  font-size: 0.88rem;
}
.switch a:visited { color: var(--ink); }
.switch a[aria-current="page"] { background: var(--teal); color: #f4f8f8; border-color: var(--teal); }

.example {
  background: var(--white);
  border-left: 4px solid var(--orange);
  padding: 0.2rem 1rem 0.4rem;
  margin: 1rem 0;
}

.near {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}
.near a { text-decoration: none; color: var(--ink); max-width: 46%; }
.near a:visited { color: var(--ink); }
.near span { display: block; color: var(--muted); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }
.near strong { font-weight: 680; }
.near .next { text-align: right; margin-left: auto; }

.foot {
  border-top: 3px solid var(--teal);
  background: var(--white);
  padding: 1.4rem 1.25rem 1.6rem;
}
.foot-inner { max-width: 68rem; margin: 0 auto; }
.foot p { margin: 0.3rem 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; list-style: none; margin: 0.7rem 0 0; padding: 0; }
.foot-links a { color: var(--teal); text-decoration: none; font-size: 0.92rem; }
.foot-links a:visited { color: var(--teal); }

@media (max-width: 860px) {
  .roles { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .menu-btn { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    background: var(--white);
    border-bottom: 3px solid var(--teal);
    padding: 0.6rem 1.25rem 0.9rem;
  }
  .nav.is-open { display: flex; }
  .roles { grid-template-columns: 1fr; }
  .near { flex-direction: column; }
  .near a, .near .next { max-width: none; text-align: left; }
}
