:root {
  --bg: #fff8ef;
  --surface: #ffffff;
  --text: #1f2933;
  --muted: #53616f;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --success-soft: #dcfce7;
  --border: #d8dee8;
  --radius: 1.25rem;
  --shadow: 0 10px 30px rgba(31, 41, 51, 0.08);
  --content: 1120px;
  
	  --color:    #D73A42;
}
* { box-sizing: border-box; }
html { font-size: 18px; scroll-behavior: smooth; }
body { margin: 0; font-family: Arial, system-ui, sans-serif; line-height: 1.65; color: var(--text); background: var(--bg); }
a { color: var(--accent); text-underline-offset: 0.2em; }
a:focus-visible, button:focus-visible { outline: 4px solid #f59e0b; outline-offset: 4px; }
img { max-width: 100%; height: auto; }
.skip-link { position: absolute; left: 1rem; top: -10rem; z-index: 20; background: var(--accent); color: #fff; padding: .75rem 1rem; border-radius: .75rem; }
.skip-link:focus { top: 1rem; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.site-header__inner, .site-footer__inner, .site-main { width: min(var(--content), calc(100% - 2rem)); margin: 0 auto; }
.site-header__inner { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: 1rem 0; flex-wrap: wrap; }
.site-logo { display: inline-flex; align-items: center; gap: .75rem; min-height: 48px; font-weight: 800; font-size: 1.05rem; color: var(--text); text-decoration: none; }
.site-logo__mark { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 1rem; background: linear-gradient(180deg, #111827 0 33%, #dc2626 33% 66%, #facc15 66%); color: #fff; text-shadow: 0 1px 2px #000; }
.site-logo__image { display: block; width: 96px; height: 96px; object-fit: contain; border-radius: 1.25rem; flex: 0 0 auto; }
.menu__list { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0; }
.menu__item { position: relative; }
.menu__link { display: inline-flex; align-items: center; min-height: 48px; padding: .65rem 1rem; border-radius: 999px; background: var(--accent-soft); color: #163c8c; font-weight: 700; text-decoration: none; }
.menu__link:hover { background: #bfdbfe; }
.menu__item .menu { margin-top: .5rem; }
.menu__item .menu__list { display: block; padding-left: 1rem; }
.site-main { padding: 2rem 0 3rem; }
.site-main--narrow { max-width: 1280px; }
.hero, .section, .content-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1rem, 4vw, 2rem); margin-bottom: 1.5rem; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.5rem; align-items: center; }
.hero__wysiwyg { font-size: 1.2rem; color: var(--muted); max-width: 68ch; }
.hero__wysiwyg p { margin: 0 0 .85rem; }
.hero__wysiwyg p:last-child { margin-bottom: 0; }
.hero__media { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--accent-soft); border: 1px solid var(--border); }
.hero__image { display: block; width: 100%; min-height: 220px; max-height: 360px; object-fit: cover; }
.eyebrow, .section__kicker { margin: 0 0 .5rem; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; font-size: .9rem; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .75rem; }
h1 { font-size: clamp(2rem, 6vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); }
h3 { font-size: 1.25rem; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 68ch; }
.hero__actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.25rem; }
.button, .speech-button, .read-more { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: .75rem 1.1rem; border-radius: 999px; border: 2px solid var(--accent); background: var(--accent); color: #fff; font-weight: 800; text-decoration: none; cursor: pointer; font-size: 1rem; }
.button--secondary { background: #fff; color: var(--accent); }
.hero__note { background: var(--success-soft); border-radius: var(--radius); padding: 1.25rem; font-size: 1.05rem; }
.hero__note strong, .hero__note span { display: block; }
.topic-grid, .phrase-grid, .card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.topic-card, .lesson-card, .phrase-card { display: block; background: #fff; border: 1px solid var(--border); border-radius: 1rem; padding: 1rem; text-decoration: none; color: var(--text); }
.topic-card { min-height: 150px; }
.topic-card__icon { font-size: 2rem; display: block; margin-bottom: .5rem; }
.topic-card__title { display: block; font-size: 1.25rem; font-weight: 800; }
.topic-card__desc, .phrase-card__note, .lesson-card p, .meta { color: var(--muted); }
.phrase-card__ua { font-weight: 700; margin: 0; }
.phrase-card__de { font-size: 1.45rem; font-weight: 800; margin: .25rem 0; }
.speech-button { width: 100%; margin-top: .75rem; background: #166534; border-color: #166534; }
.post-body { font-size: 1.08rem; }
.post-body p, .post-body ul, .post-body ol { margin-bottom: 1rem; }
.post-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.post-tags a { background: var(--accent-soft); border-radius: 999px; padding: .4rem .8rem; text-decoration: none; font-weight: 700; }
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 2rem 0; }
.site-footer__inner { display: grid; gap: 1rem; }
.version { color: var(--muted); font-size: .95rem; }
@media (max-width: 820px) {
  html { font-size: 17px; }
  .site-header { position: static; }
  .site-header__inner { align-items: stretch; }
  .site-logo { width: 100%; }
  .site-logo__image { width: 84px; height: 84px; }
  .menu, .menu__list, .menu__item, .menu__link { width: 100%; }
  .menu__link { justify-content: center; border-radius: 1rem; }
  .hero { grid-template-columns: 1fr; }
  .topic-grid, .phrase-grid, .card-grid { grid-template-columns: 1fr; }
}

/* 0.5.0 Educational UI System */
.learning-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.learning-tile { display: grid; gap: .45rem; min-height: 172px; padding: 1.15rem; border: 2px solid var(--border); border-radius: 1.15rem; background: #fffdf8; color: var(--text); text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.learning-tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.learning-tile__icon { font-size: 2.2rem; line-height: 1; }
.learning-tile__title { font-size: 1.25rem; font-weight: 800; }
.learning-tile__text { color: var(--muted); }
.progress-box, .trainer-box { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); gap: 1rem; align-items: center; background: #f8fbff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1rem, 4vw, 2rem); margin-bottom: 1.5rem; }
.progress-steps { display: grid; gap: .65rem; }
.progress-steps span { display: block; min-height: 48px; padding: .7rem 1rem; border-radius: 999px; background: var(--accent-soft); font-weight: 800; color: #163c8c; }
.phrase-card { display: grid; gap: .75rem; }
.phrase-card__label { margin: 0; font-size: .9rem; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .03em; }
.phrase-card__ua, .phrase-card__de { margin-top: 0; }
.speech-button span { pointer-events: none; }
.trainer-box__actions { display: grid; gap: .75rem; }
.lesson-card { display: grid; gap: 1rem; align-content: space-between; }
.lesson-card__type { margin: 0 0 .35rem; font-size: .9rem; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .03em; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
@media (max-width: 820px) {
  .learning-grid, .progress-box, .trainer-box { grid-template-columns: 1fr; }
  .learning-tile { min-height: 140px; }
  .trainer-box__actions .button { width: 100%; }
}


/* 0.5.0 Publii-native publication flow */
.menu li { list-style: none; }
.menu li > ul { margin-top: .5rem; padding-left: 1rem; }
.menu__link--separator { background: #f3f4f6; color: var(--text); cursor: default; }
.lesson-card__excerpt p { margin: 0 0 .75rem; }
.featured-image { margin: 1.25rem 0; }
.featured-image img { border-radius: 1rem; border: 1px solid var(--border); }
.featured-image figcaption { color: var(--muted); font-size: .95rem; margin-top: .4rem; }
.pagination, .pagination ul { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; list-style: none; padding-left: 0; }
.pagination a, .pagination strong, .site-main > .section small { display: inline-flex; min-height: 48px; min-width: 48px; align-items: center; justify-content: center; padding: .45rem .8rem; border-radius: .75rem; background: var(--accent-soft); font-weight: 800; text-decoration: none; }

/* 0.5.0 Footer copyright, author and theme version */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 2.25rem 0;
}

.site-footer__inner {
  display: grid;
  gap: 1.25rem;
  width: min(var(--content), calc(100% - 2rem));
  margin: 0 auto;
  text-align: center;
}

.site-footer__site-name {
  display: block;
  font-size: 1.15rem;
  line-height: 1.4;
  color: var(--text);
}

.site-footer__description,
.site-footer__copyright,
.site-footer__author,
.site-footer__version {
  margin: 0.35rem 0;
  line-height: 1.65;
}

.site-footer__description,
.site-footer__copyright,
.site-footer__version {
  color: var(--muted);
}

.site-footer__author {
  color: #355c7d;
}

.site-footer__author strong,
.site-footer__version {
  font-weight: 800;
}

.site-footer__nav .menu__list {
  justify-content: center;
}

.site-footer__version {
  font-size: 0.95rem;
}

/* 0.5.20 Senior-friendly audio tables and listening buttons */
.de-audio-table-wrap {
  width: 100%;
  margin: 1.5rem 0 2rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.de-audio-table {
  width: 100%;
  min-width: 620px;
  margin: 1.5rem 0 2rem;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  background: #ffffff;
  border: 2px solid var(--border);
  border-radius: 1.15rem;
  box-shadow: var(--shadow);
}

.de-audio-table-wrap .de-audio-table {
  margin: 0;
}

.post-body .de-audio-table caption,
.de-audio-table caption {
  padding: 1rem;
  font-size: 1.15rem;
  font-weight: 800;
  text-align: left;
  color: var(--text);
}

.post-body .de-audio-table th,
.post-body .de-audio-table td,
.de-audio-table th,
.de-audio-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.post-body .de-audio-table th,
.de-audio-table th {
  background: #eaf2ff;
  color: #163c8c;
  font-weight: 800;
  font-size: 1rem;
}

.post-body .de-audio-table tbody tr:nth-child(even),
.de-audio-table tbody tr:nth-child(even) {
  background: #fffaf2;
}

.post-body .de-audio-table tbody tr:hover,
.de-audio-table tbody tr:hover {
  background: #f1f7ff;
}

.post-body .de-audio-table tbody tr:last-child td,
.de-audio-table tbody tr:last-child td {
  border-bottom: 0;
}

.post-body .de-audio-table td:nth-child(1),
.de-audio-table td:nth-child(1) {
  width: 4.5rem;
  font-weight: 800;
  color: var(--accent);
}

.post-body .de-audio-table td:nth-child(2),
.de-audio-table td:nth-child(2) {
  font-size: 1.15rem;
  font-weight: 800;
  color: #1f2933;
}

.post-body .de-audio-table td:nth-child(3),
.de-audio-table td:nth-child(3) {
  color: var(--muted);
}

.listen-btn,
.post-body .listen-btn,
button[data-speech-text],
button[data-speech-target] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 52px;
  min-width: 52px;
  padding: 0.7rem 1rem;
  border: 2px solid #166534;
  border-radius: 999px;
  background: #e8f7ee;
  color: #14532d;
  font: inherit;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(20, 83, 45, 0.12);
  touch-action: manipulation;
}

.listen-btn:hover,
.post-body .listen-btn:hover,
button[data-speech-text]:hover,
button[data-speech-target]:hover {
  background: #dcfce7;
  border-color: #14532d;
}

.listen-btn:active,
.post-body .listen-btn:active,
button[data-speech-text]:active,
button[data-speech-target]:active {
  transform: translateY(1px);
}

.listen-btn:focus-visible,
.post-body .listen-btn:focus-visible,
button[data-speech-text]:focus-visible,
button[data-speech-target]:focus-visible {
  outline: 4px solid #f59e0b;
  outline-offset: 4px;
}

@media (max-width: 860px) {
  .post-body .de-audio-table,
  .de-audio-table {
    min-width: 560px;
  }
}

@media (max-width: 640px) {
  .post-body .de-audio-table,
  .de-audio-table {
    display: block;
    min-width: 0;
    width: 100%;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .post-body .de-audio-table thead,
  .de-audio-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  .post-body .de-audio-table tbody,
  .post-body .de-audio-table tr,
  .post-body .de-audio-table td,
  .de-audio-table tbody,
  .de-audio-table tr,
  .de-audio-table td {
    display: block;
    width: 100%;
  }

  .post-body .de-audio-table tr,
  .de-audio-table tr {
    margin: 0 0 1rem;
    padding: 1rem;
    background: #ffffff;
    border: 2px solid var(--border);
    border-radius: 1.15rem;
    box-shadow: var(--shadow);
  }

  .post-body .de-audio-table tbody tr:nth-child(even),
  .de-audio-table tbody tr:nth-child(even) {
    background: #fffaf2;
  }

  .post-body .de-audio-table td,
  .de-audio-table td {
    padding: 0.45rem 0;
    border-bottom: 0;
    white-space: normal;
  }

  .post-body .de-audio-table td:nth-child(1),
  .de-audio-table td:nth-child(1) {
    width: auto;
    font-size: 1.05rem;
  }

  .post-body .de-audio-table td:nth-child(2),
  .de-audio-table td:nth-child(2) {
    font-size: 1.3rem;
  }

  .post-body .de-audio-table td:nth-child(4),
  .de-audio-table td:nth-child(4) {
    padding-top: 0.75rem;
  }

  .listen-btn,
  .post-body .listen-btn,
  button[data-speech-text],
  button[data-speech-target] {
    width: 100%;
    min-height: 56px;
    min-width: 0;
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    font-size: 1.05rem;
  }
}

@media (max-width: 380px) {
  .post-body .de-audio-table tr,
  .de-audio-table tr {
    padding: 0.85rem;
  }

  .post-body .de-audio-table td:nth-child(2),
  .de-audio-table td:nth-child(2) {
    font-size: 1.2rem;
    overflow-wrap: anywhere;
  }
}

/* 0.5.20 Learning tags: book icon inline with tag title */
.learning-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin: 2rem 0;
    padding: 0;
    list-style: none;
}

.learning-tags__item {
    margin: 0;
    padding: 0;
}

.learning-tags__link {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-height: 56px;
    padding: 0.9rem 1.2rem;
    background: #f4f7fb;
    border: 1px solid #d7e1ec;
    border-radius: 18px;
    color: #24425c;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(31, 79, 130, 0.08);
}

.learning-tags__head {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.learning-tags__icon {
    flex: 0 0 auto;
    font-size: 1.25rem;
    line-height: 1;
}

.learning-tags__name {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
}

.learning-tags__desc {
    color: #5c6f82;
    font-size: 0.96rem;
    line-height: 1.5;
}

.learning-tags__link:hover,
.learning-tags__link:focus {
    background: #e8f1fb;
    border-color: #9ec3eb;
    outline: 3px solid rgba(31, 79, 130, 0.18);
    outline-offset: 2px;
}

.learning-tags__link--empty {
    cursor: default;
}

.post-tags__link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 48px;
}

.post-tags__icon {
    flex: 0 0 auto;
    line-height: 1;
}

.post-tags__name {
    line-height: 1.35;
}

@media (max-width: 640px) {
    .learning-tags {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .learning-tags__link {
        width: 100%;
        padding: 1rem;
    }

    .learning-tags__head {
        align-items: center;
    }
}

/* 0.5.20 Name spelling trainer for Publii posts */
.name-spelling-trainer {
  max-width: 720px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: #fff8ec;
  border: 2px solid #d9e8ff;
  border-radius: 20px;
  color: #1f2937;
}

.name-spelling-trainer h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: clamp(1.45rem, 4vw, 1.8rem);
  line-height: 1.3;
}

.name-spelling-trainer p {
  font-size: 1.1rem;
  line-height: 1.6;
}

.name-spelling-trainer label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
  font-weight: 800;
}

.name-spelling-trainer .name-input {
  width: 100%;
  min-height: 56px;
  padding: 0.8rem 1rem;
  border: 2px solid #8bb7f0;
  border-radius: 14px;
  box-sizing: border-box;
  font: inherit;
  font-size: 1.2rem;
  background: #ffffff;
  color: #111827;
}

.name-spelling-trainer .name-input:focus,
.name-spelling-trainer .name-input:focus-visible {
  outline: 4px solid #cfe4ff;
  border-color: #2563eb;
}

.name-spelling-trainer .trainer-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.25rem;
}

.name-spelling-trainer .trainer-buttons button {
  min-height: 52px;
  min-width: 180px;
  padding: 0.75rem 1.2rem;
  border-radius: 14px;
  font: inherit;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  touch-action: manipulation;
}

.name-spelling-trainer .spelling-output {
  margin-top: 1.5rem;
  padding: 1rem;
  background: #ffffff;
  border-left: 6px solid #22c55e;
  border-radius: 12px;
  font-size: 1.2rem;
  line-height: 1.7;
}

.name-spelling-trainer .spelling-output[data-name-spelling-error] {
  border-left-color: #dc2626;
}

/* 0.5.20 Phone spelling trainer for Publii posts */
.phone-spelling-trainer {
  max-width: 720px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: #fff8ec;
  border: 2px solid #d9e8ff;
  border-radius: 20px;
  color: #1f2937;
}

.phone-spelling-trainer h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: clamp(1.45rem, 4vw, 1.8rem);
  line-height: 1.3;
}

.phone-spelling-trainer p {
  font-size: 1.1rem;
  line-height: 1.6;
}

.phone-spelling-trainer label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
  font-weight: 800;
}

.phone-spelling-trainer .phone-input {
  width: 100%;
  min-height: 56px;
  padding: 0.8rem 1rem;
  border: 2px solid #8bb7f0;
  border-radius: 14px;
  box-sizing: border-box;
  font: inherit;
  font-size: 1.2rem;
  background: #ffffff;
  color: #111827;
}

.phone-spelling-trainer .phone-input:focus,
.phone-spelling-trainer .phone-input:focus-visible {
  outline: 4px solid #cfe4ff;
  border-color: #2563eb;
}

.phone-spelling-trainer .trainer-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.25rem;
}

.phone-spelling-trainer .trainer-buttons button {
  min-height: 52px;
  min-width: 180px;
  padding: 0.75rem 1.2rem;
  border-radius: 14px;
  font: inherit;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  touch-action: manipulation;
}

.phone-spelling-trainer .spelling-output {
  margin-top: 1.5rem;
  padding: 1rem;
  background: #ffffff;
  border-left: 6px solid #22c55e;
  border-radius: 12px;
  font-size: 1.2rem;
  line-height: 1.7;
}

.phone-spelling-trainer .spelling-output[data-phone-spelling-error] {
  border-left-color: #dc2626;
}

/* 0.5.20 Footer Flag Counter */
.footer-flagcounter {
  margin-top: 1.5rem;
  text-align: center;
}

.footer-flagcounter a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.35rem;
  border-radius: 12px;
}

.footer-flagcounter a:focus-visible {
  outline: 4px solid var(--focus-ring, #bfdbfe);
  outline-offset: 3px;
}

.footer-flagcounter img {
  display: inline-block;
  max-width: 100%;
  height: auto;
  border: 0;
  border-radius: 10px;
}

/* 0.5.20 Dialog trainer support for Publii posts */
.dialog-trainer,
.post-body .dialog-trainer {
  max-width: 760px;
  margin: 2rem auto;
  padding: 1.5rem;
  border: 2px solid #d9e8ff;
  border-radius: 20px;
  background: #fff8ec;
  color: #1f2937;
}

.dialog-trainer h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.75rem;
  line-height: 1.3;
}

.dialog-trainer > p {
  margin-bottom: 1.25rem;
  font-size: 1.1rem;
  line-height: 1.6;
}

.dialog-line {
  margin: 1rem 0;
  padding: 1rem;
  border: 2px solid #e5eefc;
  border-radius: 16px;
  background: #ffffff;
}

.dialog-line p {
  margin: 0 0 0.55rem;
  font-size: 1.15rem;
  line-height: 1.55;
}

.dialog-line strong {
  color: #1e40af;
}

.dialog-line .translation {
  color: #374151;
  font-size: 1.05rem;
}

.dialog-line .listen-btn,
.dialog-line button[data-speech-text] {
  margin-top: 0.35rem;
}


/* 0.5.25 Simple-compatible theme options */
.hero__caption {
  margin: 0;
  padding: 0.75rem 1rem;
  color: var(--muted);
  font-size: 0.95rem;
  background: #fffaf2;
}

.hero__wysiwyg--main h1,
.hero__wysiwyg--main h2,
.hero__wysiwyg--main h3 {
  margin-top: 0;
}

.hero__wysiwyg--main p:last-child {
  margin-bottom: 0;
}

@media (max-width: 820px) {
  .hero {
    min-height: auto;
  }
}


/* 0.6.7 Senior visual alignment layer
   Additive-only design refinement inspired by the approved homepage screenshot.
   Keeps existing semantic structure, speech buttons, trainers, tables and Publii flow intact. */
:root {
  --bg: #f9fbff;
  --surface: #ffffff;
  --text: #08245c;
  --muted: #324766;
  --accent: #0b63d8;
  --accent-soft: #eaf4ff;
  --success-soft: #e9f8df;
  --border: #dbe6f3;
  --radius: 1.35rem;
  --shadow: 0 12px 28px rgba(8, 36, 92, 0.08);
  --content: 1440px;
}

html {
  font-size: 19px;
}

body {
  background:
    radial-gradient(circle at top left, rgba(255, 244, 219, 0.72), transparent 34rem),
    linear-gradient(180deg, #ffffff 0%, #f6faff 52%, #ffffff 100%);
  color: var(--text);
}

.site-header {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(8, 36, 92, 0.12);
  box-shadow: 0 4px 18px rgba(8, 36, 92, 0.06);
  backdrop-filter: blur(8px);
}

.site-header__inner {
  min-height: 84px;
  gap: 1.25rem;
  padding: 0.55rem 0;
}

.site-logo {
  gap: 0.8rem;
  color: #08245c;
}

.site-logo__text {
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  line-height: 1.15;
  font-weight: 900;
}

.site-logo__mark {
  width: 58px;
  height: 46px;
  border-radius: 0 0 18px 18px;
  background: linear-gradient(180deg, #0b63d8 0 50%, #ffd23f 50% 100%);
  color: transparent;
  text-shadow: none;
  box-shadow: 0 6px 16px rgba(8, 36, 92, 0.12);
}

.site-logo__image {
  width: 76px;
  height: 76px;
  border-radius: 1rem;
}

.menu__list {
  gap: 0.35rem 0.75rem;
}

.menu__link {
  min-height: 52px;
  padding: 0.7rem 1.15rem;
  background: transparent;
  border-radius: 0;
  border-bottom: 4px solid transparent;
  color: #0649b8;
  font-size: 1.05rem;
  font-weight: 800;
}

.menu__link:hover,
.menu__link:focus {
  background: #eef6ff;
  border-radius: 0.85rem;
}

.menu__link[aria-current="page"],
.menu__item--active > .menu__link,
.current-menu-item > .menu__link {
  border-bottom-color: #1d74e8;
}

.site-main {
  padding-top: 1.45rem;
}

.hero {
  position: relative;
  min-height: 320px;
  grid-template-columns: minmax(0, 1.02fr) minmax(280px, 0.98fr);
  padding: clamp(1.4rem, 4vw, 2.6rem);
  overflow: hidden;
  border: 0;
  border-radius: 1.25rem;
  background:
    linear-gradient(90deg, rgba(255, 248, 233, 0.98) 0%, rgba(255, 246, 231, 0.88) 46%, rgba(255, 238, 214, 0.58) 100%);
  box-shadow: 0 16px 34px rgba(8, 36, 92, 0.10);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 78% 32%, rgba(255, 255, 255, 0.42), transparent 18rem);
}

.hero__content,
.hero__media {
  position: relative;
  z-index: 1;
}

.hero h1,
.hero__wysiwyg--main h1,
.hero__wysiwyg--main h2,
.hero__wysiwyg--main p:first-child strong {
  color: #08245c;
  font-size: clamp(2.35rem, 6vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 900;
}

.hero__wysiwyg,
.lead {
  max-width: 34rem;
  color: #14284d;
  font-size: clamp(1.12rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.hero__media {
  align-self: stretch;
  min-height: 260px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.hero__image {
  width: 100%;
  height: 100%;
  min-height: 260px;
  max-height: 420px;
  object-fit: cover;
  object-position: center;
  border-radius: 1.1rem;
}

.button,
.read-more {
  min-height: 58px;
  padding: 0.78rem 1.55rem;
  border-radius: 0.85rem;
  background: linear-gradient(180deg, #1f7aec 0%, #0b63d8 100%);
  border-color: #0b63d8;
  box-shadow: 0 10px 20px rgba(11, 99, 216, 0.22);
}

.button:hover,
.read-more:hover {
  transform: translateY(-1px);
}

.button--secondary {
  background: #ffffff;
  color: #0b63d8;
  box-shadow: none;
}

.section,
.content-card {
  border: 0;
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: none;
}

.section__kicker {
  color: #0b63d8;
}

.learning-tags {
  counter-reset: learning-tags;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 2rem;
}

.learning-tags__item {
  counter-increment: learning-tags;
}

.learning-tags__link {
  position: relative;
  display: flex;
  min-height: 104px;
  height: 100%;
  justify-content: center;
  padding: 1.25rem 4rem 1.25rem 1.95rem;
  border: 0;
  border-radius: 1rem;
  color: #08245c;
  box-shadow: 0 10px 22px rgba(8, 36, 92, 0.07);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.learning-tags__item:nth-child(6n+1) .learning-tags__link { background: linear-gradient(135deg, #eaf4ff 0%, #dfefff 100%); }
.learning-tags__item:nth-child(6n+2) .learning-tags__link { background: linear-gradient(135deg, #ecf9e5 0%, #def1d4 100%); }
.learning-tags__item:nth-child(6n+3) .learning-tags__link { background: linear-gradient(135deg, #fff6d9 0%, #ffedbd 100%); }
.learning-tags__item:nth-child(6n+4) .learning-tags__link { background: linear-gradient(135deg, #f0e9ff 0%, #e5dcfb 100%); }
.learning-tags__item:nth-child(6n+5) .learning-tags__link { background: linear-gradient(135deg, #ffe9e9 0%, #ffdada 100%); }
.learning-tags__item:nth-child(6n+6) .learning-tags__link { background: linear-gradient(135deg, #e9f5ff 0%, #ddecfb 100%); }

.learning-tags__head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.learning-tags__head::before {
  content: counter(learning-tags) ".";
  flex: 0 0 auto;
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  line-height: 1.2;
  font-weight: 900;
  color: #08245c;
}

.learning-tags__name {
  color: #08245c;
  font-size: clamp(1.22rem, 2.4vw, 1.6rem);
  line-height: 1.2;
  font-weight: 900;
}

.learning-tags__desc {
  margin-top: 0.2rem;
  color: #314865;
  font-size: 1rem;
}

.learning-tags__link::after {
  content: "›";
  position: absolute;
  right: 1.55rem;
  top: 50%;
  transform: translateY(-50%);
  color: #08245c;
  font-size: 2.8rem;
  line-height: 1;
  font-weight: 400;
}

.learning-tags__link:hover,
.learning-tags__link:focus {
  background: #eef6ff;
  border-color: transparent;
  box-shadow: 0 14px 28px rgba(8, 36, 92, 0.12);
  transform: translateY(-2px);
}

.learning-tags__link--empty::after {
  content: "";
}

.learning-tags__icon,
.post-tags__icon {
  display: none !important;
}

.lesson-grid,
.topic-grid,
.phrase-grid,
.card-grid {
  gap: 1.15rem;
}

.lesson-card,
.topic-card,
.phrase-card {
  border: 0;
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(8, 36, 92, 0.07);
}

.progress-box,
.trainer-box {
  border: 0;
  background: linear-gradient(135deg, #eef7ff 0%, #f6fbff 100%);
  box-shadow: 0 10px 22px rgba(8, 36, 92, 0.07);
}

.listen-btn,
.post-body .listen-btn,
button[data-speech-text],
button[data-speech-target],
.speech-button {
  border-radius: 0.9rem;
}

.site-footer {
  background: #ffffff;
  box-shadow: 0 -6px 18px rgba(8, 36, 92, 0.04);
}

@media (max-width: 980px) {
  .learning-tags,
  .topic-grid,
  .phrase-grid,
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 820px) {
  html {
    font-size: 18px;
  }

  .site-header__inner {
    min-height: auto;
  }

  .menu__link {
    border: 2px solid #d9e8ff;
    border-radius: 1rem;
    background: #ffffff;
  }
}

@media (max-width: 640px) {
  .site-main {
    width: min(var(--content), calc(100% - 1rem));
    padding-top: 0.85rem;
  }

  .hero,
  .section,
  .content-card {
    border-radius: 1rem;
  }

  .hero {
    min-height: auto;
    padding: 1.15rem;
  }

  .hero__media {
    min-height: 210px;
  }

  .hero__image {
    min-height: 210px;
  }

  .learning-tags,
  .topic-grid,
  .phrase-grid,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .learning-tags__link {
    min-height: 94px;
    padding: 1.1rem 3.55rem 1.1rem 1.25rem;
  }

  .learning-tags__link::after {
    right: 1.15rem;
  }

  .button,
  .read-more {
    width: 100%;
  }
}

/* de-senior-theme 0.6.10 PATCH — stable hero CTA placement
   Buttons are direct hero children now, so desktop keeps a two-column hero
   while mobile always places the image first and CTA buttons below it. */
.hero {
  grid-template-areas:
    "hero-content hero-media"
    "hero-actions hero-media";
}

.hero__content {
  grid-area: hero-content;
}

.hero__media {
  grid-area: hero-media;
}

.hero__actions {
  grid-area: hero-actions;
  align-self: start;
}

@media (max-width: 768px) {
  .hero {
    display: flex !important;
    flex-direction: column !important;
  }

  .hero__media {
    order: 1 !important;
    width: 100%;
  }

  .hero__content {
    order: 2 !important;
    width: 100%;
  }

  .hero__actions {
    order: 3 !important;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    margin-top: 1.25rem;
  }

  .hero__actions .button,
  .hero__actions .btn,
  .hero__actions a,
  .hero__actions button {
    width: 100%;
    min-height: 56px;
    justify-content: center;
    text-align: center;
  }
}

/* 0.6.18 Post/Page option support retained */
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
}
.post-meta__item {
  display: inline-flex;
  align-items: center;
}
.post-meta__item + .post-meta__item::before {
  content: "•";
  margin-right: 1rem;
  color: var(--muted);
}
.post-meta a {
  color: var(--accent);
  font-weight: 700;
}
@media (max-width: 560px) {
  .post-meta {
    display: grid;
    gap: 0.35rem;
  }
  .post-meta__item + .post-meta__item::before {
    content: none;
    margin-right: 0;
  }
}

.lesson-card__image {
  display: block;
  border-radius: 0.85rem;
  overflow: hidden;
}
.lesson-card__image img {
  display: block;
  width: 100%;
  height: auto;
}
.lesson-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  margin: 0.35rem 0 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* 0.6.18 Footer cookie notice */
.site-footer__cookie-notice {
    margin: 0.75rem 0 0;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(37, 99, 235, 0.18);
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}
table {
      width: 100%;
	   margin:24px auto;
	  box-sizing: border-box;
      border-collapse: collapse;
      background: white;
      border-radius: 24px;
      overflow: hidden;
      box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
      border: 1px solid #bae6fd;
	  table-layout: auto;
    word-break: break-word;
    }

    caption {
      background: linear-gradient(to right, #a3d900, #dfffbf);
      color: #222222;
      padding: 12px 24px;
      text-align: center;
      font-size: 1.25rem;
      font-weight: 700;
      caption-side: top;
      border-radius: 24px 24px 0 0;
      margin-bottom: 0;
    }

    thead th, td {
      background: #f1f5f9;
      color: #334155;
	  border: 1px solid #dcdcdc;
      padding: 6px 8px;
      text-align: center;
      font-weight: 600;
      font-size: 1.05rem;
	  vertical-align: middle;
    }
	/* CSS саме для tbody */
    tbody {
      background: white;
    }

    tbody tr {
     /*  transition: all 0.3s ease; */
    }

    tbody tr:hover {
      background: #f0f9ff;
     /*  transform: translateX(12px); */
    }

    tbody tr:not(:last-child) {
      border-bottom: 1px solid #e2e8f0;
    }

    td {
     /*  padding: 2px 4px; */
      font-size: 1.10rem;
	  text-align: center;
	  vertical-align: middle;
    }

    td:first-child {
      font-size: 1.5rem;
      font-weight: 700;
      color: #1e40af;
     }

    td:nth-child(2) {
      font-weight: 600;
      color: #1e2937;
	   overflow-wrap: anywhere;
    }

    td:nth-child(3) {
      color: #475569;
    }

    tr {
      transition: all 0.3s ease;
    }

    tr:hover {
      background: #f0f9ff;
      /* transform: translateX(12px); */
    }

    tr:not(:last-child) {
      border-bottom: 1px solid #e2e8f0;
    }

@media (max-width: 768px) {

    table,
    thead,
    tbody,
    tr
     {
        display: block;
        width: 100%;
    }
	th,
    td {
        display: block;
    }
	 caption {
        display: block;
        width: 100%;
		box-sizing: border-box;
    }
    thead {
        display: none;
    }

    table {
        border: none;
    }

    tr {
        margin-bottom: 16px;
        border: 1px solid #dcdcdc;
        border-radius: 12px;
        overflow: hidden;
        background: #fff;
    }

    td {
        border: none;
        border-bottom: 1px solid #ececec;
        position: relative;
        padding: 12px 12px 12px 42%;
        min-height: 48px;
		 width: auto;
        box-sizing: border-box;
    }

    td:last-child {
        border-bottom: none;
    }

    td::before {
        position: absolute;
        left: 12px;
        top: 12px;
        width: 35%;
        font-weight: 700;
        color: #444;
        white-space: nowrap;
    }

    /* Назви колонок */
    td:nth-child(1)::before {
        content: "Jahr";
    }

    td:nth-child(2)::before {
        content: "Deutsch";
    }

    td:nth-child(3)::before {
        content: "Транскрипція";
    }
}
	
/* ==========================================
   Year Converter Trainer
   de-senior-theme 0.6.18
========================================== */

.year-trainer-box {
  background: #ffffff;
  border: 2px solid #dbe7f3;
  border-radius: 24px;
  padding: 2rem;
  margin: 2rem 0;
}

.year-trainer-box h2 {
  font-size: 2rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  color: #1f3c5b;
}

.year-trainer-box p {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.year-trainer-label {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: #1f3c5b;
}

.year-trainer-input {
  width: 100%;
  min-height: 56px;
  border-radius: 18px;
  border: 2px solid #c8d8e8;
  padding: 1rem;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.year-trainer-input:focus {
  outline: none;
  border-color: #3d7edb;
  box-shadow: 0 0 0 4px rgba(61,126,219,0.15);
}

.year-trainer-button {
  width: 100%;
  min-height: 56px;
  border: none;
  border-radius: 18px;
  background: #3d7edb;
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 700;
  padding: 1rem;
  cursor: pointer;
}

.year-trainer-button:hover,
.year-trainer-button:focus {
  background: #2f69bb;
}

.year-trainer-result {
  margin-top: 1.5rem;
}

.year-trainer-success {
  background: #eef8ef;
  border: 2px solid #b8dfbd;
  border-radius: 20px;
  padding: 1.5rem;
}

.year-trainer-number {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: #1f3c5b;
}

.year-trainer-german {
  font-size: 1.8rem;
  line-height: 1.7;
  color: #17603a;
  word-break: break-word;
}

.year-trainer-error {
  background: #fff3f3;
  border: 2px solid #efc1c1;
  border-radius: 20px;
  padding: 1rem 1.2rem;
  font-size: 1.1rem;
  line-height: 1.7;
  color: #9b2c2c;
}

@media (max-width: 768px) {

  .year-trainer-box {
    padding: 1.5rem;
  }

  .year-trainer-box h2 {
    font-size: 1.7rem;
  }

  .year-trainer-input {
    font-size: 1.3rem;
  }

  .year-trainer-german {
    font-size: 1.5rem;
  }

}
  .card-grid + ul {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;

    list-style: none;
    margin: 2rem 0;
    padding: 0;
}

.card-grid + ul li {
    display: inline-flex;
}

.card-grid + ul li a,
.card-grid + ul li strong {
    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 48px;
    min-height: 48px;
    padding: 0.75rem 1rem;
}
pre {
  background-color: var(--lighter);
  font-size: 0.8239746086rem;
  padding: calc(var(--baseline) * 6);
  white-space: pre-wrap;
  word-wrap: break-word;
}
pre > code {
  color: var(--text-color);
  display: inline-block;
  font-size: inherit;
  padding: 0;
}

code {
  background-color: var(--lighter);
  color: var(--color);
  /* font-size: 0.8239746086rem; */
  font-family: Menlo, Monaco, Consolas, Courier New, monospace;
}
.table-container {
  overflow-x: auto; /* Додає горизонтальну прокрутку */
  max-width: 100%; /* Обмежує ширину */
}
/*Формати*/
.rule, .note, .importantly, .definition, .conclusion, .comments, .fake, .advice, .problem, .descript{position: relative;  /* margin:1rem; */margin-bottom:0.85rem; border:1px solid #AEAEAE;border-radius:4px;z-index: 1; border-left: 0.5rem solid; font-family: Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif; }
.rule::before, .note::before, .importantly::before, .definition::before, .conclusion::before, .comments::before, .fake::before, .advice::before, .problem::before, .descript::before {display: inline-block; 
padding: 0; 	border-radius: 4px; 	color: #ffffff; 	font-weight: normal; 	text-indent:0;  	margin-right: 1rem; 	line-height: 1; 	vertical-align: middle; }
.rule > p:first-of-type, .note > p:first-of-type, .importantly > p:first-of-type, .definition > p:first-of-type, .conclusion > p:first-of-type,
.comments > p:first-of-type, .fake > p:first-of-type, .advice > p:first-of-type, .problem > p:first-of-type, .descript > p:first-of-type { display: inline; text-indent: 0; } 
div.descript, div.rule, div.note, div.importantly, div.definition, div.conclusion, div.comments, div.fake, div.advice, div.problem, div.descript,
p.descript, p.rule, p.note, p.importantly, p.definition, p.conclusion, p.comments, p.fake, p.advice, p.problem, p.descript
 {  display: inline-block; 
padding:0.7rem 0.5rem 0.7rem 1rem; /* margin: 1rem; */ /* font-size: calc(0.65rem + 0.65vw); */
line-height: 1.7; word-wrap: break-word; }	
/*Для висновок 17-01-2025*/
.conclusion {background #ffffcc;border-left-color: #7F35A9; }
.conclusion::before {content:url("../icons/conclusion.svg"); }
/*Для порада 17-01-2025*/
.advice {background: #f9f9e3;border-left-color: #00664c; }
.advice::before {content:url("../icons/advice.svg"); }
/*Для проблема 17-01-2025*/
.problem {background-color: #ffbfbf;border-left-color: #ff0000; }
.problem::before {content:url("../icons/problem.svg"); }
/*Для важливо 17-01-2025*/
.importantly {background-color: #ffeaea;border-left-color: #d9006c; }
.importantly::before {content: url("../icons/importantly.svg"); }
/*Для визначення 17-01-2025*/
.definition {background-color: #ddffdd;border-left-color: rgb(18,120,79); }
.definition::before {content: url("../icons/definition.svg");
}
/*Для примітки 17-01-2025*/
.note { background-color: #dfefff; border-left-color: rgb(29, 85, 157); }
.note::before { content: url("../icons/note.svg");
}
/*Правило*/
.rule { background-color: #eeeeee;border-left-color: #444444; }
.rule::before {content: url("../icons/rule.svg"); }
/*Фейк 17-01-2025*/
.fake { background-color: #deddbc; border-left-color: #F8312F; }
.fake::before {content: url("../icons/fake.svg"); }
/*Для опису 17-01-2025*/
.descript{background:#ffffbf; border-left-color: #8c6900; }
.descript::before{content: url("../icons/descript.svg"); }
.descript a{color:#5587c4; }
.descript span{margin:1.5em; }
/*Для друку*/
@media print {
	 h2 {
    text-align: center !important;
    display: block;
    width: 100%;
    margin: 0 !important;
  }
  .listen-btn {
    display: none !important;
  }
   /* Прибираємо зайві відступи у секції */
  .dialog-trainer {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  /* Компактніший текст */
  .dialog-trainer p {
    margin: 2px 0 !important;
    line-height: 1.2 !important;
  }

  /* Прибираємо відступи між репліками */
  .dialog-line {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
  }

  /* Заголовки компактніше */
  .dialog-trainer h2 {
    margin: 0 0 6px 0 !important;
    padding: 0 !important;
  }

  /* Прибираємо службовий текст */
  .dialog-trainer > p:first-of-type {
    display: none !important;
  }
  .site-footer, .site-header, .section__kicker, .post-tags__name {
 display: none !important;
}
  td:first-child,
    th:first-child {
        white-space: nowrap;
        word-break: keep-all;
        overflow-wrap: normal;
    }

}
@page {
  @bottom-center {
    content: "© 2026 Yurii Cherniievskyi for https://de.miditaur.net/ All rights reserved";
    font-size: 10pt;
    color: #666;
  }
}