/* city-libraries.css — «Библиотека в вашем городе»: the page of all cities (city-libraries.html, a table) and one
   city's page (city-libraries/_entry.html, the pass and three answers). Loaded after libraries.css, whose tokens and
   .lb-pad / .lb-kick it uses. The «Я живу в…» chooser is shared with the libraries catalogue (city-libraries.js). */
.cl { --navy-2: #2E4468; }

/* The chooser: the city word is the control, as in the catalogue's sentence; a native select lies over it. */
.cl-tok { position: relative; display: inline-flex; align-items: baseline; gap: .12em; color: var(--ox); border-bottom: .06em dashed rgba(107, 31, 43, .4); cursor: pointer; }
.cl-tok svg { width: .5em; height: .5em; fill: none; stroke: currentColor; stroke-width: 2.4; transform: translateY(.04em); }
.cl-tok select { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.cl-tok:focus-within { outline: 2px solid var(--acc); outline-offset: 4px; border-radius: 4px; }
.cl-tok:hover { border-bottom-style: solid; }

/* ── One city ── */
.cl-top { display: grid; grid-template-columns: minmax(0, 1fr) 470px; gap: 64px; align-items: center; padding-top: 40px; }
.cl-say { margin-top: 18px; font-size: clamp(44px, 5.4vw, 72px); font-weight: 500; line-height: 1.02; letter-spacing: -.045em; color: var(--txt); }
.cl-lead { margin-top: 20px; max-width: 640px; font-size: 20px; line-height: 1.45; color: var(--txt2); }
.cl-org { margin-top: 14px; font: 500 13px var(--mono); letter-spacing: .02em; color: var(--mut); }

.cl-pass { position: relative; padding: 30px 32px 26px; border-radius: 22px; background: radial-gradient(120% 140% at 0 0, var(--navy-2), var(--navy) 60%); color: #F4EEE2; box-shadow: 0 30px 60px -28px rgba(35, 53, 84, .65); transform: rotate(-1.5deg); }
.cl-pass-org { display: flex; justify-content: space-between; gap: 16px; font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--gilt); }
.cl-pass-gift { display: inline-block; margin-top: 22px; padding: 6px 12px; border-radius: 999px; background: var(--gilt); color: #2B2724; font-size: 14px; font-weight: 600; line-height: 1.3; }
.cl-pass h2 { margin-top: 22px; font-size: 15px; font-weight: 500; color: rgba(244, 238, 226, .7); }
.cl-pass-big { margin-top: 4px; font-size: 46px; font-weight: 500; line-height: 1; letter-spacing: -.04em; }
.cl-pass-big small { display: block; margin-top: 8px; font-size: 16px; line-height: 1.4; letter-spacing: 0; color: rgba(244, 238, 226, .78); }
.cl-pass dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin-top: 20px; padding-top: 18px; border-top: 1px solid rgba(244, 238, 226, .2); }
.cl-pass dt { font: 500 15px var(--mono); color: var(--gilt); }
.cl-pass dd { font-size: 15px; line-height: 1.4; color: rgba(244, 238, 226, .86); }
.cl-pass-code { display: block; height: 28px; margin-top: 22px; border-radius: 3px; background: repeating-linear-gradient(90deg, #F4EEE2 0 2px, transparent 2px 5px, #F4EEE2 5px 6px, transparent 6px 10px); opacity: .45; }

.cl-help { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 80px; border-top: 1px solid var(--line); }
.cl-help article { display: flex; flex-direction: column; padding: 28px 32px 32px 0; }
.cl-help article + article { padding-left: 32px; border-left: 1px solid var(--line); }
.cl-help .lb-kick { color: var(--ox); }
.cl-help h3 { margin-top: 12px; font-size: 27px; font-weight: 500; line-height: 1.14; letter-spacing: -.03em; }
.cl-help p { margin-top: 12px; font-size: 17px; line-height: 1.5; color: var(--txt2); }
.cl-help dl { display: grid; grid-template-columns: 76px 1fr; gap: 8px 12px; margin-top: 18px; font-size: 15px; line-height: 1.4; }
.cl-help dt { padding-top: 3px; font: 500 11px var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--mut); }
.cl-help dd { color: var(--txt); }
.cl-help a { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 18px; font-size: 15px; font-weight: 500; color: var(--ox); }
.cl-help a span { border-bottom: 1px solid rgba(107, 31, 43, .35); }
.cl-help a:hover span { border-bottom-color: var(--ox); }

.cl-line { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cl-line > div { padding: 18px 32px 20px 0; font-size: 15px; line-height: 1.45; color: var(--txt2); }
.cl-line > div + div { padding-left: 32px; border-left: 1px solid var(--line); }
.cl-line b { display: block; margin-bottom: 4px; font: 500 16px var(--mono); color: var(--txt); }

.cl-more { display: grid; grid-template-columns: 280px 1fr 1fr; gap: 40px; align-items: start; padding-top: 56px; }
.cl-more h2 { font-size: 30px; font-weight: 500; line-height: 1.1; letter-spacing: -.035em; }
.cl-steps, .cl-prices { list-style: none; margin: 0; padding: 0; }
.cl-steps li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; line-height: 1.5; color: var(--txt2); }
.cl-steps li:first-child { padding-top: 0; }
.cl-steps b { padding-top: 3px; font: 500 13px var(--mono); color: var(--ox); }
.cl-prices li { display: grid; grid-template-columns: 110px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.45; color: var(--txt2); }
.cl-prices li:first-child { padding-top: 0; }
.cl-prices b { font: 500 16px var(--mono); color: var(--txt); }

.cl-central { display: grid; grid-template-columns: 280px 1fr auto; gap: 40px; align-items: center; margin-top: 56px; padding: 26px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cl-central h2 { font-size: 22px; font-weight: 500; letter-spacing: -.02em; }
.cl-central p { font-size: 16px; line-height: 1.5; color: var(--txt2); }
.cl-central p small { display: block; margin-top: 6px; font-size: 14px; color: var(--ox); }
.cl-central-acts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

/* ── All cities: one row each, the newcomer's questions as columns ── */
.ct-head { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 64px; align-items: end; padding-top: 40px; }
.ct-head h1 { margin-top: 18px; font-size: clamp(52px, 6.2vw, 92px); font-weight: 500; line-height: .95; letter-spacing: -.055em; color: var(--ox); }
.ct-head p { font-size: 20px; line-height: 1.45; color: var(--txt2); }
.ct-head .ct-pick { margin-top: 24px; font-size: 26px; font-weight: 500; line-height: 1.2; letter-spacing: -.03em; color: var(--txt); }
.ct-table { margin-top: 56px; border-bottom: 1px solid var(--line); }
.ct-row { display: grid; grid-template-columns: 210px minmax(0, 1.05fr) minmax(0, .8fr) minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1.05fr) minmax(0, .7fr); border-top: 1px solid var(--line); color: inherit; }
/* minmax(0, …): a long unbroken word (an e-mail, a Dutch compound) must not widen one row's column and break the grid lines. */
.ct-row > span { min-width: 0; overflow-wrap: break-word; padding: 22px 20px 24px 0; }
.ct-row > span + span { padding-left: 20px; border-left: 1px solid var(--line); }
a.ct-row { transition: background .2s; }
a.ct-row:hover { background: var(--s1); }
a.ct-row:hover .ct-city b { color: var(--ox); }
.ct-th > span { padding-top: 14px; padding-bottom: 14px; font: 500 11px var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--mut); }
.ct-city b { display: block; font-size: 28px; font-weight: 500; line-height: 1.02; letter-spacing: -.04em; overflow-wrap: normal; hyphens: auto; transition: color .2s; }
.ct-city small { display: block; margin-top: 8px; font-size: 13px; line-height: 1.35; color: var(--mut); }
.ct-row .n { display: block; font: 500 21px var(--mono); letter-spacing: -.02em; color: var(--txt); }
.ct-row .t { display: block; font-size: 16px; font-weight: 500; line-height: 1.3; color: var(--txt); }
.ct-row small { display: block; margin-top: 6px; font-size: 13.5px; line-height: 1.4; color: var(--txt2); }
.ct-row .gift { color: var(--ox); font-weight: 500; }
.ct-foot { padding-top: 26px; padding-bottom: 72px; font-size: 14px; line-height: 1.5; color: var(--mut); }

/* ── The way in, on the libraries catalogue ── */
.cl-entry { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px 32px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.cl-entry .lb-kick { flex: 0 0 100%; }
.cl-entry-say { font-size: clamp(30px, 3.2vw, 44px); font-weight: 500; line-height: 1.1; letter-spacing: -.035em; }
.cl-entry p:last-child { font-size: 16px; line-height: 1.5; color: var(--txt2); }
.cl-entry p:last-child a { color: var(--ox); font-weight: 500; border-bottom: 1px solid rgba(107, 31, 43, .35); }

@media (max-width: 1100px) {
  .cl-top, .ct-head { grid-template-columns: 1fr; gap: 36px; }
  .cl-pass { max-width: 520px; transform: none; }
  .cl-help, .cl-line { grid-template-columns: 1fr; }
  .cl-help article, .cl-help article + article, .cl-line > div, .cl-line > div + div { padding-left: 0; padding-right: 0; border-left: 0; }
  .cl-help article + article, .cl-line > div + div { border-top: 1px solid var(--line); }
  .cl-more, .cl-central { grid-template-columns: 1fr; gap: 18px; }
  .cl-central-acts { justify-content: flex-start; }
  .ct-th { display: none; }
  .ct-row { grid-template-columns: 1fr 1fr; padding: 20px 0; }
  .ct-row > span, .ct-row > span + span { padding: 8px 12px 8px 0; border-left: 0; }
  .ct-row > .ct-city { grid-column: 1 / -1; padding-bottom: 6px; }
  .ct-row > span[data-k]::before { content: attr(data-k); display: block; margin-bottom: 4px; font: 500 10.5px var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--mut); }
}
@media (max-width: 640px) {
  .cl-top { padding-top: 24px; }
  .cl-say { font-size: 40px; }
  .cl-lead { font-size: 17px; }
  .cl-pass { padding: 22px 20px 20px; border-radius: 20px; }
  .cl-pass-big { font-size: 36px; }
  .cl-help { margin-top: 44px; }
  .cl-help h3 { font-size: 23px; }
  .ct-head h1 { font-size: 46px; }
  .ct-head p { font-size: 17px; }
  .ct-city b { font-size: 28px; }
}
