/*
 * The guides: plain, static pages, served by nginx straight from landing/dist.
 *
 * Static on purpose. A search engine reads them without running a line of
 * JavaScript, they load instantly on a phone, and there is nothing to break.
 * The look follows the landing page: the same night-blue ground, the same
 * green, Archivo for reading and JetBrains Mono for figures.
 */
:root {
  --bg: #070C12; --panel: #0A1119; --card: #0D1620; --line: #16212C; --stroke: #1C2A37;
  --text: #E6EDF3; --body: #C3CFDA; --muted: #8296A8; --faint: #54697D;
  --accent: #3DD9A0; --accent-hi: #6FE8BC; --accent-deep: #1E4A3B; --danger: #EF4E43;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; background: var(--bg); color: var(--body);
  font-family: 'Archivo', system-ui, sans-serif; -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); text-decoration: underline; }

.top {
  max-width: 760px; margin: 0 auto; padding: 22px 20px 0;
  display: flex; align-items: center; gap: 12px;
}
.top img { width: 30px; height: 30px; }
.top .word {
  font-family: 'JetBrains Mono', monospace; font-size: 11.5px; letter-spacing: 2.6px;
  color: var(--accent); font-weight: 700;
}
.top .spacer { flex: 1; }
.top .app {
  font-family: 'JetBrains Mono', monospace; font-size: 11.5px; letter-spacing: 1px;
  border: 1px solid var(--stroke); border-radius: 8px; padding: 7px 12px; color: var(--text);
}
.top .app:hover { border-color: var(--accent); text-decoration: none; }

main { max-width: 760px; margin: 0 auto; padding: 34px 20px 40px; }

.crumbs {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .6px; color: var(--faint);
}
.crumbs a { color: var(--muted); }

h1 {
  margin: 14px 0 0; color: var(--text); font-size: clamp(30px, 6vw, 44px); line-height: 1.08;
  font-weight: 800; letter-spacing: -1px;
}
.lead { margin: 16px 0 0; font-size: 19px; line-height: 1.6; color: var(--muted); }
.meta {
  margin-top: 18px; font-family: 'JetBrains Mono', monospace; font-size: 11px;
  letter-spacing: .8px; color: var(--faint);
}

h2 {
  margin: 46px 0 0; color: var(--text); font-size: 25px; line-height: 1.2;
  font-weight: 800; letter-spacing: -.4px;
}
h3 { margin: 28px 0 0; color: var(--text); font-size: 18px; font-weight: 700; }
p, li { font-size: 17px; line-height: 1.72; }
p { margin: 14px 0 0; }
ul, ol { margin: 14px 0 0; padding-left: 22px; }
li + li { margin-top: 6px; }
strong { color: var(--text); font-weight: 700; }

.formula {
  margin: 18px 0 0; padding: 16px 18px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--stroke);
  font-family: 'JetBrains Mono', monospace; font-size: 15.5px; color: var(--accent-hi);
  overflow-x: auto;
}

.table-wrap { margin: 18px 0 0; overflow-x: auto; border-radius: 12px; border: 1px solid var(--stroke); }
table { width: 100%; border-collapse: collapse; min-width: 520px; background: var(--card); }
th, td { padding: 11px 14px; text-align: left; font-size: 14.5px; border-bottom: 1px solid var(--line); }
th {
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: 1.2px;
  color: var(--faint); font-weight: 500; text-transform: uppercase; background: var(--panel);
}
td.num, th.num { text-align: right; font-family: 'JetBrains Mono', monospace; }
tr:last-child td { border-bottom: none; }
tr.best td { color: var(--text); }
.up { color: var(--accent); } .down { color: var(--danger); }

.note {
  margin: 18px 0 0; padding: 14px 16px; border-left: 3px solid var(--accent);
  background: var(--panel); border-radius: 0 10px 10px 0; font-size: 15.5px; line-height: 1.6;
}

.cta {
  margin: 44px 0 0; padding: 22px 22px; border-radius: 14px;
  background: var(--accent-deep); border: 1px solid var(--accent);
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
}
.cta .copy { flex: 1 1 280px; }
.cta .copy strong { display: block; font-size: 18px; }
.cta .copy span { display: block; margin-top: 4px; font-size: 15px; color: var(--body); }
.cta a.button {
  flex: 0 0 auto; background: var(--accent); color: #04120C; font-weight: 700;
  font-family: 'JetBrains Mono', monospace; font-size: 13px; letter-spacing: 1px;
  padding: 12px 18px; border-radius: 9px;
}
.cta a.button:hover { background: var(--accent-hi); text-decoration: none; }

.fine { margin-top: 30px; font-size: 13px; line-height: 1.6; color: var(--faint); }

.list { margin: 26px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.list li { margin: 0; }
.list a.item {
  display: block; padding: 18px 20px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--stroke);
}
.list a.item:hover { border-color: var(--accent); text-decoration: none; }
.list .title { display: block; color: var(--text); font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.list .desc { display: block; margin-top: 6px; color: var(--muted); font-size: 15.5px; line-height: 1.55; }

footer {
  max-width: 760px; margin: 0 auto; padding: 26px 20px 40px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 10px 18px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .8px; color: var(--faint);
}
footer a { color: var(--muted); }

/*
 * A phone reads a table by wrapping it, not by scrolling it sideways inside a
 * frame. The minimum width above is for a laptop, where it keeps columns tidy.
 */
@media (max-width: 600px) {
  table { min-width: 0; }
  th, td { padding: 9px 10px; font-size: 13.5px; }
  th { font-size: 9.5px; letter-spacing: .6px; }
  p, li { font-size: 16.5px; }
  .lead { font-size: 17.5px; }
}

/* A figure is one unit: "15 000 zł" never breaks across lines. */
td.num, th.num { white-space: nowrap; }

@media (max-width: 600px) {
  /* Headings may wrap; the figures under them may not. */
  th.num { white-space: normal; }
  th { letter-spacing: .3px; }
  td.num { font-size: 12.5px; }
  th, td { padding-left: 7px; padding-right: 7px; }
  /* The parenthesis is said in the text above the table; on a phone it only widens it. */
  .extra { display: none; }
}

/* The same page in the other language, beside the link to the app. */
.top .lang {
  font-family: 'JetBrains Mono', monospace; font-size: 11.5px; letter-spacing: 1px;
  color: var(--muted); padding: 7px 6px;
}
.top .lang:hover { color: var(--accent); text-decoration: none; }

/*
 * The terms and the privacy policy. Numbered clauses read as a document, so
 * they get tighter type than an article and lists that nest cleanly.
 */
.doc h2 { font-size: 21px; margin-top: 40px; }
.doc p, .doc li { font-size: 16px; line-height: 1.68; }
.doc ol, .doc ul { margin-top: 10px; }
.doc li > ol, .doc li > ul { margin-top: 6px; }
.doc .note { font-size: 14.5px; }
.summary {
  margin: 22px 0 0; padding: 16px 20px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--stroke);
}
.summary strong { color: var(--text); }
.summary ul { margin-top: 8px; }
.summary li { font-size: 15.5px; }

/* A detail still to be filled in shows as a gap, not as finished text. */
.fill { color: var(--danger); background: rgba(239, 78, 67, .12); border-radius: 4px; padding: 0 4px; }

/* With a language link beside the app button, a phone keeps the logo and drops the wordmark. */
@media (max-width: 440px) {
  .top .word { display: none; }
}

/*
 * The main guide: long enough to need a table of contents, and the one guide
 * the index leads with.
 */
.guide-main h2 { scroll-margin-top: 20px; }
.toc {
  margin: 30px 0 0; padding: 18px 20px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--stroke);
}
.toc-title {
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: 1.4px; color: var(--faint);
}
.toc ol { margin: 10px 0 0; padding-left: 22px; columns: 2; column-gap: 28px; }
.toc li { font-size: 15.5px; line-height: 1.6; break-inside: avoid; }
.toc li + li { margin-top: 2px; }
@media (max-width: 600px) { .toc ol { columns: 1; } }

.list a.item--main {
  border-color: var(--accent-deep);
  background: linear-gradient(135deg, rgba(61, 217, 160, .10), rgba(61, 217, 160, 0) 60%), var(--card);
}
.list .kicker {
  display: block; margin-bottom: 6px; font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px; letter-spacing: 1.4px; color: var(--accent);
}
.list a.item--main .title { font-size: 23px; }
