:root {
  --brm-navy: #0b2942;
  --brm-blue: #315f7d;
  --brm-teal: #397565;
  --brm-gold: #9a6d2c;
  --brm-gold-text: #76531f;
  --brm-paper: #f7f4ed;
  --brm-white: #fff;
  --brm-ink: #183449;
  --brm-muted: #566b78;
  --brm-line: #cfd9df;
  --brm-soft-blue: #eaf1f3;
  --brm-soft-teal: #e7f0ed;
  --brm-warm: #f2ece0;
}

.brm-page *,
.brm-page *::before,
.brm-page *::after {
  box-sizing: border-box;
}

.brm-page {
  color: var(--brm-ink);
  background: var(--brm-white);
}

.brm-shell {
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
}

.brm-article-width {
  width: min(800px, calc(100% - 48px));
  margin: 0 auto;
}

.brm-page .content-context {
  margin-top: 71px;
  border-bottom: 1px solid var(--brm-line);
  background: var(--brm-white);
}

.brm-page .content-context-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1080px, calc(100% - 48px));
  min-height: 54px;
  margin: 0 auto;
}

.brm-page .content-context ol {
  display: flex;
  min-width: 0;
  gap: 8px;
  align-items: center;
  margin: 0;
  padding: 0;
  color: #647888;
  font-size: .76rem;
  list-style: none;
}

.brm-page .content-context li {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.brm-page .content-context li:not(:last-child)::after {
  color: #a6b3bc;
  content: "/";
}

.brm-page .content-context a {
  color: #40596d;
  text-decoration: none;
}

.brm-page .content-context-all {
  flex: 0 0 auto;
  font-weight: 700;
}

.brm-hero {
  padding: 5rem 0 4.8rem;
  border-bottom: 1px solid var(--brm-line);
  background:
    radial-gradient(circle at 92% 6%, rgba(57, 117, 101, .12), transparent 27%),
    linear-gradient(90deg, rgba(11, 41, 66, .026) 1px, transparent 1px) 0 0 / 88px 88px,
    var(--brm-paper);
}

.brm-hero h1 {
  max-width: 960px;
  margin: 0;
  color: var(--brm-navy);
  font: 600 clamp(2.05rem, 4vw, 3.25rem) / 1.45 'Noto Serif JP', serif;
  letter-spacing: -.045em;
}

.brm-title-line {
  display: block;
}

.brm-title-line + .brm-title-line {
  margin-top: .42em;
  color: var(--brm-blue);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: .64em;
  line-height: 1.6;
  letter-spacing: -.01em;
}

.brm-title-unit,
.brm-heading-unit {
  display: inline-block;
}

.brm-lead,
.brm-intro {
  max-width: 850px;
  margin: 1.55rem 0 0;
  color: var(--brm-muted);
  font-size: 1rem;
  line-height: 2;
}

.brm-intro {
  margin-top: 1rem;
}

.brm-catch {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 2.7rem;
  border: 1px solid var(--brm-line);
  background: var(--brm-white);
  box-shadow: 0 16px 36px rgba(11, 41, 66, .08);
}

.brm-section {
  padding: 5rem 0;
  scroll-margin-top: 112px;
  background: var(--brm-white);
}

.brm-section:nth-of-type(even) {
  background: var(--brm-paper);
}

.brm-section h2 {
  margin: 0;
  color: var(--brm-navy);
  font: 600 clamp(1.75rem, 3.5vw, 2.4rem) / 1.55 'Noto Serif JP', serif;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.brm-section p {
  margin: 1.2rem 0 0;
  color: var(--brm-muted);
  line-height: 2;
}

.brm-section ul {
  margin: 1.3rem 0 0;
  padding-left: 1.4rem;
  color: var(--brm-muted);
}

.brm-section li {
  padding: .25rem 0;
  line-height: 1.85;
}

.brm-diagnostic-section {
  border-top: 1px solid var(--brm-line);
  border-bottom: 1px solid var(--brm-line);
}

.brm-table-wrap {
  width: min(1000px, calc(100% - 48px));
  margin: 2rem auto;
  border: 1px solid var(--brm-line);
  background: var(--brm-white);
}

.brm-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.brm-table th,
.brm-table td {
  padding: 1rem 1.05rem;
  border-right: 1px solid var(--brm-line);
  border-bottom: 1px solid var(--brm-line);
  font-size: .86rem;
  line-height: 1.8;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.brm-table th:last-child,
.brm-table td:last-child {
  border-right: 0;
}

.brm-table tbody tr:last-child > * {
  border-bottom: 0;
}

.brm-table thead th {
  color: var(--brm-white);
  background: var(--brm-navy);
  font-size: .78rem;
}

.brm-table thead th:first-child {
  width: 29%;
}

.brm-table thead th:nth-child(2) {
  width: 35%;
}

.brm-table tbody th {
  color: var(--brm-navy);
  background: var(--brm-soft-blue);
}

.brm-table tbody td:last-child {
  background: #fbfaf7;
}

.brm-example-section {
  background: var(--brm-soft-teal) !important;
}

.brm-example-list,
.brm-handoff-list {
  padding: 1rem 1rem 1rem 2.6rem !important;
  border-left: 4px solid var(--brm-teal);
  background: var(--brm-white);
}

.brm-handoff-list {
  border-left-color: var(--brm-blue);
}

.brm-rerun-section {
  border-top: 1px solid var(--brm-line);
}

.brm-related {
  margin-top: 2.2rem !important;
  padding: 1.1rem 1.2rem;
  border-left: 4px solid var(--brm-gold);
  background: var(--brm-warm);
  font-size: .9rem;
}

.brm-related a {
  color: var(--brm-navy);
  font-weight: 700;
  text-underline-offset: .2em;
}

.brm-page .content-taxonomy-primary > p,
.brm-page .content-related > h2 {
  color: var(--brm-gold-text);
}

.brm-page .content-back {
  border-top: 1px solid var(--brm-line);
  background: var(--brm-navy);
}

.brm-page .content-back a {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .15rem .8rem;
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
  padding: 1.8rem 0;
  color: var(--brm-white);
  text-decoration: none;
}

.brm-page .content-back a > span {
  grid-row: 1 / 2;
  align-self: center;
  color: #ead9b7;
  font-size: 1.2rem;
}

.brm-page .content-back a > span::before {
  content: "←";
}

.brm-page .content-back a > strong {
  display: block;
  font-size: 1rem;
}

.brm-page .site-footer {
  margin-top: 0;
}

@media (max-width: 640px) {
  .brm-page .nav-main {
    padding-block: 0;
    border-bottom: 0;
  }

  .brm-page .nav-main.active {
    padding-block: 1rem;
    border-bottom: .5px solid var(--color-border-light);
  }

  .brm-page .content-context {
    margin-top: 90px;
  }

  .brm-shell,
  .brm-article-width,
  .brm-table-wrap,
  .brm-page .content-context-inner,
  .brm-page .content-back a {
    width: calc(100% - 28px);
  }

  .brm-page .content-context-inner {
    min-height: 48px;
  }

  .brm-page .content-context ol {
    overflow: hidden;
    font-size: .68rem;
    white-space: nowrap;
  }

  .brm-page .content-context li:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brm-page .content-context-all {
    display: none;
  }

  .brm-hero {
    padding: 3.8rem 0 3.4rem;
  }

  .brm-hero h1 {
    font-size: 1.78rem;
    line-height: 1.58;
  }

  .brm-title-line + .brm-title-line {
    font-size: .72em;
  }

  .brm-lead,
  .brm-intro {
    font-size: .91rem;
    line-height: 1.9;
  }

  .brm-catch {
    margin-top: 2.1rem;
  }

  .brm-section {
    padding: 3.8rem 0;
    scroll-margin-top: 118px;
  }

  .brm-section h2 {
    font-size: 1.55rem;
  }

  .brm-table-wrap {
    margin: 1.7rem auto;
    border: 0;
    background: transparent;
  }

  .brm-table,
  .brm-table tbody,
  .brm-table tr,
  .brm-table th,
  .brm-table td {
    display: block;
    width: 100%;
  }

  .brm-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .brm-table tbody {
    display: grid;
    gap: 1rem;
  }

  .brm-table tbody tr {
    overflow: hidden;
    border: 1px solid var(--brm-line);
    background: var(--brm-white);
  }

  .brm-table th,
  .brm-table td {
    padding: .82rem 1rem;
    border: 0;
    border-bottom: 1px solid var(--brm-line);
    font-size: .82rem;
  }

  .brm-table tbody tr > *:last-child {
    border-bottom: 0;
  }

  .brm-table th::before,
  .brm-table td::before {
    display: block;
    margin-bottom: .25rem;
    color: var(--brm-gold-text);
    content: attr(data-label);
    font-size: .68rem;
    font-weight: 700;
    line-height: 1.5;
  }

  .brm-table tbody th {
    background: var(--brm-soft-blue);
  }

  .brm-table tbody td:last-child {
    background: #fbfaf7;
  }

  .brm-example-list,
  .brm-handoff-list {
    padding: .9rem .9rem .9rem 2.2rem !important;
  }

  .brm-related {
    font-size: .84rem;
  }

  .brm-page .content-back a {
    padding: 1.5rem 0;
  }
}
