/* Page CSS: the night grade, and only what sits inside a visual (the hero window, the app frame, the
   spelling table, the nav and country name tiles) plus one --p-h per card group. The rest is system.css. */

/* ---------------------------------------------------------------- light and night
   The grade is chosen once on load (saved choice, else the device setting) or by the nav's switch;
   never by scrolling. Every kit colour derives from the --p-* tokens, so night swaps only those. */
:root {
  color-scheme: light;
  --pc-card: #fffdf9; --pc-soft: #f2ece1; --pc-hover: #f6f1e7;
  --pc-sel: #e4f5ea; --pc-sel-line: #8fdcb4;
  --pc-ink: #1f2a24; --pc-ink2: #33403a; --pc-muted: #5f6a63;
  --pc-line: rgb(31 42 36 / .09); --pc-line2: rgb(31 42 36 / .15);
  --pc-on: #1d6b58; --pc-on-ink: #ffffff;
  --pc-shadow: 0 0 0 1px rgb(31 42 36 / .07), 0 30px 60px -32px rgb(29 80 62 / .38);
  --pc-field: radial-gradient(90% 70% at 80% 10%, #dff7e9 0 30%, transparent 60%), radial-gradient(80% 60% at 10% 100%, #cfe0d1 0 35%, transparent 70%), linear-gradient(160deg, #eaf1e6, #d8e5d8);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --p-bg: #121413; --p-surface: #1b1e1c; --p-ink: #eef2ef; --p-muted: #a9b0ab;
  --p-accent: #a1ffcb; --p-accent-ink: #142019; --p-action: #a1ffcb; --p-action-ink: #142019;
  --p-inv-bg: #eef2ef; --p-inv-surface: #e1e6e2; --p-inv-ink: #151716; --p-inv-muted: #555c57;
  --p-inv-accent: #17784b; --p-inv-accent-ink: #ffffff; --p-inv-action: #151716; --p-inv-action-ink: #eef2ef;
  --pc-card: #1b1e1c; --pc-soft: #242826; --pc-hover: #222624;
  --pc-sel: rgb(161 255 203 / .12); --pc-sel-line: rgb(161 255 203 / .45);
  --pc-ink: #eef2ef; --pc-ink2: #d6dbd7; --pc-muted: #a9b0ab;
  --pc-line: rgb(238 242 239 / .09); --pc-line2: rgb(238 242 239 / .18);
  --pc-on: #a1ffcb; --pc-on-ink: #142019;
  --pc-shadow: 0 0 0 1px rgb(255 255 255 / .08), 0 30px 60px -30px rgb(0 0 0 / .8);
  --pc-field: radial-gradient(90% 70% at 80% 10%, #2d4a3a 0 30%, transparent 60%), radial-gradient(80% 60% at 10% 100%, #1f2b24 0 35%, transparent 70%), linear-gradient(160deg, #1d2621, #16201b);
}
html[data-theme="dark"][data-ground="sage"] { --ground-bg: #26302a; --ground-surface: #2f3a33; --ground-ink: #e8efe9; --ground-muted: #aab5ac; --ground-accent: #a1ffcb; }
/* without script, follow the device */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --p-bg: #121413; --p-surface: #1b1e1c; --p-ink: #eef2ef; --p-muted: #a9b0ab;
    --p-accent: #a1ffcb; --p-accent-ink: #142019; --p-action: #a1ffcb; --p-action-ink: #142019;
    --pc-card: #1b1e1c; --pc-soft: #242826; --pc-hover: #222624; --pc-sel: rgb(161 255 203 / .12); --pc-sel-line: rgb(161 255 203 / .45);
    --pc-ink: #eef2ef; --pc-ink2: #d6dbd7; --pc-muted: #a9b0ab; --pc-line: rgb(238 242 239 / .09); --pc-line2: rgb(238 242 239 / .18);
    --pc-on: #a1ffcb; --pc-on-ink: #142019;
  }
}
body { background: var(--bg); color: var(--ink); }

/* the switch in the nav: the secondary button's look, 44 x 44 */
.theme-toggle { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 99px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); cursor: pointer; }
.theme-toggle:hover { background: var(--pc-soft); }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (max-width: 1023px) { .nav__actions { display: flex; align-items: center; gap: var(--s-3); } }

/* ---------------------------------------------------------------- scripts */
[lang="ar"] { font-family: "Noto Naskh Arabic", serif; font-weight: 500; }
[lang|="bn"] { font-family: "Noto Sans Bengali", var(--font-text); }
[lang|="ur"] { font-family: "Noto Naskh Arabic", serif; }
[lang="he"] { font-family: "Noto Sans Hebrew", var(--font-text); }
[lang="sa"], [lang|="hi"], [lang|="mr"], [lang="pi"] { font-family: "Noto Sans Devanagari", var(--font-text); }
[lang="pa"] { font-family: "Noto Sans Gurmukhi", var(--font-text); }
[lang="zh"], [lang="zh-CN"] { font-family: "Noto Sans SC", var(--font-text); }
.hero--centred .hero__lead { color: var(--ink); }

/* ---------------------------------------------------------------- hero window */
.hero__window { background: var(--pc-field); }
.nw { background: var(--pc-card); color: var(--pc-ink); border-radius: 16px; overflow: hidden; font: 400 14px/1.4 var(--font-text); box-shadow: var(--pc-shadow); }
.nw__bar { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-bottom: 1px solid var(--pc-line); font-size: 13px; color: var(--pc-muted); }
.nw__bar b { color: var(--pc-ink); font-weight: 500; } .nw__bar .sp { flex: 1; } .nw__bar .mark { width: 18px; height: 18px; }
.nw__body { display: grid; grid-template-columns: 260px 1fr; min-height: 440px; }
.nw__list { list-style: none; margin: 0; padding: 10px; border-right: 1px solid var(--pc-line); display: grid; align-content: start; gap: 2px; }
.nw__row { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; }
.nw__row.is-on { background: var(--pc-sel); box-shadow: inset 0 0 0 1px var(--pc-sel-line); }
.nw__ar { font-size: 22px; line-height: 1.5; text-align: center; }
.nw__nm { font-weight: 500; font-size: 15px; }
.nw__open { padding: 20px 28px; display: grid; align-content: start; gap: 10px; }
.nw__big { margin: 0; font-size: 72px; line-height: 1.35; text-align: left; }
.nw__title { margin: 0; display: flex; align-items: baseline; gap: 12px; font: 500 28px/1.1 var(--font-display); letter-spacing: -0.02em; }
.nw__local { font: 400 20px/1.2 var(--font-text); color: var(--pc-ink2); }
.nw__say { margin: 0; font: 500 18px/1.3 var(--font-mono); } .nw__say span { display: block; font: 500 13px/1.4 var(--font-text); color: var(--pc-muted); }
.nw__fl { margin: 0; font-size: 13px; font-weight: 500; color: var(--pc-muted); }
.nw__mean { margin: 0; font-size: 15px; color: var(--pc-ink2); }
.nw__acts { margin: 4px 0 0; display: flex; gap: 8px; }
.nw__acts span { height: 32px; padding: 0 14px; border-radius: 99px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; background: var(--pc-soft); }
.nw__acts .is-ink { background: var(--pc-on); color: var(--pc-on-ink); } .nw__acts svg { width: 14px; height: 14px; fill: currentColor; }
@media (max-width: 1023px) { .nw__body { grid-template-columns: 1fr; } .nw__list { display: none; } }
@media (max-width: 639px) { .nw__bar .sp ~ span { display: none; } .nw__open { padding: 14px 16px; gap: 6px; } .nw__big { font-size: 52px; } .nw__title { font-size: 22px; } .nw__mean { display: none; } }

/* ---------------------------------------------------------------- app frame (sections-library.md app-frame) */
.app.ui { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); margin-top: var(--s-7); background: var(--pc-card); color: var(--pc-ink); border: 1px solid var(--pc-line2); border-radius: var(--u-r); box-shadow: var(--pc-shadow); }
.app > .app__pane { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.app > .app__pane + .app__pane { border-left: 1px solid var(--pc-line); }
@media (min-width: 1024px) and (max-width: 1279px) { .app.ui { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } }
@media (max-width: 1023px) {
  .app.ui { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .app > .app__pane--list { max-height: 420px; }
  .app > .app__pane + .app__pane { border-left: 0; border-top: 1px solid var(--pc-line); }
}
.names-intro { margin: 0; }

.app__pane--list { display: flex; flex-direction: column; }
.fd__tools { padding: 16px; display: grid; gap: 12px; border-bottom: 1px solid var(--pc-line); }
.fd__search { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border-radius: 99px; background: var(--pc-soft); }
.fd__search:focus-within { outline: 2px solid var(--action); outline-offset: 2px; }
.fd__search svg { width: 16px; height: 16px; fill: none; stroke: var(--pc-muted); stroke-width: 1.6; flex: none; }
.fd__search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; font: 400 16px/1 var(--font-text); color: var(--pc-ink); outline: none; }
.fd__search input::placeholder { color: var(--pc-muted); }
.fd__faith { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 500; color: var(--pc-muted); }
.fd__faith select { flex: 1; height: 48px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--pc-line2); background: var(--pc-card); font: 500 16px/1 var(--font-text); color: var(--pc-ink); }
.fd__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fd__chips button { min-height: 44px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--pc-line2); background: var(--pc-card); font: 500 15px/1 var(--font-text); color: var(--pc-ink); cursor: pointer; }
.fd__chips button[aria-pressed="true"] { background: var(--pc-on); border-color: var(--pc-on); color: var(--pc-on-ink); }
.fd__list { list-style: none; margin: 0; padding: 8px; overflow-y: auto; flex: 1; min-height: 0; overscroll-behavior: contain; }
.fd__row { width: 100%; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 64px; padding: 6px 12px; border: 0; border-radius: 14px; background: transparent; color: inherit; text-align: start; cursor: pointer; font: inherit; }
.fd__row:hover { background: var(--pc-hover); }
.fd__row[aria-pressed="true"] { background: var(--pc-sel); box-shadow: inset 0 0 0 1px var(--pc-sel-line); }
.fd__ar { font-size: 26px; line-height: 1.4; text-align: center; }
.fd__txt { display: grid; min-width: 0; }
.fd__nm { font: 500 16px/1.3 var(--font-text); }
.fd__mn { font-size: 14px; color: var(--pc-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fd__g, .nw__g { font-size: 13px; color: var(--pc-muted); text-align: end; line-height: 1.35; }
.fd__empty { margin: 0; padding: 16px 20px; font-size: 16px; }
.fd__open { padding: 32px 40px 40px; display: grid; align-content: start; gap: 16px; }
.fd__meta { margin: 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; font-size: 13px; font-weight: 500; color: var(--pc-muted); }
.fd__big { margin: 0; font-size: clamp(88px, 9vw, 140px); line-height: 1.4; text-align: left; }
.fd__title { margin: 0; font: var(--display-weight) clamp(30px, 2.4vw, 40px)/1.15 var(--font-display); letter-spacing: -0.02em; }
.fd__local { font: 400 24px/1.2 var(--font-text); color: var(--pc-ink2); }
.fd__facts { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding-top: 16px; border-top: 1px solid var(--pc-line); }
.fd__facts dt { font-size: 13px; font-weight: 500; color: var(--pc-muted); }
.fd__facts dd { margin: 4px 0 0; font-size: 16px; line-height: 1.5; }
.fd__facts div:first-child dd { font: 500 18px/1.4 var(--font-mono); }
.fd__acts { display: flex; flex-wrap: wrap; gap: 12px; }
.fd__acts svg { width: 18px; height: 18px; fill: currentColor; }
.fd__status { margin: 0; min-height: 20px; }
@media (max-width: 1023px) { .fd__open { padding: 24px; } .fd__facts { grid-template-columns: 1fr; gap: 12px; } }
@media (max-width: 639px) {
  #names { --hm: 2; }
  .app > .app__pane--list { max-height: 520px; }
  .fd__tools { padding: 12px; gap: 8px; }
  .fd__row { grid-template-columns: 52px minmax(0, 1fr); }
  .fd__g { display: none; }
  .fd__open { padding: 20px 16px; gap: 12px; }
  .fd__big { font-size: 64px; }
  .fd__acts .btn { flex: 1; }
}

/* ---------------------------------------------------------------- feature cards */
#features .panel { --p-h: 300px; }
@media (max-width: 639px) { #features .panel { --p-h: 180px; } }
.ui-search__ico[lang] { font-size: 16px; width: auto; min-width: 40px; }
.nc-heart svg { width: 14px; height: 14px; fill: currentColor; }

/* the statement moment's sub-line under the type */
#statement .mo-la__sub { max-width: 62ch; }

/* ---------------------------------------------------------------- spelling table */
.sp-frame { background: var(--pc-card); color: var(--pc-ink); border: 1px solid var(--pc-line2); border-radius: var(--r-lg); padding: 8px 24px; }
.sp { width: 100%; border-collapse: collapse; font-size: 16px; }
.sp th { text-align: start; font-size: 13px; font-weight: 500; color: var(--pc-muted); padding: 14px 8px 10px; border-bottom: 1px solid var(--pc-line2); }
.sp td { padding: 8px; border-bottom: 1px solid var(--pc-line); vertical-align: middle; }
.sp tr:last-child td { border-bottom: 0; }
.sp__ar { font-size: 24px; line-height: 1.4; width: 84px; text-align: left; }
.sp__nm { font-weight: 500; }
.sp__also { color: var(--pc-ink2); }
@media (max-width: 639px) { .sp-frame { padding: 4px 12px; } .sp__also { display: none; } .sp { font-size: 15px; } .sp__ar { width: 64px; font-size: 20px; } }

/* ---------------------------------------------------------------- nav menu cards and country cards */
.nc-panel { --p-h: 120px; display: grid; place-content: center; justify-items: center; gap: 2px; background: var(--pc-sel); }
.nc-ar { font-size: 30px; line-height: 1.4; } .nc-name { font: 500 16px/1.2 var(--font-text); }
.ct-grid { list-style: none; margin: 0; padding: 0; row-gap: 24px; }
.ct-card { display: grid; gap: 12px; height: 100%; align-content: start; text-decoration: none; color: inherit; }
.ct-card[aria-current="page"] { box-shadow: inset 0 0 0 2px var(--ink); }
.ct-tile { height: 112px; display: grid; place-content: center; justify-items: center; gap: 2px; border-radius: var(--r-md); background: var(--pc-sel); }
.ct-ar { font-size: 34px; line-height: 1.4; }
.ct-nm { font: 500 18px/1.2 var(--font-text); }
@media (max-width: 1023px) { .ct-grid > li { grid-column: span 6; } }
@media (max-width: 639px) { .ct-tile { height: 88px; } .ct-ar { font-size: 26px; } }

/* gate round 2: the frame is bounded, so its list scrolls inside it and never spills into the next section */
.app.ui { grid-template-rows: minmax(0, 1fr); overflow: hidden; }
.app > .app__pane--list::after { content: ""; position: absolute; inset: auto 0 0 0; height: 48px; background: linear-gradient(transparent, var(--pc-card)); pointer-events: none; }
.fd__list { padding-bottom: 48px; }
@media (max-width: 1023px) {
  .app.ui.fill { flex: none; height: auto; grid-template-rows: auto auto; }
  .app > .app__pane--list { height: 380px; max-height: none; }
}
@media (max-width: 639px) { .app > .app__pane--list { height: 360px; } .fd__big { font-size: 56px; } }
/* reading text in the ink (7:1) */
.names-intro, #statement .mo-la__sub { color: var(--ink); }
/* the hero window's name stays UI-sized, under heading size */
.nw__big { font-size: 38px; line-height: 1.5; }
.ct-tile { height: 96px; }
.ct-grid { row-gap: 16px; }

/* the footer's A to Z of every name */
.footer__az { margin-top: var(--s-7); }
.footer__az h3 { margin: 0 0 var(--s-3); }
.footer__az ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 var(--s-4); }
.footer__az a { display: inline-flex; min-height: 44px; align-items: center; font-size: 15px; }

/* ---------------------------------------------------------------- name and faith pages
   Long reference pages: they grow with their lists instead of holding one screen per section. */
.sub > .section { height: auto; min-height: 0; }
.sub-hero { padding-top: calc(var(--nav) + var(--s-8)); }
.crumbs { margin: 0 0 var(--s-6); color: var(--muted); }
.crumbs a { color: var(--ink); }
.name-card { display: grid; gap: var(--s-5); padding: var(--s-6); }
.name-card__orig { margin: 0; font-size: clamp(72px, 8vw, 128px); line-height: 1.4; text-align: left; }
.faith-group { margin-top: var(--s-8); }
.faith-group h2, .related h2 { margin-bottom: var(--s-5); }
.related { margin-top: var(--s-9); }
.ct-card .t-small { margin: 0; }
.ft-2 { columns: 2; column-gap: var(--s-5); }
@media (max-width: 1023px) { .ct-grid > li.span-2 { grid-column: span 4; } }
@media (max-width: 639px) { .ct-grid > li.span-2, .ct-grid > li.span-3 { grid-column: span 6; } .name-card { padding: var(--s-5); } }
.fd__more { font-size: 15px; }
/* the footer holds the A to Z as well, so it grows with it instead of holding one screen */
.footer.closing:has(.footer__az) { height: auto; min-height: 100svh; }
.footer.closing:has(.footer__az) .close__word { margin-top: var(--s-7); }

/* ---------------------------------------------------------------- blog posts */
.post__body { max-width: 720px; }
.post__body > :is(h1) { font-size: var(--t-h1); margin: var(--s-3) 0 var(--s-5); }
.post__body :is(h2) { margin: var(--s-8) 0 var(--s-4); }
.post__body :is(h3) { margin: var(--s-6) 0 var(--s-3); font-size: var(--t-h3); }
.post__body p, .post__body li { font-size: 18px; line-height: 1.7; }
.post__body p { margin: 0 0 var(--s-4); }
.post__body a:not(.btn) { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.post__meta { margin: 0 0 var(--s-2); }
.post__faq { margin-top: var(--s-8); }
.post__sources { margin-top: var(--s-7); }

/* ---------------------------------------------------------------- shortlist, sign-in, invitations */
.nav-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 99px; background: var(--action); color: var(--action-ink); font: 500 12px/1 var(--font-text); }
.sl-grid { margin-top: var(--s-7); row-gap: var(--s-6); }
.frame.sl-list { display: block; padding: var(--s-4); min-height: 240px; background: var(--pc-card); color: var(--pc-ink); border: 1px solid var(--pc-line2); border-radius: var(--r-lg); }
.sl-items { list-style: none; margin: 0; padding: 0; width: 100%; }
.sl-item { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 12px 8px; border-bottom: 1px solid var(--pc-line); }
.sl-item:last-child { border-bottom: 0; }
.sl-item__orig { font-size: 30px; line-height: 1.4; text-align: center; }
.sl-item__text { display: grid; min-width: 0; }
.sl-item__name { font: 500 18px/1.3 var(--font-text); justify-self: start; }
.sl-item__local { font-size: 16px; color: var(--pc-ink2); }
.sl-item__mean { font-size: 15px; color: var(--pc-muted); }
.sl-badge { padding: 4px 10px; border-radius: 99px; background: var(--pc-soft); font-size: 13px; font-weight: 500; white-space: nowrap; }
.sl-badge.is-both { background: var(--pc-sel); box-shadow: inset 0 0 0 1px var(--pc-sel-line); }
.sl-remove { width: 44px; height: 44px; border: 0; border-radius: 99px; background: transparent; color: var(--pc-muted); font-size: 22px; cursor: pointer; }
.sl-remove:hover { background: var(--pc-soft); color: var(--pc-ink); }
.sl-note, .sl-empty { margin: 0 8px var(--s-3); }
.sl-actions { margin-top: var(--s-5); }
.sl-side { display: grid; gap: var(--s-5); align-content: start; }
.sl-card { padding: var(--s-5); display: grid; gap: var(--s-4); }
.sl-card .form { display: grid; gap: var(--s-3); }
.sl-invite { display: grid; gap: var(--s-3); margin-top: var(--s-4); justify-items: start; }
.sl-qr { width: 200px; height: 200px; border-radius: var(--r-md); background: #fff; padding: 8px; }
.sl-link { width: 100%; height: 48px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--pc-line2); background: var(--pc-card); color: var(--pc-ink); font: 400 14px/1 var(--font-mono); }
.sl-linkbtn { background: none; border: 0; padding: 0; min-height: 44px; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.sl-me { margin: 0; }
@media (max-width: 1023px) { .sl-grid > * { grid-column: 1 / -1; } }
@media (max-width: 639px) { .sl-item { grid-template-columns: 64px minmax(0, 1fr) auto; } .sl-badge { display: none; } .sl-item__orig { font-size: 26px; } .sl-qr { width: 180px; height: 180px; } }

/* ---------------------------------------------------------------- photographs (Pexels) */
/* the hero's frame holds the country's photograph; the product window stands on it */
.hero--centred .hero__window--photo { background: var(--pc-soft); -webkit-mask-image: none; mask-image: none; }
.hero-card--right { left: auto; right: var(--s-5); }
/* one opaque card on the photograph: the name this page opens with */
.hero-card { position: absolute; z-index: 1; left: var(--s-5); bottom: var(--s-5); display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--s-4);
  max-width: min(440px, calc(100% - 2 * var(--s-5))); padding: var(--s-4) var(--s-5); text-align: start; border-radius: var(--r-md);
  background: var(--pc-card); color: var(--pc-ink); box-shadow: var(--pc-shadow); }
.hero-card__orig { font-size: 44px; line-height: 1.3; }
.hero-card__text { display: grid; gap: 2px; min-width: 0; }
.hero-card__name { font: 500 20px/1.2 var(--font-display); letter-spacing: -0.01em; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.hero-card__local { font: 400 16px/1.2 var(--font-text); color: var(--pc-ink2); }
.hero-card__mean { font-size: 15px; line-height: 1.4; color: var(--pc-ink2); }
.hero-card__faith { font-size: 13px; font-weight: 500; color: var(--pc-muted); }
@media (max-width: 639px) { .hero-card, .hero-card--right { left: var(--s-3); right: var(--s-3); bottom: var(--s-3); max-width: none; padding: var(--s-3) var(--s-4); gap: var(--s-3); } .hero-card__orig { font-size: 34px; } .hero-card__mean { display: none; } }
.hero__photo { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; }
.ct-photo { display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--r-md); background: var(--pc-soft); }
.ct-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease, ease); }
.ct-card:hover .ct-photo img { transform: scale(1.03); }
/* a band under a page heading: the faith's photograph, wide on a desktop and squarer on a phone */
.band { margin: var(--s-6) 0 0; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16 / 5; background: var(--pc-soft); }
.band img { width: 100%; height: 100%; object-fit: cover; }
.post__hero { margin: 0 0 var(--s-6); border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16 / 9; background: var(--pc-soft); }
.post__hero img { width: 100%; height: 100%; object-fit: cover; }
.post-card .post-card__img { display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--r-md); margin-bottom: var(--s-3); }
.post-card .post-card__img img { width: 100%; height: 100%; object-fit: cover; }
.credits-line { font-size: 14px; }
.credits-line a { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 639px) { .band { aspect-ratio: 4 / 3; } .post__hero { aspect-ratio: 4 / 3; } }

.post__title { font-size: clamp(32px, 3.4vw + 12px, 56px); margin: 0 0 var(--s-5); }
.post__body table { width: 100%; border-collapse: collapse; margin: 0 0 var(--s-5); font-size: 16px; }
.post__body th { text-align: start; font-size: 13px; font-weight: 500; color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--line-strong); }
.post__body td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.post__body ul, .post__body ol { margin: 0 0 var(--s-4); padding-left: 1.25em; }
.post__body li { margin-bottom: var(--s-2); }
.post__body { overflow-wrap: anywhere; }
@media (max-width: 639px) { .post__body table { display: block; overflow-x: auto; } }
.post-lang { margin: var(--s-6) 0 var(--s-4); font-size: 22px; }
.post__langs { display: flex; gap: var(--s-3); margin: 0 0 var(--s-3); }

/* catalogue name pages (/names/<key>) */
.nn-facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; padding-top: 16px; border-top: 1px solid var(--pc-line); }
.nn-facts dt { font-size: 13px; font-weight: 500; color: var(--pc-muted); }
.nn-facts dd { margin: 4px 0 0; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.nn-latin { font-size: clamp(48px, 7vw, 96px); line-height: 1.15; overflow-wrap: anywhere; }
.nn-script { font-size: 22px; line-height: 1.5; }
.nn-more { margin: 4px 8px 12px; }
.nn-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.nn-people li { padding: 12px 0; border-bottom: 1px solid var(--pc-line); }
.nn-people__name { margin: 0 0 2px; font-weight: 500; font-size: 18px; }
.nn-chips { list-style: none; margin: 0 0 var(--s-6); padding: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.nn-chips li { padding: 4px 0; }
.nn-az { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 8px 20px; }
.nn-az a, .nn-az span { display: inline-block; padding: 4px 0; }
.nn-letters { list-style: none; margin: 0 0 var(--s-6); padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.nn-letters a { display: inline-grid; place-content: center; min-width: 44px; min-height: 44px; padding: 0 12px; border: 1px solid var(--pc-line2); border-radius: var(--r-md); text-decoration: none; font-weight: 500; }
@media (max-width: 639px) { .nn-facts { grid-template-columns: 1fr; } .nn-script { font-size: 20px; } }

.nn-consider { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-6); padding-top: var(--s-6); border-top: 1px solid var(--pc-line); }
.nn-consider h3 { margin: 0; }
.nn-consider h4 { margin: 0 0 var(--s-3); }
.nn-ipa { font: 500 16px/1.4 var(--font-mono); }
.nn-badge { display: inline-block; margin: 0; padding: 6px 14px; border-radius: 999px; background: var(--pc-sel); font-weight: 500; }
@media (max-width: 1023px) { .nn-consider { grid-template-columns: 1fr; gap: var(--s-4); } }

/* yearly rank charts (inline SVG, no JS) and the "also like" list */
.nn-trends { display: grid; gap: var(--s-6); }
.nn-trend { margin: 0; padding: var(--s-5); background: var(--pc-card); border: 1px solid var(--pc-line2); border-radius: var(--r-lg); color: var(--pc-ink); min-width: 0; }
.nn-trend__svg { display: block; width: 100%; max-width: 640px; height: auto; }
.nn-trend__grid { stroke: var(--pc-line); stroke-width: 1; stroke-dasharray: 3 4; }
.nn-trend__axis { stroke: var(--pc-line2); stroke-width: 1; }
.nn-trend__label { fill: var(--pc-muted); font: 500 11px/1 var(--font-mono); }
.nn-trend__line { stroke: var(--pc-ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.nn-trend__dot { fill: var(--pc-card); stroke: var(--pc-ink); stroke-width: 1.5; }
.nn-trend__dot--last { fill: var(--pc-ink); }
.nn-trend figcaption { display: grid; gap: 6px; margin-top: var(--s-4); }
.nn-trend__latest { font-size: 16px; line-height: 1.5; }
.nn-trend__data { margin-top: var(--s-4); }
.nn-trend__data summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 500; }
@media (max-width: 639px) { .nn-trend { padding: var(--s-4); } .nn-trend__label { font-size: 12px; } }

.nn-badge[data-level="unranked"] { background: transparent; border: 1px dashed var(--pc-line2); color: var(--pc-muted); }
.nn-q { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--pc-sel); font-size: 12px; font-weight: 500; white-space: nowrap; }
.nn-q[data-q="coarse"], .nn-q[data-q="estimated"] { background: transparent; border: 1px dashed var(--pc-line2); color: var(--pc-muted); }
.nn-estimated { display: grid; gap: var(--s-3); padding: var(--s-4); border: 1px dashed var(--pc-line2); border-radius: var(--r-lg); }
.nn-estimated h3 { margin: 0; }
@media (max-width: 639px) { .nn-q { font-size: 11px; } }
.nn-estimated, .nn-consider > *, .span-6.start-7 { min-width: 0; }
.nn-estimated .sp-frame { padding: 4px 12px; overflow-x: auto; }
.nn-estimated .sp { font-size: 15px; }
@media (max-width: 639px) { .nn-estimated { padding: var(--s-3); } .nn-estimated .sp-frame { padding: 2px 8px; } .nn-estimated .sp th, .nn-estimated .sp td { padding-left: 4px; padding-right: 4px; } }
.nn-rows { grid-template-columns: 1fr; gap: 2px 0; }
.nn-rows li { padding: 6px 0; border-bottom: 1px solid var(--pc-line); line-height: 1.5; overflow-wrap: anywhere; }
@media (min-width: 900px) { .nn-rows { grid-template-columns: 1fr 1fr; gap: 2px 32px; } }


/* ---------------------------------------------------------------- the calm pass (warm ground, softer edges, phone rhythm) */
html { -webkit-tap-highlight-color: transparent; text-size-adjust: 100%; }
body { font-feature-settings: "ss01", "kern"; -webkit-font-smoothing: antialiased; }
.nav { background: color-mix(in oklab, var(--p-bg) 86%, transparent); -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3); }
.btn--primary { background: var(--p-action); color: var(--p-action-ink); box-shadow: 0 1px 0 rgb(255 255 255 / .18) inset, 0 8px 18px -10px rgb(29 107 88 / .7); }
.btn--secondary { border-color: transparent; background: var(--pc-soft); color: var(--ink); }
.btn--secondary:hover { background: color-mix(in oklab, var(--pc-soft) 82%, var(--ink)); }
.card, .ct-card, .hero__window, .ui.app { box-shadow: var(--pc-shadow); border-color: transparent; }
.hero__window { border-radius: 28px; overflow: hidden; }
.hero-card { background: color-mix(in oklab, var(--pc-card) 92%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-radius: 22px; }
.pill { background: color-mix(in oklab, var(--p-accent) 28%, var(--p-bg)); border-color: transparent; }
::selection { background: color-mix(in oklab, var(--p-accent) 70%, transparent); }

@media (max-width: 639px) {
  .hero--centred h1 { font-size: clamp(36px, 10.4vw, 44px); line-height: 1.04; }
  .hero__lead { font-size: 17px; line-height: 1.55; }
  .hero .btn-row { display: grid; gap: 10px; }
  .hero .btn-row .btn--secondary { width: 100%; justify-content: center; }
  .hero__window { border-radius: 24px; }
  .section { padding-block: 56px; }
  .app__pane--list .fd__list li { min-height: 64px; }
}
@media (max-width: 1023px) {
  .nav { height: auto; min-height: 56px; }
  .nav__logo { font-weight: 600; letter-spacing: -.02em; }
}


/* ---------------------------------------------------------------- the four things a name shows
   Four calm cards on a soft ground with the country's pattern behind each picture, instead of tall painted landscapes.
   The pictures sit centred and keep their own size; nothing is pinned to an edge. */
#features { --h: auto; }
#features > .wrap { display: block; height: auto; }
#features .section-head, #features .group > .section-head { margin-bottom: var(--s-6, 32px); }
#features .grid { row-gap: 20px; margin-bottom: 20px; }
#features .card { display: flex; flex-direction: column; gap: 6px; padding: 28px 28px 20px; border: 0; border-radius: 28px; background: var(--pc-card); box-shadow: var(--pc-shadow); }
#features .card h3 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; margin: 0; }
#features .card p { margin: 0; color: var(--muted); max-width: 46ch; }
#features .card > .panel { position: relative; isolation: isolate; margin: 22px 0 0; height: 320px; border-radius: 20px; overflow: hidden; background: var(--p-surface); display: grid; place-items: center; }
#features .card > .panel::before { content: ""; position: absolute; inset: 0; z-index: -1; color: var(--p-action); opacity: .08; background-image: var(--motif, none); }
#features .panel > .stage { position: static; inset: auto; display: grid; place-items: center; width: 100%; height: 100%; padding: 20px; -webkit-mask: none; mask: none; }
#features .panel > .stage > * { position: static !important; inset: auto !important; transform: none; width: 100%; max-width: 360px; margin: 0; }
#features .panel > .stage .ui { box-shadow: 0 0 0 1px var(--pc-line), 0 18px 36px -22px rgb(20 40 30 / .35); }
#features .panel .dg { width: 100%; height: 100%; }
@media (max-width: 639px) {
  #features .card { padding: 22px 20px 16px; border-radius: 24px; }
  #features .card > .panel { height: 280px; }
}
#features .panel > .stage > * { outline: 0; border: 0; box-shadow: none; background: none; }
