.fp { padding-top: 2.5rem; padding-bottom: 3rem; }
.fp [hidden] { display: none !important; }
.fp-intro { display: flex; gap: 1.5rem; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.fp-intro h1 { font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.1; margin: 0 0 .7rem; }
.fp-intro p { max-width: 760px; margin: 0; color: var(--muted); }
.fp-intro > a { flex-shrink: 0; }
.fp-status { padding: .7rem 1rem; background: #edf5f1; border-left: 3px solid var(--brand); font-size: .88rem; }
.fp-status.is-error { background: #fff3df; border-color: #b56913; color: #663b0a; }
.fp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1.5rem; align-items: start; }
.fp-drawing { min-width: 0; position: sticky; top: 1rem; }
.fp-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .7rem; padding: .85rem; background: #fff; border: 1px solid #d5dfd9; border-radius: 12px 12px 0 0; }
.fp button:not(.btn), .fp select, .fp input:not([type=file]) { min-height: 42px; border: 1px solid #c7d4cd; border-radius: 6px; background: #fff; color: #173d32; font: inherit; }
.fp button:not(.btn) { padding: .45rem .75rem; font-size: .86rem; font-weight: 650; }
.fp button:disabled { opacity: .45; cursor: not-allowed; }
.fp button:hover:not(:disabled) { border-color: var(--accent); }
.fp button:focus-visible, .fp a:focus-visible, .fp input:focus-visible, .fp select:focus-visible, .fp svg [tabindex]:focus-visible { outline: 3px solid #ed7829; outline-offset: 3px; }
.fp-tools, .fp-tabs, .fp-actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.fp-tabs button[aria-selected=true], .fp-presets button.is-on { background: #173d32; color: #fff; border-color: #173d32; }
.fp-stage { position: relative; height: clamp(390px, 48vw, 590px); background: #f1f5f2; border-inline: 1px solid #d5dfd9; overflow: hidden; }
.fp-stage > svg, .fp-stage > canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.fp-stage svg text { font-family: "Segoe UI", sans-serif; user-select: none; }
.fp-stage svg .fp-node { cursor: grab; }
.fp-stage svg .fp-node:active { cursor: grabbing; }
.fp-stage svg .fp-edge { cursor: pointer; }
.fp-zoom { position: absolute; right: 12px; bottom: 12px; display: flex; gap: .35rem; }
.fp-drawing-footer { border: 1px solid #d5dfd9; padding: .85rem 1rem; background: white; border-radius: 0 0 12px 12px; }
.fp-drawing-footer p { margin: 0 0 .5rem; font-size: .8rem; color: var(--muted); }
.fp-stats { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; font-size: .95rem; font-weight: 700; }
.fp-selected { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .75rem; background: #fff4e8; border-radius: 8px; margin-top: .75rem; }
.fp-selected strong { margin-right: auto; font-size: .85rem; }
.fp-small { font-size: .8rem; line-height: 1.5; color: #566b62; margin: .7rem 0 0; }
.fp-block { padding: 1.1rem; border: 1px solid #d5dfd9; border-radius: 12px; margin-bottom: 1rem; background: white; }
.fp-block h2 { font-size: 1.05rem; display: flex; align-items: center; gap: .5rem; margin: 0 0 1rem; }
.fp-block h2 > span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #ecf3ef; color: #23523f; font-size: .8rem; }
.fp label { display: flex; flex-direction: column; gap: .3rem; font-size: .82rem; font-weight: 650; margin-bottom: .75rem; min-width: 0; }
.fp select, .fp input:not([type=file]) { width: 100%; padding: .45rem .55rem; font-size: .9rem; }
.fp-fields { display: grid; grid-template-columns: 1fr 1fr; column-gap: .65rem; }
.fp-presets { display: flex; flex-wrap: wrap; gap: .4rem; }
.fp-side { padding: .8rem; border: 1px solid #e0e7e2; border-radius: 8px; margin-bottom: .6rem; background: #f7f9f7; }
.fp-side.is-selected { border-color: #d87931; box-shadow: inset 3px 0 #ed7829; }
.fp-side > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .55rem; }
.fp-side strong { font-size: .85rem; }
.fp-side header button { min-height: 32px !important; padding: .2rem .4rem !important; font-size: .78rem !important; }
.fp-side-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.fp-side small { display: block; font-size: .76rem; color: #566b62; }
.fp-side a { font-size: .78rem; display: inline-block; margin-top: .45rem; }
.fp-results { margin-top: 2rem; padding: 1.5rem; border: 1px solid #d5dfd9; border-radius: 12px; background: #fff; scroll-margin-top: 1rem; }
.fp-results h2 { font-size: 1.65rem; margin: 0 0 .65rem; }
.fp-table-wrap { overflow-x: auto; }
.fp table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.fp th { color: #fff; background: #173d32; text-align: left; }
.fp th, .fp td { padding: .7rem .8rem; border-bottom: 1px solid #dce5df; vertical-align: top; }
.fp td:nth-child(2) { font-weight: 750; white-space: nowrap; }
.fp td:nth-child(3) { color: #566b62; }
.fp-notes { font-size: .85rem; padding-left: 1.1rem; margin: 1rem 0; }
.fp-result-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; align-items: center; }
.fp-result-actions form { margin: 0; }
.fp-result-actions .btn { font-size: .87rem; }
.fp-share { padding: 1rem; margin-top: 1rem; border: 1px solid #d5dfd9; border-radius: 8px; }
@media (max-width: 1100px) { .fp-grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; } .fp-stage { height: 430px; } }
@media (max-width: 850px) { .fp-grid { grid-template-columns: 1fr; } .fp-drawing { position: static; } .fp-stage { height: 440px; } .fp-intro { align-items: flex-start; } .fp-intro > a { display: none; } }
@media (max-width: 480px) { .fp { padding-top: 1.5rem; } .fp-stage { height: 340px; } .fp-toolbar { padding: .6rem; } .fp-results { padding: 1rem; } .fp-result-actions > *, .fp-result-actions form .btn { width: 100%; } .fp th, .fp td { padding: .5rem; font-size: .78rem; } }
@media print {
    header.site-header, body > .alert, .local-copy-bar, footer, .site-footer, .footer-cta, .fp-intro > a, .fp-status, .fp-toolbar, .fp-options, .fp-selected, .fp-zoom, .fp-result-actions, .fp-share, .fp-drawing-footer > p { display: none !important; }
    .fp { max-width: none; width: 100%; padding: 0; }
    .fp-grid { display: block; } .fp-drawing { position: static; }
    .fp-stage { height: 350px; break-inside: avoid; border: 1px solid #777; }
    .fp-results { margin-top: 1rem; padding: 0; border: 0; }
    .fp th { background: #eee !important; color: #000; } .fp td { color: #000 !important; }
    .fp tr { break-inside: avoid; } .fp-intro h1 { font-size: 25px; } .fp-intro p { font-size: 12px; }
}
