/* Public articles (pages/): the site's own light look — warm paper, navy text, coral accents, painted marks —
   without the app around it. The same tokens as the site (css/playlist.css). */
:root { --bg: #F7F2EC; --surface: #FFFBF5; --card: #fff; --line: #EDE3D6; --line2: #E2DBD2; --text: #24304D; --muted: #5B6475; --accent: #EF6B4A; --accent-ink: #B5452A; --ok: #3F9B5A; --bad: #C2412D; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, sans-serif; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
h1, h2 { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Inter, Roboto, sans-serif; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; color: var(--text); }
h1 { font-size: clamp(1.9rem, 6vw, 2.7rem); margin: 10px 0 6px; text-wrap: balance; }
h2 { font-size: 1.3rem; margin: 40px 0 12px; }

/* the bar: a light glass pill, as on the site */
.pg-top { position: sticky; top: 12px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 792px; margin: 12px auto 0; padding: 8px 8px 8px 14px; border-radius: 99px;
  background: rgba(255, 251, 245, .82); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); box-shadow: 0 0 0 1px rgba(237, 227, 214, .9), 0 10px 30px rgba(70, 55, 20, .08); }
@media (max-width: 820px) { .pg-top { margin: 10px 12px 0; } }
.pg-logo { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; font-size: .95rem; text-decoration: none; white-space: nowrap; }
.pg-logo b { color: var(--text); }
.pg-mark { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; overflow: hidden; }
.pg-mark img { width: 32px; height: 32px; object-fit: cover; }
.pg-btn { display: inline-block; padding: 9px 16px; border-radius: 999px; background: var(--text); color: #fff; font-weight: 600; font-size: .9rem; text-decoration: none; white-space: nowrap; transition: background .2s; }
.pg-btn:hover { background: #1b2440; }
.pg-btn.big { padding: 14px 26px; font-size: 1rem; }

.pg { max-width: 760px; margin: 0 auto; padding: 26px 16px 48px; }
.pg-crumbs { color: var(--muted); font-size: .9rem; margin-bottom: 18px; }
.pg-crumbs a { color: var(--muted); }
.pg-level { display: inline-block; padding: 4px 12px; border-radius: 999px; background: #FBE9E1; color: var(--accent-ink); font-size: .82rem; font-weight: 700; }
.pg-en, .pg-note { color: var(--muted); margin: 0; }

/* the theory as one soft card */
.pg-theory { margin-top: 20px; padding: 22px 24px; border-radius: 24px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.pg-theory > :first-child { margin-top: 0; }
.pg-theory .formula { padding: 14px 16px; border-radius: 14px; background: var(--card); box-shadow: 0 0 0 1px var(--line); margin: 14px 0; }
.pg-theory ul { padding-left: 20px; }
.pg-theory .tip::before { content: "Запомните: "; font-weight: 700; }
.pg-theory .ex::before { content: "Примеры"; display: block; margin-left: -20px; font-size: .85rem; font-weight: 600; color: var(--muted); }
.pg-theory .tip { padding: 12px 14px; border-left: 3px solid var(--accent); background: var(--card); border-radius: 0 12px 12px 0; }
.pg-theory table { width: 100%; border-collapse: collapse; }
.pg-theory td, .pg-theory th { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.pg-theory .sit { color: var(--muted); }
.pg-theory .why-h { margin: 24px 0 8px; font-size: .9rem; font-weight: 700; color: var(--text); }
.pg-theory .phr td { vertical-align: top; border-bottom: 1px solid var(--line); }
.pg-theory .phr td:first-child { width: 30%; padding-left: 12px; border-left: 3px solid var(--accent); color: var(--muted); font-size: .9rem; }
.pg-theory .why li { padding: 4px 0; }
.pg-theory .cmp { border-collapse: separate; border-spacing: 8px 8px; margin: 0 -8px; table-layout: fixed; }
.pg-theory .cmp th { border: 0; padding: 0 10px; font-size: .85rem; font-weight: 600; color: var(--muted); }
.pg-theory .cmp td { border: 0; padding: 11px 13px; border-radius: 12px; background: var(--card); box-shadow: 0 0 0 1px var(--line); vertical-align: top; }
.pg-theory .cmp small { color: var(--muted); }
.pg-theory .oops { padding: 13px 15px; border-radius: 14px; background: #FBE9E1; color: var(--text); }
.pg-theory .oops::before { content: "Частая ошибка: "; font-weight: 700; color: var(--accent-ink); }
.pg-theory s { color: var(--bad); }
@media (max-width: 560px) {
  .pg-theory { padding: 18px 16px; border-radius: 20px; }
  .pg-theory .phr td, .pg-theory .phr td:first-child { display: block; border: 0; padding: 2px 0 2px 12px; border-left: 3px solid var(--accent); width: auto; }
  .pg-theory .phr td:first-child { padding-top: 8px; }
}

/* exercises with answers */
.pg-items { display: grid; gap: 8px; margin-top: 12px; }
.pg-items details { padding: 13px 16px; border-radius: 16px; background: var(--card); box-shadow: 0 0 0 1px var(--line); }
.pg-items details[open] { box-shadow: 0 0 0 1px var(--line2), 0 8px 22px rgba(70, 55, 20, .06); }
.pg-items summary { cursor: pointer; font-weight: 600; }
.pg-items p { margin: 8px 0 0; }
.pg-why { color: var(--muted); font-size: .92rem; }

/* the call to start: a warm card with the navy button */
.pg-cta { margin-top: 40px; padding: 24px; border-radius: 24px; background: linear-gradient(135deg, #FDE3D6, #FFF1E6); box-shadow: 0 0 0 1px #F6D6C6; color: var(--text); }
.pg-cta h2 { margin: 0 0 6px; }
.pg-cta p { margin: 0 0 16px; color: #4b556b; }
.pg-cta .pg-btn { background: var(--text); color: #fff; }

.pg-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pg-links a { color: var(--text); }
.pg-foot { display: flex; flex-wrap: wrap; gap: 8px 18px; max-width: 792px; margin: 0 auto; padding: 22px 16px 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.pg-foot a { color: var(--muted); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (pointer: coarse) { .pg-foot a, .pg-links a { display: inline-block; padding-block: 12px; } }

/* Tenses map */
.pg-map a { display: inline-block; margin: 6px 0 4px; padding: 11px 18px; border-radius: 999px; background: var(--text); color: #fff; font-weight: 600; text-decoration: none; }
.tmap-h { margin-top: 28px; }
.tmap-wrap { overflow-x: auto; margin: 8px 0 18px; -webkit-overflow-scrolling: touch; }
.tmap { border-collapse: separate; border-spacing: 6px; width: 100%; min-width: 720px; table-layout: fixed; margin: 0 -6px; }
.tmap th { font-size: .85rem; text-align: left; padding: 4px 6px; vertical-align: bottom; border: 0; background: none; }
.tmap th small { display: block; color: var(--muted); font-weight: 400; }
.tmap tr > th:first-child { width: 84px; vertical-align: middle; }
.tmap td { background: var(--card); box-shadow: 0 0 0 1px var(--line); border: 0; border-radius: 12px; padding: 10px 11px; vertical-align: top; font-size: .86rem; line-height: 1.35; overflow-wrap: anywhere; }
.tmap td > * { display: block; }
.tmap .tn { font-size: .9rem; }
.tmap .tf { color: var(--accent-ink); font-weight: 600; margin: 3px 0 6px; }
.tmap td small { color: var(--muted); margin-top: 3px; font-size: .8rem; }
.tmap td a { margin-top: 6px; font-size: .8rem; }
/* the contents: each level's rules as soft cards */
.pg-idx { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.pg-idx a { display: block; height: 100%; padding: 13px 16px; border-radius: 16px; background: var(--card); box-shadow: 0 0 0 1px var(--line); color: var(--text); font-weight: 600; font-size: .95rem; line-height: 1.35; text-decoration: none; transition: box-shadow .2s, transform .2s; }
.pg-idx a:hover { box-shadow: 0 0 0 1px var(--line2), 0 10px 24px rgba(70, 55, 20, .08); transform: translateY(-1px); }
@media (pointer: coarse) { .pg-idx a { padding-block: 14px; } }

/* narrow phones: the bar keeps the mark and the button, the name goes */
@media (max-width: 400px) { .pg-logo > span:last-child { display: none; } }
