:root {
  --navy: #061a36;
  --navy-2: #0a2d57;
  --cream: #fff8e9;
  --paper: #fffdf7;
  --orange: #f04a1d;
  --yellow: #f6aa16;
  --teal: #0f9cab;
  --purple: #8540a8;
  --ink: #10223d;
  --muted: #586779;
  --line: rgba(16, 34, 61, .14);
  --shadow: 0 22px 60px rgba(3, 21, 45, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: #f4f8fb; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.55; }
button, input { font: inherit; }
button { cursor: pointer; }
.container { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: fixed; top: -60px; left: 20px; z-index: 999; background: white; padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.tool-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.nav-wrap { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; background: var(--navy); color: white; font-weight: 900; font-size: 13px; transform: rotate(-3deg); }
.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); }
.back-link { color: var(--navy); font-weight: 800; text-decoration: none; }
.tool-hero { padding: 72px 0; color: white; background: linear-gradient(112deg, var(--navy), var(--navy-2)); position: relative; overflow: hidden; }
.tool-hero::after { content: ""; position: absolute; width: 380px; height: 380px; right: -100px; top: -190px; border: 70px solid rgba(15,156,171,.22); border-radius: 50%; }
.hero-layout { position: relative; z-index: 1; display: grid; grid-template-columns: 1.4fr .6fr; align-items: center; gap: 80px; }
.eyebrow { margin: 0 0 8px; color: var(--teal); font-size: 12px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.tool-hero .eyebrow { color: #74e1e8; }
h1, h2 { margin-top: 0; line-height: 1.05; letter-spacing: -.035em; }
.tool-hero h1 { max-width: 760px; margin-bottom: 20px; font-size: clamp(42px, 6vw, 72px); }
.hero-copy { max-width: 680px; margin: 0; color: rgba(255,255,255,.78); font-size: 18px; }
.hero-note { display: grid; grid-template-columns: 36px 1fr; align-items: center; gap: 13px; font-weight: 800; }
.hero-note span { display: grid; place-items: center; width: 36px; height: 36px; background: var(--yellow); color: var(--navy); border-radius: 50%; }
.builder-section { padding: 76px 0 96px; }
.builder-grid { display: grid; grid-template-columns: minmax(0, 1fr) 350px; align-items: start; gap: 46px; }
.step-heading { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.step-heading h2 { margin: 0; font-size: clamp(29px, 4vw, 42px); }
.step-heading .eyebrow { margin: 0 0 3px; }
.step-number { flex: 0 0 auto; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: var(--orange); color: white; font-size: 21px; font-weight: 950; transform: rotate(-3deg); }
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.category-button { min-height: 92px; padding: 14px; border: 2px solid transparent; border-radius: 19px; background: white; color: var(--ink); box-shadow: 0 8px 24px rgba(8,34,66,.06); font-weight: 850; transition: transform .15s ease, border-color .15s ease; }
.category-button:hover { transform: translateY(-2px); }
.category-button[aria-pressed="true"] { border-color: var(--teal); background: #eafafa; }
.category-icon { display: block; margin-bottom: 5px; font-size: 27px; line-height: 1; }
.task-heading { margin-top: 56px; }
.empty-message { padding: 26px; border: 2px dashed #cbd9e4; border-radius: 20px; color: var(--muted); text-align: center; }
.task-groups { display: grid; gap: 18px; }
.task-group { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 10px 30px rgba(8,34,66,.055); }
.task-group-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 19px 22px; border-bottom: 1px solid var(--line); }
.task-group-header h3 { margin: 0; font-size: 21px; }
.select-all { border: 0; background: transparent; color: var(--teal); font-size: 13px; font-weight: 850; }
.task-options { display: grid; grid-template-columns: 1fr 1fr; padding: 9px 18px 17px; }
.task-option { display: flex; align-items: flex-start; gap: 11px; padding: 12px 7px; border-radius: 10px; }
.task-option:hover { background: #f4f8fb; }
.task-option input { width: 19px; height: 19px; margin: 2px 0 0; accent-color: var(--teal); }
.schedule-card { position: sticky; top: 22px; padding: 28px; background: var(--cream); border: 1px solid rgba(246,170,22,.28); border-radius: 26px; box-shadow: var(--shadow); }
.step-heading.compact { align-items: flex-start; }
.step-heading.compact h2 { font-size: 27px; }
.schedule-card label { display: block; margin: 18px 0 7px; font-weight: 800; }
.schedule-card label span { color: var(--muted); font-weight: 500; }
.schedule-card input[type="text"], .schedule-card input[type="date"] { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid #c5d0da; border-radius: 12px; background: white; color: var(--ink); }
.custom-row { display: flex; gap: 8px; }
.add-button { border: 0; border-radius: 12px; padding: 0 15px; background: var(--navy); color: white; font-weight: 850; }
.custom-list { display: grid; gap: 6px; margin-top: 9px; }
.custom-item { display: flex; justify-content: space-between; gap: 8px; padding: 7px 10px; background: white; border-radius: 9px; font-size: 13px; }
.custom-item button { border: 0; background: transparent; color: var(--orange); font-weight: 900; }
.selection-count { display: flex; align-items: baseline; gap: 9px; margin: 25px 0 12px; }
.selection-count strong { color: var(--purple); font-size: 34px; line-height: 1; }
.selection-count span { color: var(--muted); font-weight: 700; }
.share-button { width: 100%; min-height: 50px; margin-bottom: 10px; padding: 9px 16px; border: 2px solid var(--teal); border-radius: 999px; background: white; color: var(--navy); font-weight: 900; }
.share-button:hover { background: #eafafa; }
.share-button span { display: inline-block; margin-right: 5px; color: var(--teal); font-size: 19px; }
.qr-button { width: 100%; min-height: 50px; margin-bottom: 10px; padding: 9px 16px; border: 2px solid var(--purple); border-radius: 999px; background: white; color: var(--navy); font-weight: 900; }
.qr-button:hover { background: #f7effa; }
.qr-button span { display: inline-block; margin-right: 5px; color: var(--purple); font-size: 19px; }
.share-status { min-height: 0; margin: 0 0 9px; color: var(--teal); font-size: 12px; font-weight: 800; text-align: center; }
.share-status:empty { display: none; }
.generate-button { width: 100%; min-height: 54px; padding: 10px 18px; border: 0; border-radius: 999px; background: var(--orange); color: white; font-weight: 900; box-shadow: 0 10px 24px rgba(240,74,29,.24); }
.print-note { margin-bottom: 0; color: var(--muted); font-size: 12px; text-align: center; }
.error-message { margin-bottom: 0; color: #a52b0e; font-size: 13px; font-weight: 800; }
.tool-footer { padding: 36px 0; background: #031329; color: white; }
.tool-footer .container { display: flex; justify-content: space-between; gap: 20px; }
.tool-footer span { color: rgba(255,255,255,.62); }
.qr-dialog { width: min(420px, calc(100% - 28px)); padding: 34px; border: 0; border-top: 7px solid var(--teal); border-radius: 24px; color: var(--ink); box-shadow: 0 28px 90px rgba(3,21,45,.3); text-align: center; }
.qr-dialog::backdrop { background: rgba(3,19,41,.72); backdrop-filter: blur(4px); }
.qr-dialog h2 { margin-bottom: 9px; font-size: 32px; }
.qr-dialog > p:not(.eyebrow) { color: var(--muted); }
.qr-close { position: absolute; top: 10px; right: 13px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #edf2f5; color: var(--navy); font-size: 23px; line-height: 1; }
.qr-code { display: grid; place-items: center; min-height: 240px; margin: 22px auto 13px; }
.qr-code img, .qr-code canvas { max-width: 100%; height: auto; padding: 10px; border: 1px solid var(--line); border-radius: 14px; }
.qr-help { margin-bottom: 0; font-size: 12px; font-weight: 700; }
.print-sheet { display: none; }

@media (max-width: 900px) {
  .hero-layout, .builder-grid { grid-template-columns: 1fr; }
  .hero-layout { gap: 38px; }
  .hero-note { max-width: 330px; }
  .schedule-card { position: static; }
}

@media (max-width: 600px) {
  .container { width: min(100% - 28px, 1160px); }
  .brand small, .back-link { font-size: 12px; }
  .brand-mark { width: 43px; height: 43px; }
  .tool-hero { padding: 54px 0; }
  .category-grid { grid-template-columns: 1fr 1fr; }
  .task-options { grid-template-columns: 1fr; }
  .builder-section { padding-top: 54px; }
  .tool-footer .container { flex-direction: column; }
}

@page { size: A4; margin: 13mm; }
@media print {
  body { background: white; color: #10223d; }
  body > :not(.print-sheet) { display: none !important; }
  .print-sheet { display: block; position: relative; }
  .print-sheet::before { content: ""; position: fixed; z-index: -1; top: -20mm; right: -18mm; width: 65mm; height: 65mm; border: 14mm solid rgba(15,156,171,.1); border-radius: 50%; }
  .print-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 12px 15px 14px; border-radius: 12px 12px 0 0; border-bottom: 5px solid #f6aa16; background: #061a36 !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .print-header p { margin: 0 0 3px; color: #74e1e8; font-size: 9pt; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
  .print-header h1 { margin: 0; color: white; font-size: 25pt; }
  .print-date { padding: 7px 11px; border-radius: 8px; background: #fff8e9 !important; color: #061a36; font-size: 9.5pt; font-weight: 800; white-space: nowrap; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .print-motivation { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 10px; margin: 10px 0 14px; padding: 8px 12px; border: 1px solid #c9e8eb; border-radius: 10px; background: #eefafa !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .print-motivation-mark { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; background: #0f9cab !important; color: white; font-weight: 950; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .print-motivation strong, .print-motivation span { display: block; }
  .print-motivation strong { color: #061a36; font-size: 10pt; }
  .print-motivation span { color: #586779; font-size: 8.5pt; }
  .print-total { padding-left: 12px; border-left: 1px solid #b8dfe3; text-align: center; }
  .print-total strong { color: #8540a8; font-size: 17pt; line-height: 1; }
  .print-total span { font-size: 7.5pt; font-weight: 800; text-transform: uppercase; }
  .print-groups { columns: 2; column-gap: 11mm; }
  .print-group { break-inside: avoid; margin: 0 0 12px; border: 1px solid #d6dee5; border-radius: 9px; overflow: hidden; box-shadow: 0 2px 0 rgba(6,26,54,.06); }
  .print-group h2 { margin: 0; padding: 7px 11px; border-left: 6px solid #0f9cab; background: #eefafa !important; color: #061a36; font-size: 12pt; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .print-group:nth-child(4n+2) h2 { border-color: #f6aa16; background: #fff8e9 !important; }
  .print-group:nth-child(4n+3) h2 { border-color: #8540a8; background: #f7effa !important; }
  .print-group:nth-child(4n+4) h2 { border-color: #f04a1d; background: #fff1ed !important; }
  .print-group ul { margin: 0; padding: 6px 11px 8px; list-style: none; }
  .print-group li { position: relative; padding: 5px 0 5px 24px; border-bottom: 1px solid #edf0f2; font-size: 9.5pt; line-height: 1.25; }
  .print-group li:last-child { border: 0; }
  .print-group li::before { content: ""; position: absolute; left: 0; top: 5px; width: 13px; height: 13px; border: 2px solid #0f9cab; border-radius: 4px; }
  .print-notes { break-inside: avoid; margin-top: 10px; padding: 9px 12px 7px; border: 1px solid #d6dee5; border-radius: 9px; }
  .print-notes h2 { margin: 0 0 2px; color: #8540a8; font-size: 10pt; }
  .notes-lines { display: grid; }
  .notes-lines span { height: 7mm; border-bottom: 1px dotted #9ca9b6; }
  .print-sheet footer { display: flex; justify-content: space-between; margin-top: 10px; padding: 7px 2px 0; border-top: 3px solid #f04a1d; color: #586779; font-size: 8pt; }
  .print-sheet footer strong { color: #061a36; }
}
