/* michaelnewton.pl - statyczna strona o Newtonie, LBL i regresji */

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

:root {
  --ink: #24312f;
  --ink-strong: #1d2d2a;
  --muted: #5d6966;
  --line: #d3ded6;
  --paper: #ffffff;
  --wash: #f5f7f2;
  --wash-strong: #eef8f4;
  --green: #2f6f63;
  --blue: #496d9d;
  --gold: #b17c35;
  --shadow: 0 12px 30px rgba(34, 55, 48, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 19px;
  line-height: 1.75;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(245, 247, 242, 0.98) 260px),
    var(--wash);
}

body::before {
  content: "";
  display: block;
  height: 6px;
  background: linear-gradient(90deg, #2f6f63, #496d9d, #b17c35);
}

::selection {
  color: #ffffff;
  background: var(--green);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #ffffff;
  border: 2px solid #2f6f63;
  padding: 8px 14px;
  z-index: 10;
}

.skip:focus {
  left: 10px;
  top: 10px;
}

.top,
main,
.foot {
  max-width: 980px;
  margin: 0 auto;
  padding-left: 22px;
  padding-right: 22px;
}

.top {
  margin-top: 14px;
  padding-top: 24px;
  padding-bottom: 18px;
  border: 1px solid #d5ded1;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 10px 26px rgba(42, 62, 56, 0.05);
}

.top .site {
  font-size: 31px;
  line-height: 1.22;
  margin: 0 0 4px;
  letter-spacing: 0;
  font-weight: 700;
}

.top .site a {
  color: #1d2d2a;
  text-decoration: none;
}

.top .tagline {
  margin: 0;
  color: #556662;
  font-size: 17px;
}

nav.menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
  font-size: 16px;
  line-height: 1.35;
}

nav.menu a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid #c8d4cd;
  background: #ffffff;
  color: #244f73;
  text-decoration: none;
  border-radius: 8px;
  box-shadow: 0 2px 0 rgba(36, 49, 47, 0.03);
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease, transform 160ms ease;
}

nav.menu a:hover,
nav.menu a:focus {
  border-color: #2f6f63;
  color: #1f5f55;
  transform: translateY(-1px);
}

nav.menu a.here {
  background: #2f6f63;
  color: #ffffff;
  border-color: #2f6f63;
  font-weight: 700;
}

nav.menu .sep {
  display: none;
}

main {
  padding-top: 24px;
  padding-bottom: 44px;
}

a {
  color: #1d5c94;
}

a:visited {
  color: #6a4b9b;
}

a:hover {
  color: #9b3c1d;
}

.crumbs {
  font-size: 15px;
  color: #64736f;
  margin: 0 0 10px;
}

.crumbs a {
  color: #315c8b;
}

.crumbs .sep {
  color: #8a948f;
  margin: 0 5px;
}

h1 {
  font-size: 38px;
  line-height: 1.18;
  margin: 12px 0 12px;
  color: #1d2d2a;
  letter-spacing: 0;
  text-wrap: balance;
}

h2 {
  font-size: 27px;
  line-height: 1.28;
  margin: 36px 0 12px;
  color: #213f52;
  letter-spacing: 0;
  text-wrap: balance;
}

h3 {
  font-size: 22px;
  line-height: 1.35;
  margin: 24px 0 8px;
  color: #2c4b44;
  letter-spacing: 0;
  text-wrap: balance;
}

p {
  margin: 12px 0;
}

ul,
ol {
  margin: 12px 0;
  padding-left: 28px;
}

li {
  margin: 7px 0;
}

small,
.small {
  font-size: 15px;
  color: #5d6966;
}

.lead {
  font-size: 22px;
  line-height: 1.65;
  color: #31423f;
  text-wrap: pretty;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 28px;
  align-items: start;
  margin: 4px 0 30px;
}

.hero-text {
  min-width: 0;
}

.portrait,
.figure {
  margin: 0;
  border: 1px solid #d3ded6;
  background: #ffffff;
  padding: 10px;
  border-radius: 8px;
}

.portrait img,
.figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.portrait figcaption,
.figure figcaption {
  margin-top: 8px;
  color: #5d6966;
  font-size: 13px;
  line-height: 1.45;
}

.hero .portrait {
  max-width: 230px;
}

.portrait-side {
  max-width: 320px;
  float: right;
  margin: 6px 0 18px 22px;
}

.chapter-menu,
.tiles,
.book-grid,
.week-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.card,
.tile,
.book-card,
.story,
.week,
.toc,
.note,
.seealso,
.cta,
.signature,
.source-box,
.timeline-item {
  border: 1px solid #d3ded6;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.card,
.tile,
.book-card,
.story,
.week,
.source-box,
.timeline-item {
  padding: 16px 18px;
}

.tile h3,
.book-card h3,
.week h3 {
  margin-top: 0;
}

.tile p,
.book-card p,
.week p {
  margin-bottom: 0;
}

.book-card .meta,
.week .meta,
.story .meta {
  color: #66736f;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
}

.post-grid,
.book-shelf {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.post-card,
.book-feature {
  border: 1px solid #d3ded6;
  background: #ffffff;
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
  transition: transform 160ms ease, border-color 160ms ease;
}

.tile,
.book-card,
.week,
.post-card,
.book-feature {
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.tile:hover,
.book-card:hover,
.week:hover,
.post-card:hover,
.book-feature:hover {
  border-color: #b9cfc7;
  transform: translateY(-2px);
}

.post-card h3,
.book-feature h3 {
  margin-top: 0;
}

.post-card p,
.book-feature p {
  margin-bottom: 0;
}

.article-meta,
.source-links {
  color: #66736f;
  font-size: 15px;
}

.source-links a {
  display: inline-block;
  margin-right: 10px;
}

.book-cover {
  display: flex;
  min-height: 210px;
  margin-bottom: 14px;
  padding: 18px;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(145deg, #213f52, #2f6f63);
  flex-direction: column;
  justify-content: space-between;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.book-cover.gold {
  background: linear-gradient(145deg, #6a4b20, #b17c35);
}

.book-cover.blue {
  background: linear-gradient(145deg, #253f74, #496d9d);
}

.book-cover.sage {
  background: linear-gradient(145deg, #31423f, #6d8278);
}

.book-cover .book-title {
  font-size: 24px;
  line-height: 1.18;
  font-weight: 700;
}

.book-cover .book-subtitle {
  font-size: 15px;
  opacity: 0.9;
}

.fb-note {
  border-left: 6px solid #496d9d;
  background: #f0f4fb;
  padding: 14px 18px;
  margin: 22px 0;
  border-radius: 8px;
}

.pull {
  font-size: 23px;
  line-height: 1.55;
  color: #213f52;
  margin: 24px 0;
  padding: 16px 20px;
  border-left: 6px solid #2f6f63;
  background: #eef8f4;
  border-radius: 8px;
}

.kicker {
  color: #2f6f63;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 8px;
}

.hookline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 20px;
}

.hookline span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid #b9cfc7;
  background: #eef8f4;
  border-radius: 999px;
  color: #24443e;
  font-size: 15px;
  font-weight: 700;
}

.note {
  border-left: 6px solid #b17c35;
  background: #fffaf0;
  padding: 12px 18px;
  margin: 22px 0;
}

.cta {
  border-left: 6px solid #2f6f63;
  background: #eef8f4;
  padding: 16px 20px;
  margin: 24px 0;
}

.signature {
  background: #f0f4fb;
  border-left: 6px solid #496d9d;
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 20px;
}

.signature strong {
  color: #213f52;
}

.toc {
  display: block;
  padding: 14px 18px;
  margin: 18px 0 26px;
}

.toc-title {
  font-weight: 700;
  color: #1d2d2a;
  margin-bottom: 4px;
}

.toc ol {
  margin: 6px 0 0;
}

.entries {
  list-style: none;
  padding-left: 0;
}

.entries li {
  margin: 12px 0;
}

.entries a {
  font-weight: 700;
  text-decoration: none;
}

.entries a:hover {
  text-decoration: underline;
}

.entries .desc {
  display: block;
  color: #5d6966;
  font-size: 16px;
  line-height: 1.55;
}

.infobox {
  float: right;
  width: 260px;
  border: 1px solid #d3ded6;
  background: #ffffff;
  margin: 8px 0 18px 22px;
  padding: 12px 14px;
  font-size: 16px;
  line-height: 1.55;
  border-radius: 8px;
}

.infobox .ib-title {
  font-weight: 700;
  text-align: center;
  border-bottom: 1px solid #d3ded6;
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.infobox dl {
  margin: 0;
}

.infobox dt {
  font-weight: 700;
  margin-top: 8px;
}

.infobox dd {
  margin: 0 0 4px;
}

blockquote {
  border-left: 5px solid #d3ded6;
  margin: 18px 0;
  padding: 4px 18px;
  color: #3f4c49;
  background: #ffffff;
}

.quote-block {
  border: 1px solid #d3ded6;
  background: #ffffff;
  border-radius: 8px;
  padding: 14px 18px;
  margin: 18px 0;
}

.quote-block p {
  font-style: italic;
  color: #3f4c49;
  margin: 0 0 6px;
}

.quote-block .src {
  font-style: normal;
  font-size: 14px;
  color: #64736f;
}

.faq details {
  border-bottom: 1px solid #d3ded6;
  padding: 10px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  color: #213f52;
}

table.simple {
  border-collapse: collapse;
  width: 100%;
  margin: 18px 0;
  font-size: 17px;
}

table.simple th,
table.simple td {
  border: 1px solid #cbd8d0;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

table.simple th {
  background: #e8f0ed;
}

.timeline {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.timeline-item strong {
  display: block;
  color: #213f52;
  margin-bottom: 4px;
}

.updated {
  font-size: 14px;
  color: #64736f;
  font-style: italic;
  margin: 28px 0 0;
}

.dots {
  text-align: center;
  color: #79928a;
  letter-spacing: 6px;
  margin: 30px 0;
  font-size: 16px;
}

.bullets li {
  margin: 8px 0;
}

.seealso {
  padding: 14px 18px;
  margin: 24px 0;
}

.backtop {
  font-size: 15px;
  margin: 26px 0 0;
}

.backtop a {
  color: #64736f;
}

footer.foot {
  border-top: 1px solid #d5ded1;
  padding-top: 18px;
  padding-bottom: 44px;
  font-size: 15px;
  color: #5d6966;
}

footer.foot a {
  color: #315c8b;
}

footer.foot .more,
footer.foot .related {
  margin: 0 0 10px;
}

footer.foot .disc {
  margin-top: 12px;
  font-size: 14px;
  color: #64736f;
}

@media (max-width: 760px) {
  body {
    font-size: 20px;
    line-height: 1.72;
  }

  .top,
  main,
  .foot {
    padding-left: 16px;
    padding-right: 16px;
  }

  .top {
    margin-top: 0;
    border-left: 0;
    border-right: 0;
  }

  h1 {
    font-size: 34px;
  }

  h2 {
    font-size: 26px;
  }

  .lead {
    font-size: 21px;
  }

  .hero,
  .chapter-menu,
  .tiles,
  .book-grid,
  .week-grid,
  .post-grid,
  .book-shelf {
    grid-template-columns: 1fr;
  }

  .portrait,
  .hero .portrait {
    max-width: 240px;
  }

  .portrait-side {
    float: none;
    margin: 14px 0;
  }

  nav.menu {
    gap: 7px;
  }

  nav.menu a {
    flex: 1 1 calc(50% - 7px);
    justify-content: center;
    min-height: 46px;
    text-align: center;
  }

  .infobox {
    float: none;
    width: auto;
    margin: 14px 0;
  }

  table.simple {
    display: block;
    overflow-x: auto;
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media (max-width: 420px) {
  body {
    font-size: 19px;
  }

  h1 {
    font-size: 30px;
  }

  h2 {
    font-size: 24px;
  }

  .top .site {
    font-size: 27px;
  }
}

@media print {
  body {
    color: #000;
    background: #fff;
    font-size: 12pt;
  }

  body::before,
  .skip,
  nav.menu,
  .seealso,
  .backtop,
  footer.foot .more,
  footer.foot .related {
    display: none;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  .card,
  .toc,
  .note,
  .tile,
  .quote-block,
  .book-card,
  .story,
  .week,
  .cta,
  .signature {
    border-color: #999;
    background: #fff;
  }
}
