:root {
    --green: #009645;
    --green-dark: #087238;
    --teal: #0accbe;
    --yellow: #ffc436;
    --ink: #26352e;
    --muted: #64736b;
    --line: #dbe6df;
    --soft: #f3f8f5;
    --white: #ffffff;
    --danger: #a62929;
    --shadow: 0 16px 46px rgba(23, 73, 46, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: #f7faf8;
    font-family: BlinkMacSystemFont, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

a {
    color: var(--green-dark);
}

img {
    display: block;
    max-width: 100%;
}

.site-header {
    min-height: 72px;
    padding: 14px max(20px, calc((100vw - 1180px) / 2));
    background: var(--white);
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto minmax(150px, 1fr);
    align-items: center;
    gap: 24px;
    position: relative;
    z-index: 2;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
}

.brand img {
    width: 150px;
    height: 55px;
    object-fit: contain;
}

.brand span {
    padding-left: 14px;
    border-left: 1px solid var(--line);
}

.language-picker {
    display: flex;
    align-items: center;
    justify-self: center;
    gap: 9px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
    white-space: nowrap;
}

.language-picker details {
    position: relative;
}

.language-picker summary {
    min-width: 142px;
    padding: 8px 34px 8px 12px;
    position: relative;
    list-style: none;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
}

.language-picker summary::-webkit-details-marker {
    display: none;
}

.language-picker summary::after {
    content: "▾";
    position: absolute;
    top: 50%;
    right: 12px;
    color: var(--green);
    transform: translateY(-50%);
}

.language-picker details[open] summary::after {
    transform: translateY(-50%) rotate(180deg);
}

.language-picker nav {
    min-width: 100%;
    padding: 6px;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 20;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(23, 73, 46, .16);
}

.language-picker nav a {
    display: block;
    padding: 7px 10px;
    border-radius: 7px;
    color: var(--ink);
    text-decoration: none;
}

.language-picker nav a:hover,
.language-picker nav a.active {
    color: var(--green-dark);
    background: var(--soft);
}

.back-link {
    justify-self: end;
    color: var(--green-dark);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.back-link::before {
    content: "←";
    margin-right: 7px;
}

.hero {
    background:
        radial-gradient(circle at 82% 18%, rgba(255, 196, 54, 0.35), transparent 28%),
        linear-gradient(130deg, #087238 0%, #009645 52%, #0accbe 100%);
    color: var(--white);
}

.hero-inner {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 58px 0 78px;
}


h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    max-width: 900px;
    margin-bottom: 18px;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.lead {
    max-width: 820px;
    margin-bottom: 0;
    color: rgba(255,255,255,.92);
    font-size: clamp(18px, 2.2vw, 23px);
}

.tool-shell {
    width: min(1180px, calc(100% - 40px));
    margin: -38px auto 60px;
    padding: 30px;
    position: relative;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.notice-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

.notice-row p {
    margin: 0;
    padding: 14px 16px;
    color: #405048;
    background: var(--soft);
    border-left: 4px solid var(--teal);
    border-radius: 8px;
    font-size: 14px;
}

.section-toggle {
    margin-bottom: 12px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 13px;
}

.section-toggle > summary {
    padding: 15px 52px 15px 18px;
    position: relative;
    list-style: none;
    color: var(--green-dark);
    cursor: pointer;
    font-size: 17px;
    font-weight: 850;
}

.section-toggle > summary::-webkit-details-marker {
    display: none;
}

.section-toggle > summary::after {
    content: "▾";
    position: absolute;
    top: 50%;
    right: 20px;
    color: var(--green);
    transform: translateY(-50%);
}

.section-toggle[open] > summary {
    background: var(--soft);
    border-bottom: 1px solid var(--line);
    border-radius: 13px 13px 0 0;
}

.section-toggle[open] > summary::after {
    transform: translateY(-50%) rotate(180deg);
}

.toggle-content {
    padding: 22px;
}

.help-toggle h2 {
    margin-bottom: 8px;
    font-size: 18px;
}

.help-toggle p,
.result-waiting {
    max-width: 900px;
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}

.help-toggle p + h2 {
    margin-top: 22px;
}

.help-toggle a {
    color: var(--green-dark);
    font-weight: 850;
}

.schedule-form {
    position: relative;
}

.honeypot {
    width: 1px;
    height: 1px;
    position: absolute;
    left: -10000px;
    overflow: hidden;
}

.property-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.property-card {
    min-width: 0;
    margin: 0;
    padding: 24px;
    background: #fcfefd;
    border: 1px solid var(--line);
    border-radius: 18px;
}

.property-card legend {
    padding: 0 8px;
    color: var(--green-dark);
    font-size: 20px;
    font-weight: 800;
}

.property-card legend small {
    margin-left: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.property-card label {
    display: block;
    margin: 14px 0 7px;
    color: #405048;
    font-size: 14px;
    font-weight: 750;
}

.property-card input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    color: var(--ink);
    background: var(--white);
    border: 1px solid #bdcbc3;
    border-radius: 10px;
    font: inherit;
    outline: none;
}

.property-card input:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(0, 150, 69, .12);
}

.property-card input::placeholder {
    color: #9aa69f;
}

.form-action {
    padding-top: 26px;
    text-align: center;
}

.form-action button {
    min-width: 240px;
    min-height: 52px;
    padding: 13px 28px;
    color: var(--white);
    background: var(--green);
    border: 0;
    border-radius: 13px;
    box-shadow: 0 8px 22px rgba(0, 150, 69, .22);
    cursor: pointer;
    font: inherit;
    font-size: 17px;
    font-weight: 800;
}

.form-action button:hover,
.form-action button:focus {
    background: var(--green-dark);
}

.error-box {
    margin-top: 28px;
    padding: 20px 22px;
    color: #762020;
    background: #fff3f3;
    border: 1px solid #efc5c5;
    border-radius: 14px;
}

.error-box h2 {
    margin-bottom: 8px;
    font-size: 18px;
}

.error-box ul {
    margin: 0;
    padding-left: 22px;
}

.results {
    margin: 0;
    padding: 0;
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: start;
}

.month-card {
    min-width: 0;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 18px;
}

.month-card > h3 {
    margin: 0;
    padding: 19px 20px;
    color: var(--white);
    background: linear-gradient(100deg, var(--green-dark), var(--green));
    font-size: 20px;
}

.empty-month {
    margin: 0;
    padding: 30px 20px;
    color: var(--muted);
    text-align: center;
}

.schedule-column-head,
.day-heading,
.schedule-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 112px 112px;
    align-items: center;
}

.schedule-column-head {
    padding: 12px 16px;
    color: var(--muted);
    background: #eff6f2;
    border-bottom: 1px solid var(--line);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.schedule-column-head span:nth-child(n+2) {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-align: center;
}

.schedule-column-head img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.schedule-day + .schedule-day {
    border-top: 2px solid #c6d9ce;
}

.day-heading {
    min-height: 48px;
    padding: 9px 16px;
    color: var(--green-dark);
    background: #f7fbf8;
}

.day-heading time {
    margin-right: 0;
    font-size: 15px;
    font-weight: 850;
}

.metric {
    width: 56px;
    min-width: 0;
    min-height: 30px;
    padding: 3px 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--green);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.day-heading .metric {
    justify-self: center;
}

.metric img {
    width: 19px;
    height: 19px;
    object-fit: contain;
}

.schedule-row {
    min-height: 43px;
    padding: 7px 16px;
    border-top: 1px solid #edf2ef;
}

.home-name {
    min-width: 0;
    padding-right: 10px;
    overflow-wrap: anywhere;
    font-size: 14px;
    font-weight: 650;
}

.event-mark {
    color: var(--green);
    font-size: 21px;
    font-weight: 900;
    text-align: center;
}

.cta-box {
    margin-top: 30px;
    padding: 28px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    color: var(--white);
    background: #263f34;
    border-radius: 18px;
}

.cta-box h2 {
    margin-bottom: 7px;
    font-size: 22px;
}

.cta-box p {
    max-width: 720px;
    margin-bottom: 0;
    color: rgba(255,255,255,.78);
}

.cta-box a {
    flex: 0 0 auto;
    padding: 13px 20px;
    color: #1d3328;
    background: var(--yellow);
    border-radius: 11px;
    font-weight: 850;
    text-decoration: none;
    text-align: center;
}

.cta-box a:hover,
.cta-box a:focus {
    background: #ffd461;
}

footer {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 0 0 34px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 880px) {
    .site-header {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "brand back"
            "language language";
        gap: 12px;
    }

    .brand {
        grid-area: brand;
    }

    .brand span {
        display: none;
    }

    .language-picker {
        grid-area: language;
        justify-self: center;
    }

    .back-link {
        grid-area: back;
        display: inline-flex;
        justify-self: end;
    }

    .notice-row,
    .property-grid,
    .month-grid {
        grid-template-columns: 1fr;
    }

    .month-grid {
        gap: 20px;
    }

    .cta-box {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .site-header {
        min-height: 62px;
        padding: 11px 14px;
    }

    .brand img {
        width: 120px;
        height: auto;
    }

    .language-picker {
        gap: 5px;
        font-size: 11px;
    }

    .language-picker summary {
        min-width: 108px;
        padding: 7px 27px 7px 9px;
    }

    .language-picker nav {
        min-width: 132px;
    }

    .hero-inner {
        width: calc(100% - 28px);
        padding: 42px 0 62px;
    }

    h1 {
        font-size: 34px;
    }

    .lead {
        font-size: 17px;
    }

    .tool-shell {
        width: calc(100% - 20px);
        margin-top: -28px;
        padding: 18px 12px;
        border-radius: 18px;
    }

    .notice-row {
        gap: 9px;
    }

    .property-grid {
        gap: 14px;
    }

    .property-card {
        padding: 18px 14px;
        border-radius: 14px;
    }

    .property-card legend {
        font-size: 18px;
    }

    .form-action button {
        width: 100%;
        min-width: 0;
    }

    .schedule-column-head,
    .day-heading,
    .schedule-row {
        grid-template-columns: minmax(0, 1fr) 64px 64px;
    }

    .schedule-column-head {
        padding: 10px 9px;
        font-size: 0;
    }

    .schedule-column-head span:first-child {
        font-size: 10px;
    }

    .schedule-column-head img {
        width: 24px;
        height: 24px;
    }

    .day-heading {
        padding: 8px 9px;
    }

    .day-heading time {
        font-size: 13px;
    }

    .metric {
        min-width: 44px;
        padding: 2px 6px;
    }

    .schedule-row {
        padding: 7px 9px;
    }

    .cta-box {
        padding: 22px 18px;
    }

    .cta-box a {
        width: 100%;
    }

    footer {
        width: calc(100% - 28px);
        flex-direction: column;
        gap: 4px;
    }
}

.print-only {
    display: none;
}

.result-actions {
    margin: 0 0 16px;
    display: flex;
    justify-content: flex-end;
}

.result-actions button {
    min-height: 40px;
    padding: 8px 16px;
    color: var(--green-dark);
    background: var(--white);
    border: 1px solid var(--green);
    border-radius: 10px;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
}

.result-actions button:hover,
.result-actions button:focus {
    color: var(--white);
    background: var(--green);
}

@media print {
    @page {
        size: A4 portrait;
        margin: 12mm;
    }

    * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    body {
        color: #111;
        background: #fff;
        font-size: 10pt;
    }

    .site-header,
    .hero,
    .notice-row,
    .help-toggle,
    .input-toggle,
    .result-toggle > summary,
    .result-actions,
    .error-box,
    .cta-box,
    footer {
        display: none !important;
    }

    main,
    .tool-shell,
    .result-toggle,
    .result-toggle > .toggle-content,
    .results {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
        display: block !important;
        background: #fff;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .print-only {
        display: block;
    }

    .print-title {
        margin: 0 0 3mm;
        color: #111;
        font-size: 20pt;
    }

    .print-source {
        margin: 0 0 8mm;
        color: #555;
        font-size: 9pt;
    }

    .print-source a {
        color: #111;
        font-weight: 700;
        text-decoration: none;
    }

    .month-grid {
        display: block;
    }

    .month-card {
        margin: 0 0 9mm;
        border: 1px solid #9eb0a6;
        border-radius: 0;
        break-inside: auto;
    }

    .month-card > h3 {
        padding: 10px 12px;
        color: #111;
        background: #dfeee5;
        font-size: 14pt;
    }

    .schedule-column-head,
    .day-heading,
    .schedule-row {
        grid-template-columns: minmax(0, 1fr) 105px 105px;
    }

    .schedule-column-head {
        padding-right: 12px;
        padding-left: 12px;
    }

    .day-heading {
        padding-right: 12px;
        padding-left: 12px;
    }

    .schedule-row {
        padding-right: 12px;
        padding-left: 12px;
    }

    .schedule-day {
        break-inside: avoid;
    }

    .empty-month {
        padding: 20px 12px;
    }
}

/* Compact A4 print override */
@media print {
    @page { size: A4 portrait; margin: 6mm; }
    body { font-size: 7.5pt; line-height: 1.1; }
    .print-title { margin: 0 0 1mm; font-size: 13pt; line-height: 1.1; }
    .print-source { margin: 0 0 3mm; font-size: 6.5pt; line-height: 1.1; }
    .month-card { margin-bottom: 4mm; }
    .month-card > h3 { padding: 4px 7px; font-size: 10.5pt; line-height: 1.1; }
    .schedule-column-head, .day-heading, .schedule-row { grid-template-columns: minmax(0, 1fr) 18mm 18mm; gap: 1mm; }
    .schedule-column-head { padding: 2px 7px; font-size: 6.5pt; line-height: 1; }
    .schedule-column-head span:nth-child(n+2) { flex-direction: column; gap: 0.5mm; white-space: nowrap; }
    .day-heading { min-height: 24px; padding: 2px 7px; }
    .day-heading time { font-size: 8.5pt; }
    .schedule-row { min-height: 21px; padding: 2px 7px; }
    .metric { width: 14mm; min-height: 5mm; padding: 0.5mm 1mm; gap: 1mm; font-size: 7pt; }
    .schedule-column-head img, .metric img { width: 3.5mm; height: 3.5mm; }
    .home-name { padding-right: 2mm; font-size: 7.5pt; line-height: 1.1; }
    .event-mark { font-size: 10pt; line-height: 1; }
    .empty-month { padding: 5px 7px; }
}