/* Bonsai leaf drop checker — scoped tool island.
   Same palette as /bonsai-watering and /bonsai-calendar: one app, three tools. */

.bonsai-leaf-check-page {
    --leaf: #7aab6b;
    --leaf-deep: #5B8F4F;
    --bark: #3f5a37;
    --ink: #23231f;
    --ink-soft: #5f5c55;
    --paper: #fdfbf7;
    --paper-raised: #f4f1e9;
    --rule: #e3ddd1;
    --font-reading: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --tool-peek-bg: #5B8F4F;
}

.bleaf-container {
    max-width: 760px;
    margin: 0 auto;
    padding: 72px 20px 60px;
    font-family: var(--font-reading);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.page-sketch .bleaf-container p,
body.page-sketch .bleaf-container li,
body.page-sketch .bleaf-container a,
body.page-sketch .bleaf-container span,
body.page-sketch .bleaf-container label,
body.page-sketch .bleaf-container legend,
body.page-sketch .bleaf-container select,
body.page-sketch .bleaf-container h2,
body.page-sketch .bleaf-container h3 {
    font-family: var(--font-reading);
}

body.page-sketch .bleaf-container .bleaf-title,
body.page-sketch .bleaf-container .bleaf-result-headline {
    font-family: 'Kalam', sans-serif;
}

.bleaf-title {
    font-size: clamp(2rem, 1.4rem + 2.4vw, 2.7rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--ink);
    margin: 0 0 16px;
    text-wrap: balance;
}

.bleaf-lede {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--ink-soft);
    margin: 0 0 36px;
    text-wrap: pretty;
}

/* ---------------------------------------------------------------- form ---- */
.bonsai-leaf-check {
    background: var(--paper-raised);
    border-radius: 18px;
    padding: 26px 28px;
}

.bleaf-form {
    display: grid;
    gap: 20px;
    margin: 0;
}

.bleaf-field {
    border: none;
    margin: 0;
    padding: 0;
    min-width: 0;
}

.bleaf-field legend {
    padding: 0;
    margin: 0 0 9px;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--ink);
}

.bleaf-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bleaf-options input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.bleaf-options label {
    display: inline-flex;
    align-items: center;
    min-height: 40px;                 /* hit area */
    padding: 9px 16px;
    border: 1px solid var(--rule);
    border-radius: 10px;
    background: var(--paper);
    color: var(--ink);
    font-size: 0.925rem;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
    transition-property: background-color, border-color, color, scale;
    transition-duration: 0.15s;
    transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.bleaf-options label:hover { border-color: var(--leaf-deep); color: var(--leaf-deep); }
.bleaf-options label:active { scale: 0.96; }

.bleaf-options input:checked + label {
    background: var(--leaf-deep);
    border-color: var(--leaf-deep);
    color: #fff;
}

.bleaf-options input:focus-visible + label {
    outline: 2px solid var(--leaf-deep);
    outline-offset: 2px;
}

/* The month is a select rather than twelve chips — twelve chips is a wall, and
   this is the one input with an obvious default (today). */
.bleaf-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.bleaf-select-label {
    font-size: 0.925rem;
    font-weight: 600;
    color: var(--ink-soft);
}

.bleaf-select {
    flex: 0 1 220px;
    min-height: 40px;
    padding: 9px 14px;
    border: 1px solid var(--rule);
    border-radius: 10px;
    background: var(--paper);
    color: var(--ink);
    font-size: 0.925rem;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
}

.bleaf-select:hover { border-color: var(--leaf-deep); }
.bleaf-select:focus-visible { outline: 2px solid var(--leaf-deep); outline-offset: 2px; }

/* -------------------------------------------------------------- result ---- */
.bleaf-result {
    margin-top: 22px;
    padding: 22px 24px;
    background: var(--paper);
    border-radius: 14px;
}

.bleaf-result-label {
    margin: 0 0 2px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--leaf-deep);
}

.bleaf-result-headline {
    margin: 0 0 12px;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--ink);
}

.bleaf-result-body {
    margin: 0 0 12px;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ink);
}

.bleaf-result-body:last-child { margin-bottom: 0; }

.bleaf-result-body a,
.bleaf-result-meta a,
.bleaf-guard a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--leaf);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.bleaf-steps {
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
}

.bleaf-steps li {
    position: relative;
    margin: 0 0 9px;
    padding-left: 22px;
    font-size: 0.975rem;
    line-height: 1.6;
    color: var(--ink);
}

.bleaf-steps li:last-child { margin-bottom: 0; }

.bleaf-steps li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 0.62em;
    width: 7px;
    height: 7px;
    border-radius: 2px;
    background: var(--leaf);
    rotate: 45deg;
}

/* The one thing this calendar refuses to schedule. Set apart from the jobs so
   it reads as a boundary rather than another task. */
.bleaf-guard {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--paper-raised);
    font-size: 0.925rem;
    line-height: 1.6;
    color: var(--ink-soft);
}

.bleaf-result-meta {
    margin: 0;
    padding-top: 12px;
    border-top: 1px solid var(--rule);
    font-size: 0.925rem;
    line-height: 1.6;
    color: var(--ink-soft);
}

.bleaf-note {
    margin: 12px 0 0;
    padding-left: 14px;
    border-left: 3px solid var(--leaf);
    font-size: 0.925rem;
    line-height: 1.6;
    color: var(--ink-soft);
}

/* ---------------------------------------------------------------- prose --- */
.bleaf-prose {
    margin-top: 48px;
}

.bleaf-prose h2 {
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--ink);
    margin: 36px 0 14px;
}

.bleaf-prose p,
.bleaf-prose li {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--ink);
}

.bleaf-prose p { margin: 0 0 16px; }
.bleaf-prose ul { margin: 0 0 16px; padding-left: 1.35rem; }
.bleaf-prose li { margin-bottom: 8px; }

.bleaf-prose a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--leaf);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

/* ------------------------------------------------------------------ cta --- */
.bleaf-cta {
    margin-top: 44px;
    padding: 28px 26px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--leaf-deep), var(--bark));
    color: #fff;
    text-align: center;
}

.bleaf-cta h2 {
    margin: 0 0 10px;
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    text-wrap: balance;
}

.bleaf-cta p {
    margin: 0 0 20px;
    line-height: 1.55;
    opacity: 0.94;
}

.bleaf-cta a {
    display: inline-block;
    padding: 13px 28px;
    border-radius: 30px;
    background: #fff;
    color: var(--leaf-deep);
    font-weight: 700;
    text-decoration: none;
    transition-property: opacity, scale;
    transition-duration: 0.15s;
    transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.bleaf-cta a:hover { opacity: 0.92; }
.bleaf-cta a:active { scale: 0.96; }

@media (max-width: 640px) {
    .bleaf-container { padding: 56px 16px 40px; }
    .bonsai-leaf-check { padding: 20px 18px; }
    .bleaf-result { padding: 18px 18px; }
    .bleaf-options label { flex: 1 1 100%; }
    .bleaf-select { flex: 1 1 auto; }
    .bleaf-result-headline { font-size: 1.55rem; }
}

/* ------------------------------------------------- leaf-specific bits ---- */

/* Leaf options depend on the tree. The wrapper vanishes from layout so the
   input + label pair still flows as chips; [hidden] must beat display:contents. */
.bleaf-opt { display: contents; }
.bleaf-opt[hidden],
.bleaf-field[hidden] { display: none; }

.bleaf-result-label.bleaf-kind-normal { color: var(--leaf-deep); }
.bleaf-result-label.bleaf-kind-act { color: #8a6a1f; }
.bleaf-result-label.bleaf-kind-urgent,
.bleaf-result-label.bleaf-kind-fix { color: #a3412c; }

.bleaf-watch-title {
    margin: 14px 0 6px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.bleaf-watch {
    margin: 0;
    padding: 0 0 0 1.2rem;
}

.bleaf-watch li {
    margin: 0 0 6px;
    font-size: 0.925rem;
    line-height: 1.55;
    color: var(--ink-soft);
}

.bleaf-steps a,
.bleaf-watch a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--leaf);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}
