/*
Theme Name: New in Europe
Theme URI: https://newineurope.com
Author: New in Europe editorial team
Description: Design A ("cream & coral"): country map, first-month checklist and topic tiles for newcomers in Poland, Germany and Czechia. Languages uk/en/ru.
Version: 1.0.0
Requires PHP: 8.1
Text Domain: newineurope
*/

:root {
  --ink: #14213d; --ink-2: #3b4763; --muted: #6b7489; --line: #e5e1d8;
  --paper: #faf7f2; --card: #ffffff; --accent: #e4572e; --accent-ink: #b23d19;
  --accent-soft: #fde6dd; --sea: #dfe9f0; --land: #ece7dd; --land-line: #ffffff;
  --ok: #2a9d6f; --on-accent: #ffffff;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f1ede6; --ink-2: #c7cbd6; --muted: #98a0b3; --line: #2b3348;
    --paper: #0f1626; --card: #172036; --accent: #ff7a52; --accent-ink: #ffb199;
    --accent-soft: #3a2420; --sea: #13203a; --land: #223050; --land-line: #0f1626; --ok: #4cc495;
    --on-accent: #1a0f0b;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #f1ede6; --ink-2: #c7cbd6; --muted: #98a0b3; --line: #2b3348;
  --paper: #0f1626; --card: #172036; --accent: #ff7a52; --accent-ink: #ffb199;
  --accent-soft: #3a2420; --sea: #13203a; --land: #223050; --land-line: #0f1626; --ok: #4cc495;
  --on-accent: #1a0f0b;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 Manrope, system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: inherit; }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nie-skip { position: absolute; left: 8px; top: -60px; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 8px; z-index: 50; font-weight: 700; }
.nie-skip:focus { top: 8px; }
.nie-wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.nie-narrow { max-width: 780px; }
.nie-flag { display: inline-block; vertical-align: -0.15em; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }

/* Header */
.nie-top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 88%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nie-top-inner { display: flex; align-items: center; gap: 12px; height: 64px; }
.nie-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; text-decoration: none; font-size: 18px; }
.nie-logo-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); display: grid; place-items: center; color: var(--on-accent); font-size: 15px; }
.nie-spacer { flex: 1; }
.nie-pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 14px; font: 600 14px Manrope, system-ui, sans-serif; color: var(--ink); cursor: pointer; white-space: nowrap; }
.nie-pill:hover { border-color: var(--ink-2); }
.nie-pill-short { display: none; }
.nie-dd { position: relative; }
.nie-dd > summary { list-style: none; }
.nie-dd > summary::-webkit-details-marker { display: none; }
.nie-dd-menu { position: absolute; right: 0; top: calc(100% + 8px); background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 6px; min-width: 220px; box-shadow: 0 12px 32px rgba(0,0,0,.12); list-style: none; margin: 0; z-index: 30; }
.nie-dd-menu a, .nie-dd-menu .is-off { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 9px; font-weight: 600; font-size: 14px; text-decoration: none; }
.nie-dd-menu a:hover, .nie-dd-menu a:focus-visible { background: var(--accent-soft); }
.nie-dd-menu .is-off { color: var(--muted); cursor: default; }
.nie-dd-menu a[aria-current="true"]::after { content: "✓"; color: var(--accent); }
.nie-soon { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }

/* Location hint (JS only) */
.nie-hint { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; font-size: 14px; }
.nie-hint .nie-wrap { display: flex; gap: 12px; align-items: center; min-height: 44px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.nie-hint a { text-decoration: underline; }
.nie-hint-x { all: unset; cursor: pointer; margin-left: auto; font-size: 20px; line-height: 1; padding: 4px 8px; border-radius: 6px; }
.nie-hint-x:focus-visible { outline: 3px solid var(--accent); }

/* Home */
.nie-hero { padding: 48px 16px 16px; }
.nie-eyebrow { font-weight: 700; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .08em; font-size: 13px; margin: 0; }
h1 { font-size: clamp(32px, 5vw, 56px); line-height: 1.05; letter-spacing: -.035em; margin: 10px 0 14px; font-weight: 800; max-width: 14ch; }
.nie-lead { font-size: 18px; color: var(--ink-2); max-width: 56ch; margin: 0; }
.nie-langpick { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 18px; font-weight: 600; color: var(--ink-2); font-size: 14px; }
.nie-map-card { margin-top: 28px; background: var(--sea); border-radius: 28px; position: relative; overflow: hidden; border: 1px solid var(--line); }
.nie-map { display: block; width: 100%; height: auto; }
.nie-map path.c { fill: var(--land); stroke: var(--land-line); stroke-width: .7; }
.nie-map path.c.on { fill: var(--accent); cursor: pointer; transition: fill .15s; }
.nie-map a:hover path.c.on, .nie-map a:focus path.c.on { fill: var(--accent-ink); }
.nie-map a:focus { outline: none; }
.nie-map a:focus-visible path.c.on { stroke: var(--ink); stroke-width: 2.5; }
.nie-map g > path.c:hover { fill: color-mix(in srgb, var(--land) 80%, var(--ink) 20%); }
.nie-map-labels text { font: 800 13px Manrope, system-ui, sans-serif; fill: #fff; pointer-events: none; paint-order: stroke; stroke: rgba(0,0,0,.3); stroke-width: 2px; }
.nie-tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--paper); font-weight: 700; font-size: 13px; padding: 6px 10px; border-radius: 8px; transform: translate(-50%, -130%); white-space: nowrap; opacity: 0; transition: opacity .1s; }
.nie-map-legend { position: absolute; left: 20px; bottom: 18px; display: flex; gap: 14px; font-size: 13px; font-weight: 600; color: var(--ink-2); background: color-mix(in srgb, var(--card) 85%, transparent); padding: 8px 12px; border-radius: 10px; }
.nie-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.nie-sw-on { background: var(--accent); }
.nie-sw-off { background: var(--land); border: 1px solid var(--line); }
.nie-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0 56px; padding: 0; list-style: none; }
.nie-ccard { display: flex; align-items: center; gap: 14px; text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; transition: transform .12s, border-color .12s; min-height: 72px; }
.nie-ccard:hover, .nie-ccard:focus-visible { transform: translateY(-2px); border-color: var(--accent); }
.nie-ccard b { display: block; font-size: 17px; }
.nie-ccard small { color: var(--muted); font-weight: 600; }
.nie-ccard-flag { line-height: 0; }
.nie-arr { margin-left: auto; color: var(--accent-ink); font-weight: 800; }
.nie-soonrow { color: var(--muted); font-size: 14px; font-weight: 600; margin: -36px auto 56px; }

/* Country hub */
.nie-crumbs { font-size: 14px; color: var(--muted); font-weight: 600; margin: 28px 0 0; }
.nie-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.nie-crumbs li + li::before { content: "/"; margin-right: 6px; }
.nie-crumbs a { text-decoration: none; }
.nie-crumbs a:hover { text-decoration: underline; }
.nie-chead { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: 12px 0 12px; }
.nie-chead h1 { margin: 0; max-width: none; display: flex; align-items: center; gap: 14px; }
.nie-hub-lead { margin: 0 0 24px; font-size: 16px; }
.nie-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.nie-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 14px; text-decoration: none; }
.nie-chip:hover { border-color: var(--ink-2); }
.nie-chip[aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.nie-grid2 { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; align-items: start; }
.nie-panel { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 24px; }
.nie-panel h2 { margin: 0 0 4px; font-size: 22px; letter-spacing: -.02em; }
.nie-sub { color: var(--muted); font-size: 14px; font-weight: 600; margin: 0 0 16px; }
.nie-progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 0 0 14px; }
.nie-progress i { display: block; height: 100%; background: var(--ok); width: 0; transition: width .2s; }
.nie-steps { list-style: none; margin: 0; padding: 0; }
.nie-step { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); align-items: flex-start; }
.nie-step input { appearance: none; -webkit-appearance: none; width: 24px; height: 24px; border: 2px solid var(--muted); border-radius: 7px; flex: none; margin: 2px 0 0; cursor: pointer; display: grid; place-items: center; background: var(--card); }
.nie-step input:checked { background: var(--ok); border-color: var(--ok); }
.nie-step input:checked::after { content: "✓"; color: #fff; font-weight: 800; font-size: 14px; }
.nie-step label { cursor: pointer; }
.nie-when { display: block; font-size: 12px; font-weight: 800; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .06em; }
.nie-step b { display: block; }
.nie-step p { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; }
.nie-step p a { font-weight: 700; color: var(--accent-ink); }
.nie-step.is-done b { text-decoration: line-through; color: var(--muted); }
.nie-topics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; list-style: none; margin: 0; padding: 0; }
.nie-topic { display: block; height: 100%; text-decoration: none; border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--paper); }
a.nie-topic:hover, a.nie-topic:focus-visible { border-color: var(--accent); }
.nie-topic.is-off { opacity: .78; }
.nie-ic { font-size: 20px; }
.nie-topic b { display: block; margin-top: 6px; font-size: 15px; }
.nie-topic small { color: var(--muted); font-weight: 600; }
.nie-money { margin-top: 20px; background: var(--ink); color: var(--paper); border-radius: 22px; padding: 24px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.nie-money h2 { margin: 0 0 4px; font-size: 20px; letter-spacing: -.01em; }
.nie-money p { margin: 0; opacity: .85; font-size: 14px; max-width: 60ch; }
.nie-money a { margin-left: auto; background: var(--accent); color: var(--on-accent); text-decoration: none; font-weight: 800; padding: 12px 18px; border-radius: 12px; }
.nie-money a:focus-visible { outline-color: var(--paper); }
.nie-meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13px; font-weight: 600; margin: 20px 0 56px; }
.nie-meta a { color: inherit; }

/* Articles and pages */
.nie-article { margin-top: 12px; }
.nie-article h1 { max-width: none; font-size: clamp(30px, 4.5vw, 46px); }
.nie-article .nie-lead { margin-bottom: 18px; }
.nie-byline { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 14px; font-weight: 600; }
.nie-disclaimer, .nie-status-note { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; padding: 12px 16px; font-size: 14px; color: var(--ink-2); }
.nie-entry { font-size: 17px; line-height: 1.7; }
.nie-entry h2 { font-size: 26px; letter-spacing: -.02em; margin: 36px 0 10px; line-height: 1.2; }
.nie-entry h3 { font-size: 19px; margin: 26px 0 8px; }
.nie-entry a { color: var(--accent-ink); font-weight: 600; }
.nie-entry table { width: 100%; border-collapse: collapse; font-size: 15px; }
.nie-entry th, .nie-entry td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.nie-entry details { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 10px 0; background: var(--card); }
.nie-entry summary { font-weight: 700; cursor: pointer; }
.nie-sources, .nie-others, .nie-team { margin-top: 36px; border-top: 1px solid var(--line); padding-top: 12px; }
.nie-sources a, .nie-others a { color: var(--accent-ink); font-weight: 600; }
.nie-person h3 { margin: 18px 0 0; }
.nie-person .nie-sub { margin: 0 0 4px; }
.nie-go { color: var(--accent-ink); font-weight: 700; }
.nie-sponsored { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.nie-btn { display: inline-block; background: var(--accent); color: var(--on-accent); text-decoration: none; font-weight: 800; padding: 12px 18px; border-radius: 12px; }
.nie-notfound { padding-top: 48px; }

/* Footer */
.nie-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 13px; }
.nie-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.nie-footer-about { margin: 0; max-width: 46ch; }
.nie-footer-col { display: flex; flex-direction: column; gap: 6px; }
.nie-footer-col span { font-weight: 800; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
.nie-footer-col a { text-decoration: none; }
.nie-footer-col a:hover { text-decoration: underline; }
.nie-footer-legal { margin: 20px 0 0; }

@media (max-width: 820px) {
  .nie-grid2 { grid-template-columns: 1fr; }
  .nie-cards { grid-template-columns: 1fr; }
  .nie-map-legend { display: none; }
  .nie-money a { margin-left: 0; }
  .nie-soonrow { margin-top: -40px; }
  .nie-footer-grid { grid-template-columns: 1fr 1fr; }
  .nie-footer-about { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .nie-pill-long { display: none; }
  .nie-pill-short { display: inline; }
  .nie-pill { padding: 8px 11px; }
}
@media (max-width: 420px) {
  .nie-topics { grid-template-columns: 1fr; }
  .nie-logo-text { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
