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

.brand-link {
  color: inherit;
  text-decoration: none;
}

.ipo-topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
}

.primary-nav {
  display: flex;
  align-items: center;
  align-self: stretch;
}

.primary-nav a {
  min-width: 96px;
  padding: 0 18px;
  display: grid;
  place-items: center;
  color: #b9c7cd;
  border-bottom: 3px solid transparent;
  text-decoration: none;
  font-size: 13px;
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  color: white;
  background: rgb(255 255 255 / 6%);
  border-bottom-color: #e25b4f;
}

.ipo-topbar .database-status {
  justify-self: end;
}

.ipo-shell {
  width: min(1540px, 94vw);
  margin: 28px auto 48px;
}

.ipo-intro {
  padding: 5px 0 20px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.ipo-intro h1 {
  font-size: clamp(28px, 3vw, 40px);
}

.ipo-intro p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.secondary-link {
  padding: 9px 12px;
  color: var(--navy-soft);
  border: 1px solid var(--line-strong);
  text-decoration: none;
  font-size: 12px;
}

.secondary-link:hover {
  background: var(--surface);
  border-color: var(--navy-soft);
}

.action-summary {
  margin: 0 0 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--navy-soft);
  box-shadow: var(--shadow);
}

.action-summary button {
  min-height: 98px;
  padding: 17px 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
}

.action-summary button:last-child {
  border-right: 0;
}

.action-summary button:hover,
.action-summary button:focus-visible {
  background: #f8f5ee;
}

.action-summary dt {
  align-self: end;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.action-summary dd {
  grid-row: 1 / 3;
  grid-column: 2;
  align-self: center;
  margin: 0;
  color: var(--accent);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 38px;
  font-weight: 700;
}

.action-summary span {
  color: var(--accent-deep);
  font-size: 11px;
}

.ipo-workbench {
  display: grid;
  grid-template-columns: minmax(620px, 1.18fr) minmax(460px, 0.82fr);
  align-items: start;
  gap: 16px;
}

.ipo-list-panel,
.ipo-detail-panel {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.ipo-list-panel {
  padding: 20px;
}

.ipo-panel-heading,
.ipo-detail-header,
.subsection-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.ipo-panel-heading h2,
.ipo-detail-header h2 {
  font-size: 26px;
}

.ipo-filters {
  margin: 16px 0 14px;
  display: grid;
  grid-template-columns: 150px 170px 1fr;
  gap: 10px;
}

.ipo-filters label > span {
  display: block;
  margin-bottom: 5px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.ipo-filters select,
.ipo-filters input,
.record-form input {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
}

.ipo-table-wrap {
  max-height: 700px;
  overflow: auto;
  border: 1px solid var(--line);
}

.ipo-table th,
.ipo-table td {
  padding: 11px 10px;
}

.ipo-table th:first-child,
.ipo-table td:first-child {
  text-align: left;
}

.ipo-table td:first-child strong,
.ipo-table td:first-child span {
  display: block;
}

.ipo-table td:first-child strong {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 13px;
}

.ipo-table td:first-child span {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 10px;
}

.ipo-table tbody tr {
  cursor: pointer;
}

.ipo-table tbody tr.is-selected {
  background: #f5e8e4;
  box-shadow: inset 3px 0 var(--accent);
}

.ipo-table tbody tr:focus-visible {
  outline: 3px solid rgb(197 65 54 / 24%);
  outline-offset: -3px;
}

.payment-cell {
  color: var(--accent-deep);
  font-weight: 700;
}

.ipo-status,
.board-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border: 1px solid currentColor;
  border-radius: 2px;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.status-upcoming {
  color: #6c6251;
  background: #f3efe5;
}

.status-subscription,
.status-payment {
  color: #9f3028;
  background: #fbe8e4;
}

.status-result {
  color: #926310;
  background: #fff2cd;
}

.status-waiting_listing {
  color: #265c73;
  background: #e6f1f6;
}

.status-listed {
  color: #147052;
  background: #e5f3ed;
}

.row-watch {
  color: #8a8e91;
  font-size: 17px;
}

.row-watch.is-watched {
  color: #c58c16;
}

.ipo-inline-message {
  margin: 12px 0 0;
  padding: 9px 11px;
  color: #225f49;
  background: #e8f4ef;
  border-left: 3px solid #2d8968;
  font-size: 12px;
}

.ipo-inline-message.is-error {
  color: #7b2822;
  background: #fce8e5;
  border-left-color: var(--accent);
}

.ipo-detail-panel {
  position: sticky;
  top: 16px;
}

.ipo-detail-empty {
  min-height: 360px;
  display: grid;
  place-content: center;
  gap: 5px;
  color: var(--ink-soft);
  text-align: center;
}

.ipo-detail-empty strong {
  color: var(--ink);
  font-family: Georgia, "Songti SC", serif;
  font-size: 20px;
}

.ipo-detail-header {
  padding: 21px 22px 17px;
  border-bottom: 1px solid var(--line);
}

.ipo-name-line {
  display: flex;
  align-items: center;
  gap: 9px;
}

.board-main {
  color: #405b68;
}

.board-chinext {
  color: #9a5b18;
}

.board-star {
  color: #805090;
}

.board-beijing {
  color: #287055;
}

.detail-codes {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 11px;
}

.watch-button {
  min-width: 84px;
  padding: 8px 10px;
  color: #585f63;
  background: white;
  border: 1px solid var(--line-strong);
}

.watch-button.is-watched {
  color: #8a5d0a;
  background: #fff5d8;
  border-color: #d6ad59;
}

.ipo-key-metrics {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}

.ipo-key-metrics > div {
  padding: 14px 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.ipo-key-metrics > div:nth-child(3n) {
  border-right: 0;
}

.ipo-key-metrics > div:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.ipo-key-metrics dt {
  color: var(--ink-soft);
  font-size: 10px;
}

.ipo-key-metrics dd {
  margin: 5px 0 0;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 14px;
  font-weight: 700;
}

.ipo-key-metrics .metric-emphasis {
  background: #fdf2ef;
}

.ipo-key-metrics .metric-emphasis dd {
  color: var(--accent-deep);
  font-size: 16px;
}

.timeline-section,
.price-linkage,
.record-section {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.subsection-heading {
  align-items: baseline;
  margin-bottom: 14px;
}

.subsection-heading h3 {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 14px;
}

.subsection-heading span {
  color: var(--ink-soft);
  font-size: 10px;
}

.ipo-timeline {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  list-style: none;
}

.ipo-timeline li {
  position: relative;
  min-width: 0;
  padding-right: 7px;
}

.ipo-timeline li::before {
  position: absolute;
  z-index: 0;
  top: 9px;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--line-strong);
  content: "";
}

.timeline-marker {
  position: relative;
  z-index: 1;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--surface);
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  font-size: 9px;
}

.timeline-completed .timeline-marker {
  background: #287a5d;
  border-color: #287a5d;
}

.timeline-current .timeline-marker {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgb(197 65 54 / 14%);
}

.ipo-timeline li > div {
  margin-top: 7px;
  padding-right: 4px;
}

.ipo-timeline time,
.ipo-timeline strong,
.ipo-timeline small {
  display: block;
}

.ipo-timeline time {
  color: var(--ink-soft);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 9px;
}

.ipo-timeline strong {
  margin-top: 3px;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.35;
}

.ipo-timeline small {
  margin-top: 3px;
  color: #8a9195;
  font-size: 8px;
}

.price-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 9px;
}

.price-flow > div {
  min-width: 0;
  padding: 11px 12px;
  background: #f2f0ea;
  border-top: 2px solid var(--navy-soft);
}

.price-flow > i {
  color: #9a9b96;
  font-style: normal;
}

.price-flow span,
.price-flow strong,
.price-flow small {
  display: block;
}

.price-flow span {
  color: var(--ink-soft);
  font-size: 9px;
}

.price-flow strong {
  margin-top: 4px;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 19px;
}

.price-flow small {
  min-height: 28px;
  margin-top: 3px;
  font-size: 9px;
  line-height: 1.4;
}

.record-form {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.record-form label > span {
  display: block;
  margin-bottom: 5px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

.record-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
}

.record-checkbox input {
  width: 18px;
  height: 18px;
}

.record-checkbox span {
  margin: 0 !important;
  color: var(--ink) !important;
}

.record-notes {
  grid-column: span 3;
}

.record-actions {
  grid-column: 1 / -1;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.record-actions > span {
  color: var(--ink-soft);
  font-size: 10px;
}

.record-actions .primary-button {
  height: 38px;
}

.ipo-detail-footer {
  width: auto;
  margin: 0;
  padding: 11px 22px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  font-size: 9px;
}

.ipo-detail-footer a {
  color: var(--accent-deep);
}

@media (max-width: 1180px) {
  .ipo-workbench {
    grid-template-columns: 1fr;
  }

  .ipo-detail-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .ipo-topbar {
    grid-template-columns: 1fr auto;
  }

  .primary-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-height: 40px;
    order: 3;
  }

  .primary-nav a {
    flex: 1;
    min-height: 40px;
  }

  .ipo-topbar .database-status {
    display: none;
  }

  .ipo-intro {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .action-summary button:nth-child(2) {
    border-right: 0;
  }

  .action-summary button:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .ipo-list-panel {
    padding: 15px;
  }

  .ipo-filters {
    grid-template-columns: 1fr 1fr;
  }

  .ipo-search-label {
    grid-column: 1 / -1;
  }

  .ipo-table-wrap {
    max-height: 520px;
  }

  .ipo-table {
    min-width: 810px;
  }

  .ipo-detail-header,
  .timeline-section,
  .price-linkage,
  .record-section {
    padding-right: 16px;
    padding-left: 16px;
  }

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

  .ipo-key-metrics > div,
  .ipo-key-metrics > div:nth-child(3n) {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .ipo-key-metrics > div:nth-child(even) {
    border-right: 0;
  }

  .ipo-key-metrics > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .ipo-timeline {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .ipo-timeline li {
    min-height: 58px;
    padding-left: 32px;
  }

  .ipo-timeline li::before {
    top: 0;
    bottom: 0;
    left: 9px;
    width: 1px;
    height: auto;
  }

  .timeline-marker {
    position: absolute;
    top: 0;
    left: 0;
  }

  .ipo-timeline li > div {
    margin-top: 0;
  }

  .price-flow {
    grid-template-columns: 1fr;
  }

  .price-flow > i {
    transform: rotate(90deg);
    text-align: center;
  }

  .record-form {
    grid-template-columns: 1fr 1fr;
  }

  .record-notes {
    grid-column: 1 / -1;
  }

  .record-actions {
    align-items: stretch;
    flex-direction: column;
  }
}
