:root {
  color-scheme: light;
  --ink: #17322d;
  --muted: #62726d;
  --paper: #f4f0e6;
  --paper-deep: #e7dfcf;
  --white: #fffdf7;
  --line: #c8c0b0;
  --green: #285f50;
  --green-dark: #173f36;
  --orange: #d56f3f;
  --yellow: #e5b84d;
  --blue: #46758a;
  --red: #a94b43;
  --shadow: 0 14px 34px rgb(33 45 39 / 12%);
  font-family: "Yu Gothic UI", "Hiragino Sans", "BIZ UDPGothic", system-ui, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  line-height: 1.65;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: var(--green-dark);
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 10px;
  left: 10px;
  padding: 8px 12px;
  color: var(--white);
  background: var(--green-dark);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
.site-footer,
.home,
.content-page {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.04em;
}

.classification-mark {
  display: grid;
  grid-template-columns: 18px 22px 31px;
  align-items: end;
  gap: 2px;
  height: 31px;
  padding: 3px;
  border: 2px solid var(--ink);
  background: var(--white);
}

.classification-mark i {
  display: grid;
  place-items: center;
  min-height: 19px;
  padding: 1px;
  color: var(--white);
  background: var(--green);
  font-size: 7px;
  font-style: normal;
  line-height: 1;
}

.classification-mark i:nth-child(2) {
  background: var(--blue);
}

.classification-mark i:nth-child(3) {
  background: var(--orange);
}

.site-header nav {
  display: flex;
  gap: 22px;
}

.site-header nav a {
  padding: 5px 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--orange);
}

.home {
  padding-bottom: 80px;
}

.town-intro {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(430px, 1.18fr);
  gap: 56px;
  align-items: center;
  min-height: 430px;
  padding: 52px 0 42px;
}

.eyebrow,
.section-heading p,
.result-heading p,
.code-tray header p,
.content-heading p {
  margin: 0 0 7px;
  color: var(--orange);
  font-family: ui-monospace, "Cascadia Mono", monospace;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.product-heading h1 {
  max-width: 560px;
  margin: 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(2rem, 4.3vw, 2.75rem);
  line-height: 1.28;
  letter-spacing: 0.025em;
}

.product-heading > p:not(.eyebrow) {
  max-width: 520px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.directory-facts {
  display: flex;
  gap: 0;
  margin-top: 28px;
  border-block: 1px solid var(--line);
}

.directory-facts span {
  display: grid;
  gap: 1px;
  min-width: 118px;
  padding: 12px 20px 11px 0;
}

.directory-facts span + span {
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.directory-facts strong {
  font-family: ui-monospace, "Cascadia Mono", monospace;
  font-size: 1.35rem;
  line-height: 1.2;
}

.directory-facts small {
  color: var(--muted);
  font-size: 0.72rem;
}

.industry-town {
  position: relative;
  min-height: 330px;
  padding: 24px 28px 30px;
  overflow: hidden;
  border: 1px solid #a9a08e;
  border-radius: 7px;
  background: #d9e3dd;
  box-shadow: var(--shadow);
}

.industry-town::before,
.industry-town::after {
  position: absolute;
  content: "";
}

.industry-town::before {
  inset: 11px;
  border: 1px dashed rgb(23 50 45 / 18%);
}

.industry-town::after {
  right: 22px;
  bottom: 103px;
  left: 22px;
  height: 8px;
  border-block: 2px solid var(--ink);
  background: #f2c65b;
}

.town-sky,
.town-line,
.classification-rail {
  position: relative;
  z-index: 1;
}

.town-sky {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 14px;
  min-height: 94px;
  padding-right: 10px;
}

.town-sky span,
.town-line > span {
  position: relative;
  display: grid;
  place-items: center;
  color: var(--white);
  font-family: ui-monospace, "Cascadia Mono", monospace;
  font-weight: 900;
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 rgb(23 50 45 / 18%);
}

.signal-tower {
  width: 34px;
  height: 82px;
  background: var(--blue);
  clip-path: polygon(35% 0, 65% 0, 78% 82%, 100% 82%, 100% 100%, 0 100%, 0 82%, 22% 82%);
}

.office-block {
  width: 68px;
  height: 90px;
  background-color: #536d65;
}

.office-block::before {
  position: absolute;
  top: 13px;
  left: 13px;
  width: 8px;
  height: 8px;
  content: "";
  background: #efe6d3;
  box-shadow:
    20px 0 #efe6d3,
    0 19px #efe6d3,
    20px 19px #efe6d3,
    0 38px #efe6d3,
    20px 38px #efe6d3;
}

.care-block {
  width: 74px;
  height: 70px;
  background: var(--white);
  color: var(--red) !important;
  font-size: 1.3rem;
}

.town-line {
  display: flex;
  align-items: end;
  gap: 12px;
  min-height: 102px;
  padding-bottom: 16px;
}

.field-block {
  width: 74px;
  height: 46px;
  background: #71884f;
  border-top: 9px solid #d8b850 !important;
}

.factory-block {
  position: relative;
  width: 122px;
  height: 82px;
  background: var(--orange);
  clip-path: polygon(
    0 25%,
    24% 8%,
    24% 25%,
    49% 8%,
    49% 25%,
    72% 8%,
    72% 25%,
    100% 25%,
    100% 100%,
    0 100%
  );
}

.factory-block i {
  position: absolute;
  top: 25px;
  right: 13px;
  width: 15px;
  height: 27px;
  background: var(--ink);
}

.shop-block {
  width: 75px;
  height: 64px;
  padding-top: 13px;
  background: var(--yellow);
  color: var(--ink) !important;
  border-top: 13px solid var(--red) !important;
}

.route-block {
  width: 98px;
  height: 47px;
  border-radius: 25px 6px 4px 4px;
  background: var(--blue);
}

.classification-rail {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1.2fr;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  padding: 9px;
  border: 2px solid var(--ink);
  background: var(--white);
}

.classification-rail span {
  display: grid;
  gap: 2px;
  padding: 5px 7px;
}

.classification-rail small {
  color: var(--muted);
  font-size: 0.57rem;
}

.classification-rail b {
  font-family: ui-monospace, "Cascadia Mono", monospace;
  font-size: 1rem;
}

.classification-rail > i {
  color: var(--muted);
  font-style: normal;
}

.classification-rail .rail-final {
  color: var(--white);
  background: var(--green-dark);
}

.classification-rail .rail-final small {
  color: #d8e4de;
}

.version-ribbon {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 13px 17px;
  color: var(--white);
  background: var(--green-dark);
  border-left: 7px solid var(--yellow);
}

.version-ribbon strong {
  font-size: 0.82rem;
}

.version-ribbon span {
  color: #d7e1dc;
  font-size: 0.78rem;
}

.version-ribbon a {
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 800;
}

.search-desk,
.major-deck,
.industry-results,
.code-tray {
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 7px 20px rgb(33 45 39 / 6%);
}

.search-desk {
  margin-top: 32px;
  padding: 28px;
  border-top: 5px solid var(--orange);
}

.section-heading,
.result-heading,
.code-tray > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.section-heading h2,
.result-heading h2,
.code-tray h2 {
  margin: 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 1.38rem;
  line-height: 1.25;
}

.section-heading output,
.result-heading output,
.code-tray output {
  color: var(--green-dark);
  font-family: ui-monospace, "Cascadia Mono", monospace;
  font-size: 0.82rem;
  font-weight: 800;
}

.industry-search {
  display: grid;
  gap: 7px;
  margin-top: 22px;
}

.industry-search > span:first-child,
.level-filter legend {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.search-box {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 58px;
  border: 2px solid var(--ink);
  background: #fff;
}

.search-box:focus-within {
  outline: 3px solid rgb(229 184 77 / 45%);
  outline-offset: 2px;
}

.search-box i {
  padding: 0 15px;
  color: var(--orange);
  font-size: 1.45rem;
  font-style: normal;
}

.search-box input {
  min-width: 0;
  height: 54px;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 1rem;
}

.search-box button,
#clear-major {
  margin: 7px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
}

.level-filter {
  margin: 19px 0 0;
  padding: 0;
  border: 0;
}

.level-filter div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 7px;
}

.level-filter button {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.level-filter button[aria-pressed="true"] {
  color: var(--white);
  border-color: var(--green-dark);
  background: var(--green-dark);
}

.privacy-note {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.major-deck {
  margin-top: 28px;
  padding: 28px;
}

.major-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  margin-top: 20px;
}

.major-grid > button {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-rows: auto auto;
  gap: 3px 9px;
  min-height: 82px;
  padding: 12px;
  overflow: hidden;
  text-align: left;
  border: 1px solid var(--line);
  background: #fbf8f0;
  cursor: pointer;
}

.major-grid > button:hover,
.major-grid > button:focus-visible {
  border-color: var(--green);
  box-shadow: 3px 3px 0 var(--green);
  transform: translate(-1px, -1px);
}

.major-grid > button[aria-pressed="true"] {
  color: var(--white);
  border-color: var(--green-dark);
  background: var(--green-dark);
}

.major-code {
  position: absolute;
  top: 4px;
  right: 7px;
  color: var(--orange);
  font-family: ui-monospace, "Cascadia Mono", monospace;
  font-size: 0.72rem;
  font-weight: 900;
}

.major-grid strong {
  align-self: end;
  padding-right: 12px;
  font-size: 0.76rem;
  line-height: 1.35;
}

.major-grid small {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.63rem;
}

.major-grid > button[aria-pressed="true"] small {
  color: #d5e2dc;
}

.major-icon {
  position: relative;
  grid-row: 1 / span 2;
  align-self: end;
  width: 32px;
  height: 42px;
  border: 2px solid currentColor;
  opacity: 0.72;
}

.major-icon::before,
.major-icon::after,
.major-icon i {
  position: absolute;
  content: "";
}

.major-icon::before {
  right: 4px;
  bottom: 4px;
  left: 4px;
  height: 5px;
  border-block: 2px solid currentColor;
}

.major-icon::after {
  top: 5px;
  left: 7px;
  width: 4px;
  height: 4px;
  background: currentColor;
  box-shadow:
    10px 0 currentColor,
    0 9px currentColor,
    10px 9px currentColor;
}

.major-icon.field,
.major-icon.wave {
  height: 25px;
  border-radius: 50% 50% 3px 3px;
}

.major-icon.factory {
  clip-path: polygon(0 25%, 27% 5%, 27% 25%, 56% 5%, 56% 25%, 100% 25%, 100% 100%, 0 100%);
}

.major-icon.signal {
  width: 20px;
  clip-path: polygon(35% 0, 65% 0, 100% 100%, 0 100%);
}

.major-icon.route {
  height: 24px;
  border-radius: 18px 3px 3px 3px;
}

.major-icon.shop,
.major-icon.table,
.major-icon.ticket {
  border-top-width: 8px;
}

.major-icon.care::before {
  top: 8px;
  right: auto;
  bottom: auto;
  left: 13px;
  width: 4px;
  height: 20px;
  border: 0;
  background: currentColor;
}

.major-icon.care::after {
  top: 16px;
  left: 5px;
  width: 20px;
  height: 4px;
  background: currentColor;
  box-shadow: none;
}

.result-and-tray {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 22px;
  align-items: start;
  margin-top: 28px;
}

.industry-results,
.code-tray {
  padding: 24px;
}

.industry-results {
  min-width: 0;
}

#search-status {
  margin: 16px 0 13px;
  padding: 8px 11px;
  color: var(--muted);
  background: var(--paper);
  font-size: 0.76rem;
  border-left: 3px solid var(--blue);
}

.classification-list {
  display: grid;
  gap: 13px;
}

.classification-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  background: #fff;
}

.classification-card.level-1 {
  border-left-color: var(--orange);
}

.classification-card.level-2 {
  border-left-color: var(--yellow);
}

.classification-card.level-3 {
  border-left-color: var(--green);
}

.classification-trail {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 13px;
  padding-bottom: 11px;
  border-bottom: 1px dashed var(--line);
}

.classification-trail span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  max-width: 100%;
  padding: 3px 6px;
  background: var(--paper);
}

.classification-trail span.current {
  color: var(--white);
  background: var(--green-dark);
}

.classification-trail code {
  font-size: 0.68rem;
  font-weight: 900;
}

.classification-trail small {
  overflow: hidden;
  font-size: 0.62rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.classification-trail i {
  color: var(--muted);
  font-style: normal;
}

.classification-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.classification-identity {
  display: grid;
  grid-template-columns: auto auto;
  gap: 3px 9px;
  align-items: center;
}

.level-label {
  padding: 2px 7px;
  color: var(--muted);
  background: var(--paper-deep);
  font-size: 0.65rem;
  font-weight: 800;
}

.classification-code {
  color: var(--orange);
  font-size: 1rem;
  font-weight: 900;
}

.classification-name {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 1.18rem;
  line-height: 1.4;
}

.copy-code,
.copy-record,
.save-record,
.open-saved,
.remove-saved,
.saved-actions button,
.expand-description,
.load-more {
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
}

.copy-code {
  flex: none;
  padding: 7px 9px;
}

.classification-description {
  margin: 14px 0 0;
  color: #43534e;
  font-size: 0.83rem;
  white-space: pre-line;
}

.classification-description.is-clipped {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.expand-description {
  margin-top: 8px;
  padding: 5px 8px;
  color: var(--green-dark);
  background: transparent;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid var(--paper-deep);
}

.card-actions > * {
  min-height: 34px;
  padding: 7px 10px;
}

.official-link {
  display: inline-flex;
  align-items: center;
  margin-right: auto;
  color: var(--green-dark);
  font-size: 0.7rem;
  font-weight: 800;
}

.save-record {
  color: var(--white);
  border-color: var(--green-dark);
  background: var(--green-dark);
}

.save-record:disabled {
  color: var(--muted);
  border-color: var(--line);
  background: var(--paper-deep);
  cursor: default;
}

.load-more {
  width: 100%;
  margin-top: 14px;
  padding: 11px;
  background: var(--white);
}

.loading-note,
.empty-result {
  margin: 0;
  padding: 30px 18px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  background: var(--paper);
}

.code-tray {
  position: sticky;
  top: 16px;
  border-top: 5px solid var(--green);
}

#saved-items {
  display: grid;
  gap: 8px;
  margin-top: 17px;
}

.tray-empty,
#saved-items > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.saved-classification {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 9px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.saved-number {
  color: var(--orange);
  font-family: ui-monospace, "Cascadia Mono", monospace;
  font-size: 0.65rem;
  font-weight: 900;
}

.saved-classification > div {
  display: grid;
  min-width: 0;
}

.saved-classification code {
  color: var(--orange);
  font-size: 0.68rem;
  font-weight: 900;
}

.saved-classification strong {
  overflow: hidden;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-classification small {
  color: var(--muted);
  font-size: 0.61rem;
}

.saved-item-actions {
  display: grid;
  gap: 4px;
}

.open-saved,
.remove-saved {
  padding: 4px 6px;
}

.saved-actions {
  display: grid;
  gap: 7px;
  margin-top: 16px;
}

.saved-actions button {
  padding: 9px;
  color: var(--white);
  border-color: var(--green-dark);
  background: var(--green-dark);
}

.saved-actions button.clear-button {
  color: var(--muted);
  border-color: var(--line);
  background: transparent;
}

.saved-actions button:disabled {
  opacity: 0.45;
  cursor: default;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 23px 0 32px;
  color: var(--muted);
  font-size: 0.72rem;
  border-top: 1px solid var(--line);
}

.site-footer span:last-child {
  display: flex;
  gap: 17px;
}

.content-page {
  min-height: calc(100vh - 180px);
  padding: 52px 0 80px;
}

.content-heading {
  display: flex;
  gap: 18px;
  align-items: center;
  max-width: 760px;
  margin-bottom: 32px;
}

.page-index {
  display: grid;
  flex: none;
  place-items: center;
  width: 55px;
  height: 55px;
  color: var(--white);
  background: var(--green-dark);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 1.35rem;
  border: 4px double var(--paper);
  outline: 2px solid var(--green-dark);
}

.content-heading h1 {
  margin: 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(1.7rem, 4vw, 2.35rem);
  line-height: 1.35;
}

.instruction-grid,
.source-grid,
.privacy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.source-grid {
  grid-template-columns: repeat(2, 1fr);
}

.instruction-grid section,
.source-grid section,
.privacy-grid section {
  position: relative;
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 4px 4px 0 var(--paper-deep);
}

.instruction-grid b {
  position: absolute;
  top: 12px;
  right: 14px;
  color: var(--orange);
  font-family: "Yu Mincho", serif;
  font-size: 1.4rem;
}

.instruction-grid h2,
.source-grid h2,
.privacy-grid h2 {
  margin: 0 0 10px;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 1.08rem;
}

.instruction-grid p,
.source-grid p,
.privacy-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.level-ledger {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 8px;
  align-items: center;
  max-width: 780px;
  margin: 28px auto;
  padding: 16px;
  border: 2px solid var(--ink);
  background: var(--white);
}

.level-ledger span {
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 9px;
  background: var(--paper);
}

.level-ledger b {
  font-family: ui-monospace, "Cascadia Mono", monospace;
}

.level-ledger small {
  color: var(--muted);
  font-size: 0.67rem;
}

.level-ledger i {
  color: var(--orange);
  font-style: normal;
  font-weight: 900;
}

.care-note {
  max-width: 880px;
  margin-top: 27px;
  padding: 18px 21px;
  color: var(--ink);
  border-left: 6px solid var(--yellow);
  background: #eee6d4;
}

.care-note strong {
  display: block;
  margin-bottom: 4px;
}

.care-note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.page-cta {
  display: inline-block;
  margin-top: 28px;
  padding: 10px 17px;
  color: var(--white);
  background: var(--green-dark);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.source-ledger {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 24px 0 0;
  background: var(--line);
  border: 1px solid var(--line);
}

.source-ledger div {
  min-width: 0;
  padding: 13px;
  background: var(--white);
}

.source-ledger div:last-child {
  grid-column: 1 / -1;
}

.source-ledger dt {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.source-ledger dd {
  margin: 3px 0 0;
  font-size: 0.8rem;
}

.source-ledger code {
  overflow-wrap: anywhere;
  font-size: 0.72rem;
}

.not-found {
  display: grid;
  justify-items: center;
  min-height: calc(100vh - 170px);
  padding: 80px 20px;
  text-align: center;
}

.not-found > span {
  color: var(--orange);
  font-family: ui-monospace, "Cascadia Mono", monospace;
  font-size: 2.5rem;
  font-weight: 900;
}

.not-found h1 {
  margin: 8px 0;
  font-family: "Yu Mincho", serif;
  font-size: 1.8rem;
}

.not-found p {
  color: var(--muted);
}

.not-found a {
  padding: 9px 15px;
  color: var(--white);
  background: var(--green-dark);
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 960px) {
  .town-intro {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 40px;
  }

  .industry-town {
    min-height: 300px;
  }

  .major-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .result-and-tray {
    grid-template-columns: 1fr;
  }

  .code-tray {
    position: static;
  }
}

@media (max-width: 700px) {
  .site-header,
  .site-footer,
  .home,
  .content-page {
    width: min(100% - 22px, 1180px);
  }

  .site-header {
    align-items: start;
    min-height: 92px;
    padding: 14px 0;
  }

  .site-header nav {
    display: grid;
    gap: 2px;
    justify-items: end;
  }

  .site-header nav a {
    padding: 1px 0;
    font-size: 0.74rem;
  }

  .town-intro {
    min-height: 0;
    padding: 34px 0 28px;
  }

  .product-heading h1 {
    font-size: 2rem;
  }

  .directory-facts span {
    min-width: 0;
    flex: 1;
    padding-right: 10px;
  }

  .directory-facts span + span {
    padding-left: 10px;
  }

  .directory-facts strong {
    font-size: 1.08rem;
  }

  .industry-town {
    min-height: 270px;
    padding: 18px 14px;
  }

  .town-sky {
    min-height: 78px;
  }

  .town-line {
    gap: 6px;
    transform: scale(0.88);
    transform-origin: left bottom;
  }

  .classification-rail {
    gap: 2px;
  }

  .classification-rail span {
    padding: 4px 2px;
  }

  .classification-rail small {
    font-size: 0.49rem;
  }

  .classification-rail b {
    font-size: 0.78rem;
  }

  .version-ribbon {
    grid-template-columns: 1fr auto;
    gap: 5px 12px;
  }

  .version-ribbon span {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .search-desk,
  .major-deck,
  .industry-results,
  .code-tray {
    padding: 18px;
  }

  .major-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .classification-heading {
    display: grid;
  }

  .copy-code {
    justify-self: start;
  }

  .card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .official-link {
    grid-column: 1 / -1;
  }

  .instruction-grid,
  .source-grid,
  .privacy-grid,
  .source-ledger {
    grid-template-columns: 1fr;
  }

  .source-ledger div:last-child {
    grid-column: auto;
  }

  .level-ledger {
    grid-template-columns: 1fr auto 1fr;
  }

  .level-ledger span:nth-of-type(3),
  .level-ledger span:nth-of-type(4),
  .level-ledger i:nth-of-type(2),
  .level-ledger i:nth-of-type(3) {
    display: none;
  }

  .site-footer {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
