:root {
  --pico-font-family-sans-serif: Inter, system-ui, "Segoe UI", Roboto, Arial, sans-serif, var(--pico-font-family-emoji);
  --pico-font-size: 92%;
  --pico-line-height: 1.45;
  --pico-form-element-spacing-vertical: .55rem;
  --pico-form-element-spacing-horizontal: .9rem;
  --pico-border-radius: .5rem;
  --site-bg: #f4f9fd;
  --site-surface: rgba(255, 255, 255, .94);
  --site-surface-soft: #eef6fc;
  --site-border: #dbeaf4;
  --site-text: #172b3a;
  --site-muted: #66798a;
  --site-primary: #11689f;
  --site-primary-soft: #e5f2fa;
  --site-shadow: 0 18px 50px rgba(39, 79, 112, .09);
}

@media (min-width: 576px) { :root { --pico-font-size: 92%; } }
@media (min-width: 768px) { :root { --pico-font-size: 92%; } }
@media (min-width: 1024px) { :root { --pico-font-size: 92%; } }
@media (min-width: 1280px) { :root { --pico-font-size: 92%; } }
@media (min-width: 1536px) { :root { --pico-font-size: 92%; } }

:host:not([data-theme=dark]),
:root:not([data-theme=dark]),
[data-theme=light] {
  --pico-text-selection-color: #cde9f8;
  --pico-primary: var(--site-primary);
  --pico-primary-background: #1680bd;
  --pico-primary-underline: rgba(17, 104, 159, .45);
  --pico-primary-hover: #0b5685;
  --pico-primary-hover-background: #0f6fa8;
  --pico-primary-focus: rgba(17, 104, 159, .18);
  --pico-primary-inverse: #fff;
  --pico-card-background-color: var(--site-surface);
  --pico-card-box-shadow: var(--site-shadow);
  --pico-muted-border-color: var(--site-border);
}

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

body {
  min-height: 100vh;
  margin: 0;
  color: var(--site-text);
  background:
    radial-gradient(circle at 8% -8%, rgba(121, 181, 219, .26), transparent 34rem),
    linear-gradient(180deg, #edf6fc 0, #f8fbfd 24rem, #fff 100%);
  display: flex;
  flex-direction: column;
}

a {
  text-underline-offset: .16em;
}

h1, h2, h3, h4, h5, h6 {
  --pico-font-weight: 650;
  color: #10293b;
  letter-spacing: 0;
  margin-top: 1.65rem;
  margin-bottom: .75rem;
}

h1 {
  font-size: clamp(1.65rem, 1.25rem + 1vw, 2.25rem);
  line-height: 1.12;
  margin-top: 0;
}

h2 {
  font-size: 1.35rem;
  line-height: 1.2;
}

h3 {
  font-size: 1.16rem;
  line-height: 1.25;
}

h4 {
  font-size: 1.06rem;
  line-height: 1.28;
}

h5 {
  font-size: .98rem;
  line-height: 1.32;
}

h6 {
  font-size: .92rem;
  line-height: 1.35;
  color: var(--site-muted);
}

.site-header {
  padding: .55rem 0 .55rem;
}

.site-header-panel {
  width: 100%;
  min-height: 0;
  padding: .28rem clamp(1rem, 2vw, 1.45rem);
  background: var(--site-surface);
  border: 1px solid var(--site-border);
  border-radius: .45rem;
  box-shadow: var(--site-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header-panel ul {
  margin: 0;
}

.site-header-panel :where(ul, li) {
  margin-bottom: 0;
}

.site-logo {
  padding: .1rem 0;
  color: var(--site-primary);
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
}

.site-logo:hover {
  color: #0b5685;
}

.menu-toggle {
  display: none;
  width: auto;
  margin: 0;
  padding: .45rem .7rem;
  align-items: center;
  color: var(--site-primary);
  background: var(--site-primary-soft);
  border: 1px solid #8ec4e5;
  border-radius: .4rem;
  box-shadow: none;
}

.menu-toggle-text {
  font-size: .92rem;
  line-height: 1;
}

.site-layout {
  width: 100%;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 1.5rem;
  align-items: start;
}

.site-content {
  min-width: 0;
}

.site-sidebar-wrap {
  position: sticky;
  top: 1.25rem;
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-self: start;
}

.site-sidebar {
  padding: 1.15rem 1.25rem;
  background: var(--site-surface);
  border: 1px solid var(--site-border);
  border-radius: .45rem;
  box-shadow: var(--site-shadow);
}

.site-sidebar strong {
  display: block;
  margin-bottom: .65rem;
  color: #10293b;
  font-size: .98rem;
}

.site-sidebar ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-sidebar li + li {
  margin-top: .18rem;
}

.site-sidebar a {
  display: block;
  padding: .42rem .55rem;
  color: var(--site-primary);
  border-radius: .35rem;
  text-decoration: none;
  line-height: 1.25;
}

.site-sidebar a:hover,
.site-sidebar a.active {
  color: #0b5685;
  background: rgba(255, 255, 255, .72);
}

.ad-block {
  margin-bottom: 1rem;
  padding: clamp(1rem, 2vw, 1.45rem);
  background: var(--site-surface);
  border: 1px solid var(--site-border);
  border-radius: .45rem;
  box-shadow: var(--site-shadow);
}

.ad-block-sidebar {
  margin-top: 0;
  margin-bottom: 0;
  padding: 0;
  overflow: hidden;
}

.ad-placeholder {
  min-height: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--site-muted);
  background: transparent;
  border: 0;
  border-radius: 0;
  text-align: center;
  font-size: .9rem;
}

main {
  flex: 1;
}

article,
.calculator-article,
.likearticle {
  margin-bottom: 1rem;
  padding: clamp(1rem, 2vw, 1.45rem);
  background: var(--site-surface);
  border: 1px solid var(--site-border);
  border-radius: .45rem;
  box-shadow: var(--site-shadow);
}

.site-content > p[itemscope] {
  margin-bottom: 1rem;
  padding: .9rem 1.25rem;
  min-height: 3.15rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .15rem .35rem;
  background: var(--site-surface);
  border: 1px solid var(--site-border);
  border-radius: .45rem;
  box-shadow: var(--site-shadow);
}

article > :first-child,
.calculator-article > :first-child,
.likearticle > :first-child {
  margin-top: 0;
}

article > :last-child,
.calculator-article > :last-child,
.likearticle > :last-child {
  margin-bottom: 0;
}

article > footer,
.calculator-article > footer {
  border-radius: .45rem;
}

.categoryList {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.05rem;
}

.categoryList > * {
  min-height: 12.5rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--site-primary);
  background: var(--site-primary-soft);
  border: 1px solid #8ec4e5;
  border-radius: .35rem;
  text-align: center;
  text-decoration: none;
  box-shadow: none;
  transition: transform .16s ease, background-color .16s ease, border-color .16s ease;
}

.categoryList > :hover {
  background: #dff0fa;
  border-color: #63aad6;
  transform: translateY(-1px);
}

.categoryList img {
  max-width: 7rem;
  max-height: 7rem;
  margin-bottom: .7rem;
  filter: invert(30%) sepia(86%) saturate(1181%) hue-rotate(179deg) brightness(84%) contrast(91%);
}

.categoryList small {
  color: #286f9d;
}

.imgfix img {
  max-width: min(40rem, 90%);
  display: block;
  margin: 1rem auto;
}

.likearticle-title {
  margin-bottom: 1rem;
  font-size: 1.28rem;
}

.related-articles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .8rem 1rem;
}

.related-article-link {
  min-height: 4.2rem;
  padding: .75rem .85rem;
  display: grid;
  grid-template-columns: 2.15rem minmax(0, 1fr);
  gap: .65rem;
  align-items: center;
  color: #10293b;
  background: #f7fbfe;
  border: 1px solid #d7e9f4;
  border-radius: .45rem;
  text-decoration: none;
  transition: transform .16s ease, border-color .16s ease, background-color .16s ease;
}

.related-article-link:hover {
  color: #0b5685;
  background: #eef7fc;
  border-color: #8ec4e5;
  transform: translateY(-1px);
}

.related-article-icon {
  position: relative;
  width: 2.15rem;
  height: 2.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e5f2fa;
  border: 2px solid #63aad6;
  border-radius: .42rem;
}

.related-article-icon::before,
.related-article-icon::after {
  position: absolute;
  left: 50%;
  top: 50%;
  width: .9rem;
  height: 2px;
  background: #1680bd;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  content: "";
}

.related-article-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.related-article-title {
  min-width: 0;
  font-size: .98rem;
  font-weight: 650;
  line-height: 1.25;
}

details > p {
  padding: 1rem;
}

.feedback-row {
  display: inline-flex;
  align-items: baseline;
  gap: .75rem;
}

.feedback-buttons {
  display: flex;
  gap: .5rem;
}

.site-footer {
  margin-top: .75rem;
  margin-bottom: 1rem;
  padding: .9rem 1.25rem;
  color: var(--site-muted);
  background: var(--site-surface);
  border: 1px solid var(--site-border);
  border-radius: .45rem;
  box-shadow: var(--site-shadow);
}

.site-footer small {
  font-size: .82rem;
}

@media (max-width: 1024px) {
  .site-layout {
    grid-template-columns: 1fr;
  }

  .site-sidebar-wrap {
    position: static;
    order: -1;
  }

  .site-sidebar {
    padding: .7rem .85rem;
  }

  .site-sidebar ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    gap: 0 .45rem;
  }

  .site-sidebar li + li {
    margin-top: 0;
  }

  .site-sidebar a {
    padding: .24rem .35rem;
    line-height: 1.15;
  }

  .site-sidebar strong {
    margin-bottom: .35rem;
  }

  .related-articles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 640px) {
  .site-header {
    padding: .45rem 0 .45rem;
  }

  .site-logo {
    font-size: 1.25rem;
  }

  .site-header-panel {
    padding: .28rem .95rem;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-sidebar {
    display: none;
  }

  body.sidebar-open .site-sidebar {
    display: block;
  }

  .site-sidebar-wrap .ad-block-sidebar {
    display: none;
  }

  body.sidebar-open .site-sidebar-wrap .ad-block-sidebar {
    display: block;
  }

  article,
  .calculator-article,
  .likearticle {
    padding: .95rem;
  }

  .related-articles-grid {
    grid-template-columns: 1fr;
  }

  .related-article-link {
    min-height: 3.7rem;
    padding: .65rem .7rem;
  }

  .categoryList {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
  }

  .categoryList > * {
    min-height: 10.5rem;
  }

  .categoryList img {
    max-width: 5.75rem;
    max-height: 5.75rem;
  }
}
