:root {
  color-scheme: light;
  --ink: #213044;
  --muted: #66717d;
  --paper: #fffefa;
  --desk: #f2eee5;
  --line: #cbd0d2;
  --navy: #253447;
  --orange: #e77238;
  --mint: #6eae91;
  --yellow: #e9bd55;
  --shadow: 0 15px 35px rgba(33, 48, 68, 0.11);
  font-family: Inter, "Yu Gothic UI", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  color: var(--ink);
  background: var(--desk);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-width: 320px;
  background: var(--desk);
}
a {
  color: inherit;
}
button,
input,
select {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  min-height: 64px;
  padding: 10px max(20px, calc((100vw - 1180px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(33, 48, 68, 0.17);
  background: rgba(242, 238, 229, 0.96);
  backdrop-filter: blur(12px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: -0.03em;
}
.brand img {
  border-radius: 9px;
  box-shadow: 0 3px 10px rgba(33, 48, 68, 0.16);
}
.site-header nav {
  display: flex;
  gap: 6px;
}
.site-header nav a {
  padding: 8px 10px;
  border-radius: 7px;
  text-decoration: none;
  color: #4f5b68;
  font-size: 14px;
  font-weight: 750;
}
.site-header nav a:hover {
  background: #fffefa;
  color: var(--navy);
}

main {
  min-height: calc(100vh - 190px);
}
.intro-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 62px 20px 54px;
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(420px, 1.12fr);
  align-items: center;
  gap: 72px;
}
.eyebrow {
  margin: 0 0 13px;
  color: var(--orange);
  font:
    850 11px ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.intro-copy h1,
.page-intro h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(2rem, 4.2vw, 2.5rem);
  line-height: 1.19;
  letter-spacing: -0.055em;
}
.intro-copy > p:not(.eyebrow) {
  max-width: 560px;
  margin: 22px 0 26px;
  color: #596573;
  font-size: 16px;
  line-height: 1.9;
}
.start-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 2px solid var(--orange);
  text-decoration: none;
  font-weight: 850;
}
.start-link span {
  color: var(--orange);
}

.condition-board {
  position: relative;
  min-height: 354px;
  padding: 56px 42px 32px;
  border: 2px solid #35465b;
  border-radius: 14px;
  background: #30435a;
  box-shadow:
    0 18px 0 #d5cfc2,
    var(--shadow);
  transform: rotate(0.5deg);
}
.condition-board::before {
  position: absolute;
  inset: 17px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  content: "";
  pointer-events: none;
}
.board-clip {
  position: absolute;
  z-index: 2;
  top: -14px;
  left: 50%;
  width: 92px;
  height: 35px;
  border: 4px solid #b5bbc1;
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  background: #e8e7e1;
  transform: translateX(-50%);
  box-shadow: inset 0 4px 0 #faf9f4;
}
.condition-slip {
  position: relative;
  z-index: 1;
  min-height: 68px;
  margin-bottom: 13px;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 42px 1fr 28px;
  align-items: center;
  gap: 13px;
  border-radius: 8px 4px 9px 5px;
  background: var(--paper);
  box-shadow: 4px 5px 0 rgba(15, 28, 43, 0.3);
}
.condition-slip:nth-of-type(3) {
  transform: rotate(-0.7deg);
}
.condition-slip:nth-of-type(4) {
  transform: rotate(0.45deg);
}
.slip-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  color: var(--orange);
  font-weight: 950;
}
.condition-slip b,
.condition-slip small {
  display: block;
}
.condition-slip b {
  font-size: 16px;
}
.condition-slip small {
  margin-top: 3px;
  color: #737d87;
  font-size: 11px;
}
.condition-slip i {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: var(--mint);
  color: white;
  font-style: normal;
  font-weight: 950;
}
.slip-bonus .slip-icon {
  color: #bd8b20;
}
.slip-commute .slip-icon {
  color: #4e82a5;
}
.board-note {
  position: relative;
  z-index: 1;
  margin: 22px 0 0;
  color: #dfe5eb;
  font:
    650 11px/1.7 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
}

.finder-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 20px 80px;
}
.metric-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.metric-tab {
  min-width: 0;
  min-height: 82px;
  padding: 14px 15px;
  display: grid;
  grid-template-columns: 38px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  border: 1px solid #c7ccd0;
  border-bottom: 4px solid #aeb5bc;
  border-radius: 10px 10px 5px 5px;
  background: #e7e4dd;
  color: #5f6872;
  text-align: left;
  cursor: pointer;
}
.metric-tab > span {
  grid-row: 1 / 3;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-weight: 950;
}
.metric-tab b,
.metric-tab small {
  display: block;
}
.metric-tab b {
  color: var(--ink);
  font-size: 15px;
}
.metric-tab small {
  font-size: 10px;
}
.metric-tab.active {
  border-color: var(--navy);
  border-bottom-color: var(--orange);
  background: var(--paper);
  color: var(--orange);
  box-shadow: 0 8px 22px rgba(33, 48, 68, 0.08);
  transform: translateY(-2px);
}
.controls {
  margin-top: 18px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(250px, 1.2fr) 180px minmax(210px, 0.8fr);
  gap: 13px;
  border: 1px solid #c8c5bd;
  border-radius: 11px;
  background: #ded9ce;
}
.controls label {
  min-width: 0;
}
.controls label > span {
  display: block;
  margin: 0 0 7px;
  color: #626a72;
  font:
    800 10px ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  letter-spacing: 0.08em;
}
.controls input,
.controls select {
  width: 100%;
  height: 45px;
  padding: 0 12px;
  border: 1px solid #adb4ba;
  border-radius: 7px;
  outline: none;
  background: var(--paper);
  color: var(--ink);
}
.controls input:focus,
.controls select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(231, 114, 56, 0.13);
}
.finder-status {
  min-height: 54px;
  padding: 14px 3px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #68727c;
  font-size: 12px;
}
.finder-status p {
  margin: 0;
}
.finder-status p:last-child {
  font-weight: 800;
}
.boundary-card {
  margin: 0 0 14px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-left: 4px solid var(--yellow);
  border-radius: 5px;
  background: rgba(255, 254, 250, 0.68);
}
.boundary-card span {
  flex: none;
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--navy);
  color: white;
  font:
    850 9px ui-monospace,
    monospace;
}
.boundary-card p {
  margin: 0;
  color: #5d6872;
  font-size: 12px;
  line-height: 1.65;
}

.results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}
.industry-card {
  position: relative;
  min-width: 0;
  padding: 21px 18px 17px;
  border: 1px solid #c8cdd0;
  border-radius: 8px 8px 11px 11px;
  background: var(--paper);
  box-shadow: 0 7px 18px rgba(33, 48, 68, 0.07);
  overflow: hidden;
}
.industry-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: #aeb7c0;
  content: "";
}
.industry-card.selected {
  border-color: var(--orange);
  box-shadow: 0 8px 25px rgba(231, 114, 56, 0.16);
}
.industry-card.selected::before {
  background: var(--orange);
}
.card-tab {
  position: absolute;
  top: 5px;
  right: 16px;
  padding: 4px 8px 5px;
  border-radius: 0 0 5px 5px;
  background: #e3e6e7;
  color: #5c6874;
  font:
    850 9px ui-monospace,
    monospace;
}
.card-heading {
  min-height: 47px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}
.card-heading p {
  margin: 0 0 4px;
  color: #8a9299;
  font:
    750 9px ui-monospace,
    monospace;
}
.card-heading h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.035em;
}
.compare-toggle {
  flex: none;
  padding: 7px 9px;
  border: 1px solid #aeb5bb;
  border-radius: 6px;
  background: transparent;
  color: #4f5d6b;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.selected .compare-toggle {
  border-color: var(--orange);
  background: #fff2e9;
  color: #bd5020;
}
.card-main {
  min-height: 78px;
  margin: 18px 0 12px;
  display: grid;
  grid-template-columns: 1fr 131px;
  align-items: end;
  gap: 10px;
}
.percent-block strong,
.percent-block span {
  display: block;
}
.percent-block strong {
  font:
    900 clamp(28px, 3vw, 38px)/1 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  letter-spacing: -0.08em;
}
.percent-block span {
  margin-top: 8px;
  color: #6d7780;
  font-size: 11px;
  font-weight: 750;
}
.sparkline {
  width: 131px;
  height: 42px;
  overflow: visible;
}
.sparkline path {
  fill: none;
  stroke: #d6dadd;
  stroke-width: 1;
}
.sparkline polyline {
  fill: none;
  stroke: var(--orange);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}
.sparkline circle {
  fill: var(--paper);
  stroke: var(--orange);
  stroke-width: 2.5;
}
.distribution {
  height: 10px;
  display: flex;
  border: 1px solid #bcc2c6;
  border-radius: 5px;
  overflow: hidden;
  background: #e5e7e8;
}
.segment {
  display: block;
  min-width: 0;
}
.primary {
  background: var(--orange);
}
.secondary {
  background: var(--mint);
}
.tertiary {
  background: var(--yellow);
}
.none {
  background: #c8cdd1;
}
.legend {
  min-height: 37px;
  padding-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 5px 9px;
  color: #68727b;
  font-size: 9px;
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.legend i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
}
.card-foot {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px dashed #d4d6d5;
  color: #7b8389;
  font:
    750 9px ui-monospace,
    monospace;
}
.no-results {
  grid-column: 1 / -1;
  padding: 70px 20px;
  border: 1px dashed #b5bac0;
  border-radius: 10px;
  text-align: center;
}
.no-results span {
  font:
    900 32px ui-monospace,
    monospace;
  color: var(--orange);
}
.no-results h3 {
  margin: 10px 0 5px;
}
.no-results p {
  margin: 0;
  color: var(--muted);
}

.compare-drawer {
  position: sticky;
  z-index: 20;
  bottom: 14px;
  max-width: 1180px;
  margin: 0 auto 24px;
  padding: 14px;
  display: grid;
  grid-template-columns: 150px 1fr 150px;
  align-items: center;
  gap: 13px;
  border: 1px solid #41536a;
  border-radius: 12px;
  background: #253447;
  color: white;
  box-shadow: 0 13px 34px rgba(20, 31, 45, 0.24);
}
.compare-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.compare-head p,
.compare-head h2 {
  margin: 0;
}
.compare-head p {
  color: #aeb8c4;
  font-size: 9px;
}
.compare-head h2 {
  margin-top: 3px;
  font-size: 15px;
}
.compare-head button {
  display: none;
  border: 0;
  background: none;
  color: #c8d0d9;
  font-size: 9px;
  cursor: pointer;
}
.has-items .compare-head button {
  display: block;
}
.compare-list {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.compare-empty {
  margin: 0;
  color: #abb7c4;
  font-size: 11px;
}
.compare-row {
  min-width: 0;
  padding: 8px;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 7px;
  border: 1px solid #51647a;
  border-radius: 7px;
  background: #30445a;
}
.compare-row > span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: #425970;
  color: #dce5ec;
  font:
    800 8px ui-monospace,
    monospace;
}
.compare-row b,
.compare-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.compare-row b {
  font-size: 10px;
}
.compare-row small {
  margin-top: 2px;
  color: #aab6c2;
  font-size: 7px;
}
.compare-row strong {
  font:
    850 11px ui-monospace,
    monospace;
}
.compare-row button {
  border: 0;
  background: none;
  color: #b7c0c8;
  cursor: pointer;
}
.copy-button {
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  background: var(--orange);
  color: white;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.copy-button:disabled {
  background: #536273;
  color: #8e9baa;
  cursor: default;
}
.compare-drawer.limit-reached {
  outline: 4px solid rgba(231, 114, 56, 0.35);
}

.page-intro {
  max-width: 920px;
  margin: 0 auto;
  padding: 76px 20px 42px;
}
.page-intro > p:last-child {
  max-width: 690px;
  margin: 20px 0 0;
  color: #606b76;
  line-height: 1.9;
}
.prose-grid,
.source-cards {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 20px 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.prose-grid.two {
  grid-template-columns: repeat(2, 1fr);
}
.prose-grid article {
  padding: 24px;
  border: 1px solid #c9cdd0;
  border-top: 4px solid var(--navy);
  border-radius: 8px;
  background: var(--paper);
}
.prose-grid h2 {
  margin: 14px 0 9px;
  font-size: 18px;
}
.prose-grid p,
.prose-section p,
.prose-section li {
  color: #5b6671;
  font-size: 14px;
  line-height: 1.9;
}
.prose-mark {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border: 2px solid var(--orange);
  border-radius: 50%;
  color: var(--orange);
  font-weight: 950;
}
.prose-section {
  max-width: 880px;
  margin: 24px auto 64px;
  padding: 27px 30px;
  border-left: 5px solid var(--yellow);
  background: rgba(255, 254, 250, 0.72);
}
.prose-section h2 {
  margin: 0 0 10px;
  font-size: 19px;
}
.prose-section p {
  margin: 0;
}
.prose-section ul {
  margin: 0;
  padding-left: 20px;
}
.source-cards a {
  min-height: 140px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  border: 1px solid #bec4c8;
  border-radius: 8px;
  background: var(--paper);
  text-decoration: none;
  box-shadow: 0 6px 14px rgba(33, 48, 68, 0.06);
}
.source-cards a:hover {
  border-color: var(--orange);
  transform: translateY(-2px);
}
.source-cards span {
  color: var(--orange);
  font:
    850 10px ui-monospace,
    monospace;
}
.source-cards b {
  margin-top: 17px;
}
.source-cards small {
  margin-top: auto;
  color: #6c7680;
}
.source-links {
  max-width: 880px;
  margin: -40px auto 70px;
  padding: 0 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  font-weight: 750;
}
.not-found {
  min-height: 66vh;
  padding: 110px 20px;
  text-align: center;
}
.not-found > span {
  color: var(--orange);
  font:
    900 45px ui-monospace,
    monospace;
}
.not-found h1 {
  margin: 12px 0 24px;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}
.not-found a {
  font-weight: 850;
}

footer {
  padding: 30px max(20px, calc((100vw - 1180px) / 2));
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid #c9c6be;
  color: #6f767c;
  font-size: 11px;
}
footer p {
  margin: 0;
}
footer div {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

@media (max-width: 900px) {
  .intro-shell {
    grid-template-columns: 1fr;
    gap: 42px;
  }
  .condition-board {
    max-width: 620px;
    width: 100%;
  }
  .results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .compare-drawer {
    margin-inline: 12px;
    grid-template-columns: 120px 1fr;
  }
  .copy-button {
    grid-column: 1 / -1;
  }
  .compare-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .site-header {
    min-height: 58px;
  }
  .brand span {
    font-size: 14px;
  }
  .site-header nav a {
    padding: 7px 5px;
    font-size: 11px;
  }
  .site-header nav a:nth-child(4) {
    display: none;
  }
  .intro-shell {
    padding-top: 42px;
  }
  .condition-board {
    min-height: 320px;
    padding: 48px 24px 24px;
  }
  .metric-tabs {
    grid-template-columns: 1fr;
  }
  .metric-tab {
    min-height: 65px;
  }
  .controls {
    grid-template-columns: 1fr;
  }
  .results {
    grid-template-columns: 1fr;
  }
  .industry-card {
    padding-inline: 16px;
  }
  .compare-drawer {
    position: relative;
    bottom: auto;
    grid-template-columns: 1fr;
  }
  .compare-list {
    grid-template-columns: 1fr;
  }
  .prose-grid,
  .prose-grid.two,
  .source-cards {
    grid-template-columns: 1fr;
  }
  .page-intro {
    padding-top: 55px;
  }
  footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
