/* Shared, accessible controls for the static portal. */
.piso-dialog[hidden], .piso-dialog.hidden { display: none !important; }
.piso-dialog { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(21, 19, 15, .82); }
.piso-dialog > .piso-dialog-panel { position: relative; box-sizing: border-box; width: 100%; max-width: 540px; min-height: 0; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; padding: 28px 24px; background: #fbf8f1; color: #15130f; }
.piso-dialog-panel h2 { font-size: 22px; font-weight: 800; line-height: 1.2; margin-bottom: 12px; }
.piso-dialog-panel > p { margin: 12px 0; }
.piso-dialog-panel textarea, .piso-whatsapp-result textarea { box-sizing: border-box; display: block; width: 100%; min-height: 90px; max-height: 36vh; padding: 10px; margin: 8px 0; border: 2px solid #5b5448; background: #fff; color: #15130f; font: inherit; font-size: 16px; resize: vertical; }
.piso-dialog-panel > button, .piso-whatsapp-result button { padding: 10px 14px; margin: 6px 8px 0 0; border: 2px solid #15130f; background: #efe9dd; color: #15130f; cursor: pointer; font: inherit; font-weight: 700; }
.piso-dialog-panel :focus-visible { outline: 3px solid #a83000; outline-offset: 3px; }
.piso-whatsapp-result { margin-top: 18px; padding-top: 14px; border-top: 2px solid #15130f; }
.piso-whatsapp-result p { font-size: 14px; margin-bottom: 10px; }
.piso-whatsapp-result label { display: block; margin-top: 14px; font-weight: 700; font-size: 14px; }
.piso-whatsapp-link { display: inline-block; padding: 12px; background: #a83000; color: #fff; font-weight: 700; text-decoration: underline; }
.field-error { margin: 5px 0; font-size: 13px; font-weight: 600; line-height: 1.4; color: #8f2900; }
.field-error:empty { display: none; }
[aria-invalid="true"] { outline: 2px solid #a83000; outline-offset: 1px; }
.piso-copy-probe { position: fixed; inset: 0 auto auto 0; width: 1px; height: 1px; opacity: 0; }
@media print { .piso-dialog, .piso-whatsapp-result { display: none !important; } }

/* Calculator explanations share the site's existing paper-and-ink palette. */
.seo-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 18px; margin: 20px 0; }
.seo-fields label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 7px; }
.seo-fields input { box-sizing: border-box; width: 100%; min-width: 0; padding: 12px; background: #fbf8f1; color: #15130f; border: 1px solid #8d8473; font: inherit; font-size: 16px; }
.seo-fields small, #porc-loss-help { display: block; font-size: 13px; line-height: 1.6; color: #4f493e; margin-top: 6px; }
.seo-note { color: #4f493e; font-size: 14px; line-height: 1.7; margin: 16px 0; }
.seo-note[hidden] { display: none; }
.seo-result { margin: 20px 0; padding: 18px; border-left: 4px solid #a83000; background: #e6dfd1; color: #15130f; line-height: 1.7; overflow-wrap: anywhere; }
.seo-result p + p { margin-top: 8px; }
.seo-result strong { display: block; font-size: clamp(20px, 4vw, 28px); }
.seo-next { display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 20px 0; }
.seo-next a, .seo-editorial a, .seo-byline a { color: #8f2900; text-decoration: underline; text-underline-offset: 3px; }
.seo-editorial { max-width: 896px; margin: 32px auto; padding: 0 24px; color: #3d3830; line-height: 1.8; }
.seo-editorial h2 { margin: 24px 0 12px; font-size: clamp(22px, 3vw, 30px); font-weight: 800; line-height: 1.3; color: #15130f; }
.seo-editorial p { margin: 12px 0; }
.seo-byline { max-width: 896px; margin: 24px auto; padding: 20px 24px; border-top: 1px solid #cfc6b4; font-size: 13px; color: #4f493e; line-height: 1.7; }
.seo-fields :focus-visible, .seo-next a:focus-visible { outline: 3px solid #a83000; outline-offset: 3px; }
@media (max-width: 480px) { .seo-editorial { padding-inline: 16px; } .seo-result { padding: 14px; } }
