/* Loom & Fiber Forms — uses the theme tokens (--lf-*) so light/dark both work. */
.lff{--lff-accent:#29483d;--lff-accent-ink:#fff;--lff-error:#b42318;position:relative;margin:0;font-family:var(--lf-sans,Inter,system-ui,sans-serif)}
.lff__trap{position:absolute!important;left:-9999px!important;width:1px;height:1px;overflow:hidden}
.lff__fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem 1.1rem}
.lff__field{grid-column:1/-1;display:grid;gap:.4rem;min-width:0}
.lff__field--half{grid-column:span 1}
.lff__field>label{color:var(--lf-ink,#26342f);font-size:.84rem;font-weight:650}
.lff__req{color:#bc4b29}
.lff__opt{color:var(--lf-soft,#52605a);font-weight:400;font-size:.78rem}
.lff input[type=text],.lff input[type=email],.lff input[type=url],.lff select,.lff textarea{width:100%;min-height:48px;padding:.7rem .9rem;border:1px solid var(--lf-line,#dedfd8);border-radius:10px;background:var(--lf-paper,#fffefa);color:var(--lf-ink,#26342f);font:inherit;font-size:.95rem;transition:border-color .15s,box-shadow .15s}
.lff textarea{min-height:140px;resize:vertical;line-height:1.55}
.lff select{appearance:none;-webkit-appearance:none;padding-right:2.4rem;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16' fill='none' stroke='%2352605a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 6 5 5 5-5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right .9rem center}
.lff input:focus,.lff select:focus,.lff textarea:focus{outline:0;border-color:#b48a57;box-shadow:0 0 0 3px rgba(180,138,87,.22)}
.lff ::placeholder{color:var(--lf-soft,#52605a);opacity:.75}
.lff__field.has-error input,.lff__field.has-error select,.lff__field.has-error textarea{border-color:var(--lff-error)}
.lff__error{color:var(--lff-error);font-size:.8rem;font-weight:550}
.lff__check{display:flex;align-items:flex-start;gap:.65rem;color:var(--lf-soft,#52605a);font-size:.86rem;line-height:1.5;cursor:pointer}
.lff__check input{flex:none;width:20px;height:20px;margin:.1rem 0 0;accent-color:var(--lff-accent)}
.lff__check a{color:inherit;text-decoration:underline;text-underline-offset:3px}
.lff__actions{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;gap:.8rem 1.2rem;margin-top:.2rem}
.lff__submit{display:inline-flex;align-items:center;gap:.7rem;min-height:50px;padding:.75rem 1.35rem;border:0;border-radius:999px;background:var(--lff-accent);color:var(--lff-accent-ink);font:650 .9rem/1 var(--lf-sans,Inter,sans-serif);text-decoration:none;cursor:pointer;transition:background .2s,transform .2s}
.lff__submit svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;transition:transform .2s}
.lff__submit:hover{background:#1d352d;color:#fff}
.lff__submit:hover svg{transform:translateX(3px)}
.lff__submit:focus-visible{outline:2px solid #b48a57;outline-offset:3px}
.lff__submit[disabled]{opacity:.7;cursor:progress}
.lff__note{margin:0;color:var(--lf-soft,#52605a);font-size:.8rem;line-height:1.5}
.lff__note a{color:inherit;text-decoration:underline;text-underline-offset:3px}
.lff__status{grid-column:1/-1;margin-top:.9rem;font-size:.92rem;line-height:1.5}
.lff__status:empty{display:none}
.lff__status.is-sent{padding:1rem 1.1rem;border-radius:12px;background:#e8f3ec;color:#14532d;border:1px solid #b9dcc6}
.lff__status.is-invalid,.lff__status.is-failed,.lff__status.is-expired,.lff__status.is-limited,.lff__status.is-too_fast{padding:.8rem 1rem;border-radius:12px;background:#fdecea;color:#8a1c1c;border:1px solid #f3c2bd}
.lff.is-sent .lff__fields,.lff.is-sent .lff__intro{display:none}
.lff.is-sent .lff__status{margin-top:0}

/* Newsletter: inline (single row) variants */
.lff--newsletter .lff__fields{grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:.6rem}
.lff--newsletter .lff__field{grid-column:auto}
.lff--newsletter .lff__actions{grid-column:auto;margin:0}
.lff--newsletter .lff__field>label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.lff--newsletter:not(.lff--footer):not(.lff--article):not(.lff--calculator):not(.lff--inline) .lff__actions{grid-column:1/-1}
.lff--newsletter .lff__actions>.lff__note{flex-basis:100%}

/* Article / calculator box */
.lff-box{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:1.2rem 2rem;align-items:center;margin:3rem 0 1rem;padding:1.6rem 1.7rem;border:1px solid var(--lf-line,#dedfd8);border-radius:18px;background:var(--lf-cream,#f7f5ef)}
.lff-box__eyebrow{margin:0 0 .4rem;color:#735a3a;font:700 .66rem/1.3 var(--lf-sans,Inter,sans-serif);letter-spacing:.16em;text-transform:uppercase}
.lff-box__title{margin:0 0 .35rem;color:var(--lf-ink,#26342f);font:500 1.45rem/1.2 var(--lf-serif,Georgia,serif)}
.lff-box__text{margin:0;color:var(--lf-soft,#52605a);font-size:.9rem;line-height:1.55}
.lff-box .lff__note{margin-top:.6rem}
.lff-box--calculator{margin:2rem 0}
.lf-entry-content .lff-box{max-width:var(--lf-reading,760px)}

/* Footer variant (dark band) */
.lff--footer{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:1rem 2.5rem;align-items:center}
.lff--footer .lff__title{margin:0 0 .3rem;color:#f8f3ea;font:400 1.5rem/1.2 var(--lf-serif,Georgia,serif)}
.lff--footer .lff__note{color:#b9b1a5}
.lff--footer input[type=email]{background:rgba(248,243,234,.06);border-color:rgba(245,240,232,.24);color:#f8f3ea}
.lff--footer ::placeholder{color:#b9b1a5}
.lff--footer .lff__submit{background:#f3eee6;color:#171614}
.lff--footer .lff__submit:hover{background:#e6d5b8;color:#171614}
.lff--footer .lff__status{grid-column:1/-1}
.lff--footer .lff__status.is-sent{background:rgba(166,196,178,.14);border-color:rgba(166,196,178,.35);color:#d9efe1}
.lff-footer-newsletter{padding:2.2rem 0;border-bottom:1px solid rgba(245,240,232,.12)}

/* Confirmation / unsubscribe page */
.lff-message{display:grid;place-items:center;min-height:56vh;padding:4rem 1.5rem}
.lff-message__card{max-width:560px;padding:2.5rem;border:1px solid var(--lf-line,#dedfd8);border-radius:20px;background:var(--lf-paper,#fffefa);text-align:center}
.lff-message__eyebrow{margin:0 0 .5rem;color:#8a714e;font:700 .68rem/1.3 var(--lf-sans,Inter,sans-serif);letter-spacing:.16em;text-transform:uppercase}
.lff-message h1{margin:0 0 .8rem;font-size:clamp(2rem,4vw,2.8rem)}
.lff-message p{color:var(--lf-soft,#52605a)}

@media (max-width:760px){
	.lff__fields{grid-template-columns:1fr}
	.lff__field--half{grid-column:1/-1}
	.lff-box{grid-template-columns:1fr;padding:1.3rem}
	.lff--footer{grid-template-columns:1fr}
}
@media (max-width:460px){
	.lff--newsletter .lff__fields{grid-template-columns:1fr}
	.lff--newsletter .lff__submit{width:100%;justify-content:center}
}

/* Dark mode */
html[data-theme="dark"] .lff{--lff-accent:#a6c4b2;--lff-accent-ink:#171614;--lff-error:#ff9b8f}
html[data-theme="dark"] .lff__submit:hover{background:#c4dccd;color:#171614}
html[data-theme="dark"] .lff__req{color:#e8916b}
html[data-theme="dark"] .lff__status.is-sent{background:rgba(166,196,178,.12);border-color:rgba(166,196,178,.35);color:#d9efe1}
html[data-theme="dark"] .lff__status.is-invalid,html[data-theme="dark"] .lff__status.is-failed,html[data-theme="dark"] .lff__status.is-expired,html[data-theme="dark"] .lff__status.is-limited,html[data-theme="dark"] .lff__status.is-too_fast{background:rgba(255,155,143,.1);border-color:rgba(255,155,143,.3);color:#ffc9c2}
html[data-theme="dark"] .lff-box__eyebrow,html[data-theme="dark"] .lff-message__eyebrow{color:#cdb48c}
html[data-theme="dark"] .lff select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16' fill='none' stroke='%23bdb5aa' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 6 5 5 5-5'/%3E%3C/svg%3E")}
html[data-theme="dark"] .lff--footer .lff__submit{background:#f3eee6;color:#171614}
@media (prefers-reduced-motion:reduce){.lff *{transition:none!important}}
/* newsletter: button sits next to the email field; the privacy note gets its own full-width line */
.lff--newsletter .lff__actions{display:contents}
.lff--newsletter .lff__actions>.lff__note{grid-column:1/-1;margin-top:.1rem}
@media (max-width:460px){.lff--newsletter .lff__submit{grid-column:1/-1}}
