/* grzegorzgawlik.pl — one stylesheet, no framework, no build step, no external
   fonts, no JS. Referenced by every page as /assets/style.css.

   Design notes: this is a reading site for people who arrived from a search
   result with one question. So the measure is narrow, the type is large, and
   photographs are allowed to break out of the measure because on a travel site
   they carry as much of the answer as the prose does. */

:root {
  --ink:        #16181c;
  --ink-soft:   #4a4e57;
  --ink-faint:  #7c818b;
  --bg:         #fffefb;
  --bg-soft:    #f5f3ee;
  --bg-sink:    #ece8e0;
  --rule:       #e3ded4;
  --rule-soft:  #efebe3;
  --accent:     #1f5f4b;
  --accent-ink: #144536;
  --accent-bg:  #e8f2ee;
  --warn-bg:    #fdf4e7;
  --warn-rule:  #e3b877;

  --measure: 40rem;   /* reading column  */
  --wide:    68rem;   /* header/footer   */
  --bleed:   50rem;   /* figures + tables break out to here */

  --step-0: 1.0625rem;
  --step-1: 1.1875rem;
  --step-2: 1.4375rem;
  --step-3: 1.875rem;
  --step-4: 2.375rem;

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e9e7e2; --ink-soft: #b3b0a8; --ink-faint: #8b8880;
    --bg: #16171a; --bg-soft: #1e2024; --bg-sink: #26282d;
    --rule: #33363c; --rule-soft: #2a2d32;
    --accent: #7fc3ab; --accent-ink: #a8dcc7; --accent-bg: #1c2f2a;
    --warn-bg: #2c2519; --warn-rule: #7a5f34;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: var(--step-0)/1.7 var(--serif);
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent); text-underline-offset: .16em;
    text-decoration-thickness: .06em; }
a:hover { color: var(--accent-ink); }

/* ------------------------------------------------------------------ header */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: saturate(1.4) blur(6px);
}
.site-header .wrap-wide {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .35rem 2rem; padding-top: .85rem; padding-bottom: .85rem;
}
.brand {
  font-family: var(--sans); font-weight: 650; font-size: 1.0625rem;
  letter-spacing: -.015em; color: var(--ink); text-decoration: none;
}
.brand:hover { color: var(--accent); }
.nav { display: flex; gap: 1.35rem; flex-wrap: wrap; }
.nav a {
  font-family: var(--sans); font-size: .8125rem; font-weight: 500;
  letter-spacing: .01em; color: var(--ink-soft); text-decoration: none;
}
.nav a:hover { color: var(--accent); }

/* Mobile menu toggle. Checkbox + label, because the spec forbids JavaScript --
   so the open/closed state has to live somewhere the browser tracks for us.
   Both are hidden above the breakpoint; the rules that show them are in the
   responsive block at the bottom of this file. */
.nav-toggle { position: absolute; opacity: 0; width: 0; height: 0; }
.nav-toggle-label { display: none; }

/* ------------------------------------------------------------------ crumbs */
.crumbs {
  font-family: var(--sans); font-size: .78125rem; color: var(--ink-faint);
  margin: 1.75rem 0 0; letter-spacing: .01em;
}
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }

/* ------------------------------------------------------------------ article */
article { padding-bottom: 3rem; }

h1 {
  font-size: var(--step-4); line-height: 1.12; letter-spacing: -.022em;
  font-weight: 700; margin: .6em 0 .3em; text-wrap: balance;
}
h2 {
  font-size: var(--step-2); line-height: 1.25; letter-spacing: -.014em;
  font-weight: 680; margin: 2.4em 0 .5em; text-wrap: balance;
}
h3 {
  font-family: var(--sans); font-size: var(--step-1); line-height: 1.3;
  letter-spacing: -.008em; font-weight: 620; margin: 1.9em 0 .45em;
  color: var(--ink);
}
h2 + h3 { margin-top: 1.2em; }

p { margin: 0 0 1.15em; }
article > p a, li a { font-weight: 500; }

.dek {
  font-size: var(--step-1); line-height: 1.5; color: var(--ink-soft);
  margin: 0 0 1.5em; text-wrap: pretty;
}
.byline {
  font-family: var(--sans); font-size: .8125rem; color: var(--ink-faint);
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
  padding: .7rem 0; margin: 0 0 2.2em;
}
.byline a { color: var(--ink-soft); text-decoration: none; font-weight: 500; }
.byline a:hover { color: var(--accent); text-decoration: underline; }

strong { font-weight: 680; }

/* ------------------------------------------------------------------ figures
   Photographs break out past the reading measure. On a travel page the picture
   is part of the answer, not decoration, so it gets room. */
figure {
  margin: 2.2em auto; max-width: var(--bleed);
  width: 100%;
}
figure img, article > img, .hero img {
  display: block; width: 100%; height: auto;
  border-radius: 3px; background: var(--bg-soft);
}
figcaption {
  font-family: var(--sans); font-size: .8125rem; line-height: 1.5;
  color: var(--ink-faint); margin-top: .6rem; padding-left: .1rem;
  border-left: 2px solid var(--rule); padding-left: .7rem;
}
figure.wide { max-width: var(--wide); }
figure.inline { max-width: var(--measure); }

.hero { margin: 1.4rem auto 0; max-width: var(--bleed); }
.hero img { border-radius: 4px; }

.figure-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: .9rem;
  max-width: var(--bleed); margin: 2.2em auto;
}
.figure-grid figure { margin: 0; }
@media (max-width: 34rem) { .figure-grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ lists */
ul, ol { margin: 0 0 1.3em; padding-left: 1.35em; }
li { margin-bottom: .5em; }
li::marker { color: var(--ink-faint); }

/* Scan block: the short bullet list that follows an H3 intro. */
.scan {
  background: var(--bg-soft); border: 1px solid var(--rule-soft);
  border-radius: 4px; padding: 1.1rem 1.3rem .9rem 2.4rem;
  margin: 1.5em 0; font-family: var(--sans); font-size: .9375rem;
  line-height: 1.6;
}
.scan li { margin-bottom: .55em; }

blockquote {
  margin: 1.9em 0; padding: 1rem 1.3rem;
  background: var(--warn-bg); border-left: 3px solid var(--warn-rule);
  border-radius: 0 4px 4px 0;
  font-family: var(--sans); font-size: .9375rem; line-height: 1.6;
  color: var(--ink-soft);
}
blockquote p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------ tables */
.table-wrap {
  overflow-x: auto; margin: 2em auto; max-width: var(--bleed);
  border: 1px solid var(--rule); border-radius: 4px;
  -webkit-overflow-scrolling: touch;
}
table {
  border-collapse: collapse; width: 100%;
  font-family: var(--sans); font-size: .90625rem; line-height: 1.5;
}
thead th {
  background: var(--bg-sink); text-align: left; font-weight: 620;
  font-size: .8125rem; letter-spacing: .02em; text-transform: uppercase;
  color: var(--ink-soft); padding: .7rem .95rem; white-space: nowrap;
}
td, tbody th { padding: .7rem .95rem; border-top: 1px solid var(--rule-soft);
               vertical-align: top; text-align: left; }
tbody tr:nth-child(even) { background: color-mix(in srgb, var(--bg-soft) 55%, transparent); }

/* ------------------------------------------------------------------ FAQ */
.faq { margin: 2.6em 0 0; }
.faq > h2 { margin-bottom: .6em; }
.faq details {
  border-top: 1px solid var(--rule-soft);
  padding: .1rem 0;
}
.faq details:last-of-type { border-bottom: 1px solid var(--rule-soft); }
.faq summary {
  font-family: var(--sans); font-weight: 580; font-size: .9875rem;
  cursor: pointer; list-style: none; padding: .85rem 2rem .85rem 0;
  position: relative; color: var(--ink);
}
.faq summary:hover { color: var(--accent); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: .35rem; top: 1.25rem;
  width: .55rem; height: .55rem; border-right: 2px solid var(--ink-faint);
  border-bottom: 2px solid var(--ink-faint); transform: rotate(45deg);
  transition: transform .15s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 1.45rem; }
.faq details > p { margin: -.15em 0 1.1em; font-size: .96875rem;
                   color: var(--ink-soft); padding-right: 1rem; }

/* ------------------------------------------------------------------ related */
.related {
  margin: 3rem 0 0; padding: 1.6rem 0 0; border-top: 2px solid var(--rule);
}
.related h2 {
  font-family: var(--sans); font-size: .78125rem; font-weight: 640;
  letter-spacing: .09em; text-transform: uppercase; color: var(--ink-faint);
  margin: 0 0 1rem;
}
.related ul { list-style: none; padding: 0; margin: 0; }
.related li { margin-bottom: .7em; line-height: 1.45; }
.related a { font-family: var(--sans); font-size: .96875rem; font-weight: 540;
             text-decoration: none; }
.related a:hover { text-decoration: underline; }
.related .gloss { color: var(--ink-faint); font-family: var(--sans);
                  font-size: .875rem; }

/* ------------------------------------------------------------------ pager */
.pager {
  display: flex; gap: 1rem; margin: 2.5rem 0 0;
  padding-top: 1.4rem; border-top: 1px solid var(--rule-soft);
  font-family: var(--sans);
}
.pager a {
  text-decoration: none; max-width: 47%; font-size: .9375rem;
  font-weight: 540; line-height: 1.4;
}
.pager .next { text-align: right; margin-left: auto; }
.pager .label {
  display: block; font-size: .75rem; letter-spacing: .05em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: .25rem;
  font-weight: 600;
}

/* ------------------------------------------------------------------ hubs */
.hub-intro { margin-bottom: 2.5rem; }
.spokes { list-style: none; padding: 0; margin: 0; display: grid; gap: .1rem; }
.spokes li {
  border-top: 1px solid var(--rule-soft); padding: 1rem 0;
}
.spokes li:last-child { border-bottom: 1px solid var(--rule-soft); }
.spokes a {
  font-family: var(--sans); font-size: 1.03125rem; font-weight: 590;
  text-decoration: none; line-height: 1.35; display: inline-block;
}
.spokes a:hover { text-decoration: underline; }
.spokes .gloss {
  display: block; color: var(--ink-faint); font-family: var(--sans);
  font-size: .875rem; line-height: 1.5; margin-top: .2rem;
}

.silo-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem; margin: 2rem 0 0; padding: 0; list-style: none;
}
.silo-card {
  border: 1px solid var(--rule); border-radius: 5px; padding: 1.15rem 1.25rem;
  background: var(--bg-soft);
}
.silo-card a {
  font-family: var(--sans); font-weight: 620; font-size: 1.03125rem;
  text-decoration: none; letter-spacing: -.008em;
}
.silo-card a:hover { text-decoration: underline; }
.silo-card .count {
  display: block; font-family: var(--sans); font-size: .8125rem;
  color: var(--ink-faint); margin-top: .3rem;
}

.notice {
  background: var(--accent-bg); border: 1px solid var(--rule);
  border-radius: 4px; padding: .9rem 1.15rem; margin: 1.5em 0;
  font-family: var(--sans); font-size: .9375rem; color: var(--ink-soft);
}

/* ------------------------------------------------------------------ footer */
.site-footer {
  border-top: 1px solid var(--rule); background: var(--bg-soft);
  margin-top: 4rem; padding: 2.2rem 0 2.6rem;
  font-family: var(--sans); font-size: .875rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin-bottom: .8rem; }
.footer-links a { color: var(--ink-soft); text-decoration: none; font-weight: 500; }
.footer-links a:hover { color: var(--accent); text-decoration: underline; }
.footer-meta { color: var(--ink-faint); font-size: .8125rem; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 46rem) {
  :root { --step-4: 1.9375rem; --step-3: 1.625rem; --step-2: 1.3125rem; }
  body { font-size: 1.0625rem; }
  .site-header { position: static; }
  figure, .table-wrap, .hero, .figure-grid { max-width: 100%; }

  /* Header becomes: brand left, hamburger right, menu on its own row.
     Without this the nav wrapped to four cramped lines under the brand and
     ate most of the first screen. */
  .site-header .wrap-wide { flex-wrap: wrap; gap: 0; }
  .brand { flex: 1 1 auto; }

  .nav-toggle-label {
    display: block; flex: 0 0 auto; cursor: pointer;
    width: 2.75rem; height: 2.75rem;          /* 44px tap target */
    margin-right: -.6rem;                      /* optical alignment to edge */
    position: relative;
  }
  .nav-bars, .nav-bars::before, .nav-bars::after {
    position: absolute; left: .625rem; width: 1.5rem; height: 2px;
    background: var(--ink); border-radius: 2px; content: "";
    transition: transform .18s ease, opacity .18s ease;
  }
  .nav-bars { top: 1.375rem; margin-top: -1px; }
  .nav-bars::before { top: -.4375rem; }
  .nav-bars::after  { top:  .4375rem; }

  /* Open state: middle bar out, outer two crossed. */
  .nav-toggle:checked + .nav-toggle-label .nav-bars { background: transparent; }
  .nav-toggle:checked + .nav-toggle-label .nav-bars::before { transform: translateY(.4375rem) rotate(45deg); }
  .nav-toggle:checked + .nav-toggle-label .nav-bars::after  { transform: translateY(-.4375rem) rotate(-45deg); }

  /* Keyboard users get a visible ring on the label, since the input itself
     is visually hidden. */
  .nav-toggle:focus-visible + .nav-toggle-label {
    outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px;
  }

  .nav {
    display: none; flex-basis: 100%; flex-direction: column; gap: 0;
    border-top: 1px solid var(--rule); margin-top: .8rem;
  }
  .nav-toggle:checked ~ .nav { display: flex; }
  .nav a {
    display: block; padding: .8rem .1rem; font-size: .9375rem;
    border-bottom: 1px solid var(--rule);
  }
  .nav a:last-child { border-bottom: 0; }
}
@media print {
  .site-header, .nav-toggle-label, .pager, .related, .site-footer { display: none; }
  body { font-size: 11pt; }
  .faq details { display: block; }
}
