:root {
  color-scheme: light;
  --ink: #14281f;
  --ink-soft: #46564e;
  --muted: #77847c;
  --line: #e4e8e1;
  --paper: #f4f5f0;
  --white: #fff;
  --green: #c6ec83;
  --green-deep: #346c4b;
  --green-soft: #eef5e5;
  --gold: #dfad52;
  --rose: #d88773;
  --shadow: 0 20px 50px rgba(17, 35, 27, .055);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); min-width: 320px; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 19px max(5.2vw, calc((100vw - 1336px) / 2)); border-bottom: 1px solid #e6e8e3; background: rgba(248, 249, 245, .9); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 19px; font-weight: 760; letter-spacing: -.06em; }
.brand-dot { color: #83aa56; }
.brand-mark { width: 24px; height: 24px; padding: 4px; border-radius: 8px; background: var(--ink); display: flex; align-items: end; justify-content: center; gap: 2px; }
.brand-mark span { width: 3px; border-radius: 3px; display: block; background: var(--green); }
.brand-mark span:nth-child(1) { height: 7px; opacity: .7; }
.brand-mark span:nth-child(2) { height: 13px; }
.brand-mark span:nth-child(3) { height: 9px; opacity: .85; }
.topbar-right { display: flex; align-items: center; gap: 20px; }
.demo-badge { display: inline-flex; align-items: center; gap: 5px; padding: 6px 8px; border: 1px solid #e2e9d8; border-radius: 5px; color: #56764e; background: #f3f7ec; white-space: nowrap; font-size: 7px; line-height: 1; font-weight: 760; letter-spacing: .1em; }
.local-badge { display: inline-flex; align-items: center; gap: 8px; color: #65746a; font-size: 11px; letter-spacing: .035em; }
.status-dot { width: 6px; height: 6px; border-radius: 100%; background: #75a87c; box-shadow: 0 0 0 3px #75a87c1d; }
.button { appearance: none; border: 0; min-height: 42px; display: inline-flex; justify-content: center; align-items: center; gap: 10px; padding: 0 17px; border-radius: 8px; text-decoration: none; cursor: pointer; font-size: 12px; font-weight: 690; transition: transform .16s ease, background .16s ease, border-color .16s ease; }
.button:hover { transform: translateY(-1px); }
.button:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #71965680; outline-offset: 2px; }
.button-outline { min-height: 36px; padding: 0 12px; border: 1px solid #dfe4db; color: var(--ink-soft); background: transparent; font-size: 11px; }
.button-outline:hover { background: #fff; border-color: #becbb6; }
.button-dark { color: #f7f9f3; background: var(--ink); white-space: nowrap; }
.button-dark:hover { background: #254034; }
.button-primary { color: #193223; background: var(--green); }
.button-primary:hover { background: #b8e16d; }
.button-wide { width: 100%; justify-content: space-between; }
.shell { width: min(1280px, calc(100% - 64px)); margin: 0 auto; padding: 42px 0 34px; }
.page-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 25px; margin: 0 0 26px; }
.eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 11px; color: #728176; font-size: 9px; line-height: 1.35; font-weight: 760; letter-spacing: .14em; }
.eyebrow-line { width: 19px; height: 1px; background: #8aaa72; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(34px, 4vw, 49px); letter-spacing: -.065em; line-height: 1.02; font-weight: 560; }
.intro-copy { max-width: 580px; margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.65; letter-spacing: -.01em; }
.date-context { display: flex; align-items: center; gap: 11px; padding-bottom: 4px; }
.date-icon { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 12px; background: #e8eddf; color: #55795d; font-size: 21px; }
.date-context div { display: grid; gap: 4px; }
.overline { color: var(--muted); font-size: 8px; letter-spacing: .12em; font-weight: 750; }
.date-context strong { font-size: 12px; font-weight: 670; }
.panel, .day-strip-panel { background: var(--white); border: 1px solid #e8ebe6; border-radius: 13px; box-shadow: var(--shadow); }
.day-strip-panel { padding: 21px 23px 16px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.section-heading h2 { margin: 0; font-size: 20px; line-height: 1.1; font-weight: 620; letter-spacing: -.045em; }
.section-heading .eyebrow { margin-bottom: 8px; }
.compact-heading { align-items: center; }
.subtle-label { color: var(--muted); font-size: 10px; }
.day-strip { display: grid; grid-template-columns: repeat(14, minmax(48px, 1fr)); gap: 8px; margin: 18px 0 9px; }
.day-card { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 4px 7px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--ink-soft); cursor: pointer; }
.day-card:hover { background: #f6f8f2; }
.day-card.selected { border-color: #c8dab9; background: #f3f8ed; color: #254b34; }
.day-card.today:not(.selected) { background: #f8f9f5; }
.day-weekday { color: #88938a; font-size: 8px; text-transform: uppercase; letter-spacing: .075em; }
.day-number { font-size: 12px; font-weight: 690; }
.day-current { color: #496c50; font-size: 7px; font-weight: 700; line-height: 1; letter-spacing: .04em; }
.day-markers { display: flex; gap: 3px; min-height: 5px; }
.day-markers i { width: 4px; height: 4px; border-radius: 50%; display: block; }
.day-markers .activity-marker { background: #639072; }
.day-markers .sleep-marker { background: #d7ac5e; }
.day-markers .missing-marker { background: #d9ded7; }
.timeline-plot { display: grid; grid-template-columns: repeat(14, minmax(20px, 1fr)); gap: 8px; align-items: end; padding: 9px 6px 0; border-top: 1px solid #f0f2ee; }
.plot-column { min-width: 0; display: grid; justify-items: center; gap: 5px; }
.plot-bars { width: 100%; height: 53px; display: flex; align-items: end; justify-content: center; gap: 3px; }
.plot-bar { width: min(10px, 34%); min-height: 2px; border-radius: 4px 4px 1px 1px; }
.activity-bar { background: #78a17e; }
.sleep-bar { background: #e4c37e; }
.bar-missing { background: #e7eae5; }
.bar-level-1 { height: 3px; }
.bar-level-2 { height: 5px; }
.bar-level-3 { height: 8px; }
.bar-level-4 { height: 10px; }
.bar-level-5 { height: 13px; }
.bar-level-6 { height: 15px; }
.bar-level-7 { height: 18px; }
.bar-level-8 { height: 20px; }
.bar-level-9 { height: 23px; }
.bar-level-10 { height: 25px; }
.bar-level-11 { height: 28px; }
.bar-level-12 { height: 30px; }
.bar-level-13 { height: 33px; }
.bar-level-14 { height: 35px; }
.bar-level-15 { height: 38px; }
.bar-level-16 { height: 40px; }
.bar-level-17 { height: 43px; }
.bar-level-18 { height: 45px; }
.bar-level-19 { height: 48px; }
.bar-level-20 { height: 50px; }
.plot-tick { color: #a0a9a2; font-size: 7px; }
.chart-legend { display: flex; justify-content: flex-end; gap: 14px; color: #879189; font-size: 9px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.chart-legend i { width: 5px; height: 5px; border-radius: 50%; }
.legend-activity { background: #639072; }
.legend-sleep { background: #d7ac5e; }
.legend-missing { background: #d9ded7; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 13px 0; }
.metric-card { display: flex; justify-content: space-between; align-items: center; padding: 15px 17px; background: #fff; border: 1px solid #e8ebe6; border-radius: 10px; }
.metric-card:nth-child(2) { background: #fafbf8; }
.metric-label { display: grid; gap: 6px; }
.metric-label span { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .085em; }
.metric-label strong { font-size: 20px; font-weight: 620; letter-spacing: -.04em; }
.metric-label small { color: #8a948d; font-size: 9px; }
.metric-glyph { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 10px; color: #537759; background: #eff4e9; font-size: 16px; }
.metric-card:nth-child(2) .metric-glyph { background: #f7f1e3; color: #a27e3a; }
.metric-card:nth-child(3) .metric-glyph { background: #f5eeea; color: #a46f60; }
.work-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(330px, .7fr); gap: 13px; align-items: start; }
.plan-panel, .diary-panel { padding: 22px; }
.pill { padding: 7px 9px; border-radius: 20px; font-size: 8px; text-transform: uppercase; font-weight: 760; letter-spacing: .07em; white-space: nowrap; }
.pill-ready { color: #42694a; background: #eff6e9; }
.pill-missing { color: #785e35; background: #f9f2e6; }
.pill-saved { color: #45674f; background: #eaf3e7; }
.pill-neutral { color: #65746a; background: #f1f3ef; }
.plan-content { margin-top: 20px; }
.plan-title-wrap { display: flex; align-items: flex-start; gap: 13px; }
.plan-emblem { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 13px; background: var(--green-soft); display: grid; place-items: center; color: #406c47; font-size: 18px; }
.plan-emblem.rest { color: #9a7540; background: #f8f1e4; }
.plan-emblem.missing { color: #72806f; background: #f1f3ef; }
.plan-title { margin: 2px 0 5px; font-size: 19px; line-height: 1.2; letter-spacing: -.04em; font-weight: 620; }
.plan-caption { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.rationale-list { display: grid; gap: 10px; margin: 20px 0; padding: 15px; background: #f8faf6; border: 1px solid #eef1ec; border-radius: 9px; list-style: none; }
.rationale-list li { display: flex; gap: 9px; color: #506055; font-size: 10px; line-height: 1.5; }
.rationale-list li::before { content: ""; flex: 0 0 5px; width: 5px; height: 5px; margin-top: 4px; border-radius: 50%; background: #88a96e; }
.data-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -7px 0 16px; }
.data-chip { padding: 5px 7px; color: #56665b; background: #f3f5f0; border-radius: 5px; font-size: 8px; }
.missing-chip { color: #866a3d; background: #f8f1e4; }
.plan-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.text-button { border: 1px solid #e3e8e0; background: #fff; color: #425148; min-height: 39px; padding: 0 13px; border-radius: 7px; cursor: pointer; font-size: 10px; font-weight: 680; }
.text-button:hover { background: #f6f8f3; }
.text-button.positive { border-color: #d9e9c7; background: #f4f8ed; color: #345b3b; }
.text-button.positive:hover { background: #eaf3de; }
.edit-panel { margin-top: 16px; padding: 16px; border: 1px solid #dae7d4; background: #fbfcf9; border-radius: 10px; }
.edit-heading { display: flex; justify-content: space-between; align-items: start; margin-bottom: 13px; }
.edit-heading .eyebrow { margin-bottom: 4px; }
.edit-heading h3 { margin: 0; font-size: 14px; letter-spacing: -.03em; }
.icon-button { width: 27px; height: 27px; border: 0; border-radius: 100%; background: transparent; color: #68766d; font-size: 21px; cursor: pointer; }
.form-stack { display: flex; flex-direction: column; gap: 8px; }
.form-stack label { margin-top: 3px; color: #536157; font-size: 10px; font-weight: 670; }
.form-stack input:not([type=range]), .form-stack textarea, .form-stack select { width: 100%; min-height: 39px; padding: 9px 10px; border: 1px solid #e0e6dc; border-radius: 7px; background: #fff; color: var(--ink); font-size: 11px; }
.form-stack textarea { resize: vertical; min-height: 72px; line-height: 1.45; }
.label-hint { float: right; color: #929b94; font-size: 9px; font-weight: 450; }
.saved-plan { margin-top: 13px; padding: 12px; border: 1px solid #e1eadb; background: #f7faf3; border-radius: 9px; }
.saved-plan-head { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.saved-plan strong { font-size: 11px; line-height: 1.5; }
.saved-plan small { color: #6d7b71; font-size: 9px; }
.saved-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.saved-actions .text-button { min-height: 32px; padding: 0 10px; font-size: 9px; }
.ai-explainer { display: grid; grid-template-columns: 29px minmax(0, 1fr) auto; align-items: center; column-gap: 10px; row-gap: 8px; margin-top: 19px; padding-top: 16px; border-top: 1px solid #edf0eb; }
.ai-mark { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid #e1e7dd; border-radius: 9px; color: #597b53; font-size: 14px; }
.ai-copy strong { font-size: 10px; font-weight: 680; }
.ai-copy p { margin: 3px 0 0; color: #839087; font-size: 9px; line-height: 1.4; }
.ai-explainer .button { grid-column: 3; grid-row: 1 / span 2; min-height: 37px; font-size: 9px; padding: 0 12px; }
.ai-privacy { grid-column: 1 / -1; margin: 0; color: #8a948b; font-size: 8px; line-height: 1.5; }
.ai-result { grid-column: 1 / -1; padding: 11px 12px; border-radius: 8px; background: #f5f8f1; border-left: 2px solid #90ad73; color: #46554b; font-size: 10px; line-height: 1.55; }
.ai-result.error { background: #fcf3f0; border-left-color: #ce8876; color: #845243; }
.diary-icon { display: grid; place-items: center; width: 32px; height: 32px; color: #9d7b42; background: #f7f1e5; border-radius: 10px; }
.panel-lead { margin: 18px 0 15px; color: #647168; font-size: 10px; line-height: 1.6; }
.panel-lead strong { color: #35473b; font-weight: 680; }
.input-with-value { display: flex; align-items: center; gap: 11px; margin: 2px 0 3px; }
input[type=range] { flex: 1; accent-color: #507c55; height: 4px; }
.input-with-value output { min-width: 28px; padding: 5px 0; border: 1px solid #e4e9e0; border-radius: 6px; color: #4c6850; background: #f8faf5; text-align: center; font-size: 11px; font-weight: 700; }
.diary-panel .form-stack { gap: 8px; }
.diary-panel .form-stack label { margin-top: 5px; }
.diary-panel .button { margin-top: 6px; }
.inline-feedback { min-height: 15px; margin: 8px 0 0; color: #4a7954; font-size: 9px; }
.history-panel { margin-top: 13px; padding: 18px 22px; }
.history-content { margin-top: 14px; }
.history-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.history-item { display: flex; align-items: center; gap: 9px; padding: 10px 11px; border: 1px solid #edf0ec; border-radius: 8px; }
.history-dot { width: 7px; height: 7px; border-radius: 50%; background: #7fa179; }
.history-item.skipped .history-dot { background: #d2a157; }
.history-item div { min-width: 0; display: grid; gap: 3px; }
.history-item strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 9px; font-weight: 670; }
.history-item span { color: #818d84; font-size: 8px; }
.history-empty { padding: 4px 0 0; color: #849087; font-size: 10px; }
.import-panel { margin-top: 13px; padding: 0; overflow: hidden; }
.import-summary { min-height: 76px; display: flex; align-items: center; gap: 13px; padding: 14px 20px; cursor: pointer; list-style: none; }
.import-summary::-webkit-details-marker { display: none; }
.upload-icon { display: grid; place-items: center; width: 33px; height: 33px; border: 1px solid #e0e7dc; border-radius: 9px; color: #537b59; font-size: 17px; }
.import-summary > span:nth-child(2) { display: grid; gap: 5px; }
.import-summary strong { font-size: 11px; font-weight: 700; }
.import-summary small { color: #87928a; font-size: 9px; }
.summary-chevron { margin-left: auto; color: #758279; font-size: 17px; transition: transform .16s ease; }
.import-panel[open] .summary-chevron { transform: rotate(180deg); }
.import-body { padding: 0 20px 19px; border-top: 1px solid #f0f2ef; }
.import-instructions { display: flex; justify-content: space-between; align-items: start; gap: 16px; padding: 15px 0 13px; }
.import-instructions p { max-width: 570px; margin: 0; color: #728077; font-size: 10px; line-height: 1.6; }
.text-link { color: #416e4a; white-space: nowrap; font-size: 9px; font-weight: 670; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.import-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.file-picker { display: inline-flex; align-items: center; gap: 8px; min-height: 37px; max-width: 280px; padding: 0 11px; overflow: hidden; border: 1px dashed #cad5c7; border-radius: 7px; color: #58695d; cursor: pointer; font-size: 9px; }
.file-picker span:first-child { color: #507b55; font-size: 14px; }
.file-picker input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); }
.replace-option { display: inline-flex; align-items: center; gap: 7px; max-width: 290px; color: #748077; font-size: 8px; line-height: 1.45; cursor: pointer; }
.replace-option input { accent-color: #4e7a53; }
.import-form .button { min-height: 37px; font-size: 9px; }
.import-feedback { display: none; margin-top: 12px; padding: 10px 12px; border-radius: 7px; background: #f6f8f3; color: #506454; font-size: 9px; line-height: 1.55; }
.import-feedback.visible { display: block; }
.import-feedback.error { color: #865346; background: #fbf1ed; }
.import-feedback ul { margin: 6px 0 0; padding-left: 17px; }
.format-note { margin: 13px 0 0; color: #929b94; font-size: 8px; }
.format-note code { color: #6d7d70; font-size: 8px; }
.footer-note { display: flex; align-items: center; gap: 10px; padding: 24px 4px 4px; color: #87928a; }
.footer-symbol { color: #74926b; font-size: 20px; }
.footer-note p { flex: 1; max-width: 690px; margin: 0; font-size: 9px; line-height: 1.55; }
.footer-version { color: #a0a8a1; white-space: nowrap; font-size: 7px; letter-spacing: .1em; }
.toast { position: fixed; right: 24px; bottom: 22px; z-index: 10; max-width: min(390px, calc(100% - 32px)); padding: 12px 15px; border: 1px solid #dce8d5; border-radius: 9px; background: #f4f8ef; box-shadow: 0 12px 32px #12241d20; color: #35533b; font-size: 10px; line-height: 1.5; }
.toast.error { border-color: #eddbd5; background: #fcf3f0; color: #845243; }
.loading { color: #87928a; font-size: 11px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1050px) {
  .shell { width: min(100% - 40px, 900px); }
  .day-strip { grid-template-columns: repeat(14, minmax(34px, 1fr)); gap: 4px; }
  .day-card { padding: 8px 1px; }
  .work-grid { grid-template-columns: minmax(0, 1fr) minmax(300px, .85fr); }
}
@media (max-width: 760px) {
  .topbar { padding: 14px 20px; }
  .topbar-right { gap: 10px; }
  .local-badge { display: none; }
  .shell { width: calc(100% - 32px); padding-top: 29px; }
  .page-intro { align-items: flex-start; }
  .date-context { gap: 7px; padding-top: 4px; }
  .date-icon { width: 32px; height: 32px; }
  .date-context strong { max-width: 80px; font-size: 10px; line-height: 1.3; }
  .intro-copy { max-width: 460px; font-size: 12px; }
  .day-strip-panel { padding: 18px 14px 13px; }
  .day-strip { grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 3px; }
  .timeline-plot { gap: 4px; }
  .chart-legend { margin-top: 9px; }
  .metric-grid { gap: 7px; }
  .metric-card { padding: 12px 10px; }
  .metric-label strong { font-size: 17px; }
  .metric-label span, .metric-label small { font-size: 8px; }
  .metric-glyph { width: 27px; height: 27px; }
  .work-grid { grid-template-columns: 1fr; }
  .history-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .topbar { padding: 13px 16px; }
  .topbar-right { gap: 7px; }
  .demo-badge { overflow: hidden; max-width: 112px; font-size: 0; letter-spacing: .08em; }
  .demo-badge[data-has-synthetic="true"]::after { content: "DEMO · SYNTETYCZNE"; font-size: 6px; }
  .demo-badge[data-has-synthetic="false"]::after { content: "DANE LOKALNE"; font-size: 6px; }
  .button-outline { min-height: 33px; padding: 0 9px; font-size: 9px; }
  .brand { font-size: 17px; }
  .brand-mark { width: 22px; height: 22px; }
  .shell { width: calc(100% - 24px); padding-top: 23px; }
  .page-intro { display: block; margin-bottom: 18px; }
  h1 { font-size: 38px; }
  .date-context { margin-top: 13px; }
  .section-heading h2 { font-size: 18px; }
  .subtle-label { max-width: 125px; text-align: right; font-size: 8px; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { padding: 10px 13px; }
  .metric-label { grid-template-columns: auto auto; align-items: baseline; column-gap: 9px; }
  .metric-label span { grid-column: 1 / -1; }
  .metric-label small { grid-column: 1 / -1; }
  .metric-label strong { font-size: 18px; }
  .metric-glyph { grid-column: 2; grid-row: 1 / span 3; }
  .plan-panel, .diary-panel { padding: 17px 14px; }
  .ai-explainer { grid-template-columns: 27px 1fr; }
  .ai-explainer .button { grid-column: 1 / -1; grid-row: auto; justify-self: start; }
  .ai-privacy { grid-column: 1 / -1; }
  .history-panel { padding: 16px 14px; }
  .history-list { grid-template-columns: 1fr; }
  .import-summary { padding: 13px 14px; }
  .import-body { padding: 0 14px 16px; }
  .import-instructions { display: grid; }
  .import-form { align-items: stretch; flex-direction: column; }
  .file-picker { max-width: none; }
  .replace-option { max-width: none; }
  .footer-note { align-items: flex-start; padding-top: 20px; }
  .footer-version { display: none; }
  .toast { right: 12px; bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }
