.widget-frame {
    margin: 0;
    background: white;
    color: #172b36;
    font: 1rem/1.5 system-ui, sans-serif;
    overflow-wrap: anywhere;
}

.widget-frame *, .widgets-page * { box-sizing: border-box; }
.widget-frame :is(a, input, select, button):focus-visible {
    outline: 3px solid #2076a1;
    outline-offset: 3px;
}

.widget-frame :is(.packing-page, .budget-page) {
    width: min(100% - 1.5rem, 72rem);
    margin: 1rem auto;
}

.widget-frame h1 { margin: 0; color: #173f57; font-size: clamp(1.35rem, 4vw, 1.8rem); line-height: 1.2; }
.widget-frame :is(.packing-panel, .budget-panel) { padding: .8rem; box-shadow: none; }
.widget-frame :is(.packing-layout, .budget-layout) { gap: .75rem; }
.widget-frame :is(.packing-panel, .budget-panel) h2 { font-size: 1.2rem; }
.widget-note { margin: .4rem 0; color: #465e6c; font-size: .9rem; }
.widget-jump, .widget-attribution a { display: inline-flex; align-items: center; min-height: 2.75rem; color: #176188; }
.widget-jump { margin-bottom: .25rem; }
.widget-attribution { margin: 0 .75rem .5rem; text-align: center; font-size: .85rem; }

.widgets-page { width: min(100% - 2rem, 76rem); margin: 2.5rem auto; }
.widgets-page h1 { margin: 0 0 .5rem; font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.15; }
.widgets-intro { max-width: 45rem; margin: 0 0 1.5rem; color: #465e6c; }
.widgets-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 28rem), 1fr)); gap: 1.25rem; }
.widget-card { min-width: 0; padding: clamp(.75rem, 2.5vw, 1.25rem); border: 1px solid #cbd8e1; border-radius: .75rem; }
.widget-card h2 { margin: 0; font-size: 1.35rem; }
.widget-card p { margin: .4rem 0 .9rem; }
.widget-card label { display: block; margin-bottom: .35rem; font-weight: 650; }
.widget-card textarea { display: block; width: 100%; min-height: 8rem; padding: .65rem; border: 1px solid #8ba1af; border-radius: .4rem; font: .9rem/1.5 ui-monospace, monospace; resize: vertical; }
.widget-card button { min-height: 2.75rem; margin-top: .5rem; padding: .4rem .8rem; border: 0; border-radius: .45rem; background: #176188; color: white; cursor: pointer; font: inherit; font-weight: 650; }
.widget-card button:hover { background: #124d6c; }
.widget-card button:focus-visible, .widget-card textarea:focus-visible { outline: 3px solid #2076a1; outline-offset: 3px; }
.widget-card .widget-copy-status { min-height: 1.5em; margin: .4rem 0; color: #465e6c; font-size: .9rem; }
.widget-card iframe { display: block; }
.widgets-page a { color: #176188; }

@media print {
    .widget-frame :is(.packing-page, .budget-page) { width: auto; margin: 0; }
    .widget-frame :is(.packing-panel, .budget-panel) { padding: 0; }
    .widget-note, .widget-jump, .widget-attribution { display: none; }
}
