/* Spanish website (TestPermiso), group "learn" (copied from the Polish site 30 Nov 2026): signs, sign R-2, rules hub, rule guides, costs.
   Only what pages.css does not already cover. */

/* filtered items: the hidden attribute must win over .sign { display: flex } */
[data-filter-list] [data-item][hidden] { display: none !important; }

/* ---------- road signs hub ---------- */
.sign-tools { display: flex; flex-direction: column; gap: 14px; margin-bottom: 22px; }
.sign-count { font-size: 14px; color: var(--muted); }
.sign-grid .sign small { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.sign-grid .rs-code { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 12px; background: #EEF2F7; color: #475569; font-size: 13px; font-weight: 700; }
a.sign { position: relative; }
a.sign::after { content: ""; position: absolute; top: 12px; right: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.fam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
button.lcard { text-align: left; font: inherit; color: inherit; cursor: pointer; }
div.lcard:hover { border-color: var(--line); box-shadow: none; transform: none; }
.lcard .fam-letter { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; font-weight: 700; background: var(--blue-soft); color: var(--blue-d); }
.lcard .lc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lcard.soon { background: var(--soft); }
.lcard.soon .fam-letter { background: #fff; color: var(--muted); }
.sotd { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px 28px; align-items: center; padding: 26px; border-radius: 26px; background: #fff; border: 1px solid var(--line); }
.sotd .sign-big { width: 150px; height: 150px; }
.sotd .sign-big svg, .sotd .sign-big .rs { width: 104px; height: 104px; }
.sotd-txt { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sotd-txt h3 { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.25; }
.sotd-txt p { font-size: 15.5px; color: var(--text); line-height: 1.6; }
.learn-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; max-width: 680px; }
.learn-head p { font-size: 16px; color: var(--text); line-height: 1.6; }
.learn-head.spaced { margin-top: 56px; }

/* ---------- sign detail (A-7) ---------- */
.sign-head .sign-meta { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.sign-head .sign-meta .tags { display: flex; flex-wrap: wrap; gap: 8px; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pair > div { border: 1px solid var(--line); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.pair svg, .pair .rs { width: 64px; height: 64px; }
.pair b { font-size: 16px; font-weight: 600; color: var(--ink); }
.pair p { font-size: 15px !important; line-height: 1.55 !important; }
.plate-fig { display: flex; align-items: center; gap: 22px; padding: 18px; border-radius: 20px; background: var(--soft); }
.plate-fig svg { width: 96px; height: auto; flex: none; }
.plate-fig p { font-size: 15px !important; line-height: 1.55 !important; }
.doc .q { margin-top: 4px; }
.doc .q-why p { font-size: 14.5px; line-height: 1.5; }
.doc .sign-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.q-media svg { width: 100%; height: 100%; display: block; }
.q-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 4px; }
.q-head small { font-size: 13px; color: var(--muted); }
.rel-links { display: flex; flex-wrap: wrap; gap: 10px; }
.rel-links a { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 12px; background: var(--soft); font-size: 14.5px; font-weight: 500; color: var(--ink) !important; }
.rel-links a:hover { background: var(--blue-soft); text-decoration: none !important; }
.rel-links .ms { font-size: 18px; color: var(--blue-d); }

/* ---------- traffic rules hub ---------- */
.rule-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.rule-grid .lcard .lc-top .ms { font-size: 26px; color: var(--blue); }
.rule-grid div.lcard .lc-top .ms { color: var(--muted); }
/* topic cards with a photo (26 Nov 2026): picture, title, one short line */
.rule-grid .rcard { padding: 10px 10px 16px; gap: 4px; }
.rcard .rc-img { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: var(--soft); margin-bottom: 8px; }
.rcard .rc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rcard .rc-img .tag { position: absolute; top: 8px; left: 8px; height: 24px; font-size: 12px; background: rgba(255, 255, 255, .92); }
.rcard .rc-img .tag.good { background: var(--good); color: #fff; }
.rcard b, .rcard p { padding: 0 6px; }
.rcard p { font-size: 14px; }
.rcard.soon .rc-img img { filter: saturate(.75); }
@media (max-width: 860px) { .rule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .rcard b { font-size: 15px; } .rcard p { font-size: 13px; } }

/* ---------- costs ---------- */
.calc { border: 1px solid var(--line); border-radius: 24px; padding: 22px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; background: #fff; box-shadow: 0 14px 34px rgba(20, 40, 80, .07); }
.calc .field input { width: 100%; }
.calc .field small { font-size: 12.5px; color: var(--muted); }
.calc-in { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.calc-out { border-radius: 18px; background: var(--soft); padding: 18px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.calc-out small { font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.calc-total { font-size: 36px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.calc-lines { list-style: none; padding: 0 !important; margin: 4px 0 0; display: flex; flex-direction: column; gap: 6px !important; }
.calc-lines li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px !important; line-height: 1.4 !important; }
.calc-lines li b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.calc-note { font-size: 13px; color: var(--muted); line-height: 1.5; }
.est { font-size: 12.5px; font-weight: 600; color: #9A6B00; background: #FFF5D9; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.steps-list { list-style: none; padding: 0 !important; counter-reset: ks; gap: 12px !important; }
.steps-list li { counter-increment: ks; position: relative; padding: 14px 16px 14px 56px; border-radius: 18px; background: var(--soft); }
.steps-list li::before { content: counter(ks); position: absolute; left: 16px; top: 15px; width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center; }
.note-box { display: flex; gap: 12px; align-items: flex-start; border-radius: 18px; background: #FFF5D9; padding: 16px 18px; }
.note-box .ms { color: #9A6B00; font-size: 22px; margin-top: 2px; }
.note-box p { font-size: 15.5px !important; color: #5E4500 !important; }

/* ---------- news ---------- */
.news .tag { justify-self: start; margin-top: 4px; grid-column: 2; }
.news-cta { margin-top: 40px; }

@media (max-width: 860px) {
  .calc { grid-template-columns: minmax(0, 1fr); padding: 18px; }
}
@media (max-width: 600px) {
  .sotd { grid-template-columns: minmax(0, 1fr); padding: 20px; }
  .sotd .sign-big { width: 120px; height: 120px; }
  .sotd .sign-big svg, .sotd .sign-big .rs { width: 84px; height: 84px; }
  .pair { grid-template-columns: minmax(0, 1fr); }
  .plate-fig { flex-direction: column; align-items: flex-start; }
  .calc-total { font-size: 30px; }
  .news .tag { grid-column: auto; }
  .fam-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .fam-grid .lcard { padding: 16px 14px; }
  .fam-grid .lcard p { font-size: 13.5px; }
  .fam-grid .lcard .tag { height: 22px; padding: 0 8px; font-size: 11.5px; }
}
.pair .duo { display: flex; gap: 8px; }
.faq details p a { color: var(--blue-d); font-weight: 500; }
.faq details p a:hover { text-decoration: underline; }
.cta-btns { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.sotd-txt .tag { align-self: flex-start; }
.doc .q { max-width: 580px; }
.doc .calc-note { font-size: 13px; line-height: 1.5; color: var(--muted); }
.doc .calc .field small { font-size: 12.5px; line-height: 1.4; }

/* ---------- Spanish site (30 Nov 2026) ---------- */
/* rule cards whose picture is a row of signs or a big icon instead of a scene */
.rcard .rc-img.signs, .rcard .rc-img.icon { display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--soft); }
.rcard .rc-img.signs img { width: 28%; height: auto; max-height: 72%; object-fit: contain; }
.rcard .rc-img.icon .ms { font-size: 64px; color: var(--muted); }
/* "which signal wins" list on the signs hub */
.order-box { max-width: 680px; margin-top: 28px; }
.order-box h3 { margin: 0 0 12px; font-size: 20px; font-weight: 700; }
.order-box .steps-list { display: flex; flex-direction: column; margin: 0; }
.order-box .steps-list li { font-size: 15.5px; line-height: 1.5; }
.fam-letter .ms { font-size: 22px; }
.pair .pair-ico { font-size: 56px; line-height: 64px; height: 64px; color: var(--muted); }
