/* ==========================================================================
   Europa Kontor Guide — design system
   Concept: editorial European country guide (magazine register)
   Palette: warm cream ground, deep forest green, ochre signal, brick rule
   Type: Fraunces (display) + Public Sans (text)
   ========================================================================== */

:root {
  --ground: #faf6ef;
  --ground-2: #f2ece1;
  --paper: #ffffff;
  --ink: #1d2320;
  --ink-2: #4c554f;
  --ink-3: #7b857e;
  --rule: #e0d8c9;
  --rule-2: #c9bfab;
  --forest: #14453a;
  --forest-2: #0d3028;
  --forest-tint: #e5efea;
  --ochre: #b06a1a;
  --ochre-tint: #fbf0dd;
  --brick: #8a3b2a;
  --wrap: 1240px;
  --display: "Fraunces", "Playfair Display", Georgia, serif;
  --text: "Public Sans", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0125rem;
  line-height: 1.7;
}

img { max-width: 100%; height: auto; }
a { color: var(--forest); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--brick); }
:focus-visible { outline: 3px dashed var(--ochre); outline-offset: 3px; }

.skip-link { position: absolute; left: -9999px; background: var(--forest); color: #fff; padding: .7rem 1rem; z-index: 50; }
.skip-link:focus { left: .75rem; top: .75rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.4rem; }

/* ---------- Masthead ---------- */

.masthead { background: var(--ground); border-bottom: 1px solid var(--rule-2); }
.masthead .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; padding-top: 1.4rem; padding-bottom: 1.4rem; }
.brand { display: flex; align-items: center; gap: .85rem; text-decoration: none; color: inherit; }
.brand-mark { width: 46px; height: 46px; }
.brand-text { display: flex; flex-direction: column; }
.brand-title { font-family: var(--display); font-size: 1.55rem; font-weight: 600; font-variation-settings: "SOFT" 40, "WONK" 1; letter-spacing: -.01em; line-height: 1.05; }
.brand-sub { font-family: var(--text); font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ochre); margin-top: .18rem; }
.masthead-role { font-size: .82rem; color: var(--ink-2); max-width: 34ch; line-height: 1.45; border-left: 2px solid var(--ochre); padding-left: .8rem; }
.masthead-role strong { color: var(--ink); }

/* ---------- Nav ---------- */

.nav { background: var(--forest); }
.nav .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem; }
.nav a {
  color: #d9e7e1;
  text-decoration: none;
  font-size: .84rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .8rem .9rem;
  font-weight: 500;
}
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .09); }
.nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -3px 0 var(--ochre); }
.nav .nav-utility { margin-left: auto; }

.breadcrumb { font-size: .78rem; color: var(--ink-3); padding: 1rem 0 0; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "›"; margin-right: .4rem; color: var(--rule-2); }
.breadcrumb a { color: var(--ink-3); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- Type ---------- */

h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.16; color: var(--ink); margin: 0 0 .5em; }
h1 { font-size: clamp(2.05rem, 1.3rem + 2.6vw, 3.4rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 1.15rem + 1.3vw, 2.1rem); margin-top: 2.3rem; }
h3 { font-size: 1.24rem; margin-top: 1.6rem; }
h4 { font-size: 1.02rem; margin-top: 1.3rem; font-family: var(--text); font-weight: 700; }
p { margin: 0 0 1.05em; }
.lede { font-family: var(--display); font-size: 1.32rem; line-height: 1.5; color: var(--ink-2); font-variation-settings: "SOFT" 30; }
.eyebrow { font-family: var(--text); font-size: .72rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--ochre); margin: 0 0 .7rem; }
.meta-line { font-size: .8rem; color: var(--ink-3); }
.small { font-size: .92rem; }
hr { border: 0; border-top: 1px solid var(--rule-2); margin: 2.6rem 0; }
blockquote { margin: 1.8rem 0; padding: 0 0 0 1.4rem; border-left: 4px solid var(--ochre); font-family: var(--display); font-size: 1.16rem; line-height: 1.55; color: var(--forest); }
ul, ol { padding-left: 1.3rem; margin: 0 0 1.1em; }
li { margin-bottom: .45em; }

.dropcap::first-letter {
  font-family: var(--display);
  font-size: 3.5rem;
  line-height: .82;
  float: left;
  padding: .12em .16em 0 0;
  color: var(--forest);
  font-weight: 600;
}

/* ---------- Hero ---------- */

.hero { background: var(--ground-2); border-bottom: 1px solid var(--rule-2); position: relative; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 5px; background: linear-gradient(90deg, var(--forest) 0 33%, var(--ochre) 33% 66%, var(--brick) 66% 100%); }
.hero .wrap { padding-top: 3rem; padding-bottom: 3.2rem; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 3rem; align-items: end; }
.hero-role { background: var(--paper); border: 1px solid var(--rule); padding: 1.2rem 1.3rem; font-size: .92rem; color: var(--ink-2); }
.hero-role strong { display: block; font-family: var(--text); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ochre); margin-bottom: .5rem; }

.index-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--rule-2); border-bottom: 1px solid var(--rule-2); background: var(--paper); }
.index-cell { padding: 1rem 1.2rem; border-right: 1px solid var(--rule); }
.index-cell:last-child { border-right: 0; }
.index-cell b { display: block; font-family: var(--display); font-size: 1.55rem; color: var(--forest); }
.index-cell span { font-size: .74rem; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-3); }

/* ---------- Section machinery ---------- */

section { padding: 2.6rem 0; }
.section-head { border-bottom: 2px solid var(--ink); padding-bottom: .55rem; margin-bottom: 1.6rem; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; align-items: baseline; justify-content: space-between; }
.section-head h2 { margin: 0; }
.section-head .section-note { font-size: .82rem; color: var(--ink-3); }

/* ---------- Country list (typographic, not cards) ---------- */

.country-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule-2); }
.country-list > li { margin: 0; border-bottom: 1px solid var(--rule); }
.country-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) 250px 150px; gap: 1.2rem; align-items: center; padding: 1.05rem .4rem; text-decoration: none; color: inherit; }
.country-row:hover { background: var(--paper); }
.country-num { font-family: var(--display); font-size: 1.7rem; color: var(--ochre); line-height: 1; }
.country-name { font-family: var(--display); font-size: 1.32rem; }
.country-name small { display: block; font-family: var(--text); font-size: .78rem; color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; margin-top: .15rem; }
.country-facts { font-size: .86rem; color: var(--ink-2); }
.country-cta { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--forest); text-align: right; }

/* ---------- Editorial blocks ---------- */

.feature { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.article-card { border-top: 3px solid var(--forest); padding-top: .9rem; }
.article-card h3 { margin: 0 0 .35rem; font-size: 1.2rem; }
.article-card p { color: var(--ink-2); font-size: .95rem; }
.article-card .kicker { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ochre); margin-bottom: .4rem; }

.note { background: var(--paper); border: 1px solid var(--rule); padding: 1.1rem 1.2rem; font-size: .94rem; color: var(--ink-2); }
.note-warm { background: var(--ochre-tint); border-color: #e6ceA4; }
.note-ok { background: var(--forest-tint); border-color: #b7d2c6; }
.note p:last-child { margin-bottom: 0; }

/* ---------- Table ---------- */

.table-scroll { overflow-x: auto; border: 1px solid var(--rule-2); background: var(--paper); }
table.gtable { border-collapse: collapse; width: 100%; min-width: 980px; font-size: .89rem; }
table.gtable caption { text-align: left; padding: .8rem 1rem; font-size: .82rem; color: var(--ink-3); }
table.gtable th, table.gtable td { padding: .7rem .85rem; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
table.gtable thead th { background: var(--forest); color: #fff; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; position: sticky; top: 0; }
table.gtable tbody tr:nth-child(even) { background: #fdfbf7; }
table.gtable tbody tr:hover { background: var(--forest-tint); }
table.gtable tbody tr:target { background: var(--ochre-tint); }
.p-name { font-family: var(--display); font-size: 1.02rem; display: block; }
.p-meta { font-size: .77rem; color: var(--ink-3); }
.tag { display: inline-block; font-size: .72rem; padding: .1rem .5rem; border: 1px solid var(--rule-2); background: var(--ground-2); color: var(--ink-2); margin: 0 .25rem .25rem 0; border-radius: 2px; }
.tag-green { background: var(--forest-tint); border-color: #b7d2c6; color: var(--forest); }
.tag-ochre { background: var(--ochre-tint); border-color: #e6cea4; color: #7d4a10; }

/* ---------- Filters (editorial drawer) ---------- */

.filters { background: var(--paper); border: 1px solid var(--rule-2); padding: 1.2rem; }
.filters h2, .filters h3 { margin-top: 0; }
.filters fieldset { border: 0; padding: 0; margin: 0 0 1.1rem; }
.filters legend { font-size: .73rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--forest); margin-bottom: .5rem; }
.filters label.check { display: flex; gap: .5rem; align-items: flex-start; font-size: .88rem; color: var(--ink-2); margin-bottom: .3rem; }
.filters select, .filters input[type="search"] { width: 100%; padding: .55rem .6rem; border: 1px solid var(--rule-2); background: var(--ground); font-family: var(--text); font-size: .9rem; color: var(--ink); }
.filter-actions { display: flex; flex-wrap: wrap; gap: .55rem; border-top: 1px solid var(--rule); padding-top: .9rem; }
.result-count { font-size: .9rem; color: var(--ink-2); }
.filter-toggle { display: none; }

/* ---------- Buttons ---------- */

.btn { display: inline-flex; align-items: center; gap: .45rem; font-family: var(--text); font-size: .86rem; font-weight: 600; padding: .6rem 1.05rem; border: 1px solid var(--forest); background: var(--forest); color: #fff; text-decoration: none; cursor: pointer; border-radius: 0; }
.btn:hover { background: var(--forest-2); color: #fff; }
.btn-outline { background: transparent; color: var(--forest); }
.btn-outline:hover { background: var(--forest-tint); color: var(--forest-2); }
.btn-ochre { background: var(--ochre); border-color: var(--ochre); }
.btn-ochre:hover { background: #945714; }
.btn-sm { padding: .38rem .7rem; font-size: .78rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: .55rem; }

/* ---------- Provider profile ---------- */

.profile-header { background: var(--ground-2); border-top: 4px solid var(--forest); padding: 1.8rem 0 1.6rem; }
.profile-cols { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 2.6rem; align-items: start; }
.spec { display: grid; grid-template-columns: minmax(150px, 210px) minmax(0, 1fr); border-top: 1px solid var(--rule-2); font-size: .94rem; }
.spec dt { padding: .65rem 1rem .65rem 0; border-bottom: 1px solid var(--rule); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.spec dd { margin: 0; padding: .65rem 0; border-bottom: 1px solid var(--rule); }
.aside-card { background: var(--paper); border: 1px solid var(--rule-2); padding: 1.2rem; font-size: .9rem; }
.aside-card h2 { font-family: var(--text); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ochre); margin: 0 0 .7rem; }
.aside-card dl { margin: 0; }
.aside-card dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin-top: .75rem; }
.aside-card dd { margin: .15rem 0 0; overflow-wrap: break-word; }
.only-note { border-left: 4px solid var(--brick); background: var(--paper); padding: .85rem 1rem; font-size: .86rem; color: var(--brick); }

/* ---------- Shortlist ---------- */

.shortlist { border: 1px solid var(--rule-2); background: var(--paper); }
.shortlist header { background: var(--forest); color: #fff; padding: .75rem 1rem; font-size: .86rem; display: flex; gap: 1rem; justify-content: space-between; align-items: center; }
.shortlist ul { list-style: none; margin: 0; padding: .6rem 1rem; font-size: .88rem; }
.shortlist li { display: flex; justify-content: space-between; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid var(--rule); margin: 0; }
.shortlist li:last-child { border-bottom: 0; }
.shortlist .empty { padding: 1rem; color: var(--ink-3); font-size: .88rem; margin: 0; }

/* ---------- Article + sidebar ---------- */

.article-wrap { display: grid; grid-template-columns: 230px minmax(0, 1fr) 260px; gap: 2.4rem; align-items: start; padding-top: 2rem; }
.article-wrap > .prose { max-width: 74ch; }
.sticky { position: sticky; top: 1.2rem; }
.toc { font-size: .88rem; border-left: 2px solid var(--rule-2); padding-left: 1rem; }
.toc h2 { font-family: var(--text); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 .6rem; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; margin-bottom: .5rem; }
.toc a { text-decoration: none; color: var(--ink-2); }
.toc a::before { content: counter(toc) ". "; color: var(--ochre); }
.toc a:hover { color: var(--forest); text-decoration: underline; }

.question-list { list-style: none; padding: 0; }
.question-list li { border-left: 3px solid var(--rule-2); padding: .2rem 0 .2rem 1rem; margin-bottom: .9rem; }
.question-list li b { display: block; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ochre); }

/* ---------- Footer ---------- */

.site-footer { background: var(--forest-2); color: #bcd3c9; padding: 2.8rem 0 1.4rem; margin-top: 3.4rem; font-size: .87rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 2.2rem; }
.site-footer h2 { font-family: var(--text); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: #fff; margin: 0 0 .75rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .4rem; }
.site-footer a { color: #bcd3c9; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .brand-title { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: .7rem; margin-bottom: .8rem; }
.footer-legal { border-top: 1px solid #1f4a3f; margin-top: 2.2rem; padding-top: 1rem; color: #93aea3; font-size: .8rem; display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; justify-content: space-between; }
.footer-legal p { margin: 0; max-width: 72ch; }

/* ---------- Misc ---------- */

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.source-line { font-size: .8rem; color: var(--ink-3); }
.source-line a { color: var(--forest); }
.updated { font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.faq dt { font-family: var(--display); font-size: 1.1rem; margin-top: 1.4rem; }
.faq dd { margin: .35rem 0 0; color: var(--ink-2); }
.empty-state { border: 1px dashed var(--rule-2); background: var(--paper); padding: 1.5rem; text-align: center; color: var(--ink-3); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.6rem; }

@media (max-width: 1000px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .article-wrap { grid-template-columns: minmax(0, 1fr); }
  .profile-cols { grid-template-columns: minmax(0, 1fr); }
  .index-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .country-row { grid-template-columns: 54px minmax(0, 1fr) 140px; }
  .country-facts { display: none; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 660px) {
  .filter-toggle { display: inline-flex; }
  .filters { display: none; }
  .filters.is-open { display: block; }
  .country-row { grid-template-columns: 44px minmax(0, 1fr); }
  .country-cta { grid-column: 2; text-align: left; }
  .spec { grid-template-columns: minmax(0, 1fr); }
  .spec dt { border-bottom: 0; padding-bottom: 0; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
}
