/* dziecko.haczewski.pl — cieplejsza odmiana rodziny stron (krem, morela, śliwka), bez dziecięcej przesady */
@font-face { font-family: Inter; src: url(fonty/inter.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: Cardo; src: url(fonty/cardo-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Cardo; src: url(fonty/cardo-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
	--tekst: #3a2f38; --szary: #75666f; --krem: #fbf6f1; --krem2: #f5ebe2; --linia: #ecdfd4;
	--akcent: #d9776a; --akcent-ciemny: #b85a4e; --szalwia: #8fb5a3; --lawenda: #b9a6d6;
}
* { box-sizing: border-box; }
html { background: var(--krem); }
body { margin: 0; font: 1.02rem/1.6 Inter, system-ui, sans-serif; color: var(--tekst); background: var(--krem); -webkit-font-smoothing: antialiased; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 1.5rem); }
:where(a, button, input, select, summary):focus-visible { outline: 3px solid var(--akcent); outline-offset: 2px; }
a { color: var(--akcent-ciemny); }

.naglowek { background: radial-gradient(120% 140% at 85% 0%, #fde3d6 0%, var(--krem) 60%); padding: clamp(2.5rem, 7vw, 4rem) 0 clamp(1.5rem, 4vw, 2rem); }
.nad { color: var(--akcent-ciemny); font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; margin: 0 0 0.4rem; }
h1 { font: 700 clamp(2.2rem, 1.6rem + 3vw, 3.4rem)/1.08 Cardo, Georgia, serif; margin: 0 0 0.6rem; }
h2 { font: 700 1.5rem/1.2 Cardo, Georgia, serif; margin: 0 0 0.6rem; }
.lead { color: var(--szary); font-size: clamp(1.05rem, 1rem + 0.3vw, 1.18rem); margin: 0; }

main { padding-bottom: 3rem; display: grid; gap: 1rem; }
.karta { background: #fff; border: 1px solid var(--linia); border-radius: 18px; padding: clamp(1.1rem, 3vw, 1.5rem); box-shadow: 0 12px 30px -26px #3a2f3866; }
.maly { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--szary); font-weight: 600; margin: 0 0 0.3rem; }
.przypis { text-transform: none; letter-spacing: 0; font-weight: 400; }

/* formularz */
.formularz { display: flex; flex-wrap: wrap; gap: 0.9rem 1rem; align-items: flex-end; }
.pole { display: grid; gap: 0.3rem; flex: 1 1 14rem; }
.pole-waskie { flex: 0 1 9rem; }
.pole span { font-size: 0.9rem; color: var(--szary); }
input, select { font: inherit; color: inherit; padding: 0.6rem 0.75rem; border: 1px solid var(--linia); border-radius: 12px; background: var(--krem); min-height: 2.9rem; }
button { font: 600 1rem Inter, sans-serif; border: 0; border-radius: 12px; padding: 0.75rem 1.4rem; min-height: 2.9rem; background: var(--akcent); color: #fff; cursor: pointer; }
button:hover { background: var(--akcent-ciemny); }
.drugorzedny { background: var(--krem2); color: var(--tekst); }
.drugorzedny:hover { background: var(--linia); }
.dodatkowe { flex-basis: 100%; font-size: 0.9rem; color: var(--szary); }
.dodatkowe summary { cursor: pointer; }
.dodatkowe .pole { margin-top: 0.6rem; max-width: 16rem; }
.zacheta { text-align: center; color: var(--szary); margin: 0.5rem 0; }

/* wynik */
.wynik { display: grid; gap: 1rem; }
.glowna { background: linear-gradient(160deg, #fff 0%, #fff7f2 100%); }
.termin { font: 700 clamp(2rem, 1.5rem + 2.5vw, 2.9rem)/1.1 Cardo, Georgia, serif; margin: 0.1rem 0 0.3rem; }
.stan { margin: 0 0 1.2rem; color: var(--akcent-ciemny); font-weight: 600; }
.pasek { position: relative; height: 14px; border-radius: 99px; background: var(--krem2); }
.pasek-wypelnienie { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--szalwia), var(--akcent)); width: 0; transition: width .6s ease; }
.znacznik { position: absolute; top: -4px; width: 3px; height: 22px; border-radius: 2px; background: #fff; box-shadow: 0 0 0 1px var(--linia); }
.pasek-opisy { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--szary); margin-top: 0.4rem; }

.siatka { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
.liczba { font: 700 1.55rem/1.2 Cardo, Georgia, serif; margin: 0.1rem 0 0.2rem; }
.drobne { margin: 0; color: var(--szary); font-size: 0.92rem; }

.daty { list-style: none; margin: 0.4rem 0 0; padding: 0; }
.daty li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px dashed var(--linia); }
.daty li:last-child { border-bottom: 0; }
.daty span { color: var(--szary); }

.suwaczek img { display: block; max-width: 100%; height: auto; margin: 0.4rem 0 0.9rem; border-radius: 8px; }
.kod { display: grid; gap: 0.25rem; margin-bottom: 0.7rem; font-size: 0.88rem; color: var(--szary); }
textarea { font: 0.82rem/1.4 ui-monospace, monospace; padding: 0.5rem 0.6rem; border: 1px solid var(--linia); border-radius: 10px; background: var(--krem); color: var(--tekst); resize: vertical; }

.jak p { margin: 0 0 0.7rem; }
.uwaga { color: var(--akcent-ciemny); font-weight: 600; margin-bottom: 0 !important; }

.stopka { background: var(--tekst); color: #e7dce2; padding: 1.5rem 0; font-size: 0.9rem; }
.stopka .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.6rem 1.5rem; }
.stopka a { color: #fff; }
@media (prefers-reduced-motion: reduce) { .pasek-wypelnienie { transition: none; } }

/* 10.11: wiek dziecka na pierwszym planie; pasek życia dziecka od poczęcia (Marek) */
.glowne-liczby { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 0.8rem 2rem; margin-bottom: 0.6rem; }
.wiek-duzy { font: 700 clamp(2.1rem, 1.5rem + 2.8vw, 3.1rem)/1.08 Cardo, Georgia, serif; margin: 0.1rem 0 0.25rem; color: var(--akcent-ciemny); }
.termin-boks { text-align: right; }
.termin-boks .termin { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem); margin: 0.1rem 0 0.25rem; }
@media (max-width: 560px) { .termin-boks { text-align: left; } }
.pasek-wypelnienie { position: absolute; top: 0; left: 0; }
.znacznik-poczecie { background: var(--akcent-ciemny); box-shadow: none; width: 4px; top: -6px; height: 26px; }
.pasek-opisy { position: relative; height: 1.3rem; }
.pasek-opisy span:first-child { position: absolute; left: 0; }
.pasek-opisy span:last-child { position: absolute; right: 0; }
.pasek-nad { position: relative; height: 1.35rem; font-size: 0.8rem; }
.opis-poczecie, .opis-dzis { position: absolute; bottom: 0.15rem; white-space: nowrap; font-weight: 600; }
.opis-poczecie { color: var(--akcent-ciemny); transform: translateX(-0.35rem); }
.opis-dzis { color: var(--szary); transform: translateX(-50%); }
/* 10.11 (Marek): pastelowe tło całej ciąży (miesiączka → termin), kolor tylko od poczęcia do dziś */
.pasek { height: 16px; background: linear-gradient(90deg, #e7f0ea 0%, #f6e6dc 55%, #f3dde4 100%); box-shadow: inset 0 0 0 1px #ead9cf; }
.pasek-wypelnienie { background: linear-gradient(90deg, #e9a08f, var(--akcent-ciemny)); box-shadow: 0 2px 6px -2px #b85a4e88; }
.znacznik { top: -3px; height: 22px; }
.znacznik-poczecie { top: -5px; height: 26px; }

/* strzałka dokładnie nad punktem: strzałka na początku napisu, jej środek w punkcie */
.opis-poczecie, .opis-dzis { transform: none; margin-left: -0.32em; }
.pasek-nad b { display: inline-block; width: 0.64em; text-align: center; font-weight: 700; }
.znacznik { transform: translateX(-50%); }
.pasek-nad b { margin-right: 0.2em; }

/* podpisy końców paska ze strzałkami dokładnie pod początkiem i końcem */
.pasek-opisy b { display: inline-block; width: 0.64em; text-align: center; font-weight: 700; }
.pasek-opisy .opis-start { left: 0; margin-left: -0.32em; }
.pasek-opisy .opis-koniec { right: 0; margin-right: -0.32em; }
.opis-start b { margin-right: 0.2em; }
.opis-koniec b { margin-left: 0.2em; }

/* dymki na pasku */
.pasek { cursor: crosshair; touch-action: none; }
.pasek::before { content: ""; position: absolute; inset: -14px 0; }
.znacznik, .pasek-wypelnienie { pointer-events: none; }
.dymek { position: absolute; bottom: calc(100% + 30px); transform: translateX(-50%); z-index: 5; pointer-events: none;
	background: var(--tekst); color: #fff; border-radius: 10px; padding: 0.45rem 0.7rem; font-size: 0.82rem; line-height: 1.35; white-space: nowrap; box-shadow: 0 10px 24px -12px #3a2f38aa; }
.dymek strong { display: block; font-weight: 600; }
.dymek span { color: #e7dce2; }
.dymek::after { content: ""; position: absolute; top: 100%; left: calc(50% + var(--strzalka, 0px)); transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--tekst); }
.dymek { white-space: normal; width: max-content; max-width: 17rem; }
.dymek span { display: block; }

/* przełącznik wyglądu w prawym górnym rogu nagłówka */
.naglowek .wrap { position: relative; }
.przelacznik { position: absolute; top: 0; right: clamp(1rem, 4vw, 1.5rem); width: 2.6rem; height: 2.6rem; min-height: 0; padding: 0; display: grid; place-items: center;
	border-radius: 50%; background: #ffffff99; color: var(--akcent-ciemny); border: 1px solid var(--linia); backdrop-filter: blur(6px); }
.przelacznik:hover { background: #fff; color: var(--akcent); }
.przelacznik svg { transition: transform .3s; }
.przelacznik:hover svg { transform: rotate(180deg); }

/* historia zmian */
.nad a { color: inherit; text-decoration: none; }
.historia { list-style: none; margin: 0; padding: clamp(1rem, 3vw, 1.6rem); }
.historia li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 0.3rem 1.2rem; padding: 0.8rem 0; border-bottom: 1px dashed var(--linia); }
.historia li:last-child { border-bottom: 0; }
.historia time { font-weight: 700; color: var(--akcent-ciemny); font-variant-numeric: tabular-nums; }
.historia p { margin: 0; }
@media (max-width: 560px) { .historia li { grid-template-columns: 1fr; } }

/* ukryte elementy zawsze ukryte (wcześniej .wynik { display: grid } nadpisywało hidden) */
[hidden] { display: none !important; }
