@charset "UTF-8";

:root {
  --bg: #f5f3ef;
  --card: #ffffff;
  --text: #20201f;
  --muted: #69645f;
  --faint: #9a938c;
  --line: #e8e2dc;
  --brand: #e8111a;
  --brand-deep: #b70e15;
  --brand-soft: #fdecec;
  --green: #2f7a4b;
  --green-deep: #175b34;
  --green-soft: #eaf5ed;
  --amber: #a7640a;
  --amber-soft: #fff3df;
  --blue: #2861c7;
  --blue-soft: #edf3ff;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px rgba(35, 27, 22, 0.08);
  --font: "Alibaba PuHuiTi 3", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, rgba(247, 199, 201, 0.34), transparent 26rem),
    radial-gradient(circle at 88% 8%, rgba(244, 206, 134, 0.18), transparent 24rem),
    var(--bg);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

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

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

.boot-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: var(--muted);
  font-size: 14px;
}

.boot-screen img {
  width: 54px;
  height: 54px;
  animation: breathe 1.2s ease-in-out infinite alternate;
}

@keyframes breathe {
  to { transform: scale(1.07); opacity: 0.72; }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(84, 63, 48, 0.09);
  background: linear-gradient(135deg, #f7c7c9 0%, #fae0cb 55%, #f4ce86 100%);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1160px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
}

.brand img {
  width: 102px;
  height: 38px;
  object-fit: contain;
}

.brand-label {
  padding-left: 10px;
  border-left: 1px solid rgba(89, 48, 23, 0.2);
  color: #693414;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  color: rgba(92, 50, 24, 0.65);
  font-size: 14px;
  font-weight: 600;
  transition: 160ms ease;
}

.nav-link:hover,
.nav-link.active {
  color: #6b2f0f;
  background: rgba(255, 255, 255, 0.54);
}

.header-user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-chip {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid rgba(91, 50, 24, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  color: #5f2b10;
  font-size: 13px;
}

.user-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 80px;
}

.hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 22px;
  padding: 34px 36px;
  border: 1px solid rgba(92, 58, 32, 0.08);
  border-radius: 24px;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.88), rgba(255, 251, 246, 0.68)),
    linear-gradient(135deg, #f8d6d2, #f7e9d3);
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -120px;
  width: 330px;
  height: 330px;
  border: 55px solid rgba(232, 17, 26, 0.055);
  border-radius: 50%;
}

.eyebrow {
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 9px 0 10px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.045em;
}

.hero p {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.stats {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 24px;
}

.stat strong {
  display: block;
  color: var(--brand-deep);
  font-size: 24px;
  letter-spacing: -0.04em;
}

.stat span {
  color: var(--faint);
  font-size: 12px;
}

.news-panel {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 14px;
  padding: 16px;
}

.news-heading {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 3px 8px 3px 2px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.news-badge {
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.news-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.news-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: #fbf9f6;
}

.news-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--faint);
  font-size: 10px;
}

.news-meta span {
  color: var(--brand-deep);
  font-weight: 700;
}

.news-item h2 {
  margin: 7px 0 4px;
  font-size: 14px;
  line-height: 1.45;
}

.news-item p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 10px 35px rgba(35, 27, 22, 0.045);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfaf8;
}

.search-wrap svg {
  flex: 0 0 auto;
  color: var(--faint);
}

.search-wrap input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.select {
  min-height: 46px;
  padding: 0 38px 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  background: #fbfaf8;
  color: var(--text);
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 14px;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  cursor: pointer;
}

.chip.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.table-wrap {
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: #fcfbf9;
  color: var(--faint);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
}

td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: 0;
}

tbody tr {
  transition: background 140ms ease;
}

tbody tr:hover {
  background: #fcf9f6;
}

.pid {
  width: 70px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.problem-link {
  color: var(--text);
  font-weight: 650;
}

.problem-link:hover {
  color: var(--brand);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 11px;
  font-weight: 600;
}

.difficulty {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.difficulty.easy { background: var(--green-soft); color: var(--green-deep); }
.difficulty.mid { background: var(--amber-soft); color: var(--amber); }
.difficulty.hard { background: var(--brand-soft); color: var(--brand-deep); }

.solved-mark {
  color: var(--green);
  font-size: 16px;
  font-weight: 900;
}

.muted {
  color: var(--muted);
}

.faint {
  color: var(--faint);
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  padding: 20px;
}

.page-btn {
  min-width: 38px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.page-btn.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.page-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.empty {
  padding: 56px 20px;
  text-align: center;
  color: var(--faint);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--faint);
  font-size: 13px;
}

.breadcrumb a:hover {
  color: var(--brand);
}

.problem-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  align-items: start;
}

.problem-main {
  overflow: hidden;
}

.problem-title {
  padding: 28px 30px 21px;
  border-bottom: 1px solid var(--line);
}

.problem-title h1 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3.4vw, 38px);
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.problem-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.content-section {
  padding: 22px 30px;
  border-bottom: 1px solid var(--line);
}

.content-section:last-child {
  border-bottom: 0;
}

.content-section h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 13px;
  font-size: 17px;
}

.content-section h2::before {
  content: "";
  width: 22px;
  height: 3px;
  border-radius: 99px;
  background: var(--brand);
}

.prose {
  color: #46423f;
  font-size: 15px;
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.sample {
  overflow: hidden;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.sample-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfaf8;
  color: var(--muted);
  font-size: 12px;
}

.copy-btn {
  padding: 4px 9px;
  border: 0;
  border-radius: 7px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 11px;
  cursor: pointer;
}

pre {
  margin: 0;
  overflow-x: auto;
  padding: 14px;
  background: #fcfbfa;
  color: #292624;
  font: 13px/1.7 "Cascadia Code", Consolas, monospace;
}

.side-card {
  position: sticky;
  top: 88px;
  overflow: hidden;
}

.side-head {
  padding: 15px 17px;
  border-bottom: 1px solid var(--line);
  background: #fcfbf9;
  font-weight: 700;
}

.meta-list {
  margin: 0;
  padding: 4px 17px;
}

.meta-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.meta-list div:last-child {
  border-bottom: 0;
}

.meta-list dt {
  color: var(--faint);
}

.meta-list dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.side-actions {
  padding: 16px;
}

.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
  font-weight: 700;
  transition: 150ms ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, #ef2b31, var(--brand));
  color: #fff;
  box-shadow: 0 9px 22px rgba(232, 17, 26, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #f04449, var(--brand-deep));
}

.btn-secondary {
  border-color: var(--line);
  background: #fff;
  color: var(--text);
}

.btn-green {
  background: linear-gradient(135deg, #4a9a64, var(--green));
  color: #fff;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.auth-wrap {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 180px);
}

.auth-card {
  width: min(440px, 100%);
  padding: 28px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.auth-brand img {
  width: 105px;
}

.auth-card h1 {
  margin: 0 0 8px;
  font-size: 27px;
  letter-spacing: -0.035em;
}

.auth-card p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: #fbfaf8;
  color: var(--text);
}

.input:focus {
  border-color: rgba(232, 17, 26, 0.4);
  box-shadow: 0 0 0 3px rgba(232, 17, 26, 0.07);
}

.status-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.status-toolbar h1 {
  margin: 0 0 5px;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.submission-list {
  display: grid;
  gap: 10px;
}

.submission-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 18px;
  padding: 18px;
}

.submission-card h3 {
  margin: 0 0 5px;
  font-size: 15px;
}

.submission-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--faint);
  font-size: 12px;
}

.verdict {
  align-self: start;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: #f0eeeb;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.verdict.accepted { background: var(--green-soft); color: var(--green-deep); }
.verdict.wrong { background: var(--brand-soft); color: var(--brand-deep); }
.verdict.error { background: #fdeaea; color: #a41920; }
.verdict.pending { background: var(--amber-soft); color: var(--amber); }

.contest-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.contest-card {
  padding: 20px;
}

.contest-card h2 {
  margin: 0 0 9px;
  font-size: 18px;
  line-height: 1.4;
}

.contest-card p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.contest-card ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contest-card li {
  padding: 8px 10px;
  border-radius: 8px;
  background: #faf8f5;
  color: var(--muted);
  font-size: 12px;
}

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(26, 22, 19, 0.52);
  backdrop-filter: blur(8px);
}

.modal {
  width: min(760px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(22, 18, 16, 0.25);
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.modal-head h2 {
  margin: 0;
  font-size: 19px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-size: 22px;
}

.modal-body {
  padding: 20px;
}

.editor {
  min-height: 320px;
  resize: vertical;
  font: 13px/1.6 "Cascadia Code", Consolas, monospace;
  tab-size: 4;
}

.judge-notice {
  margin: 12px 0;
  padding: 11px 12px;
  border: 1px solid #f1dfbf;
  border-radius: 10px;
  background: var(--amber-soft);
  color: #74501a;
  font-size: 12px;
  line-height: 1.6;
}

.judge-result {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.case-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
}

.spinner {
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  z-index: 120;
  max-width: min(520px, calc(100% - 32px));
  padding: 11px 15px;
  border-radius: 10px;
  background: #272421;
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.mobile-tabs {
  display: none;
}

.site-footer {
  padding: 20px 16px 36px;
  text-align: center;
  color: var(--faint);
  font-size: 12px;
}

@media (max-width: 860px) {
  .header-inner {
    width: min(100% - 24px, 620px);
    height: 62px;
  }

  .brand img {
    width: 82px;
    height: 32px;
  }

  .brand-label {
    font-size: 17px;
  }

  .top-nav {
    display: none;
  }

  .header-user .user-account {
    display: none;
  }

  .shell {
    width: min(100% - 24px, 620px);
    padding-top: 18px;
    padding-bottom: 94px;
  }

  .hero {
    padding: 25px 22px;
    border-radius: 20px;
  }

  .hero p {
    font-size: 13px;
  }

  .news-panel {
    display: block;
    padding: 13px;
  }

  .news-heading {
    flex-direction: row;
    justify-content: flex-start;
    gap: 9px;
    padding: 0 0 10px;
    border-right: 0;
  }

  .news-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .news-list::-webkit-scrollbar {
    display: none;
  }

  .news-item {
    flex: 0 0 82%;
    scroll-snap-align: start;
  }

  .stats {
    gap: 20px;
  }

  .toolbar {
    grid-template-columns: 1fr;
  }

  thead {
    display: none;
  }

  tbody,
  tr,
  td {
    display: block;
  }

  tbody tr {
    position: relative;
    padding: 15px;
    border-bottom: 1px solid var(--line);
  }

  tbody tr:last-child {
    border-bottom: 0;
  }

  td {
    padding: 0;
    border: 0 !important;
  }

  td.column-solved {
    display: none;
  }

  td.column-id {
    width: auto;
    margin-bottom: 4px;
    font-size: 12px;
  }

  td.column-title {
    padding-right: 52px !important;
    margin-bottom: 9px;
  }

  td.column-title .problem-link::after {
    content: "";
    position: absolute;
    inset: 0;
  }

  td.column-tags {
    margin-bottom: 8px;
  }

  td.column-difficulty {
    position: absolute;
    top: 14px;
    right: 14px;
  }

  td.column-passed {
    color: var(--faint);
    font-size: 12px;
  }

  .problem-layout {
    grid-template-columns: 1fr;
  }

  .problem-title {
    padding: 22px 18px 17px;
  }

  .content-section {
    padding: 19px 18px;
  }

  .side-card {
    position: static;
    order: -1;
  }

  .meta-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
  }

  .contest-grid {
    grid-template-columns: 1fr;
  }

  .submission-card {
    grid-template-columns: 1fr auto;
    padding: 15px;
  }

  .submission-card h3 {
    grid-column: 1 / -1;
  }

  .submission-meta {
    grid-column: 1 / -1;
  }

  .mobile-tabs {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 50;
    height: 62px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 6px;
    border: 1px solid rgba(52, 44, 39, 0.1);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 40px rgba(40, 30, 24, 0.14);
  }

  .mobile-tab {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 3px;
    border-radius: 14px;
    color: var(--faint);
    font-size: 10px;
  }

  .mobile-tab strong {
    font-size: 18px;
    line-height: 1;
  }

  .mobile-tab.active {
    background: var(--brand-soft);
    color: var(--brand-deep);
  }

  .toast {
    bottom: 82px;
  }
}

@media (max-width: 520px) {
  .header-user {
    gap: 7px;
  }

  .user-chip {
    padding: 0 10px;
  }

  .auth-card {
    padding: 22px 18px;
  }

  .modal-mask {
    padding: 0;
    place-items: end center;
  }

  .modal {
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
  }

  .modal-body {
    padding: 16px;
  }

  .editor {
    min-height: 260px;
  }

  .meta-list {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   黑石OJ · Quiet Technology
   A focused, cool-white interface for learning, progress and competition.
   The mirrored HTML is intentionally untouched; this layer controls visuals.
   ========================================================================== */

:root {
  --bg: #f4f7fa;
  --surface: #ffffff;
  --surface-soft: #f9fbfd;
  --surface-blue: #eef6ff;
  --ink: #071521;
  --muted: #667789;
  --faint: #627180;
  --line: rgba(10, 35, 55, 0.09);
  --line-strong: rgba(10, 35, 55, 0.14);
  --blue: #066adf;
  --blue-deep: #073b78;
  --blue-soft: #eaf4ff;
  --cyan: #27c2e8;
  --danger: #c93542;
  --danger-soft: #fff0f1;
  --warning: #9a671b;
  --warning-soft: #fff7e8;
  --success: #157a5a;
  --success-soft: #eaf8f2;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --font-title: "Alibaba PuHuiTi 3", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-number: "Avenir Next Condensed", "DIN Alternate", "SF Pro Display", "Bahnschrift", sans-serif;
  --ease: cubic-bezier(.22, .8, .28, 1);
  --page: 1180px;
  --shell-pad: 24px;
  --tap: 44px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 0%, rgba(8, 120, 249, 0.045), transparent 34rem),
    linear-gradient(180deg, #f7fafc 0%, var(--bg) 44%, #f6f9fc 100%);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.65;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::selection,
body *::selection {
  background: rgba(8, 120, 249, 0.16);
  color: var(--ink);
}

img,
video,
iframe,
table,
pre {
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: color 220ms var(--ease), opacity 220ms var(--ease);
}

a:hover,
a:focus {
  color: var(--blue-deep);
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid rgba(8, 120, 249, 0.72);
  outline-offset: 3px;
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
.panel-heading,
.content-header,
.login-title,
.signin-title,
.list-tag-title,
.activity-header h2 {
  margin-top: 0;
  color: var(--ink);
  font-family: var(--font-title);
  font-weight: 650;
  letter-spacing: -0.025em;
}

p {
  color: var(--muted);
}

hr {
  border-color: var(--line);
}

.wrap {
  min-height: calc(100vh - 76px);
  background: transparent !important;
}

.container {
  width: min(var(--page), calc(100% - var(--shell-pad) * 2)) !important;
  max-width: none !important;
  margin-right: auto !important;
  margin-left: auto !important;
  padding-right: 0 !important;
  padding-left: 0 !important;
  background: transparent !important;
}

.wrap > .container {
  padding-top: 28px;
  padding-bottom: 72px;
}

.row {
  margin-right: 0;
  margin-left: 0;
}

[class*="col-"] {
  padding-right: 0;
  padding-left: 0;
}

.clear-padding {
  padding: 0 !important;
}

.text-muted,
.help-block,
.list-tag-muted,
.faint {
  color: var(--muted) !important;
}

.markdown,
.content-wrapper,
.blog-post,
.card {
  overflow-wrap: anywhere;
}

.markdown pre,
.sample-test pre {
  overflow: auto;
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */

.navbar-default {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 76px;
  margin-bottom: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important;
  background: rgba(248, 251, 253, 0.88) !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: saturate(150%) blur(18px);
  backdrop-filter: saturate(150%) blur(18px);
}

.navbar-default .container {
  position: relative;
  min-height: 75px;
}

.navbar-default .navbar-header {
  float: left;
}

.navbar-default .navbar-brand,
.navbar-default .navbar-brand:hover,
.navbar-default .navbar-brand:focus,
.navbar-default .navbar-brand:visited {
  display: flex;
  align-items: center;
  width: auto;
  height: 75px;
  padding: 0 !important;
  color: transparent !important;
  font-size: 0 !important;
}

.navbar-default .navbar-brand::before {
  content: "";
  display: block;
  width: 106px;
  height: 46px;
  flex: 0 0 106px;
  background: url("/images/brand-logo.png") left center / contain no-repeat;
}

.navbar-default .navbar-collapse {
  float: right;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.navbar-default .navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 75px;
  margin: 0;
}

.navbar-default .navbar-nav > li {
  display: block;
}

.navbar-default .navbar-nav > li > a,
.navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .open > a:hover,
.navbar-default .navbar-nav > .open > a:focus {
  position: relative;
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  padding: 0 15px !important;
  border: 0 !important;
  border-radius: 11px;
  background: transparent !important;
  color: var(--muted) !important;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.4 !important;
  transition: color 220ms var(--ease), background-color 220ms var(--ease);
}

.navbar-default .navbar-nav > li > a .fa,
.navbar-default .navbar-nav > li > a .glyphicon {
  display: none;
}

.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus,
.navbar-default .navbar-nav > .open > a:hover {
  background: rgba(8, 120, 249, 0.055) !important;
  color: var(--ink) !important;
}

.navbar-default .navbar-nav > li.active > a {
  color: var(--ink) !important;
  font-weight: 700;
}

.navbar-default .navbar-nav > li.active > a::after {
  content: "";
  position: absolute;
  right: 15px;
  bottom: 11px;
  left: 15px;
  height: 2px;
  border-radius: 2px;
  background: var(--blue);
}

.navbar-default .dropdown-menu {
  min-width: 180px;
  margin-top: 6px;
  padding: 7px;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-sm) !important;
  background: var(--surface) !important;
  box-shadow: 0 18px 46px rgba(7, 21, 33, 0.12) !important;
}

.navbar-default .dropdown-menu > li > a {
  min-height: var(--tap);
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--ink);
}

.navbar-default .dropdown-menu > li > a:hover {
  background: var(--blue-soft);
  color: var(--blue-deep);
}

.navbar-default .navbar-toggle {
  float: right;
  width: var(--tap);
  height: var(--tap);
  margin: 15px 0 0;
  padding: 11px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface) !important;
}

.navbar-default .navbar-toggle .icon-bar {
  height: 1.5px;
  border-radius: 2px;
  background: var(--ink);
}

.navbar-default .navbar-toggle:hover,
.navbar-default .navbar-toggle:focus {
  background: var(--blue-soft) !important;
}

/* --------------------------------------------------------------------------
   Shared surfaces, language and controls
   -------------------------------------------------------------------------- */

.panel,
.bg-white,
.problem-detail,
.card,
.inner-item,
.list-group-item,
.site-login,
.form-signup,
.contest-index {
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-lg) !important;
  background: var(--surface) !important;
  box-shadow: none !important;
}

.panel {
  margin-bottom: 18px;
}

.panel[style] {
  border: 1px solid var(--line) !important;
  background: var(--surface) !important;
}

.panel-body {
  padding: 22px !important;
}

.panel-heading {
  padding: 20px 22px !important;
  border-right: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  border-left: 0 !important;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
  background: transparent !important;
  color: var(--ink);
  font-size: 18px !important;
  font-weight: 650;
}

.panel-heading::after {
  display: none;
}

.bg-white {
  padding: 0 !important;
}

.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 19px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.25;
  box-shadow: none !important;
  transition:
    transform 220ms var(--ease),
    background-color 220ms var(--ease),
    border-color 220ms var(--ease),
    color 220ms var(--ease),
    opacity 220ms var(--ease);
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary,
.btn-success,
.btn-info,
.btn-blue,
.btn-blue-radius-3,
.btn-blue-round {
  border-color: var(--blue) !important;
  background: var(--blue) !important;
  color: #fff !important;
}

.btn-primary:hover,
.btn-success:hover,
.btn-info:hover,
.btn-blue:hover,
.btn-blue-radius-3:hover {
  border-color: var(--blue-deep) !important;
  background: var(--blue-deep) !important;
  color: #fff !important;
}

.btn-default,
.btn-link,
.btn-warning {
  border-color: var(--line-strong) !important;
  background: var(--surface) !important;
  color: var(--ink) !important;
}

.btn-default:hover,
.btn-link:hover,
.btn-warning:hover {
  border-color: rgba(8, 120, 249, 0.22) !important;
  background: var(--blue-soft) !important;
  color: var(--blue-deep) !important;
}

.btn-danger {
  border-color: rgba(201, 53, 66, 0.18) !important;
  background: var(--danger-soft) !important;
  color: var(--danger) !important;
}

.btn-danger:hover {
  border-color: var(--danger) !important;
  background: var(--danger) !important;
  color: #fff !important;
}

.btn.disabled,
.btn[disabled],
.btn-default.disabled {
  border-color: var(--line) !important;
  background: #edf2f6 !important;
  color: var(--faint) !important;
  opacity: 1 !important;
}

.btn-sm,
.btn-xs {
  min-height: 38px;
  padding: 7px 13px;
  font-size: 12px;
}

.btn .fa,
.btn .glyphicon {
  color: inherit !important;
}

.btn.form-control {
  min-height: 50px;
  border-color: var(--blue) !important;
  background: var(--blue) !important;
  color: #fff !important;
}

.btn.form-control:hover {
  border-color: var(--blue-deep) !important;
  background: var(--blue-deep) !important;
}

.form-control {
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--line-strong) !important;
  border-radius: 12px !important;
  background: var(--surface-soft) !important;
  color: var(--ink) !important;
  font-size: 14px;
  box-shadow: none !important;
  transition:
    border-color 220ms var(--ease),
    background-color 220ms var(--ease),
    box-shadow 220ms var(--ease);
}

.form-control::placeholder {
  color: var(--faint);
}

.form-control:focus {
  border-color: rgba(8, 120, 249, 0.72) !important;
  background: var(--surface) !important;
  box-shadow: 0 0 0 3px rgba(8, 120, 249, 0.08) !important;
  outline: 0;
}

select.form-control {
  cursor: pointer;
}

textarea.form-control {
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

.input-group {
  display: flex;
  width: 100%;
}

.input-group .form-control {
  flex: 1;
  border-radius: 12px 0 0 12px !important;
}

.input-group-addon {
  display: flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-right: 0;
  border-radius: 12px 0 0 12px;
  background: var(--surface-soft);
  color: var(--faint);
}

.input-group-addon + .form-control {
  border-radius: 0 12px 12px 0 !important;
}

.help-block-error,
.has-error .help-block {
  margin: 6px 0 0 !important;
  color: var(--danger) !important;
  font-size: 12px;
}

.has-error .form-control {
  border-color: rgba(201, 53, 66, 0.62) !important;
}

/* --------------------------------------------------------------------------
   Home page
   -------------------------------------------------------------------------- */

.hs-home-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 560px;
  flex-direction: column;
  justify-content: center;
  padding: 72px 74px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 82% 22%, rgba(39, 194, 232, 0.12), transparent 22rem),
    radial-gradient(circle at 92% 78%, rgba(8, 120, 249, 0.1), transparent 26rem),
    linear-gradient(145deg, #fff 0%, #f6faff 62%, #eef6ff 100%);
}

.hs-home-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: 8%;
  bottom: 4%;
  width: 250px;
  height: 250px;
  border: 1px solid rgba(8, 120, 249, 0.12);
  border-radius: 50%;
  box-shadow:
    0 0 0 52px rgba(8, 120, 249, 0.025),
    0 0 0 104px rgba(8, 120, 249, 0.014);
}

.hs-home-hero::after {
  content: "";
  position: absolute;
  top: 70px;
  right: 70px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 7px rgba(39, 194, 232, 0.09);
}

.hs-eyebrow {
  margin-bottom: 20px;
  color: var(--blue);
  font: 700 11px/1.4 var(--font-body);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hs-home-hero h1 {
  max-width: 760px;
  margin: 0;
  color: var(--ink);
  font: 680 clamp(46px, 6.1vw, 82px)/1.05 var(--font-title);
  letter-spacing: -0.055em;
}

.hs-home-hero h1 em {
  color: var(--blue-deep);
  font-style: normal;
}

.hs-home-hero > p {
  max-width: 650px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.7vw, 20px);
  line-height: 1.75;
}

.hs-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.hs-hero-actions .btn {
  min-width: 148px;
  min-height: 50px;
  padding: 12px 24px;
  border-radius: 14px;
  font-size: 15px;
}

.hs-hero-actions .btn-secondary {
  border-color: var(--line-strong) !important;
  background: rgba(255, 255, 255, 0.7) !important;
  color: var(--ink) !important;
}

.hs-hero-actions .btn-secondary:hover {
  border-color: rgba(8, 120, 249, 0.2) !important;
  background: var(--surface) !important;
  color: var(--blue-deep) !important;
}

.hs-home-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hs-home-stat {
  padding: 28px 30px;
  border-right: 1px solid var(--line);
}

.hs-home-stat:last-child {
  border-right: 0;
}

.hs-home-stat strong {
  display: block;
  color: var(--blue-deep);
  font-family: var(--font-number);
  font-size: clamp(36px, 4.3vw, 56px);
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.035em;
}

.hs-home-stat span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.hs-home-story {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 78px;
  border-top: 1px solid var(--line);
}

.hs-story-item {
  padding: 32px 38px 10px;
  border-right: 1px solid var(--line);
}

.hs-story-item:last-child {
  border-right: 0;
}

.hs-story-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue);
}

.hs-story-icon svg {
  width: 21px;
  height: 21px;
}

.hs-story-item h2 {
  margin: 20px 0 8px;
  font-size: 20px;
  font-weight: 650;
}

.hs-story-item p {
  max-width: 29ch;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.hs-home-brief {
  margin-top: 76px;
  padding: 42px 46px;
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: #fff;
}

.hs-home-brief .hs-brief-label {
  color: rgba(255, 255, 255, 0.54);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.hs-home-brief h2 {
  max-width: 720px;
  margin: 12px 0 12px;
  color: #fff;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.2;
}

.hs-home-brief p {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 15px;
  line-height: 1.8;
}

.hs-home-brief .btn {
  margin-top: 24px;
  background: #fff !important;
  color: var(--ink) !important;
}

.hs-home-brief .btn:hover {
  background: var(--blue-soft) !important;
  color: var(--blue-deep) !important;
}

.hs-section-intro {
  padding: 10px 0 28px;
}

.hs-section-intro .hs-eyebrow {
  margin-bottom: 12px;
}

.hs-section-intro h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(46px, 5.4vw, 68px);
  font-weight: 680;
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.hs-section-intro p {
  max-width: 620px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.hs-page-home .search-row,
.hs-page-home .row.clear-margin {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Problem library
   -------------------------------------------------------------------------- */

.hs-page-problems .breadcrumb {
  display: none;
}

.search-row {
  margin: 0 auto 30px !important;
}

.search-row > [class*="col-"] {
  width: min(760px, 100%) !important;
  margin-right: auto !important;
  margin-left: auto !important;
  float: none !important;
  padding: 0 !important;
}

.search-row .input-group {
  position: relative;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  transition: border-color 220ms var(--ease), box-shadow 220ms var(--ease);
}

.search-row .input-group:focus-within {
  border-color: rgba(8, 120, 249, 0.45);
  box-shadow: 0 0 0 4px rgba(8, 120, 249, 0.055);
}

.search-row .form-control {
  height: 56px;
  min-height: 56px;
  padding: 0 128px 0 19px;
  border: 0 !important;
  border-radius: 16px !important;
  background: transparent !important;
  font-size: 15px;
}

.search-row .btn-search {
  position: absolute;
  top: 6px;
  right: 6px;
  bottom: 6px;
  width: 112px;
  padding: 0;
  border: 0 !important;
  border-radius: 11px !important;
  background: var(--blue) !important;
  color: #fff !important;
  font-size: 13px;
  font-weight: 650;
}

.search-row .btn-search .fa {
  display: none;
}

.search-row .btn-search::after {
  content: "搜索";
}

.search-row .input-group-btn {
  position: static;
}

.hs-library-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 300px !important;
  gap: 24px;
  align-items: start;
}

.hs-library-layout::before,
.hs-library-layout::after {
  content: none !important;
  display: none !important;
}

.hs-library-layout > .col-md-9,
.hs-library-layout > .col-md-3 {
  width: auto !important;
  float: none !important;
  padding: 0 !important;
}

.hs-library-layout > .col-md-9 {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.hs-library-layout > .col-md-3 {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0 !important;
}

.row.clear-margin {
  display: block !important;
  margin: 0 !important;
}

.row.clear-margin::before,
.row.clear-margin::after {
  content: none !important;
  display: none !important;
}

.row.clear-margin .grid-view,
.row.clear-margin .problem-index-list {
  width: 100% !important;
}

.list-head {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: space-between;
  gap: 24px;
  margin: 0 !important;
  padding: 30px 32px 20px !important;
  border-bottom: 0 !important;
}

.list-head > [class*="col-"] {
  width: auto !important;
  float: none !important;
  padding: 0 !important;
}

.list-head > [class*="col-"]:last-child {
  flex: 0 0 auto;
}

.list-tag {
  padding: 0 !important;
  border: 0 !important;
}

.list-tag-title {
  padding: 0 !important;
  color: var(--ink);
  font-size: 38px;
  font-weight: 680;
  line-height: 1.15;
  letter-spacing: -0.045em;
}

.list-tag-title::after {
  display: none;
}

.list-tag-muted {
  margin-top: 8px !important;
  color: var(--faint) !important;
  font-size: 12px !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.list-head .pagination {
  margin: 0 !important;
  flex-wrap: nowrap !important;
}

.list-section,
.grid-view {
  padding: 0 32px !important;
}

.grid-view {
  border: 0 !important;
  background: transparent !important;
}

.table {
  margin: 0 !important;
  background: transparent !important;
}

.problem-index-list {
  border-top: 0 !important;
}

.table > thead > tr > th {
  padding: 14px 14px !important;
  border-top: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  background: transparent !important;
  color: var(--faint) !important;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.table > tbody > tr > td {
  padding: 17px 14px !important;
  border-top: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  background: transparent !important;
  color: var(--muted);
  font-size: 14px;
  vertical-align: middle;
}

.table > tbody > tr:last-child > td {
  border-bottom: 0 !important;
}

.table-striped > tbody > tr:nth-of-type(odd),
.table-striped > tbody > tr:nth-of-type(odd) > td {
  background: transparent !important;
}

.table-hover > tbody > tr:hover,
.table-hover > tbody > tr:hover > td {
  background: rgba(8, 120, 249, 0.035) !important;
}

.problem-index-list tr td:nth-child(1) {
  color: var(--blue);
}

.problem-index-list tr td:nth-child(2) a {
  color: var(--faint) !important;
  font-family: var(--font-number);
  font-size: 13px;
}

.problem-index-list tr td:nth-child(3) a {
  color: var(--ink) !important;
  font-weight: 580;
}

.problem-index-list tr td:nth-child(3) a:hover,
.problem-index-list tr td:nth-child(6) a:hover {
  color: var(--blue) !important;
}

.problem-index-list tr td:nth-child(6) {
  color: var(--muted) !important;
  font-family: var(--font-number);
}

.problem-index-list tr td:nth-child(6) .fa-ellipsis-v {
  display: none;
}

.problem-list-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.label {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 2px 9px;
  border: 0 !important;
  border-radius: 7px;
  background: var(--blue-soft) !important;
  color: var(--blue-deep) !important;
  font-size: 11px;
  font-weight: 550;
  line-height: 1.4;
}

.label-success,
.label-warning,
.label-danger,
.label-info,
.label-primary,
.label-default {
  background: var(--blue-soft) !important;
  color: var(--blue-deep) !important;
}

.label-deg-1 {
  background: #eef2f5 !important;
  color: #506475 !important;
}

.label-deg-2 {
  background: var(--blue-soft) !important;
  color: var(--blue-deep) !important;
}

.label-deg-3,
.label-deg-4 {
  background: #e6f0fb !important;
  color: #0a4f9f !important;
}

.tagging_list {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}

.tagging_list > li {
  margin: 0 !important;
}

.tagging_list a,
.hs-chips a {
  position: relative;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 5px 12px !important;
  border: 1px solid transparent !important;
  border-radius: 9px !important;
  background: var(--surface-soft) !important;
  color: var(--muted) !important;
  font-size: 12px;
  line-height: 1.4 !important;
}

.tagging_list a::before,
.hs-chips a::before {
  content: "";
  position: absolute;
  inset: -4px;
}

.tagging_list a:hover,
.hs-chips a:hover {
  background: var(--blue-soft) !important;
  color: var(--blue-deep) !important;
}

.tagging_list a.is-on,
.hs-chips a.is-on {
  border-color: rgba(8, 120, 249, 0.1) !important;
  background: var(--blue-soft) !important;
  color: var(--blue-deep) !important;
  font-weight: 650;
}

.hs-library-layout > .col-md-3 .panel {
  overflow: hidden;
  border-radius: var(--radius-md) !important;
}

.hs-library-layout > .col-md-3 .panel-heading {
  padding: 18px 20px !important;
  font-size: 16px !important;
}

.hs-library-layout > .col-md-3 .panel-body {
  padding: 20px !important;
}

.blog-post {
  padding: 13px 0 13px 15px;
  border-bottom: 1px solid var(--line) !important;
  position: relative;
}

.blog-post:first-child {
  padding-top: 4px;
}

.blog-post:last-child {
  padding-bottom: 4px;
  border-bottom: 0 !important;
}

.blog-post::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
}

.blog-post:last-child::before {
  top: 11px;
}

.blog-post-title,
.blog-post-title a {
  color: var(--ink) !important;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 550;
  line-height: 1.6;
}

.blog-date,
.blog-post-meta,
.detail {
  color: var(--faint) !important;
  font-size: 11px;
}

.blog-post-title .fa-circle {
  display: none;
}

.panel-news .btn,
.panel-news .btn-primary {
  min-height: 44px;
  border-color: var(--line) !important;
  background: var(--surface-soft) !important;
  color: var(--ink) !important;
}

.hs-library-layout > .col-md-3 .panel.hidden-sm,
.hs-library-layout > .col-md-3 img {
  display: none !important;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 24px 0 !important;
}

.pagination > li {
  display: block;
}

.pagination > li > a,
.pagination > li > span {
  min-width: 38px;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px !important;
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  background: transparent !important;
  color: var(--muted) !important;
  font-family: var(--font-number);
}

.pagination > li > a:hover {
  border-color: var(--line) !important;
  background: var(--surface-soft) !important;
  color: var(--ink) !important;
}

.pagination > .active > a,
.pagination > .active > span {
  border-color: var(--blue) !important;
  background: var(--blue) !important;
  color: #fff !important;
  font-weight: 650;
}

.pagination > .disabled > span {
  background: transparent !important;
  color: var(--faint) !important;
  opacity: 0.5;
}

.summary {
  margin: 18px 0;
  color: var(--faint);
  font-size: 12px;
}

.empty {
  padding: 54px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  color: var(--muted);
  text-align: center;
}

.hs-empty-hint {
  display: block;
  margin-top: 7px;
  color: var(--faint);
  font-size: 12px;
}

/* --------------------------------------------------------------------------
   Problem detail
   -------------------------------------------------------------------------- */

.hs-page-problem .search-row {
  display: none !important;
}

.hs-page-problem .breadcrumb {
  margin: 0 0 22px !important;
}

.breadcrumb {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--faint);
  font-size: 12px;
}

.breadcrumb > li > a {
  color: var(--muted);
}

.breadcrumb > li > a:hover {
  color: var(--blue);
}

.breadcrumb > .active {
  color: var(--ink);
}

.breadcrumb > li + li::before {
  padding: 0 9px;
  color: var(--faint);
}

.hs-page-problem .problem-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 0 34px;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  overflow: visible;
}

.hs-page-problem .problem-detail > .row.text-center {
  grid-column: 1 / -1;
  margin: 0 0 24px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  text-align: left;
}

.hs-page-problem .problem-detail > .row.text-center h3 {
  max-width: 760px;
  margin: 0 !important;
  color: var(--ink);
  font-size: clamp(36px, 4.8vw, 62px);
  font-weight: 680;
  line-height: 1.12;
  letter-spacing: -0.05em;
}

.hs-page-problem .problem-detail > .problem-view {
  width: auto !important;
  float: none !important;
  padding: 34px 38px !important;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.hs-page-problem .problem-detail > .problem-info {
  position: sticky;
  top: 102px;
  width: auto !important;
  float: none !important;
  padding: 0 !important;
}

.content-header {
  position: relative;
  margin: 38px 0 0 !important;
  padding: 0 0 12px !important;
  border-top: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  background: transparent !important;
  color: var(--ink);
  font-size: 18px !important;
}

.content-header:first-child {
  margin-top: 0 !important;
}

.content-header::after {
  display: none;
}

.content-header > span {
  font-family: var(--font-title);
  font-weight: 650;
  letter-spacing: -0.02em;
}

.content-header .fa-ellipsis-v {
  display: none;
}

.content-wrapper {
  padding: 18px 0 8px !important;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}

.content-wrapper .markdown {
  max-width: 68ch;
}

.content-wrapper .markdown p {
  margin: 0 0 14px;
}

.content-wrapper .markdown p:last-child {
  margin-bottom: 0;
}

.content-wrapper .markdown strong {
  color: var(--ink);
}

.markdown code {
  padding: 1px 5px;
  border: 0;
  border-radius: 4px;
  background: var(--blue-soft);
  color: var(--blue-deep);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.92em;
}

.markdown pre {
  margin: 18px 0;
  padding: 20px 22px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--ink) !important;
  color: rgba(255, 255, 255, 0.9);
}

.markdown pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.sample-test {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.sample-test .input,
.sample-test .output {
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--ink);
}

.sample-test h4 {
  margin: 0 !important;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.68);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sample-test pre {
  min-height: 82px;
  margin: 0;
  padding: 18px;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  color: rgba(255, 255, 255, 0.88);
  font: 13px/1.7 "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

.problem-info .panel {
  margin-bottom: 16px !important;
  overflow: hidden;
}

.problem-info .panel .content-header {
  margin: 0 !important;
  padding: 18px 20px 12px !important;
  font-size: 15px !important;
}

.problem-info .table {
  margin: 0 !important;
}

.problem-info .table > tbody > tr > td {
  padding: 12px 20px !important;
  border-bottom: 1px solid var(--line) !important;
  font-size: 12px;
}

.problem-info .table > tbody > tr:last-child > td {
  border-bottom: 0 !important;
}

.problem-info .table > tbody > tr > td:first-child {
  width: 43%;
  color: var(--faint);
}

.problem-info .table > tbody > tr > td:last-child {
  color: var(--ink);
  font-family: var(--font-number);
  text-align: right;
}

.problem-info .table .fa {
  margin-right: 5px;
  color: var(--blue);
}

.problem-info > .btn {
  width: 100%;
  margin-top: 4px;
}

.problem-info .hidden-sm {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Modal and submission
   -------------------------------------------------------------------------- */

.modal-backdrop.in {
  z-index: 1290 !important;
  background: rgba(7, 21, 33, 0.42);
  opacity: 1 !important;
}

.modal {
  z-index: 1300 !important;
}

.modal-content {
  overflow: hidden;
  border: 1px solid var(--line) !important;
  border-radius: 24px !important;
  background: var(--surface) !important;
  box-shadow: 0 30px 90px rgba(7, 21, 33, 0.18) !important;
}

.modal-header {
  padding: 20px 24px !important;
  border-bottom: 1px solid var(--line) !important;
}

.modal-header h3 {
  margin: 0 !important;
  color: var(--ink);
  font-size: 20px;
  font-weight: 650;
}

.modal-header .close {
  width: var(--tap);
  height: var(--tap);
  margin-top: -8px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--muted) !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

.modal-header .close:hover {
  background: var(--surface-soft);
}

.modal-body {
  padding: 24px !important;
}

.modal-footer {
  padding: 16px 24px !important;
  border-top: 1px solid var(--line) !important;
}

.modal-footer .btn {
  min-height: 44px;
}

#submit-form .control-label {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
}

#submit-form textarea,
#submit-code {
  min-height: 340px;
  padding: 18px !important;
  border: 0 !important;
  border-radius: var(--radius-md) !important;
  background: var(--ink) !important;
  color: rgba(255, 255, 255, 0.9) !important;
  caret-color: var(--cyan);
  font-size: 13px !important;
}

#submit-form textarea:focus {
  box-shadow: inset 0 0 0 1px rgba(39, 194, 232, 0.6) !important;
}

#submit-form select {
  max-width: 280px;
}

#submit-form .btn-success {
  min-width: 130px;
}

/* --------------------------------------------------------------------------
   Contests
   -------------------------------------------------------------------------- */

.hs-page-contest .wrap > .container > .search-row,
.hs-page-group .wrap > .container > .search-row {
  display: none !important;
}

.contest-index {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.contest-index .list-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end !important;
  gap: 28px;
  padding: 0 0 30px !important;
  border-bottom: 0 !important;
}

.contest-index .list-head > :first-child {
  text-align: left !important;
}

.contest-index .list-tag-title {
  font-size: clamp(42px, 5vw, 64px);
}

.contest-index .input-group {
  width: min(360px, 100%);
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.contest-index .input-group .form-control {
  height: 46px;
  min-height: 46px;
  width: auto !important;
  min-width: 0;
  flex: 1 1 auto;
  border: 0 !important;
  background: transparent !important;
}

.contest-index .input-group-btn {
  width: auto;
  flex: 0 0 auto;
  font-size: 0;
}

.contest-index .input-group .btn {
  position: relative;
  flex: 0 0 auto;
  min-width: 80px;
  margin: 4px;
  min-height: 38px;
  border-radius: 10px !important;
  background: var(--blue) !important;
  color: #fff !important;
}

.list-section > .list-group {
  margin: 0 0 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.list-section > .list-group > .list-group-item {
  margin: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.list-section > .list-group > .list-group-item.active {
  padding: 28px 32px !important;
  background: var(--ink) !important;
  color: #fff !important;
}

.list-section > .list-group > .list-group-item.active .activity-name {
  color: #fff !important;
  font-size: clamp(23px, 2.8vw, 32px);
  font-weight: 650;
  letter-spacing: -0.035em;
}

.list-section > .list-group > .list-group-item.active .more {
  color: rgba(255, 255, 255, 0.45) !important;
}

.list-section > .list-group > .list-group-item > .list-group-item-heading {
  padding: 26px 32px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.list-section > .list-group > .list-group-item > .list-group-item-heading .row {
  text-align: left !important;
}

.list-section > .list-group > .list-group-item > .list-group-item-heading > .row {
  margin: 0 !important;
}

.list-section .inner-item {
  height: 100%;
  overflow: hidden;
  border-color: var(--line) !important;
  border-radius: var(--radius-md) !important;
  background: var(--surface-soft) !important;
}

.list-section .list-group-item:not(.active) {
  padding: 24px 32px 30px !important;
}

.list-section .list-group-item:not(.active) > .row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0 !important;
}

.list-section .list-group-item:not(.active) > .row > [class*="col-"] {
  width: auto !important;
  float: none !important;
  padding: 0 !important;
}

.inner-header {
  padding: 18px 18px 14px !important;
  border-bottom: 1px solid var(--line) !important;
  background: transparent !important;
}

.inner-header b,
.inner-header B {
  color: var(--ink);
  font-family: var(--font-title);
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.inner-body {
  padding: 15px 18px 6px !important;
}

.contest-info-row {
  margin: 0 0 10px !important;
}

.contest-info-row .inner-words {
  color: var(--muted) !important;
  font-size: 12px;
  line-height: 1.7;
}

.contest-info-row .inner-words span {
  white-space: normal !important;
  overflow-wrap: anywhere;
}

.contest-info-row .label {
  min-height: 24px;
  background: #eef2f6 !important;
  color: #657686 !important;
}

.inner-footer {
  padding: 6px 18px 18px !important;
  text-align: left !important;
}

.inner-btn,
.contest-action-btn {
  min-height: 42px;
  padding: 8px 15px;
  border: 1px solid rgba(8, 120, 249, 0.23) !important;
  border-radius: 10px !important;
  background: var(--surface) !important;
  color: var(--blue-deep) !important;
  font-size: 12px;
  font-weight: 650;
}

.inner-btn:hover,
.contest-action-btn:hover {
  background: var(--blue-soft) !important;
}

.contests-table-wrapper {
  overflow-x: auto;
}

.contests-table th {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font-size: 11px;
  font-weight: 650;
  text-align: left;
}

.contests-table td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.contest-title {
  color: var(--ink);
  font-weight: 600;
}

.contest-time {
  color: var(--muted);
  font-family: var(--font-number);
}

.contest-status {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 7px;
  background: #eef2f5;
  color: #5f7080;
  font-size: 11px;
}

.contest-status.status-running,
.contest-status.status-signup {
  background: var(--blue-soft);
  color: var(--blue-deep);
}

/* --------------------------------------------------------------------------
   Groups
   -------------------------------------------------------------------------- */

.group-filters {
  margin: 0 0 24px !important;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.group-filters .form-control {
  min-height: 48px;
}

.group-filters .btn {
  min-width: 106px;
  margin-left: 8px;
}

.group-columns {
  display: block !important;
}

.group-columns > .row {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0 !important;
}

.group-columns > .row::before,
.group-columns > .row::after {
  content: none !important;
  display: none !important;
}

.group-columns .card-parent {
  width: auto !important;
  padding: 0 !important;
  float: none !important;
  margin: 0 !important;
}

.group-columns .card {
  height: 100%;
  padding: 22px !important;
  border-color: var(--line) !important;
  border-radius: var(--radius-md) !important;
  background: var(--surface) !important;
  box-shadow: none !important;
  transition: transform 240ms var(--ease), border-color 240ms var(--ease);
}

.group-columns .card:hover {
  transform: translateY(-2px);
  border-color: rgba(8, 120, 249, 0.18) !important;
}

.group-columns .card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 0 14px !important;
  border: 0 !important;
  background: transparent !important;
}

.group-columns .card-header a {
  color: var(--ink) !important;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.4;
}

.group-columns .card-header i,
.group-columns .card-item-1 .fa,
.group-columns .card-item-2 .fa,
.group-columns .card-item-3 .fa,
.group-columns .card-item-4 .fa,
.group-columns .card-item-5 .fa,
.group-columns .card-item-6 .fa,
.group-columns .card-item-7 .fa {
  width: 38px !important;
  height: 38px !important;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 11px !important;
  background: var(--blue-soft) !important;
  color: var(--blue) !important;
  font-size: 15px;
}

.group-columns .card-body {
  padding: 0;
  color: var(--muted);
  font-size: 12px;
}

.group-columns .card-text {
  min-height: 40px;
  margin: 0 0 10px !important;
  color: var(--muted);
  line-height: 1.7;
}

.group-columns .pull-right {
  color: var(--faint);
  font-family: var(--font-number);
}

ul.nav-tabs.group-index.nav {
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

ul.nav-tabs.group-index.nav > li > a {
  min-height: var(--tap);
  display: flex;
  align-items: center;
  border: 0 !important;
  background: transparent !important;
  color: var(--muted) !important;
}

ul.nav-tabs.group-index.nav > li.active > a {
  color: var(--ink) !important;
  font-weight: 650;
  box-shadow: inset 0 -2px 0 var(--blue);
}

/* --------------------------------------------------------------------------
   Login / registration
   -------------------------------------------------------------------------- */

.hs-page-auth .wrap > .container {
  display: flex;
  min-height: calc(100vh - 76px);
  align-items: center;
  padding-top: 48px;
  padding-bottom: 64px;
}

.hs-page-auth .site-login,
.hs-page-auth .form-signup {
  width: min(1080px, 100%) !important;
  margin: 0 auto !important;
  padding: 0 !important;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line) !important;
  border-radius: 30px !important;
  background: var(--surface) !important;
}

.hs-page-auth .site-login {
  min-height: 620px;
}

.hs-page-auth .form-signup {
  min-height: 700px;
}

.hs-page-auth .left {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 48px !important;
  border: 0 !important;
  background:
    radial-gradient(circle at 82% 16%, rgba(39, 194, 232, 0.2), transparent 17rem),
    radial-gradient(circle at 12% 92%, rgba(8, 120, 249, 0.28), transparent 22rem),
    var(--ink) !important;
}

.hs-page-auth .left::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -110px;
  bottom: -110px;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  box-shadow:
    0 0 0 58px rgba(255, 255, 255, 0.025),
    0 0 0 116px rgba(255, 255, 255, 0.014);
}

.hs-page-auth .left > img {
  display: none !important;
}

.hs-auth-visual {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left !important;
  color: #fff;
}

.hs-auth-visual__logo {
  width: 150px;
  padding: 13px 15px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
}

.hs-auth-visual__logo img {
  display: block;
  width: 100%;
  height: auto;
}

.hs-auth-visual__copy {
  max-width: 360px;
}

.hs-auth-visual__copy span {
  color: rgba(255, 255, 255, 0.46);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hs-auth-visual__copy h2 {
  margin: 14px 0 15px;
  color: #fff;
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.hs-auth-visual__copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 14px;
  line-height: 1.8;
}

.hs-page-auth .site-login > .col-md-6,
.hs-page-auth .form-signup > .col-md-6 {
  width: auto !important;
  float: none !important;
}

.hs-page-auth .site-login > .col-md-6:last-child,
.hs-page-auth .form-signup > .col-md-6:last-child {
  display: flex;
  align-items: center;
  padding: 54px 64px !important;
}

.hs-page-auth .form-signup > .col-md-6:last-child {
  flex-direction: column;
  align-items: stretch;
  padding-top: 38px !important;
  padding-bottom: 38px !important;
}

.hs-page-auth .form-signup > .col-md-6:last-child > form {
  width: 100%;
}

.hs-page-auth .form-signin {
  width: 100%;
}

.hs-page-auth .login-title,
.hs-page-auth .signin-title {
  margin: 0 0 28px !important;
  color: var(--ink);
  font-size: clamp(28px, 3vw, 38px) !important;
  font-weight: 680;
  line-height: 1.2;
  letter-spacing: -0.04em;
  text-align: left;
}

.hs-page-auth .form-group {
  margin-bottom: 18px;
}

.hs-page-auth .form-group > label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
}

.hs-page-auth .form-control {
  min-height: 50px;
}

.hs-page-auth .btn-primary {
  min-height: 50px;
  margin-top: 4px;
  border-radius: 13px !important;
  font-size: 14px;
}

.hs-page-auth .tips {
  margin: 12px 0 0 !important;
  color: var(--faint) !important;
  font-size: 11px;
  line-height: 1.65;
}

.hs-page-auth .checkbox {
  color: var(--muted);
  font-size: 12px;
}

.hs-page-auth .reset-password {
  padding-top: 0 !important;
  font-size: 12px;
}

.hs-page-auth .site-login .form-group > .clearfix {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.hs-page-auth .site-login .form-group > .clearfix > .col-sm-8,
.hs-page-auth .site-login .form-group > .clearfix > .col-sm-2 {
  width: auto !important;
  float: none !important;
  padding: 0 !important;
}

.hs-page-auth .site-login .reset-password {
  display: none;
}

/* --------------------------------------------------------------------------
   Account, status and auxiliary pages
   -------------------------------------------------------------------------- */

.hs-page-status .problem-detail,
.hs-page-ranking .problem-detail,
.hs-page-lists .problem-detail {
  padding: 34px !important;
}

.hs-page-status .problem-detail > .row.text-center,
.hs-page-ranking .problem-detail > .row.text-center,
.hs-page-lists .problem-detail > .row.text-center {
  padding-bottom: 14px;
  text-align: left;
}

.hs-page-status .problem-detail > .row.text-center h3,
.hs-page-ranking .problem-detail > .row.text-center h3,
.hs-page-lists .problem-detail > .row.text-center h3 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 680;
  letter-spacing: -0.04em;
}

.hs-page-status .problem-detail > .text-muted,
.hs-page-ranking .problem-detail > .text-muted,
.hs-page-lists .problem-detail > .text-muted {
  max-width: 68ch;
}

.hs-page-status .table > tbody > tr > td a {
  color: var(--ink);
  font-weight: 550;
}

.hs-status-result {
  color: var(--blue-deep) !important;
  font-weight: 650;
}

.hs-status-result.is-accepted {
  color: var(--success) !important;
}

.hs-status-result.is-error {
  color: var(--danger) !important;
}

.tag-group {
  display: flex !important;
  flex-wrap: wrap;
  gap: 9px;
  padding: 0 !important;
  list-style: none;
}

.tag-group li {
  margin: 0 !important;
}

.tag-group a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 9px;
  background: var(--blue-soft);
  color: var(--blue-deep);
  font-size: 12px;
}

.tag-group a:hover {
  background: var(--blue);
  color: #fff;
}

/* --------------------------------------------------------------------------
   Footer and mobile navigation
   -------------------------------------------------------------------------- */

.footer {
  margin-top: 56px !important;
  padding: 28px 0 !important;
  border-top: 1px solid var(--line) !important;
  background: transparent !important;
  color: var(--faint) !important;
  font-size: 11px;
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer p {
  margin: 0 !important;
  float: none !important;
  color: var(--faint);
}

.footer .container > p + p {
  display: none;
}

.footer a {
  color: var(--faint);
}

.hs-tabbar {
  display: none;
}

.hs-assistant,
.hs-sheet,
.hs-sheet-mask {
  display: none !important;
}

.hs-scroll-top {
  position: fixed;
  right: 24px;
  bottom: 28px;
  z-index: 1050;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: opacity 220ms var(--ease), transform 220ms var(--ease);
}

.hs-scroll-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Progressive motion
   -------------------------------------------------------------------------- */

.hs-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 320ms var(--ease), transform 320ms var(--ease);
}

.hs-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hs-problem-drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(7, 21, 33, 0.34);
  opacity: 0;
  transition: opacity 240ms var(--ease);
}

.hs-problem-drawer-mask.is-open {
  opacity: 1;
}

.hs-problem-drawer {
  position: fixed;
  top: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 1101;
  width: min(620px, calc(100vw - 24px));
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 30px 90px rgba(7, 21, 33, 0.18);
  transform: translateX(calc(100% + 24px));
  transition: transform 280ms var(--ease);
}

.hs-problem-drawer.is-open {
  transform: translateX(0);
}

.hs-drawer-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.hs-drawer-head span {
  display: block;
  margin-bottom: 5px;
  color: var(--blue);
  font-family: var(--font-number);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.hs-drawer-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  font-weight: 650;
  line-height: 1.35;
}

.hs-drawer-close {
  width: var(--tap);
  height: var(--tap);
  flex: 0 0 var(--tap);
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  font-size: 20px;
}

.hs-drawer-body {
  padding: 10px 26px 28px;
}

.hs-drawer-body .content-header {
  margin-top: 26px !important;
}

.hs-drawer-body .problem-view {
  width: auto !important;
  float: none !important;
}

.hs-drawer-preview {
  clear: both;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--blue-soft);
}

.hs-drawer-preview p {
  margin: 0;
  color: var(--blue-deep);
  font-size: 12px;
}

.hs-drawer-loading {
  display: flex;
  min-height: 220px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
}

.hs-news-mask {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 21, 33, 0.42);
  opacity: 0;
  transition: opacity 220ms var(--ease);
}

.hs-news-mask.is-open {
  opacity: 1;
}

.hs-news-sheet {
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 34px 100px rgba(7, 21, 33, 0.2);
  transform: translateY(14px);
  transition: transform 260ms var(--ease);
}

.hs-news-mask.is-open .hs-news-sheet {
  transform: translateY(0);
}

.hs-news-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 36px 46px 28px;
  border-bottom: 1px solid var(--line);
}

.hs-news-head span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.hs-news-head h1 {
  margin: 10px 0 0;
  color: var(--ink);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 680;
  line-height: 1.14;
  letter-spacing: -0.045em;
}

.hs-news-head button {
  width: var(--tap);
  height: var(--tap);
  flex: 0 0 var(--tap);
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  font-size: 20px;
}

.hs-news-body {
  max-width: 68ch;
  margin: 0 auto;
  padding: 34px 30px 48px;
}

.hs-news-body p,
.hs-news-body h2 {
  max-width: 40em;
}

.hs-news-body p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
}

.hs-news-body .hs-news-lead {
  color: var(--ink);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.8;
}

.hs-news-body h2 {
  margin: 36px 0 12px;
  color: var(--ink);
  font-size: 24px;
  font-weight: 650;
}

.hs-news-body .hs-news-sign {
  margin-top: 38px;
  color: var(--faint);
  font-size: 12px;
}

/* --------------------------------------------------------------------------
   Responsive: tablet and mobile
   -------------------------------------------------------------------------- */

@media (max-width: 991px) {
  :root {
    --shell-pad: 16px;
  }

  body {
    padding-bottom: 86px;
  }

  .container {
    width: min(680px, calc(100% - 32px)) !important;
  }

  .wrap > .container {
    padding-top: 20px;
    padding-bottom: 44px;
  }

  .navbar-default {
    min-height: 70px;
  }

  .navbar-default .container {
    min-height: 69px;
  }

  .navbar-default .navbar-brand,
  .navbar-default .navbar-brand:hover,
  .navbar-default .navbar-brand:focus {
    height: 69px;
  }

  .navbar-default .navbar-brand::before {
    width: 94px;
    height: 41px;
    flex-basis: 94px;
  }

  .navbar-default .navbar-toggle {
    display: block;
    margin-top: 13px;
  }

  .navbar-default .navbar-collapse {
    display: none !important;
    float: none;
    clear: both;
    padding: 8px 0 12px !important;
  }

  .navbar-default .navbar-collapse.in,
  .navbar-default .navbar-collapse.collapsing {
    display: block !important;
  }

  .navbar-default .navbar-nav {
    display: block;
    min-height: 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
  }

  .navbar-default .navbar-nav > li > a,
  .navbar-default .navbar-nav > .open > a {
    min-height: 46px;
    display: flex;
    padding: 0 12px !important;
    border-radius: 9px;
  }

  .navbar-default .navbar-nav > li.active > a::after {
    display: none;
  }

  .hs-home-hero {
    min-height: 480px;
    padding: 44px 28px;
    border-radius: 24px;
  }

  .hs-home-hero::before {
    right: -100px;
    bottom: -70px;
  }

  .hs-home-hero::after {
    top: 32px;
    right: 32px;
  }

  .hs-home-hero h1 {
    font-size: clamp(40px, 10vw, 58px);
    line-height: 1.08;
  }

  .hs-home-hero > p {
    font-size: 15px;
    line-height: 1.8;
  }

  .hs-home-stats {
    grid-template-columns: 1fr;
    margin-top: 16px;
    border-top: 1px solid var(--line);
  }

  .hs-home-stat {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 20px 4px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .hs-home-stat:last-child {
    border-bottom: 0;
  }

  .hs-home-stat strong {
    font-size: 38px;
  }

  .hs-home-stat span {
    margin-top: 0;
  }

  .hs-home-story {
    grid-template-columns: 1fr;
    margin-top: 54px;
  }

  .hs-story-item {
    padding: 26px 4px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .hs-story-item:last-child {
    border-bottom: 0;
  }

  .hs-story-item p {
    max-width: 38ch;
  }

  .hs-home-brief {
    margin-top: 52px;
    padding: 30px 24px;
    border-radius: 22px;
  }

  .hs-home-brief h2 {
    font-size: 28px;
  }

  .search-row {
    margin-bottom: 22px !important;
  }

  .search-row .form-control {
    height: 54px;
    min-height: 54px;
    padding-right: 102px;
  }

  .search-row .btn-search {
    width: 88px;
  }

  .hs-library-layout {
    display: flex !important;
    flex-direction: column;
    gap: 18px;
  }

  .hs-library-layout > .col-md-9,
  .hs-library-layout > .col-md-3 {
    width: 100% !important;
  }

  .hs-library-layout > .col-md-3 {
    order: 2;
  }

  .list-head {
    display: block !important;
    padding: 24px 20px 18px !important;
  }

  .list-tag-title {
    font-size: 34px;
  }

  .list-head .pagination {
    margin-top: 18px !important;
    justify-content: flex-start;
  }

  .list-section,
  .grid-view {
    padding: 0 20px !important;
  }

  .problem-index-list {
    display: block;
    width: 100% !important;
  }

  .problem-index-list colgroup,
  .problem-index-list thead {
    display: none;
  }

  .problem-index-list tbody {
    display: block;
  }

  .problem-index-list tr {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "id title title"
      "tags tags difficulty";
    gap: 9px 10px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
  }

  .problem-index-list tr:last-child {
    border-bottom: 0;
  }

  .problem-index-list td {
    display: block !important;
    width: auto !important;
    padding: 0 !important;
    border: 0 !important;
  }

  .problem-index-list > tbody > tr > td {
    border: 0 !important;
  }

  .problem-index-list td:nth-child(1) {
    display: none !important;
  }

  .problem-index-list td:nth-child(2) {
    grid-area: id;
    align-self: center;
    color: var(--faint) !important;
    font-size: 12px !important;
  }

  .problem-index-list td:nth-child(3) {
    grid-area: title;
    min-width: 0;
    color: var(--ink);
    font-size: 15px !important;
    font-weight: 570;
    line-height: 1.5;
  }

  .problem-index-list td:nth-child(3) a::after {
    content: "";
    position: absolute;
    inset: 0;
  }

  .problem-index-list td:nth-child(4) {
    grid-area: tags;
  }

  .problem-index-list td:nth-child(5) {
    grid-area: difficulty;
    justify-self: end;
  }

  .problem-index-list td:nth-child(6) {
    display: none !important;
  }

  .table > tbody > tr > td {
    border-bottom-color: var(--line);
  }

  .hs-page-problem .problem-detail {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .hs-page-problem .problem-detail > .row.text-center {
    margin-bottom: 2px !important;
  }

  .hs-page-problem .problem-detail > .row.text-center h3 {
    font-size: clamp(34px, 8vw, 48px);
    text-align: left;
  }

  .hs-page-problem .problem-detail > .problem-view {
    padding: 26px 22px !important;
    border-radius: 22px;
  }

  .hs-page-problem .problem-detail > .problem-info {
    position: static;
    order: 2;
  }

  .sample-test {
    grid-template-columns: 1fr;
  }

  .contest-index .list-head {
    display: block !important;
    padding-bottom: 22px !important;
  }

  .contest-index .list-head > [class*="col-"] {
    width: 100% !important;
    float: none !important;
  }

  .contest-index .input-group {
    width: 100%;
    margin-top: 18px;
  }

  .list-section > .list-group > .list-group-item.active {
    padding: 24px 22px !important;
  }

  .list-section .list-group-item:not(.active) {
    padding: 20px 18px 24px !important;
  }

  .list-section .list-group-item:not(.active) > .row {
    grid-template-columns: 1fr;
  }

  .group-columns {
    display: block !important;
  }

  .group-columns > .row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hs-page-auth .wrap > .container {
    min-height: auto;
    padding-top: 24px;
    padding-bottom: 36px;
  }

  .hs-page-auth .site-login,
  .hs-page-auth .form-signup {
    display: block;
    width: min(520px, 100%) !important;
    min-height: 0;
    border-radius: 24px !important;
  }

  .hs-page-auth .site-login .left,
  .hs-page-auth .form-signup .left {
    display: none !important;
  }

  .hs-page-auth .site-login > .col-md-6:last-child,
  .hs-page-auth .form-signup > .col-md-6:last-child {
    display: block;
    padding: 34px 26px !important;
  }

  .hs-page-auth .login-title,
  .hs-page-auth .signin-title {
    font-size: 30px !important;
  }

  .hs-page-status .problem-detail,
  .hs-page-ranking .problem-detail,
  .hs-page-lists .problem-detail {
    padding: 24px 20px !important;
  }

  .hs-page-status .table,
  .hs-page-ranking .table {
    display: block;
  }

  .hs-page-status .table thead,
  .hs-page-ranking .table thead {
    display: none;
  }

  .hs-page-status .table tbody,
  .hs-page-ranking .table tbody,
  .hs-page-status .table tr,
  .hs-page-ranking .table tr,
  .hs-page-status .table td,
  .hs-page-ranking .table td {
    display: block;
  }

  .hs-page-status .table tr,
  .hs-page-ranking .table tr {
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
  }

  .hs-page-status .table td,
  .hs-page-ranking .table td {
    padding: 2px 0 !important;
    border: 0 !important;
  }

  .hs-page-status .table td::before {
    display: inline-block;
    min-width: 4.8em;
    color: var(--faint);
    font-size: 11px;
    font-weight: 500;
  }

  .hs-page-status .table td:nth-child(1)::before { content: "提交编号"; }
  .hs-page-status .table td:nth-child(2)::before { content: "题目"; }
  .hs-page-status .table td:nth-child(3)::before { content: "语言"; }
  .hs-page-status .table td:nth-child(4)::before { content: "结果"; }
  .hs-page-status .table td:nth-child(5)::before { content: "提交时间"; }

  .footer {
    margin-top: 34px !important;
    padding-bottom: 100px !important;
  }

  .footer .container {
    justify-content: center;
  }

  .hs-scroll-top {
    right: 16px;
    bottom: 86px;
  }

  .hs-tabbar {
    position: fixed;
    right: 12px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 12px;
    z-index: 1050;
    height: 64px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 6px;
    border: 1px solid rgba(10, 35, 55, 0.1);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.88);
    -webkit-backdrop-filter: saturate(160%) blur(18px);
    backdrop-filter: saturate(160%) blur(18px);
  }

  .hs-tabbar a {
    min-height: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 14px;
    color: var(--faint);
    font-size: 10px;
  }

  .hs-tabbar a[aria-current="page"] {
    background: var(--blue-soft);
    color: var(--blue-deep);
    font-weight: 650;
  }

  .hs-tabbar a .fa {
    font-size: 17px;
  }

  .hs-problem-drawer {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 90vh;
    border-radius: 24px 24px 0 0;
    transform: translateY(100%);
  }

  .hs-problem-drawer.is-open {
    transform: translateY(0);
  }

  .hs-drawer-head {
    padding: 20px;
  }

  .hs-drawer-body {
    padding: 4px 20px 28px;
  }

  .hs-news-mask {
    padding: 0;
    place-items: end center;
  }

  .hs-news-sheet {
    width: 100%;
    max-height: 92vh;
    border-radius: 24px 24px 0 0;
  }

  .hs-news-head {
    padding: 26px 22px 20px;
  }

  .hs-news-body {
    padding: 26px 22px 44px;
  }

  .hs-news-body p {
    font-size: 15px;
  }

  .hs-news-body .hs-news-lead {
    font-size: 18px;
  }
}

@media (min-width: 641px) and (max-width: 991px) {
  .hs-home-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hs-home-stat {
    display: block;
    padding: 24px 18px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .hs-home-stat:last-child {
    border-right: 0;
  }

  .hs-home-stat strong {
    font-size: 42px;
  }

  .hs-home-stat span {
    margin-top: 8px;
  }

  .hs-home-story {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hs-story-item {
    padding: 26px 20px 10px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .hs-story-item:last-child {
    border-right: 0;
  }

  .problem-index-list tbody {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
  }

  .problem-index-list tr {
    display: grid;
  }
}

@media (max-width: 540px) {
  .hs-home-hero {
    min-height: 440px;
    padding: 36px 22px;
  }

  .hs-home-hero h1 {
    font-size: clamp(37px, 11vw, 50px);
  }

  .hs-home-hero > p {
    margin-top: 20px;
  }

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

  .hs-hero-actions .btn {
    width: 100%;
  }

  .hs-eyebrow {
    margin-bottom: 15px;
    font-size: 10px;
  }

  .list-tag-title,
  .contest-index .list-tag-title {
    font-size: 34px;
  }

  .group-columns {
    display: block;
  }

  .group-columns > .row {
    grid-template-columns: 1fr;
  }

  .group-filters .btn {
    width: 100%;
    margin: 8px 0 0;
  }

  .group-filters .input-group {
    display: block;
  }

  .contest-index .input-group {
    display: flex;
  }

  .hs-page-auth .site-login > .col-md-6:last-child,
  .hs-page-auth .form-signup > .col-md-6:last-child {
    padding: 28px 20px !important;
  }

  .hs-page-auth .login-title,
  .hs-page-auth .signin-title {
    font-size: 27px !important;
  }

  #submit-form select {
    max-width: none;
  }
}

@media (min-width: 992px) {
  .hs-tabbar,
  .hs-scroll-top {
    display: none !important;
  }
}

@media (min-width: 1400px) {
  .container {
    width: min(1220px, calc(100% - 96px)) !important;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .hs-reveal {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   Cloud OJ application layer
   ========================================================================== */

:root {
  --card: var(--surface);
  --text: var(--ink);
  --brand: var(--blue);
  --brand-deep: var(--blue-deep);
  --brand-soft: var(--blue-soft);
  --radius: 24px;
  --radius-sm: 12px;
  --shadow: none;
  --font: var(--font-body);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 251, 253, 0.9);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
}

.header-inner {
  width: min(1180px, calc(100% - 48px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand img {
  width: 106px;
  height: 46px;
  object-fit: contain;
}

.brand-label {
  padding-left: 13px;
  border-left: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 18px;
  font-weight: 680;
  letter-spacing: -0.03em;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  position: relative;
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  padding: 0 15px;
  border-radius: 11px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 550;
  transition: color 220ms var(--ease), background-color 220ms var(--ease);
}

.nav-link:hover {
  background: rgba(8, 120, 249, 0.055);
  color: var(--ink);
}

.nav-link.active {
  color: var(--ink);
  font-weight: 700;
}

.nav-link.active::after {
  content: "";
  position: absolute;
  right: 15px;
  bottom: 10px;
  left: 15px;
  height: 2px;
  border-radius: 2px;
  background: var(--blue);
}

.header-user {
  margin-left: auto;
}

.user-chip {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
}

.user-dot {
  background: var(--blue);
}

.shell {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 90px;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 20px;
  padding: 66px 68px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 84% 22%, rgba(39, 194, 232, 0.13), transparent 22rem),
    radial-gradient(circle at 94% 78%, rgba(8, 120, 249, 0.1), transparent 26rem),
    linear-gradient(145deg, #fff, #f6faff 58%, #eef6ff);
  box-shadow: none;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: 7%;
  bottom: 3%;
  width: 245px;
  height: 245px;
  border: 1px solid rgba(8, 120, 249, 0.12);
  border-radius: 50%;
  box-shadow:
    0 0 0 52px rgba(8, 120, 249, 0.025),
    0 0 0 104px rgba(8, 120, 249, 0.014);
}

.hero::after {
  content: "";
  position: absolute;
  top: 58px;
  right: 58px;
  width: 7px;
  height: 7px;
  border: 0;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 7px rgba(39, 194, 232, 0.09);
}

.eyebrow {
  margin-bottom: 18px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.hero h1 {
  max-width: 800px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(48px, 6vw, 82px);
  font-weight: 680;
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.hero h1 em {
  color: var(--blue-deep);
  font-style: normal;
}

.hero p {
  max-width: 660px;
  margin-top: 26px;
  color: var(--muted);
  font-size: clamp(15px, 1.6vw, 19px);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-actions .btn {
  min-width: 144px;
  min-height: 50px;
  border-radius: 14px;
}

.hero-actions .btn-secondary {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.stats {
  position: absolute;
  right: 68px;
  bottom: 50px;
  display: flex;
  gap: 32px;
  margin: 0;
}

.stat strong {
  color: var(--blue-deep);
  font-family: var(--font-number);
  font-size: 38px;
  font-weight: 650;
  line-height: 1;
}

.stat span {
  color: var(--faint);
}

.news-panel {
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 20px;
  padding: 18px;
  border-radius: 22px;
  box-shadow: none;
}

.news-heading {
  border-right-color: var(--line);
}

.news-badge {
  background: var(--blue);
}

.news-item {
  background: var(--surface-soft);
  border-radius: 14px;
}

.news-meta span {
  color: var(--blue-deep);
}

.panel {
  border-color: var(--line);
  border-radius: 24px;
  box-shadow: none;
}

.toolbar {
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 10px;
  padding: 12px;
  border-bottom-right-radius: 18px;
  border-bottom-left-radius: 18px;
}

.search-wrap,
.select {
  min-height: 50px;
  border-color: var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
}

.search-wrap:focus-within,
.select:focus {
  border-color: rgba(8, 120, 249, 0.45);
  box-shadow: 0 0 0 3px rgba(8, 120, 249, 0.07);
}

.chips {
  gap: 8px;
  padding-bottom: 16px;
}

.chip {
  min-height: 36px;
  border-color: transparent;
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--muted);
}

.chip.active {
  border-color: rgba(8, 120, 249, 0.1);
  background: var(--blue-soft);
  color: var(--blue-deep);
}

.table-wrap {
  border-radius: 24px;
  background: var(--surface);
}

.table-wrap th {
  padding: 15px 18px;
  background: transparent;
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.table-wrap td {
  padding: 18px;
  color: var(--muted);
}

.table-wrap tbody tr:hover {
  background: rgba(8, 120, 249, 0.035);
}

.pid {
  color: var(--faint);
  font-family: var(--font-number);
}

.problem-link {
  color: var(--ink);
  font-weight: 580;
}

.problem-link:hover {
  color: var(--blue);
}

.tag {
  border-radius: 7px;
  background: var(--blue-soft);
  color: var(--blue-deep);
  font-weight: 550;
}

.difficulty {
  border-radius: 7px;
}

.difficulty.easy {
  background: #eef2f5;
  color: #526474;
}

.difficulty.mid,
.difficulty.hard {
  background: var(--blue-soft);
  color: var(--blue-deep);
}

.solved-mark,
.verdict.accepted {
  color: var(--blue-deep);
}

.pagination {
  padding: 24px;
}

.page-btn {
  border-color: transparent;
  border-radius: 10px;
  color: var(--muted);
}

.page-btn.active {
  border-color: var(--blue);
  background: var(--blue);
}

.empty {
  border: 1px dashed var(--line-strong);
  border-radius: 20px;
  background: var(--surface-soft);
}

.breadcrumb a:hover,
.side-card a:hover {
  color: var(--blue);
}

.problem-layout {
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 24px;
}

.problem-main {
  border-radius: 26px;
}

.problem-title {
  padding: 32px 36px 24px;
}

.problem-title h1 {
  font-size: clamp(34px, 4vw, 56px);
  font-weight: 680;
  letter-spacing: -0.045em;
}

.content-section {
  padding: 26px 36px;
}

.content-section h2::before {
  display: none;
}

.content-section h2 {
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 650;
}

.prose {
  max-width: 68ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}

.sample {
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: var(--ink);
}

.sample-head {
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.64);
}

.copy-btn {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
}

pre {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.88);
}

.side-card {
  top: 100px;
  border-radius: 22px;
}

.side-head {
  background: var(--surface-soft);
}

.side-actions {
  padding: 18px;
}

.auth-wrap {
  min-height: calc(100vh - 190px);
}

.auth-layout {
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--surface);
}

.auth-visual {
  position: relative;
  isolation: isolate;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 48px;
  background:
    radial-gradient(circle at 82% 16%, rgba(39, 194, 232, 0.2), transparent 17rem),
    radial-gradient(circle at 12% 92%, rgba(8, 120, 249, 0.28), transparent 22rem),
    var(--ink);
}

.auth-visual::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -110px;
  bottom: -110px;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  box-shadow:
    0 0 0 58px rgba(255, 255, 255, 0.025),
    0 0 0 116px rgba(255, 255, 255, 0.014);
}

.auth-visual-logo {
  width: 150px;
  padding: 13px 15px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
}

.auth-visual > div:last-child {
  max-width: 380px;
}

.auth-visual span {
  color: rgba(255, 255, 255, 0.46);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.auth-visual h2 {
  margin: 14px 0 15px;
  color: #fff;
  font-size: clamp(34px, 4vw, 50px);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.auth-visual p {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 14px;
  line-height: 1.8;
}

.auth-card {
  width: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 54px 64px;
  border: 0;
  border-radius: 0;
}

.auth-brand img {
  width: 128px;
}

.auth-card h1 {
  font-size: 34px;
  font-weight: 680;
  letter-spacing: -0.04em;
}

.field label {
  color: var(--ink);
  font-weight: 650;
}

.input {
  min-height: 50px;
  border-color: var(--line-strong);
  background: var(--surface-soft);
  color: var(--ink);
}

.input:focus {
  border-color: rgba(8, 120, 249, 0.72);
  box-shadow: 0 0 0 3px rgba(8, 120, 249, 0.08);
}

.status-toolbar h1 {
  font-size: clamp(38px, 5vw, 58px);
  font-weight: 680;
}

.submission-card {
  border-radius: 20px;
  padding: 22px;
}

.verdict {
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue-deep);
}

.verdict.wrong,
.verdict.error {
  background: var(--danger-soft);
  color: var(--danger);
}

.verdict.pending {
  background: var(--warning-soft);
  color: var(--warning);
}

.contest-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.contest-card {
  overflow: hidden;
  padding: 0;
  border-radius: 26px;
}

.contest-card h2 {
  margin: 0;
  padding: 28px 28px 18px;
  background: var(--ink);
  color: #fff;
  font-size: 26px;
  font-weight: 650;
}

.contest-card p {
  padding: 22px 28px 0;
}

.contest-card ul {
  padding: 0 28px 28px;
}

.contest-card li {
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.modal-mask {
  z-index: 1300;
  background: rgba(7, 21, 33, 0.42);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.modal {
  border-radius: 24px;
  box-shadow: 0 34px 100px rgba(7, 21, 33, 0.2);
}

.modal-head {
  padding: 22px 24px;
}

.modal-head h2 {
  font-size: 22px;
  font-weight: 650;
}

.editor {
  border: 0;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.9);
  caret-color: var(--cyan);
}

.judge-notice {
  border-color: rgba(8, 120, 249, 0.14);
  background: var(--blue-soft);
  color: var(--blue-deep);
}

.case-row {
  border-radius: 12px;
}

.mobile-tabs {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 40px rgba(7, 21, 33, 0.14);
}

.mobile-tab.active {
  background: var(--blue-soft);
  color: var(--blue-deep);
}

.mobile-tab .tab-icon {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
}

.mobile-tab .tab-icon svg {
  width: 21px;
  height: 21px;
}

.site-footer {
  margin-top: 48px;
  padding: 28px 16px 36px;
  border-top: 1px solid var(--line);
  color: var(--faint);
}

@media (max-width: 991px) {
  .header-inner,
  .shell {
    width: min(680px, calc(100% - 32px));
  }

  .header-inner {
    height: 70px;
  }

  .top-nav {
    display: none;
  }

  .brand img {
    width: 94px;
    height: 41px;
  }

  .brand-label {
    font-size: 17px;
  }

  .header-user .user-account {
    display: none;
  }

  .hero {
    min-height: 500px;
    padding: 44px 28px 175px;
    border-radius: 24px;
  }

  .hero h1 {
    font-size: clamp(42px, 10vw, 64px);
    line-height: 1.06;
  }

  .hero::before {
    right: -100px;
    bottom: -70px;
  }

  .hero::after {
    top: 30px;
    right: 30px;
  }

  .stats {
    right: 28px;
    bottom: 30px;
    left: 28px;
    justify-content: space-between;
    gap: 12px;
  }

  .stat strong {
    font-size: 31px;
  }

  .news-panel {
    display: block;
  }

  .news-heading {
    flex-direction: row;
    justify-content: flex-start;
    padding: 0 0 11px;
    border-right: 0;
  }

  .news-list {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .news-list::-webkit-scrollbar {
    display: none;
  }

  .news-item {
    flex: 0 0 82%;
    scroll-snap-align: start;
  }

  .toolbar {
    grid-template-columns: 1fr;
  }

  tbody tr {
    padding: 18px;
  }

  td.column-title .problem-link {
    font-size: 16px;
  }

  .problem-layout {
    grid-template-columns: 1fr;
  }

  .side-card {
    position: static;
    order: 2;
  }

  .contest-grid {
    grid-template-columns: 1fr;
  }

  .mobile-tabs {
    z-index: 1050;
  }

  .auth-layout {
    display: block;
    width: min(520px, 100%);
  }

  .auth-visual {
    display: none;
  }

  .auth-card {
    padding: 34px 26px;
  }
}

@media (max-width: 540px) {
  .hero {
    padding: 36px 22px 170px;
  }

  .hero h1 {
    font-size: clamp(37px, 11vw, 50px);
  }

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

  .hero-actions .btn {
    width: 100%;
  }

  .stat strong {
    font-size: 27px;
  }

  .stat span {
    font-size: 10px;
  }

  .problem-title {
    padding: 26px 22px 20px;
  }

  .content-section {
    padding: 22px;
  }

  .auth-card {
    padding: 28px 20px;
  }

  .modal-mask {
    padding: 0;
    place-items: end center;
  }

  .modal {
    max-height: 92vh;
    border-radius: 24px 24px 0 0;
  }
}

