:root {
  color-scheme: light;
  --ink: #172f46;
  --muted: #566b7b;
  --line: #d9e2e7;
  --blue: #185b82;
  --soft: #edf5f8;
  --up: #ac383b;
  --down: #087355;
  font-family: Inter, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  background: #f3f6f7;
}
body[data-colors='green-up'] {
  --up: #087355;
  --down: #ac383b;
}
* {
  box-sizing: border-box;
}
body,
h1,
h2,
h3,
p,
dl,
dd {
  margin: 0;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.58;
}
button,
a,
input,
select,
canvas {
  -webkit-tap-highlight-color: transparent;
}
:focus-visible {
  outline: 3px solid #3894c3;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.wrap {
  width: min(1176px, calc(100% - 64px));
  margin-inline: auto;
}
.site-header {
  background: var(--ink);
  color: #fff;
}
.nav,
.brand,
.nav-links,
.page-head,
.actions,
.action,
.status-line,
.panel-heading,
.index-head,
.index-price,
.index-foot,
.detail-top,
.price-line,
.chart-heading,
.favorite,
.source-note,
.dialog-head,
.dialog-actions {
  display: flex;
  align-items: center;
}
.nav {
  min-height: 61px;
  gap: 52px;
}
.brand {
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.brand img {
  border-radius: 6px;
}
.nav a {
  color: inherit;
  text-decoration: none;
}
.nav-links {
  align-self: stretch;
  gap: 28px;
}
.nav-links a {
  display: grid;
  align-items: center;
  border-bottom: 3px solid transparent;
  padding-top: 3px;
  color: #c1cdd7;
  font-size: 13px;
}
.nav-links a:hover,
.nav-links [aria-current] {
  color: white;
}
.nav-links [aria-current] {
  border-bottom-color: #78c2d9;
}
.page-head {
  justify-content: space-between;
  gap: 20px;
  padding: 33px 0 26px;
}
h1 {
  font-size: clamp(32px, 4vw, 42px);
  line-height: 1.25;
  letter-spacing: -0.04em;
}
h2 {
  font-size: 19px;
  letter-spacing: -0.025em;
}
h3 {
  font-size: 14px;
}
.status-line,
.stamp,
.chart-caption,
.count,
.index-foot,
.index-time,
.source-note {
  color: var(--muted);
  font-size: 12px;
}
.status-line {
  margin-top: 8px;
  gap: 8px;
  min-height: 19px;
}
.status-line i {
  width: 7px;
  height: 7px;
  background: #8599a6;
  border-radius: 50%;
  flex: none;
}
.status-line[data-state='ok'] i {
  background: #148768;
}
.status-line[data-state='error'] i,
.status-line[data-state='partial'] i {
  background: #b47518;
}
.actions,
.dialog-actions {
  gap: 9px;
}
.action,
.favorite {
  justify-content: center;
  gap: 7px;
  border: 1px solid #c7d4dd;
  border-radius: 7px;
  background: white;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  min-height: 40px;
}
.action:not(:disabled):hover,
.favorite:not(:disabled):hover {
  border-color: var(--blue);
  background: var(--soft);
}
.action.primary {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.action.primary:hover {
  background: #264b66;
  color: white;
}
#refresh span {
  font:
    21px/1 'Segoe UI Symbol',
    sans-serif;
}
.sliders {
  width: 16px;
  height: 12px;
  display: inline-block;
  position: relative;
  background: linear-gradient(
    to bottom,
    transparent 2px,
    currentColor 2px 3px,
    transparent 3px 9px,
    currentColor 9px 10px,
    transparent 10px
  );
}
.sliders::before,
.sliders::after {
  content: '';
  position: absolute;
  background: currentColor;
  width: 3px;
  height: 6px;
  border-radius: 2px;
}
.sliders::before {
  left: 3px;
  top: 0;
}
.sliders::after {
  right: 3px;
  bottom: 0;
}
.overview h2 {
  margin-bottom: 11px;
  font-size: 15px;
}
.indices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.panel,
.index-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 11px;
}
.index-card {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 15px 19px 13px;
  text-align: left;
}
.index-card:hover,
.index-card[aria-pressed='true'] {
  border-color: #7da6bc;
}
.index-head,
.index-price,
.index-foot,
.detail-top,
.chart-heading,
.panel-heading,
.dialog-head {
  justify-content: space-between;
  gap: 10px;
}
.index-name {
  font-size: 15px;
}
.index-market,
.instrument,
.row-name small {
  font:
    11px/1.4 'Cascadia Mono',
    Consolas,
    'Microsoft YaHei',
    monospace;
  letter-spacing: 0.035em;
  color: var(--muted);
}
.index-price {
  flex-wrap: wrap;
  gap: 4px 8px;
}
.index-price b {
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 650;
  line-height: 1.22;
  letter-spacing: -0.045em;
}
.move,
.row-change {
  font-weight: 650;
  white-space: nowrap;
}
.index-price .move {
  font-size: 13px;
}
[data-sign='up'] {
  color: var(--up);
}
[data-sign='down'] {
  color: var(--down);
}
.range {
  display: block;
  position: relative;
  background: #e5ebee;
  margin: 3px 1px 0;
  height: 3px;
  border-radius: 2px;
}
.range i {
  display: none;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  left: var(--position);
  width: 8px;
  height: 8px;
  border: 1.5px solid white;
  border-radius: 50%;
  background: #51788e;
  box-shadow: 0 0 0 1px #7291a1;
}
.range[data-ready] i {
  display: block;
}
.index-foot,
.index-time {
  font-size: 11px;
}
.index-time {
  line-height: 1.2;
}
.exchange {
  margin-top: 18px;
  padding: 14px 19px;
}
.exchange .panel-heading {
  padding: 0 0 11px;
}
.exchange-fields {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr) auto minmax(0, 1fr) minmax(0, 1.35fr);
  align-items: end;
  gap: 10px;
}
.exchange-fields label {
  display: grid;
  min-width: 0;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.exchange-fields input,
.exchange-fields select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #c7d4dd;
  border-radius: 6px;
  background: white;
  color: var(--ink);
  font-size: 16px;
}
.exchange-fields input[aria-invalid='true'] {
  border-color: #ac383b;
}
.exchange-fields select {
  text-overflow: ellipsis;
}
.exchange-swap {
  width: 42px;
  min-height: 42px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}
.exchange-result {
  min-width: 0;
  padding: 6px 12px;
  border-radius: 7px;
  background: var(--soft);
}
.exchange-result output {
  display: block;
  color: var(--ink);
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.exchange-info {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.exchange-rate {
  color: var(--ink);
  font-weight: 650;
}
.exchange-info a {
  color: var(--blue);
  text-underline-offset: 3px;
}
.exchange-note {
  margin-left: auto;
}
.exchange-invalid {
  margin-top: 8px;
  color: #ac383b;
  font-size: 12px;
}
.board {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(304px, 0.86fr) minmax(0, 1.64fr);
  gap: 18px;
  margin-top: 20px;
}
.panel {
  min-width: 0;
}
.securities {
  overflow: hidden;
}
.panel-heading {
  padding: 20px 20px 13px;
}
.count,
.instrument,
.chart-caption {
  font-size: 12px;
}
.search {
  display: flex;
  align-items: stretch;
  margin: 0 19px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9fa;
}
.search:focus-within {
  outline: 2px solid #448bb4;
  outline-offset: 1px;
}
.search input {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  outline: 0;
  border: 0;
  background: transparent;
  font-size: 13px;
}
.search button {
  flex: none;
  width: 40px;
  border: 0;
  background: transparent;
}
.magnifier {
  display: inline-block;
  position: relative;
  width: 13px;
  height: 13px;
  border: 1.7px solid var(--muted);
  border-radius: 50%;
}
.magnifier::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 2px;
  background: var(--muted);
  transform: rotate(45deg);
  right: -5px;
  bottom: -2px;
}
.list-tabs,
.periods {
  display: flex;
}
.list-tabs {
  padding: 8px 16px 0;
  gap: 3px;
}
.list-tabs button,
.periods button {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
}
.list-tabs button {
  flex: 1;
  padding: 10px 0;
  border-bottom: 2px solid transparent;
  font-weight: 600;
}
.list-tabs button[aria-pressed='true'] {
  color: var(--blue);
  border-bottom-color: var(--blue);
}
.row-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(61px, 0.52fr);
  gap: 8px;
  align-items: center;
  padding-inline: 19px;
}
.row-grid > :not(:first-child) {
  text-align: right;
}
.list-labels {
  background: #f7f9fa;
  padding-block: 8px;
  border-block: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}
.rows {
  max-height: 410px;
  overflow: auto;
}
.stock-row {
  width: 100%;
  background: white;
  border: 0;
  border-bottom: 1px solid #e8edef;
  padding-block: 8px;
  text-align: left;
}
.stock-row:last-child {
  border-bottom: 0;
}
.stock-row[aria-pressed='true'] {
  background: var(--soft);
  box-shadow: inset 3px 0 var(--blue);
}
.stock-row:hover {
  background: #f2f7f9;
}
.stock-row:focus-visible {
  outline-offset: -3px;
}
.row-name,
.row-price {
  min-width: 0;
}
.stock-row strong,
.stock-row small {
  display: block;
}
.row-name strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.stock-row strong {
  font-size: 14px;
  line-height: 1.35;
}
.stock-row small {
  margin-top: 3px;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.25;
}
.row-change {
  font-size: 13px;
}
.list-empty {
  padding: 26px 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.list-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding: 9px 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.list-pager button,
.list-pager input {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
  min-height: 32px;
  padding: 4px 8px;
}
.list-pager button:not(:disabled):hover {
  background: var(--soft);
  color: var(--blue);
}
.list-pager label,
.directory-note {
  color: var(--muted);
}
.list-pager input {
  width: 4em;
  text-align: center;
  appearance: textfield;
}
.list-pager input::-webkit-inner-spin-button {
  appearance: none;
}
.directory-note {
  border-top: 1px solid var(--line);
  padding: 8px 15px;
  font-size: 11px;
}
.directory-note button {
  color: var(--blue);
  border: 0;
  background: none;
  text-decoration: underline;
}
.detail {
  padding: 21px 25px 17px;
  scroll-margin-top: 12px;
}
.detail-top {
  align-items: flex-start;
}
.detail-top h2 {
  margin-top: 3px;
  font-size: clamp(24px, 2.5vw, 29px);
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.favorite {
  flex: none;
  min-height: 34px;
  padding: 6px 11px;
  color: var(--blue);
  font-size: 12px;
}
.favorite b {
  font-size: 17px;
  line-height: 1;
}
.favorite[aria-pressed='true'] {
  background: var(--soft);
  border-color: #a9c7d7;
}
.price-line {
  gap: 7px;
  flex-wrap: wrap;
  align-items: baseline;
  margin: 9px 0 2px;
}
.last {
  font-size: clamp(34px, 4vw, 45px);
  line-height: 1.15;
  font-weight: 650;
  letter-spacing: -0.045em;
}
#detail-unit {
  color: var(--muted);
  font-size: 13px;
}
.price-line .move {
  font-size: 14px;
  margin-left: 6px;
}
.stamp,
.chart-caption {
  line-height: 1.5;
  min-height: 18px;
}
.chart-heading {
  padding-top: 15px;
  margin-top: 15px;
  border-top: 1px solid var(--line);
}
.periods {
  background: #eef2f4;
  border-radius: 6px;
  padding: 3px;
}
.periods button {
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 12px;
}
.periods button[aria-pressed='true'] {
  background: white;
  color: var(--ink);
  box-shadow: 0 1px 3px #17354c24;
  font-weight: 650;
}
.chart {
  position: relative;
  height: clamp(175px, 18vw, 210px);
  margin-top: 7px;
}
.chart canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.chart p {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  pointer-events: none;
}
.chart output {
  position: absolute;
  top: 0;
  right: 0;
  padding: 4px 7px;
  border-radius: 4px;
  background: var(--ink);
  color: white;
  font-size: 11px;
  pointer-events: none;
}
.chart-caption {
  font-size: 11px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 11px;
}
.metrics div + div {
  border-left: 1px solid var(--line);
  padding-left: 16px;
}
.metrics dt {
  color: var(--muted);
  font-size: 12px;
}
.metrics dd {
  margin-top: 3px;
  font-size: 16px;
  font-weight: 600;
}
.source-note {
  justify-content: space-between;
  gap: 8px 20px;
  flex-wrap: wrap;
  padding: 19px 0 34px;
  line-height: 1.7;
}
.source-note a {
  color: var(--blue);
  text-underline-offset: 3px;
}
.notice,
.feedback {
  padding: 12px 16px;
  font-size: 13px;
}
.feedback {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 7px;
  background: var(--ink);
  color: white;
  box-shadow: 0 3px 10px #172f4620;
  width: max-content;
  max-width: 90vw;
  z-index: 1;
}
dialog {
  width: min(400px, calc(100% - 32px));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  color: var(--ink);
  box-shadow: 0 18px 70px #17354c38;
}
dialog::backdrop {
  background: #152e436b;
}
.dialog-head button {
  background: transparent;
  border: 0;
  font-size: 25px;
  line-height: 1;
  width: 32px;
  height: 32px;
}
dialog p {
  margin: 4px 0 18px;
  color: var(--muted);
  font-size: 13px;
}
dialog label {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  font-weight: 600;
  font-size: 14px;
}
dialog select {
  padding: 8px;
  border: 1px solid #c7d4dd;
  border-radius: 5px;
  background: white;
}
.dialog-actions {
  justify-content: flex-end;
  margin-top: 22px;
}
@media (max-width: 850px) {
  .wrap {
    width: calc(100% - 36px);
  }
  .board {
    grid-template-columns: minmax(268px, 0.85fr) minmax(0, 1.15fr);
    gap: 12px;
  }
  .indices {
    gap: 9px;
  }
  .index-card {
    padding: 13px;
  }
  .detail {
    padding: 18px;
  }
  .row-grid {
    padding-inline: 14px;
  }
}
@media (max-width: 680px) {
  .wrap {
    width: calc(100% - 28px);
  }
  .nav {
    min-height: 52px;
    gap: 10px;
    justify-content: space-between;
  }
  .brand {
    font-size: 15px;
    gap: 6px;
  }
  .brand img {
    width: 23px;
    height: 23px;
  }
  .nav-links {
    gap: 13px;
  }
  .nav-links a {
    font-size: 12px;
  }
  .page-head {
    flex-wrap: wrap;
    padding: 21px 0 17px;
    gap: 12px;
  }
  .actions .action {
    min-height: 35px;
    padding: 6px 10px;
    font-size: 12px;
  }
  .overview h2 {
    margin-bottom: 8px;
  }
  .indices {
    gap: 6px;
  }
  .index-card {
    padding: 9px 7px;
    gap: 5px;
    border-radius: 7px;
  }
  .index-name {
    font-size: 12px;
  }
  .index-head {
    display: grid;
    gap: 2px;
  }
  .index-market {
    font-size: 10px;
  }
  .index-foot {
    display: none;
  }
  .index-price {
    display: grid;
    gap: 1px;
  }
  .index-price b {
    font-size: clamp(16px, 5.1vw, 27px);
  }
  .index-price .move {
    font-size: 11px;
  }
  .index-time {
    font-size: 10px;
  }
  .index-card .range {
    margin-block: 3px;
  }
  .exchange {
    margin-top: 12px;
    padding: 12px;
  }
  .exchange-fields {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 10px 7px;
  }
  .exchange-amount,
  .exchange-result {
    grid-column: 1 / -1;
  }
  .exchange-fields select {
    padding-inline: 5px;
    font-size: 14px;
  }
  .exchange-note {
    width: 100%;
    margin-left: 0;
  }
  .board {
    display: flex;
    flex-direction: column;
    margin-top: 12px;
  }
  .board > * {
    width: 100%;
  }
  .chart {
    height: 175px;
  }
  .rows {
    max-height: 285px;
  }
  .detail {
    padding: 16px;
  }
  .securities .panel-heading {
    padding: 13px 15px 9px;
  }
  .metrics div + div {
    padding-left: 8px;
  }
  .metrics dd {
    font-size: 14px;
  }
  .source-note {
    display: grid;
    font-size: 11px;
    gap: 3px;
  }
}
@media (max-width: 400px) {
  .exchange-fields {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .exchange-currency {
    grid-column: 1;
  }
  .exchange-swap {
    grid-column: 2;
    grid-row: 2 / 4;
    align-self: center;
  }
  .exchange-swap span {
    transform: rotate(90deg);
  }
}
@media (max-width: 375px) {
  .nav-links {
    gap: 9px;
  }
  .brand {
    letter-spacing: 0;
  }
  .price-line {
    gap: 4px;
  }
}
