:root {
  --hma-ink: #1e2927;
  --hma-muted: #65736f;
  --hma-paper: #fffdf8;
  --hma-canvas: #f3efe7;
  --hma-line: #d8ded8;
  --hma-teal: #0f564f;
  --hma-blue: #263f5e;
  --hma-gold: #b88b3e;
  --hma-rust: #9b4f3b;
  --hma-mint: #e9f5f1;
  --hma-shell: #fbf5e9;
}

html {
  background: var(--hma-canvas);
}

body {
  margin: 0;
  background: var(--hma-canvas);
}

.hma-wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  color: var(--hma-ink);
  background: var(--hma-paper);
  border: 1px solid rgba(31, 65, 59, 0.14);
  box-shadow: 0 24px 60px rgba(28, 40, 37, 0.12);
  font-family: Arial, "Helvetica Neue", "Segoe UI", "Noto Sans", "Noto Sans JP", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
}

.hma-wrap,
.hma-wrap * {
  box-sizing: border-box;
}

.hma-wrap a {
  color: var(--hma-teal);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.hma-hero a {
  color: #fff;
  text-decoration-color: rgba(255, 255, 255, 0.58);
}

.hma-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  padding: clamp(30px, 5vw, 58px);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(11, 70, 63, 0.96), rgba(34, 63, 88, 0.94)),
    linear-gradient(90deg, #0f564f, #263f5e);
}

.hma-hero > *,
.hma-review-alert > *,
.hma-body > * {
  min-width: 0;
}

.hma-wrap--palani .hma-hero {
  background:
    linear-gradient(135deg, rgba(38, 63, 94, 0.97), rgba(109, 63, 47, 0.94)),
    linear-gradient(90deg, #263f5e, #804a38);
}

.hma-kicker {
  margin: 0 0 16px;
  color: #d5efe9;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  word-break: normal;
  overflow-wrap: normal;
  white-space: normal;
}

.hma-hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.08;
  letter-spacing: 0;
  word-break: normal;
  overflow-wrap: normal;
}

.hma-hero h1 span {
  display: inline;
}

.hma-subtitle {
  max-width: 740px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(18px, 2.2vw, 23px);
  line-height: 1.75;
}

.hma-hero-meta {
  align-self: start;
  width: 100%;
  max-width: 760px;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.hma-hero-meta p {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hma-hero-meta ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hma-hero-meta li {
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
}

.hma-review-alert {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 18px;
  margin: 0;
  padding: 18px clamp(22px, 5vw, 58px);
  border-bottom: 1px solid var(--hma-line);
  background: #f9f3e6;
}

.hma-review-alert strong {
  color: #6c4b17;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hma-review-alert p {
  margin: 0;
  color: #473e2f;
  font-size: 15px;
  line-height: 1.75;
}

.hma-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px clamp(22px, 5vw, 58px);
  border-bottom: 1px solid var(--hma-line);
  background: #fff;
}

.hma-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid #c9ddd8;
  border-radius: 999px;
  color: var(--hma-teal);
  background: #f9fcfb;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.hma-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: clamp(28px, 4vw, 54px);
  padding: clamp(28px, 5vw, 58px);
}

.hma-main {
  min-width: 0;
}

.hma-section {
  padding: 0 0 30px;
  margin: 0 0 32px;
  border-bottom: 1px solid rgba(31, 65, 59, 0.12);
}

.hma-section:last-child {
  margin-bottom: 0;
}

.hma-section h2 {
  margin: 0 0 18px;
  color: var(--hma-teal);
  font-size: clamp(25px, 3.5vw, 36px);
  line-height: 1.28;
  letter-spacing: 0;
}

.hma-wrap--palani .hma-section h2 {
  color: var(--hma-blue);
}

.hma-section p {
  margin: 0 0 18px;
  color: var(--hma-ink);
  font-size: 17px;
  line-height: 1.95;
  overflow-wrap: anywhere;
}

.hma-section p:last-child {
  margin-bottom: 0;
}

.hma-lede {
  padding: 0 0 26px;
  margin: 0 0 34px;
  border-bottom: 2px solid rgba(184, 139, 62, 0.42);
}

.hma-lede p {
  margin: 0;
  color: #273532;
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.85;
}

.hma-pull {
  margin: 30px 0;
  padding: 22px 24px;
  border-left: 5px solid var(--hma-gold);
  background: var(--hma-shell);
  color: #352e24;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.75;
}

.hma-cite {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2em;
  margin-left: 0.18em;
  padding: 0.05em 0.42em;
  border: 1px solid rgba(15, 86, 79, 0.28);
  border-radius: 999px;
  background: var(--hma-mint);
  color: var(--hma-teal);
  font-size: 0.74em;
  font-weight: 900;
  line-height: 1.35;
  text-decoration: none;
  vertical-align: 0.18em;
}

.hma-term {
  display: inline;
  padding: 0 0.03em;
  border-bottom: 1px dotted rgba(15, 86, 79, 0.62);
  color: #0b4f49;
  font-weight: 750;
  cursor: help;
  text-decoration: none;
  text-underline-offset: 0.18em;
}

.hma-wrap--palani .hma-term {
  border-bottom-color: rgba(38, 63, 94, 0.64);
  color: #263f5e;
}

.hma-term:focus {
  outline: 2px solid rgba(184, 139, 62, 0.52);
  outline-offset: 2px;
  border-radius: 3px;
}

.hma-term-popover {
  position: fixed;
  z-index: 100000;
  display: none;
  width: min(380px, calc(100vw - 28px));
  padding: 13px 14px;
  border: 1px solid rgba(15, 86, 79, 0.24);
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 16px 42px rgba(28, 40, 37, 0.2);
  color: var(--hma-ink);
  font-size: 13px;
  line-height: 1.65;
}

.hma-term-popover.is-visible {
  display: block;
}

.hma-term-popover strong {
  display: block;
  margin: 0 0 6px;
  color: var(--hma-teal);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hma-source-popover {
  position: fixed;
  z-index: 99999;
  display: none;
  width: min(360px, calc(100vw - 32px));
  padding: 14px 15px;
  border: 1px solid rgba(15, 86, 79, 0.22);
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 16px 40px rgba(28, 40, 37, 0.18);
  color: var(--hma-ink);
  font-size: 13px;
  line-height: 1.65;
}

.hma-source-popover.is-visible {
  display: block;
}

.hma-source-popover strong {
  display: block;
  margin: 0 0 6px;
  color: var(--hma-teal);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hma-source-popover a {
  display: inline-flex;
  margin-top: 8px;
  font-weight: 800;
}

.hma-wrap--palani .hma-cite {
  border-color: rgba(38, 63, 94, 0.28);
  background: #eef3fb;
  color: var(--hma-blue);
}

.hma-aside {
  align-self: start;
  position: sticky;
  top: 24px;
  display: grid;
  gap: 16px;
}

.hma-sidebox {
  padding: 18px;
  border: 1px solid rgba(31, 65, 59, 0.14);
  border-radius: 8px;
  background: #fbfdfc;
}

.hma-sidebox h3 {
  margin: 0 0 10px;
  color: var(--hma-teal);
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hma-wrap--palani .hma-sidebox h3 {
  color: var(--hma-blue);
}

.hma-sidebox ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hma-sidebox li {
  color: #33413f;
  font-size: 14px;
  line-height: 1.55;
}

.hma-sidebox li::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--hma-gold);
  vertical-align: 0.08em;
}

.hma-sources,
.hma-checklist {
  padding: 24px;
  border: 1px solid rgba(31, 65, 59, 0.14);
  border-radius: 8px;
  background: #fbfdfc;
}

.hma-sources h2,
.hma-checklist h2 {
  margin: 0 0 14px;
  color: var(--hma-teal);
  font-size: 24px;
}

.hma-wrap--palani .hma-sources h2,
.hma-wrap--palani .hma-checklist h2 {
  color: var(--hma-blue);
}

.hma-sources ol,
.hma-checklist ul {
  margin: 0;
  padding-left: 1.25em;
}

.hma-sources li,
.hma-checklist li {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.7;
}

.hma-sources li:target {
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--hma-mint);
}

.hma-checklist {
  background: #fffaf0;
}

@media (max-width: 900px) {
  .hma-body,
  .hma-review-alert {
    grid-template-columns: 1fr;
  }

  .hma-hero-meta,
  .hma-aside {
    position: static;
  }
}

@media (max-width: 640px) {
  .hma-wrap {
    position: relative;
    left: 50%;
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    margin-left: calc(-50vw + 10px);
    margin-right: calc(-50vw + 10px);
    border-left: 0;
    border-right: 0;
    box-shadow: none;
    overflow-x: hidden;
  }

  .hma-hero,
  .hma-body,
  .hma-review-alert,
  .hma-tabs {
    width: 100%;
    max-width: 100%;
    padding-left: 18px;
    padding-right: 18px;
    overflow-x: hidden;
  }

  .hma-hero > *,
  .hma-review-alert > *,
  .hma-tabs > *,
  .hma-body > *,
  .hma-main,
  .hma-aside,
  .hma-section,
  .hma-sidebox,
  .hma-sources,
  .hma-checklist {
    min-width: 0;
    max-width: 100%;
  }

  .hma-section p {
    font-size: 16px;
    line-height: 1.9;
  }

  .hma-hero h1 {
    font-size: clamp(25px, 6.7vw, 30px);
    line-height: 1.16;
    overflow-wrap: anywhere;
  }

  .hma-hero h1 span {
    display: block;
  }

  .hma-subtitle {
    margin-top: 16px;
    font-size: 14.5px;
    line-height: 1.78;
  }

  .hma-hero-meta {
    padding: 14px;
  }

  .hma-subtitle,
  .hma-lede p,
  .hma-review-alert p,
  .hma-sidebox li,
  .hma-hero-meta li,
  .hma-tabs a,
  .hma-section h2,
  .hma-section p {
    overflow-wrap: anywhere;
    word-break: normal;
    line-break: strict;
    max-width: 100%;
    white-space: normal;
  }

  .hma-section h2 {
    font-size: clamp(24px, 7vw, 30px);
  }

  .hma-pull {
    font-size: 18px;
  }

  .hma-hero-meta ul {
    grid-template-columns: 1fr;
  }

  .hma-source-popover {
    display: none !important;
  }
}
