:root {
  --md-primary-fg-color: #21354d;
  --md-primary-fg-color--light: #31506f;
  --md-primary-fg-color--dark: #132233;
  --md-accent-fg-color: #5a7d9a;
  --dt-bg: #e2d6c0; /* background whole wiki color */
  --dt-panel: #fbefd5; /* background page color */
  --dt-line: #d7deea;
  --dt-link: #2463a6;
  --dt-gold: #d0ad66;
}

[data-md-color-scheme="default"] {
  --md-default-bg-color: var(--dt-bg);
}

.md-header {
  background: linear-gradient(90deg, #1d3149 0%, #2d4767 60%, #496689 100%);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
}

.md-tabs {
  background: #31506f;
  border-bottom: 1px solid var(--dt-line);
}

.md-tabs__link {
  font-weight: 700;
}

/* Remove all rounded corners */
* {
  border-radius: 0 !important;
}

/* Hide unused menu stuff, including empty mobile drawer */
.md-sidebar,
.md-sidebar--primary,
.md-sidebar--secondary {
  display: none !important;
}

.md-header__button[for="__drawer"] {
  display: none !important;
}

@media screen and (max-width: 59.9375em) {
  .md-header__button[for="__search"] {
    display: inline-flex !important;
    order: 999;
    margin-left: auto;
  }
}

/* Main layout */
.md-main__inner,
.md-grid,
.md-content {
  max-width: 100% !important;
}

.md-main__inner {
  margin-top: 1rem;
}

.md-content__inner {
  background: var(--dt-panel);
  border: 1px solid var(--dt-line);
  box-shadow: 0 14px 35px rgba(23, 35, 52, 0.06);
  padding: 1.2rem 1.4rem;
  max-width: 1400px;
  margin: 0 auto;
}

.md-sidebar__inner {
  background: rgba(255, 255, 255, 0.8);
}

.md-nav__title,
.md-nav__item .md-nav__link {
  border-radius: 12px;
}

/* Typography */
.md-typeset a {
  color: var(--dt-link);
}

.md-typeset h1 {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.md-typeset h2 {
  border-bottom: 2px solid rgba(208, 173, 102, 0.35);
  padding-bottom: 0.25rem;
}

/* Hero panel */
.hero-panel {
  background:
    radial-gradient(circle at top right, rgba(208, 173, 102, 0.22), transparent 38%),
    linear-gradient(135deg, #22344d, #38557a);
  border: 1px solid rgba(208, 173, 102, 0.35);
  color: white;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.hero-panel h1,
.hero-panel p {
  color: white !important;
}

/* Card grid */
.dt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

.dt-card {
  display: block;
  background: var(--dt-panel);
  border: 1px solid var(--dt-line);
  padding: 1rem;
  box-shadow: 0 10px 24px rgba(25, 41, 60, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  color: inherit;
  text-decoration: none;
}

.dt-card:link,
.dt-card:visited,
.dt-card:hover,
.dt-card:active {
  color: inherit;
  text-decoration: none;
}

.dt-card:hover {
  transform: translateY(-2px);
  border-color: var(--dt-gold);
  background: #f5e6c8;
  box-shadow: 0 16px 32px rgba(25, 41, 60, 0.11);
}

.dt-card strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 1.03rem;
  color: inherit;
}

.dt-card span {
  color: inherit;
}

/* Chips / tags */
.dt-chip-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.dt-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  padding: 0.38rem 0.7rem;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.md-tag {
  border-radius: 999px;
}

/* Hide page tags */
.md-tags {
  display: none !important;
}

/* Top-right search bar */
@media screen and (min-width: 60em) {
  .md-search {
    min-width: 420px;
    margin-right: 1rem;
  }
}

.md-search__inner,
.md-search__form {
  width: 100% !important;
}

.md-search__form {
  background: #fffdf6 !important;
  border: 2px solid var(--dt-gold) !important;
  box-shadow: 0 0 0 2px rgba(208, 173, 102, 0.12);
}

.md-search__input {
  width: 100% !important;
  color: #222 !important;
  font-weight: 600;
}

.md-search__input::placeholder {
  color: #666 !important;
  opacity: 1;
}

.md-search__icon {
  color: #21354d !important;
}

.md-search-result__meta {
  font-size: 0.68rem;
}

/* Header items inserted by JS */
.dt-home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.8rem;
  margin-right: 0.75rem;
  background: #31506f;
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.25);
  white-space: nowrap;
}

.dt-home-button:hover {
  background: #496689;
}

.dt-site-title-link {
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.md-header__title {
  min-width: 0;
}

@media screen and (max-width: 600px) {
  .dt-home-button {
    display: none !important;
  }
}

/* Homepage search block */
.dt-home-search {
  margin: 1.5rem 0 2rem;
}

.dt-home-search-label {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.dt-home-search-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.dt-home-search-input {
  flex: 1 1 420px;
  min-width: 280px;
  padding: 0.9rem 1rem;
  border: 2px solid #31506f;
  background: #fffdf6;
  font-size: 1rem;
  color: #222;
  cursor: text;
}

.dt-home-search-button {
  padding: 0.9rem 1.2rem;
  background: #31506f;
  color: white;
  border: 2px solid #31506f;
  font-weight: 700;
  cursor: pointer;
}

.dt-home-search-button:hover {
  background: #496689;
}

.icon-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.horiz-img {
    width: 512px;
    height: auto;
    object-fit: contain;
}

.vert-img {
    width: 256px;
    height: auto;
    object-fit: contain;
}

.map-img {
    width: 768px;
    height: auto;
    object-fit: contain;
}