:root {
  --jaka-red: rgb(216, 12, 30);
  --jaka-red-dark: rgb(181, 8, 23);
  --ink: #242424;
  --muted: #686868;
  --line: #dddddd;
  --surface: #f4f4f4;
}

.wy-nav-side,
.wy-nav-top {
  display: none !important;
}

.wy-nav-content-wrap {
  background: #ffffff;
  margin-left: 0 !important;
}

.wy-nav-content {
  max-width: none !important;
  min-height: 100vh;
  padding: 0 !important;
}

.rst-content > [role="navigation"],
.rst-content > .document > [itemprop="articleBody"] > section > h1 {
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
  max-width: 1180px;
  padding-left: 48px;
  padding-right: 48px;
}

.rst-content > [role="navigation"] {
  padding-top: 18px;
}

.rst-content > .document > [itemprop="articleBody"] > section > h1 {
  margin-top: 28px;
}

.portal {
  color: var(--ink);
  margin: 0 auto;
  max-width: 1180px;
  padding: 52px 48px 30px;
}

.portal-hero {
  border-bottom: 3px solid var(--jaka-red);
  margin-bottom: 36px;
  padding-bottom: 34px;
}

.portal-brand {
  align-items: center;
  display: flex;
  gap: 22px;
  margin-bottom: 42px;
}

.portal-logo {
  height: auto;
  width: 144px;
}

.portal-kicker,
.card-type {
  color: var(--jaka-red);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.portal-hero-content {
  align-items: flex-end;
  display: flex;
  justify-content: space-between;
}

.portal-hero h1 {
  color: var(--ink);
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin: 0 0 14px;
}

.portal-hero p {
  color: var(--muted);
  font-size: 17px;
  margin: 0;
}

.portal-title-en {
  display: block;
  font-size: 0.58em;
  font-weight: 600;
  margin-top: 8px;
}

.portal-description-en,
.card-description-en {
  display: block;
  margin-top: 5px;
}

.document-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.portal-search-results-panel {
  background: var(--surface);
  border-left: 4px solid var(--jaka-red);
  margin: -18px 0 34px;
  padding: 26px 28px 24px;
}

.portal-search-results-panel[hidden] {
  display: none;
}

.portal-search-compact {
  flex: 0 0 330px;
  margin-left: 28px;
  transform: translateY(8px);
}

.portal-search-form {
  display: flex;
  justify-content: flex-end;
}

.portal-search-form input {
  background: #ffffff;
  border: 1px solid #c9c9c9;
  border-radius: 4px 0 0 4px;
  flex: 1;
  font-size: 14px;
  height: 38px;
  min-width: 0;
  padding: 8px 11px;
}

.portal-search-form input:focus {
  border-color: var(--jaka-red);
  box-shadow: 0 0 0 2px rgba(216, 12, 30, 0.12);
  outline: none;
}

.portal-search-form button {
  background: var(--jaka-red);
  border: 1px solid var(--jaka-red);
  border-radius: 0 4px 4px 0;
  color: #ffffff;
  cursor: pointer;
  height: 38px;
  padding: 8px 12px;
  width: 43px;
}

.portal-search-form button svg {
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
  width: 18px;
}

.portal-search-form button:hover,
.portal-search-form button:focus {
  background: var(--jaka-red-dark);
}

.portal-search-status {
  color: var(--muted);
  font-size: 13px;
  margin: 14px 0 0;
}

.portal-search-results {
  margin: 14px 0 0;
  padding-left: 24px;
}

.portal-search-results:empty {
  display: none;
}

.portal-search-results li {
  margin: 0 0 14px;
  padding-left: 4px;
}

.portal-search-results a {
  color: var(--jaka-red);
  font-size: 16px;
  font-weight: 600;
}

.portal-search-result-meta,
.portal-search-result-snippet {
  display: block;
}

.portal-search-result-meta {
  color: #777777;
  font-size: 12px;
  margin-top: 2px;
}

.portal-search-result-snippet {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin-top: 3px;
}

.sr-only {
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  clip: rect(0, 0, 0, 0);
}

.document-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 4px;
  display: grid;
  grid-template-columns: 56px 1fr;
  min-height: 246px;
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.document-card:hover {
  border-color: var(--jaka-red);
  box-shadow: 0 12px 30px rgba(32, 32, 32, 0.09);
  transform: translateY(-2px);
}

.card-number {
  align-items: center;
  background: var(--surface);
  color: var(--jaka-red);
  display: flex;
  font-size: 13px;
  font-weight: 700;
  justify-content: center;
  letter-spacing: 0.08em;
  writing-mode: horizontal-tb;
}

.card-content {
  display: flex;
  flex-direction: column;
  padding: 30px 30px 28px;
}

.card-content h2 {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.35;
  margin: 12px 0 12px;
}

.card-title-en {
  display: block;
  font-size: 0.72em;
  font-weight: 600;
  margin-top: 5px;
}

.card-content p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
  margin: 0 0 24px;
}

.card-link {
  align-items: center;
  align-self: flex-start;
  background: var(--jaka-red);
  border: 1px solid var(--jaka-red);
  border-radius: 3px;
  color: #ffffff !important;
  display: inline-flex;
  font-size: 14px;
  font-weight: 600;
  gap: 9px;
  margin-top: auto;
  padding: 9px 15px;
  text-decoration: none !important;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.card-link:hover,
.card-link:focus {
  background: var(--jaka-red-dark);
  border-color: var(--jaka-red-dark);
}

.card-link.secondary {
  background: #ffffff;
  color: var(--jaka-red) !important;
}

.card-link.secondary:hover,
.card-link.secondary:focus {
  background: #fff3f4;
}

.language-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.language-links .card-link {
  box-sizing: border-box;
  justify-content: center;
  margin-top: 0;
  height: 40px;
  width: 118px;
}

.portal-footer {
  border-top: 1px solid var(--line);
  color: #777777;
  display: flex;
  font-size: 12px;
  justify-content: space-between;
  letter-spacing: 0.04em;
  margin-top: 42px;
  padding-top: 20px;
}

.legacy-entry {
  align-items: center;
  background: #fff8f8;
  border: 1px solid #efc9cc;
  border-left: 4px solid var(--jaka-red);
  border-radius: 6px;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-top: 28px;
  padding: 22px 26px;
}

.legacy-entry h2 {
  font-size: 21px;
  margin: 6px 0 8px;
}

.legacy-entry p {
  color: var(--muted);
  margin: 0;
}

.legacy-entry .card-link {
  flex-shrink: 0;
  min-width: 184px;
}

@media screen and (max-width: 760px) {
  .legacy-entry {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media screen and (max-width: 760px) {
  .rst-content > [role="navigation"],
  .rst-content > .document > [itemprop="articleBody"] > section > h1 {
    padding-left: 20px;
    padding-right: 20px;
  }

  .portal {
    padding: 30px 20px 24px;
  }

  .portal-brand {
    margin-bottom: 30px;
  }

  .portal-hero h1 {
    font-size: 32px;
  }

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

  .portal-search-form {
    width: 100%;
  }

  .portal-hero-content {
    align-items: stretch;
    flex-direction: column;
    gap: 22px;
  }

  .portal-search-compact {
    flex-basis: auto;
    margin-left: 0;
    max-width: 420px;
    transform: none;
  }
}

@media screen and (max-width: 440px) {
  .portal-kicker {
    display: none;
  }

  .document-card {
    grid-template-columns: 42px 1fr;
  }

  .card-content {
    padding: 24px 20px;
  }

  .portal-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}
