/* Form 5558 page (EAMain.Form5558): page shell, cards, dialogs, toasts and Form 5558 laid out like the printed form. */
.f58 { --f58-blue:#1d4f91; --f58-green:#1e7b4a; --f58-amber:#b7791f; --f58-red:#b42318; --f58-line:#dfe3ea; --f58-soft:#f5f7fb; font-size:.95rem; }
.f58 .f58-header { display:flex; align-items:center; gap:12px; flex-wrap:wrap; border-bottom:1px solid var(--f58-line); padding-bottom:10px; margin-bottom:14px; }
.f58 .f58-header h1 { font-size:1.4rem; margin:0; }
.f58 .f58-badge-test { background:#fff4e5; color:#8a4b00; border:1px solid #f3c27a; border-radius:12px; padding:2px 10px; font-size:.78rem; }
.f58 .f58-card { background:#fff; border:1px solid var(--f58-line); border-radius:10px; padding:16px; margin-bottom:14px; }
.f58 .f58-card h2 { font-size:1.1rem; margin:0 0 10px; }
.f58 .f58-feature { border:2px solid var(--f58-green); background:#f1faf5; }
.f58 .f58-muted { color:#666; font-size:.85rem; }
.f58-modal-backdrop { position:fixed; inset:0; background:rgba(15,23,42,.45); z-index:2000; display:none; align-items:flex-start; justify-content:center; padding:40px 12px; overflow:auto; }
.f58-modal { background:#fff; border-radius:12px; max-width:760px; width:100%; box-shadow:0 10px 40px rgba(0,0,0,.25); }
.f58-modal-head { display:flex; justify-content:space-between; align-items:center; padding:12px 16px; border-bottom:1px solid #e5e7eb; }
.f58-modal-title { margin:0; font-size:1.05rem; }
.f58-modal-body { padding:16px; max-height:72vh; overflow:auto; font-size:.92rem; }
.f58-modal-body .f58-popup-text { white-space:pre-wrap; }
.f58-modal-foot { padding:10px 16px; border-top:1px solid #e5e7eb; display:flex; justify-content:flex-end; gap:8px; }
.f58-pdfview { position:fixed; inset:0; z-index:2050; background:#525659; display:flex; flex-direction:column; }
.f58-pdfview-bar { display:flex; align-items:center; gap:6px; padding:6px 10px; background:#323639; color:#fff; flex-wrap:wrap; }
.f58-pdfview-name { flex:1 1 12rem; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.9rem; }
.f58-pdfview-body { flex:1; overflow:auto; padding:16px; text-align:center; }
.f58-pdfview-body canvas { background:#fff; box-shadow:0 2px 12px rgba(0,0,0,.4); }
.f58-toast { position:fixed; right:16px; bottom:16px; z-index:2100; background:#1f2937; color:#fff; padding:10px 14px; border-radius:8px; font-size:.9rem; box-shadow:0 4px 16px rgba(0,0,0,.25); opacity:0; transform:translateY(8px); transition:opacity .3s, transform .3s; }
.f58-toast.show { opacity:1; transform:none; }
.f58-toast-error { background:#7a1a12; } .f58-toast-success { background:#14532d; }
.f58 .f58-gov { --g-ink:#111; background:#fff; color:var(--g-ink); font-family:Helvetica, Arial, sans-serif; font-size:.86rem; border:1px solid #c9ced6; box-shadow:0 1px 6px rgba(0,0,0,.08); padding:18px 22px 10px; max-width:1060px; margin:0 auto 14px; }
.f58 .g-head { display:grid; grid-template-columns:170px minmax(0,1fr) 150px; border-top:3px solid var(--g-ink); border-bottom:2px solid var(--g-ink); }
.f58 .g-head-l { border-right:1px solid var(--g-ink); padding:6px 8px 6px 0; }
.f58 .g-pre { font-weight:700; font-size:.95rem; letter-spacing:.02em; }
.f58 .g-fname { font-size:.8rem; line-height:1.1; } .f58 .g-fname b { font-size:1.55rem; font-weight:800; letter-spacing:-.01em; }
.f58 .g-agency { font-size:.62rem; line-height:1.25; margin-top:4px; }
.f58 .g-head-m { padding:6px 12px; text-align:center; }
.f58 .g-title { font-weight:700; font-size:1.08rem; line-height:1.25; }
.f58 .g-sub { font-size:.7rem; margin-top:3px; line-height:1.3; }
.f58 .g-head-r { border-left:1px solid var(--g-ink); display:flex; flex-direction:column; text-align:center; }
.f58 .g-omb { font-size:.66rem; padding:5px 4px; border-bottom:1px solid var(--g-ink); }
.f58 .g-year { font-size:2rem; font-weight:800; line-height:1.1; padding:4px 0; border-bottom:1px solid var(--g-ink); letter-spacing:.02em; }
.f58 .g-pub { font-size:.66rem; font-weight:700; padding:4px; }
.f58 .g-yearline { border-bottom:1px solid var(--g-ink); padding:5px 0; font-size:.8rem; }
.f58 .g-fill { display:inline-block; min-width:96px; border-bottom:1px solid var(--g-ink); text-align:center; font-weight:600; }
.f58 .g-fill .g-yearin { display:inline-block; width:auto; padding:0 4px; font-size:.8rem; font-weight:600; border:0; border-radius:0; background:#fffbe6; box-shadow:none; }
.f58 .g-fill .g-yearin:disabled { background:transparent; }
.f58 .g-part { border-bottom:1px solid var(--g-ink); }
.f58 .g-part-h { display:flex; align-items:stretch; border-bottom:1px solid var(--g-ink); margin-top:8px; }
.f58 .g-pn { background:var(--g-ink); color:#fff; font-weight:700; padding:2px 10px; white-space:nowrap; display:flex; align-items:center; }
.f58 .g-pt { font-weight:700; padding:2px 10px; display:flex; align-items:center; }
.f58 .g-pt.g-perjury { font-weight:400; font-size:.72rem; line-height:1.3; padding:4px 10px; }
.f58 .g-row { display:grid; grid-template-columns:58px minmax(160px,1fr) auto 92px; align-items:center; column-gap:6px; border-bottom:1px solid #cfd3da; min-height:34px; }
.f58 .g-part > .g-row:last-child { border-bottom:none; }
.f58 .g-row.err .g-num { color:var(--f58-red); }
.f58 .g-num { font-weight:700; padding-left:2px; font-size:.84rem; line-height:1.15; overflow-wrap:anywhere; }
.f58 .g-num-sm { font-size:.7rem; display:block; }
.f58 .g-lbl { display:flex; flex-wrap:wrap; align-items:baseline; gap:0 4px; padding:5px 0; min-width:0; }
.f58 .g-text { flex:0 1 auto; }
.f58 .g-dots { flex:1 1 30px; border-bottom:1px dotted #8a8f98; transform:translateY(-3px); min-width:20px; }
.f58 .g-subline .g-lbl { padding-left:16px; font-size:.82rem; }
.f58 .g-chk { display:flex; align-items:flex-start; gap:7px; margin:0; cursor:pointer; flex:0 1 auto; }
.f58 .g-chk input { width:15px; height:15px; margin-top:1px; border-radius:0; border:1.5px solid var(--g-ink); flex:none; }
.f58 .g-note { flex-basis:100%; font-size:.7rem; color:#6b7280; line-height:1.3; }
.f58 .g-note.g-error { color:var(--f58-red); } .f58 .g-note.g-warning { color:#8a5a00; }
.f58 .g-ref { display:inline-flex; align-items:center; justify-content:center; width:17px; height:17px; margin-left:4px; padding:0; border:none; border-radius:50%;
  background:var(--f58-blue); color:#fff; font:italic 700 11px/1 Georgia, 'Times New Roman', serif; vertical-align:middle; cursor:pointer; flex-shrink:0;
  box-shadow:0 1px 2px rgba(0,0,0,.18); transition:background-color .15s, transform .15s; }
.f58 .g-ref:hover { background:#0d6efd; transform:scale(1.1); }
.f58 .g-ref:focus-visible { outline:2px solid #0d6efd; outline-offset:2px; }
.f58 .g-cells { display:flex; align-self:stretch; min-width:0; }
.f58 .g-cell { position:relative; display:flex; align-items:center; border-left:1px solid var(--g-ink); flex:0 1 175px; min-width:92px; }
.f58 .g-cells > .g-cell + .g-cell, .f58 .g-colhead .g-cell, .f58 .g-cells > .g-cell:first-child:not(:only-child) { flex-basis:160px; }
.f58 .g-cell .form-control, .f58 .g-cell .form-select { border:none; border-radius:0; background-color:transparent; height:100%; min-height:33px; padding:3px 8px; font-family:"Courier New", Courier, monospace; font-size:.9rem; font-weight:600; color:#0b2a66; box-shadow:none; }
.f58 .g-cell .form-control:focus, .f58 .g-cell .form-select:focus { background-color:#fffde7; outline:2px solid #6ea8fe; outline-offset:-2px; }
.f58 .g-cell .form-control:disabled, .f58 .g-cell .form-select:disabled { background-color:transparent; opacity:1; }
.f58 .g-cell .form-control.calc { background-color:#eef4ff; } .f58 .g-cell .form-control.overridden { background-color:#fff4dc; }
.f58 .g-bn { position:absolute; left:0; top:0; bottom:0; display:flex; align-items:center; padding:0 4px; font-size:.68rem; font-weight:700; border-right:1px solid var(--g-ink); background:#fff; z-index:1; min-width:30px; justify-content:center; }
.f58 .g-bn + .form-control { padding-left:38px; }
.f58 .g-cell.g-t-text, .f58 .g-cell.g-t-select { flex-basis:340px; }
.f58 .g-cell.g-t-codes { flex:1 1 auto; padding:4px 6px; border-left:none; }
.f58 .g-cell.err { background:#fdecea; } .f58 .g-cell.warn { background:#fff6e0; }
.f58 .g-row.g-wide { grid-template-columns:58px minmax(0,1fr) 92px; }
.f58 .g-row.g-wide .g-lbl { grid-column:2; } .f58 .g-row.g-wide .g-cells { grid-column:2; grid-row:2; padding-bottom:6px; } .f58 .g-row.g-wide .g-tools { grid-column:3; grid-row:1 / 3; }
.f58 .g-yn { display:flex; gap:12px; padding:0 10px; align-items:center; height:100%; }
.f58 .g-yn label { display:flex; align-items:center; gap:4px; margin:0; cursor:pointer; font-size:.82rem; }
.f58 .g-yn input { width:14px; height:14px; accent-color:#111; margin:0; }
.f58 .g-tools { display:flex; flex-wrap:wrap; gap:0 2px; justify-content:flex-end; }
.f58 .g-tools button:not(.btn) { border:none; background:none; color:var(--f58-blue); padding:1px 4px; font-size:.72rem; }
.f58 .g-tools .btn { font-size:.72rem; padding:2px 8px; align-self:center; white-space:nowrap; margin-right:4px; }
.f58 .g-colhead { min-height:0; font-size:.72rem; font-weight:700; text-align:center; }
.f58 .g-colhead .g-cell { justify-content:center; padding:3px 4px; line-height:1.2; }
.f58 .g-cells > .g-cell.g-c3 { flex-basis:132px; }
.f58 .g-foot { display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; font-size:.7rem; padding-top:5px; }
.f58 .g-foot b { font-size:.85rem; }
.f58 .g-key { display:inline-block; width:12px; height:12px; border:1px solid #555; vertical-align:-2px; margin-left:6px; }
.f58 .g-key-calc { background:#eef4ff; } .f58 .g-key-over { background:#fff4dc; }
.f58 .f58-codes label { border-radius:0; border-color:#555; }
.f58 .g-extra { border-bottom:1px solid var(--g-ink); padding:3px 0; font-size:.74rem; line-height:1.35; }
.f58 .g-cell.g-t-radio { flex-basis:360px; }
.f58 .g-radio { flex-wrap:wrap; row-gap:2px; }
/* Box grid (Part II lines 1-4, Schedule SB A-D, signature blocks): caption above the entry, ID boxes on the right. */
.f58 .g-blk { display:grid; grid-template-columns:minmax(0,1fr) minmax(200px,32%); border-bottom:1px solid var(--g-ink); }
.f58 .g-blk.g-blk-full { grid-template-columns:minmax(0,1fr); }
.f58 .g-blk-l, .f58 .g-blk-r { display:flex; flex-direction:column; min-width:0; }
.f58 .g-blk-r { border-left:1px solid var(--g-ink); }
.f58 .g-box { position:relative; padding:3px 6px 0; border-bottom:1px solid #cfd3da; min-width:0; flex:1 1 auto; }
.f58 .g-blk-l > .g-box:last-child, .f58 .g-blk-r > .g-box:last-child, .f58 .g-blk-l > .g-boxrow:last-child { border-bottom:none; }
.f58 .g-boxrow { display:flex; border-bottom:1px solid #cfd3da; }
.f58 .g-boxrow > .g-box { border-bottom:none; flex:1 1 0; } .f58 .g-boxrow > .g-box + .g-box { border-left:1px solid #cfd3da; }
.f58 .g-boxrow > .g-box.g-t-state, .f58 .g-boxrow > .g-box.g-t-zip { flex:0 0 110px; }
.f58 .g-blbl { font-size:.72rem; line-height:1.25; color:#222; } .f58 .g-blbl b { font-size:.8rem; margin-right:3px; }
.f58 .g-box .form-control, .f58 .g-box .form-select { border:none; border-radius:0; background-color:transparent; min-height:28px; padding:1px 2px 3px; font-family:"Courier New", Courier, monospace; font-size:.9rem; font-weight:600; color:#0b2a66; box-shadow:none; }
.f58 .g-box .form-control:focus, .f58 .g-box .form-select:focus { background-color:#fffde7; outline:2px solid #6ea8fe; outline-offset:-2px; }
.f58 .g-box .form-control:disabled, .f58 .g-box .form-select:disabled { background-color:transparent; opacity:1; }
.f58 .g-box .g-chk { padding:5px 0; font-size:.8rem; }
.f58 .g-box.err { background:#fdecea; } .f58 .g-box.warn { background:#fff6e0; }
.f58 .g-box .g-tools { position:absolute; right:2px; top:1px; }
.f58 .g-static { min-height:28px; padding:2px 2px 4px; font-size:.72rem; color:#6b7280; font-style:italic; }
.f58 .g-static.g-val { font-family:"Courier New", Courier, monospace; font-size:.9rem; font-weight:600; color:#0b2a66; font-style:normal; }
/* Boxes A and B: a row of check boxes. */
.f58 .g-grp .g-lbl { align-items:flex-start; }
.f58 .g-opts { flex-basis:100%; display:grid; grid-template-columns:repeat(auto-fill, minmax(250px, 1fr)); gap:3px 18px; padding:3px 0 1px 4px; }
.f58 .g-opts-A { grid-template-columns:repeat(2, minmax(0, 1fr)); grid-template-rows:auto auto; grid-auto-flow:column; }
.f58 .g-opts-B { grid-template-columns:repeat(auto-fill, minmax(170px, auto)); }
.f58 .g-opt { display:flex; align-items:flex-start; gap:7px; margin:0; cursor:pointer; font-size:.82rem; }
.f58 .g-opt input[type=checkbox] { width:15px; height:15px; margin-top:1px; border-radius:0; border:1.5px solid var(--g-ink); flex:none; }
.f58 .g-opt.err { color:var(--f58-red); }
.f58 .g-opt-t { grid-column:1 / -1; } .f58 .g-opt-t .form-control { border:none; border-bottom:1px solid var(--g-ink); border-radius:0; padding:1px 4px; font-family:"Courier New", Courier, monospace; font-weight:600; color:#0b2a66; max-width:420px; box-shadow:none; }
.f58 .g-headrow { min-height:26px; } .f58 .g-headrow .g-lbl { padding:4px 0 2px; }
.f58 .g-headrow .g-cell.g-colh { justify-content:center; font-size:.72rem; font-weight:700; border-left:1px solid var(--g-ink); }
/* Signature areas. */
.f58 .g-caution { font-weight:700; font-size:.74rem; padding:4px 0; border-bottom:1px solid var(--g-ink); margin-top:8px; }
.f58 .g-part-h.g-sign { margin-top:0; }
.f58 .g-part-h.g-sign .g-pn { font-size:1rem; line-height:1.05; text-align:center; padding:4px 12px; }
.f58 .g-statement { border-bottom:1px solid var(--g-ink); padding:6px 0; font-size:.74rem; line-height:1.35; margin-top:8px; } .f58 .g-statement b { font-size:.85rem; }
.f58 .g-signwrap { display:grid; grid-template-columns:70px minmax(0,1fr); border-bottom:1px solid var(--g-ink); }
.f58 .g-signtag { background:var(--g-ink); color:#fff; font-weight:800; display:flex; align-items:center; justify-content:center; text-align:center; line-height:1.1; }
.f58 .g-signbody .g-blk:last-child { border-bottom:none; }
.f58 .g-schnote { max-width:1060px; margin:-6px auto 14px; font-size:.75rem; color:#6b7280; }
@media print { .f58 .g-tools, .f58 .g-ref { display:none !important; } .f58 .f58-gov { box-shadow:none; border:none; } }
.f58 .f58-steps { counter-reset: s; padding-left: 0; list-style: none; }
.f58 .f58-steps > li { counter-increment: s; position: relative; padding-left: 28px; margin-bottom: 4px; }
.f58 .f58-steps > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--f58-blue); color: #fff; font-size: .72rem; display: flex; align-items: center; justify-content: center; }
.f58 .f58-tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--f58-line); margin-bottom: 14px; }
.f58 .f58-tabs button { border: 1px solid transparent; border-bottom: none; background: none; padding: 8px 14px; border-radius: 8px 8px 0 0; color: var(--f58-blue); font-weight: 600; }
.f58 .f58-tabs button.active { border-color: var(--f58-line); background: #fff; color: #111; margin-bottom: -1px; }
.f58 .f58-pane[hidden] { display: none; }
.f58 .f58-help-quick { padding-left: 18px; }
.f58 .f58-help-quick li { margin-bottom: 6px; }
.f58 #f58Help .f58-card { max-width: 880px; }
.f58 .f58-bulk-table { font-size: .82rem; }
.f58 .f58-bulk-table td { vertical-align: top; }
.f58 .f58-bulk-table tr.st-error td { background: #fdecea; }
.f58 .f58-bulk-table tr.st-warning td { background: #fff6e0; }
.f58 .f58-bulk-table tr.st-duplicate td, .f58 .f58-bulk-table tr.st-enrolled td { background: #f1f3f5; color: #555; }
.f58 .f58-counts span { margin-right: 12px; }
.f58 .f58-auth { background: var(--f58-soft); border: 1px solid var(--f58-line); border-radius: 8px; padding: 10px 12px; font-size: .85rem; }
.f58 .f58-scroll { max-height: 460px; overflow: auto; border: 1px solid var(--f58-line); border-radius: 6px; }
/* Public page: toolbar, short plan year, Validate results, view-only, sign-in, account prepaid filings, share/QR. */
.f58 .f58-intro { max-width: 900px; }
.f58 .f58-panel-h { display: flex; align-items: center; gap: 8px; }
.f58 .f58-panel-t { flex: 1 1 auto; display: flex; align-items: center; gap: 6px; border: none; background: none; padding: 0; text-align: left; font-weight: 700; font-size: .85rem; color: inherit; }
.f58 .f58-chev::before { content: ''; display: inline-block; width: .45em; height: .45em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin: -3px 2px 0 0; transition: transform .15s; }
.f58 .f58-panel.collapsed .f58-chev::before { transform: rotate(-45deg); margin-top: 0; }
.f58 .f58-panel.collapsed .f58-panel-b { display: none; }
.f58 .f58-panel .btn-close { font-size: .6rem; flex: 0 0 auto; }
.f58 .f58-panel-b { margin-top: 4px; }
.f58 .f58-panel[hidden] { display: none; }
.content:has(> .f58) { padding-top: 12px; }
.f58 .f58-share-panel { padding: 8px 12px; }
.f58 .f58-share-panel .f58-panel-t { font-size: .9rem; }
.f58 .f58-intro-panel { border: 1px solid var(--f58-line); border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; }
.f58 .f58-term { border: 1px solid #f0c36d; background: #fff8e6; border-radius: 8px; padding: 6px 12px; margin-bottom: 10px; font-size: .85rem; }
.f58 .f58-toolbar { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 14px; margin-bottom: 10px; }
.f58 .f58-actions { align-items: center; gap: 6px; }
.f58 .f58-sep { width: 1px; align-self: stretch; background: var(--f58-line); margin: 0 4px; }
.f58 .f58-vres { border: 1px solid var(--f58-line); border-radius: 8px; padding: 8px 12px; background: var(--f58-soft); margin-top: 6px; }
.f58 .f58-vlist { padding-left: 18px; margin: 0; }
.f58 .f58-vlist li { margin-bottom: 2px; }
.f58 .f58-vlist button { border: none; background: none; color: var(--f58-blue); padding: 0 2px; text-decoration: underline; }
.f58 .badge.text-bg-danger, .f58-modal .badge.text-bg-danger { color: #fff; background-color: #dc3545; }
.f58 .badge.text-bg-warning, .f58-modal .badge.text-bg-warning { color: #000; background-color: #ffc107; }
.f58 .badge.text-bg-info, .f58-modal .badge.text-bg-info { color: #000; background-color: #0dcaf0; }
.f58 .badge.text-bg-success, .f58-modal .badge.text-bg-success { color: #fff; background-color: #198754; }
.f58 .badge.text-bg-primary, .f58-modal .badge.text-bg-primary { color: #fff; background-color: #0d6efd; }
.f58 .badge.text-bg-secondary, .f58-modal .badge.text-bg-secondary { color: #fff; background-color: #6c757d; }
.f58 .badge.text-bg-light, .f58-modal .badge.text-bg-light { color: #000; background-color: #f8f9fa; }
.f58 .f58-prior { border: 1px solid var(--f58-line); border-left: 4px solid var(--f58-blue); border-radius: 8px; padding: 8px 12px; background: #fff; margin: 8px 0; overflow-wrap: anywhere; }
.f58 .f58-prior-h { margin-bottom: 4px; }
.f58 .f58-prior.collapsed .f58-prior-h { margin-bottom: 0; }
.f58 .f58-prior .f58-panel-t { font-size: inherit; }
.f58 .f58-prior ul:not(.f58-vlist) { padding-left: 18px; margin-top: 2px; }
.f58 .f58-prior button.btn-link, .f58 .f58-find button.btn-link { color: var(--f58-blue); }
.f58 .f58-find { border: 1px dashed var(--f58-line); border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; background: var(--f58-soft); }
.f58 .f58-find-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.f58 .f58-find-row input { flex: 1 1 220px; min-width: 0; }
.f58 .f58-find-list { list-style: none; padding: 0; margin: 6px 0 0; max-height: 260px; overflow-y: auto; }
.f58 .f58-find-list li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 4px 0; border-top: 1px solid var(--f58-line); }
.f58 .f58-find-list li:first-child { border-top: none; }
.f58 #f58Check.btn-success, .f58 #f58Check.btn-warning, .f58 #f58Check.btn-danger { font-weight: 600; }
.f58 .f58-flash { animation: f58flash 1.6s ease-out; }
@keyframes f58flash { 0%, 40% { box-shadow: 0 0 0 3px #ffb020; background-color: #fff6d6; } 100% { box-shadow: none; } }
.f58 .f58-ro .form-control[readonly], .f58 .f58-ro .form-select:disabled { background-color: #f7f7f7; cursor: default; }
.f58 .f58-signin { border-left: 4px solid var(--f58-blue); }
.f58 .f58-wallet-n { font-size: 1rem; }
.f58-qrwrap { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.f58-qr { background: #fff; padding: 8px; border: 1px solid #dfe3ea; border-radius: 6px; line-height: 0; }
.f58-qr img, .f58-qr canvas { width: 180px; height: 180px; }
.f58 .f58-newkey { border: 3px solid var(--f58-green); background: #f1faf5; border-radius: 10px; padding: 14px; margin-bottom: 14px; scroll-margin: 90px; }
.f58 .f58-newkey:focus { outline: none; }
.f58 .f58-newkey-h { font-weight: 700; font-size: 1.1rem; color: var(--f58-green); margin-bottom: 4px; }
.f58 .f58-newkey-in { font-family: "Courier New", Courier, monospace; font-size: 1rem; font-weight: 700; background: #fff !important; }
.f58 .f58-apilinks { display: flex; flex-wrap: wrap; gap: 4px 16px; }
@media (max-width: 768px) { .f58 .f58-newkey .input-group { flex-wrap: wrap; } .f58 .f58-newkey-in { width: 100% !important; flex: 1 1 100%; font-size: .85rem; border-radius: 6px !important; } .f58 .f58-newkey .input-group .btn { flex: 1 1 100%; margin-top: 6px; border-radius: 6px !important; } }
/* Tutorial panel lives on <body>, outside .f58. */
.f58-tut { position: fixed; right: 16px; bottom: 16px; z-index: 1900; width: 360px; max-width: calc(100vw - 32px); background: #fff; border: 1px solid #c9d3e6; border-top: 4px solid #1d4f91; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.2); padding: 12px 14px; font-size: .9rem; }
.f58-tut-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.f58-tut h3 { font-size: 1rem; margin: 0 0 6px; }
.f58-tut .btn { min-height: 34px; }
.f58-tut-focus { outline: 3px solid #ffb020 !important; outline-offset: 2px; border-radius: 4px; scroll-margin: 90px; }
@media print { .f58-tut, .f58-toast { display: none !important; } }

/* Phones and small tablets. */
@media (max-width: 768px) {
  .f58 { font-size: 1rem; }
  .f58 .f58-card { padding: 12px; }
  .f58 .f58-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .f58 .f58-tabs button { white-space: nowrap; padding: 10px 12px; }
  .f58 .f58-actions .btn, .f58 .f58-toolbar .form-select, .f58 .f58-toolbar .form-control { min-height: 40px; }
  .f58 .f58-sep { display: none; }
  .f58 .f58-gov { padding: 10px 8px 6px; }
  .f58 .g-head { grid-template-columns: 1fr; }
  .f58 .g-head-l, .f58 .g-head-r { border: none; border-bottom: 1px solid var(--g-ink); padding: 6px 0; }
  .f58 .g-head-r { flex-direction: row; justify-content: space-around; align-items: center; }
  .f58 .g-head-r > * { border-bottom: none !important; }
  .f58 .g-blk { grid-template-columns: 1fr; }
  .f58 .g-blk-r { border-left: none; border-top: 1px solid var(--g-ink); }
  .f58 .g-boxrow { flex-wrap: wrap; }
  .f58 .g-boxrow > .g-box { flex: 1 1 100%; }
  .f58 .g-boxrow > .g-box + .g-box { border-left: none; border-top: 1px solid #cfd3da; }
  .f58 .g-boxrow > .g-box.g-t-state, .f58 .g-boxrow > .g-box.g-t-zip { flex: 1 1 45%; }
  .f58 .g-box .form-control, .f58 .g-box .form-select { min-height: 40px; font-size: 1rem; }
  .f58 .g-row { grid-template-columns: 40px minmax(0,1fr); }
  .f58 .g-row .g-cells, .f58 .g-row .g-tools { grid-column: 1 / -1; }
  .f58 .g-cell { flex: 1 1 100%; border-left: none; }
  .f58 .g-opts-A, .f58 .g-opts { grid-template-columns: 1fr; grid-auto-flow: row; }
  .f58 .g-opt, .f58 .g-chk { padding: 4px 0; }
  .f58 .g-opt input[type=checkbox], .f58 .g-chk input { width: 20px; height: 20px; }
  .f58 .f58-scroll { max-height: none; }
  .f58 table { font-size: .85rem; }
  .f58-modal-backdrop { padding: 0; }
  .f58-modal { max-width: none !important; width: 100% !important; min-height: 100vh; border-radius: 0; }
  .f58-modal-body { max-height: none; }
  .f58-modal-foot { flex-wrap: wrap; position: sticky; bottom: 0; background: #fff; }
  .f58-modal-foot .btn { flex: 1 1 auto; min-height: 44px; }
  .f58-tut { left: 0; right: 0; bottom: 0; width: auto; max-width: none; border-radius: 12px 12px 0 0; max-height: 45vh; overflow: auto; }
  .f58-toast { left: 12px; right: 12px; }
}
