.permit-module{background:white;border:1px solid #d6e3e8;border-radius:18px;overflow:hidden}.permit-heading{display:flex;justify-content:space-between;align-items:center;padding:28px 30px;gap:18px}.permit-heading p{margin:5px 0}.permit-heading .tag{white-space:nowrap}.permit-notice{margin:0;padding:14px 30px;background:#edf6f5;font-size:13px}.permit-toolbar{display:flex;flex-wrap:wrap;gap:10px;padding:18px 30px;border-bottom:1px solid #d6e3e8}.permit-module button{margin:0}.permit-layout{display:grid;grid-template-columns:245px minmax(0,1fr)}.permit-sidebar{background:#f6f9fa;padding:20px;border-right:1px solid #d6e3e8}.permit-sidebar label{margin-top:0}.permit-sidebar>small{margin:18px 0 12px}.permit-item{display:flex;flex-direction:column;gap:7px;text-align:left;width:100%;background:white;color:var(--ink);border:1px solid #d6e3e8;margin-bottom:10px!important;padding:14px}.permit-item strong,.permit-item span{overflow-wrap:anywhere}.permit-item span{font-size:12px;color:var(--muted)}.permit-item.is-selected{border-color:var(--accent);box-shadow:inset 4px 0 var(--accent);background:#eaf5f4}.permit-editor{padding:24px;min-width:0}.permit-editor-heading{display:flex;align-items:center;justify-content:space-between;gap:15px}.permit-editor-heading button{font-size:12px;padding:9px}.permit-editor h3{font-size:15px;margin:28px 0 14px;padding-bottom:10px;border-bottom:1px solid #d6e3e8;color:var(--accent)}.permit-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.permit-fields label{margin:0;font-size:12px}.permit-module input,.permit-module select,.permit-module textarea,.permit-module output{font:inherit;width:100%;margin-top:7px;padding:10px;border:1px solid #ccdbe0;border-radius:7px;background:#fff;color:var(--ink)}.permit-module output{display:block;background:#eaf5f4;min-height:42px;font-weight:700}.permit-table-scroll{overflow:auto;margin-top:16px}.permit-axles{border-collapse:collapse;width:100%;font-size:12px}.permit-axles th,.permit-axles td{padding:9px;border:1px solid #d6e3e8;min-width:115px}.permit-axles th{background:#f0f5f7;text-align:left}.permit-axles th:first-child{min-width:145px}.permit-axles select,.permit-axles input{margin:0;min-width:100px}.permit-totals{display:flex;justify-content:space-between;gap:15px;flex-wrap:wrap;background:#edf6f5;padding:16px;margin-top:18px;font-size:13px}.permit-totals strong{margin-left:12px}.permit-mismatch{color:#ac3930}.permit-module textarea{resize:vertical}@media(max-width:850px){.permit-layout{grid-template-columns:1fr}.permit-sidebar{border-right:0;border-bottom:1px solid #d6e3e8}.permit-sidebar #permitList{display:flex;gap:10px;overflow:auto}.permit-item{min-width:180px;max-width:220px}.permit-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:520px){.permit-heading{padding:20px;align-items:flex-start;flex-direction:column}.permit-editor{padding:16px}.permit-notice,.permit-toolbar{padding:15px 20px}.permit-fields{grid-template-columns:1fr 1fr}.permit-module h1{font-size:23px}}

@media(min-width:851px){#permitList{max-height:900px;overflow-y:auto;padding-right:5px}}
.permit-section{padding:2px 0 22px;border-bottom:1px solid #e5edf0}.permit-section:last-of-type{border-bottom:0}.permit-section h3{border:0;display:flex;align-items:center;gap:10px;margin:24px 0 18px;font-size:16px}.permit-section h3>span{display:inline-flex;align-items:center;justify-content:center;width:29px;height:29px;border-radius:8px;background:#e6f3f1;color:var(--accent);font-size:12px;flex-shrink:0}.permit-section>small{margin-bottom:14px}.permit-section p{font-size:13px}.permit-dimensions,.permit-tara-table,.permit-results{width:100%;border-collapse:collapse;font-size:12px}.permit-dimensions th,.permit-dimensions td,.permit-tara-table th,.permit-tara-table td,.permit-results th,.permit-results td{padding:11px 10px;text-align:left;border-bottom:1px solid #dfe8eb;vertical-align:middle}.permit-dimensions thead,.permit-tara-table thead,.permit-results thead{background:#f1f6f7}.permit-dimensions th:first-child{width:23%}.permit-dimensions td{width:25%}.permit-dimensions input,.permit-dimensions output,.permit-tara-table input{margin:0}.permit-dimensions output{border:0;background:#eaf5f4}.permit-tara{border:1px solid #dfe8eb;padding:16px;border-radius:10px;background:#fafcfc}.permit-tara summary,.permit-section summary{cursor:pointer;font-weight:650;color:var(--ink);font-size:14px}.permit-tara>small{margin-top:12px}.permit-tara-table td:first-child{width:28%}.permit-tara-table td:nth-child(2){width:18%}.permit-tara-table td:last-child{width:40px}.permit-tara-table td button{padding:5px 10px}.permit-tara>button{margin-top:14px;font-size:12px;padding:9px 12px}.permit-module output{font-size:13px}.permit-weight-summary{margin-bottom:18px}.permit-axles th:first-child{min-width:155px;font-size:10px}.permit-axles small{font-size:10px;line-height:1.4;margin-top:7px;min-height:28px}.permit-axles output{border:0;min-height:34px;text-align:center;background:#f1f4f5}.permit-legend{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0 10px}.permit-legend span,.permit-result{display:inline-block;padding:5px 9px;border-radius:5px;font-size:11px;font-weight:650}.permit-module .weight-ok{background:#e7f4ed;color:#256344;border-color:#a9d5b9}.permit-module .weight-limit{background:#fff1c8;color:#785800;border-color:#dfbf53}.permit-module .weight-review{background:#fff0dd;color:#8b4b0c;border-color:#e8bb7f}.permit-module .weight-over{background:#fbe5e5;color:#a22828;border-color:#e5a4a4}.permit-module .weight-pending{background:#eff2f4;color:#607480}.permit-results td.weight-review,.permit-results td.weight-over,.permit-results td.weight-ok{font-weight:650}.permit-results td:last-child{min-width:100px}.permit-reference-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.permit-reference-grid label{margin:0;font-size:12px}.permit-reference-grid select{font-size:11px;padding:8px}.permit-reference-note{padding:12px 15px;background:#f3f7f9;border-radius:8px;color:#526b78}.permit-reference-note a{color:var(--accent)}#permitGeometry{padding:15px 0;font-size:12px;color:var(--muted)}#permitMessage:empty{display:none}#permitMessage{padding:0 30px}.permit-editor{padding:24px 28px}.permit-editor input:focus-visible,.permit-editor select:focus-visible,.permit-editor textarea:focus-visible{outline:3px solid #007e8740;outline-offset:1px}#permitRequirements{overflow:auto}.permit-results tbody tr:hover{box-shadow:inset 3px 0 #aac7cc}.permit-dimensions{min-width:440px}.permit-tara-table{min-width:500px}@media(max-width:650px){.permit-editor{padding:16px}.permit-reference-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.permit-fields{grid-template-columns:1fr}.permit-heading h1{font-size:24px}.permit-results th,.permit-results td{padding:9px}.permit-tara{padding:12px}.permit-editor-heading h2{font-size:18px}.permit-editor-heading button{font-size:11px}.permit-notice{font-size:12px}}

.permit-sidebar,.permit-section,.permit-tara,.permit-fields,.permit-editor{min-width:0;max-width:100%}.permit-table-scroll{max-width:100%;width:100%}.permit-results{min-width:560px}.permit-editor-heading{flex-wrap:wrap}.permit-legend span{white-space:normal}.permit-section small{overflow-wrap:anywhere}@media(max-width:850px){.permit-layout{grid-template-columns:minmax(0,1fr)}}
/* Compact tables: all eight groups fit in the desktop editor. */
.permit-layout{grid-template-columns:190px minmax(0,1fr)}.permit-sidebar{padding:14px}.permit-editor{padding:18px}.permit-module input,.permit-module select,.permit-module textarea,.permit-module output{padding:7px 8px;font-size:13px}.permit-fields{gap:10px}.permit-section{padding-bottom:14px}.permit-section h3{margin:19px 0 12px}.permit-dimensions{min-width:0;table-layout:fixed}.permit-dimensions th,.permit-dimensions td{padding:7px}.permit-dimensions output{min-height:32px}.permit-axles{table-layout:fixed;width:100%;min-width:670px;font-size:11px}.permit-axles th,.permit-axles td{min-width:0;padding:5px 3px;vertical-align:top}.permit-axles th:first-child{width:113px;min-width:0;font-size:9px;overflow-wrap:anywhere}.permit-axles select,.permit-axles input{min-width:0;width:100%;padding:7px 2px;font-size:11px}.permit-axles output{font-size:12px;padding:7px 2px;min-height:30px;margin:0}.permit-axles small{font-size:9px;overflow-wrap:anywhere}.permit-no-distance{background:#f6f9fa}.permit-legend{font-size:10px}.permit-results th,.permit-results td{padding:8px}.permit-dimensions output:empty{min-height:32px}.permit-fields label{font-size:12px}@media(max-width:850px){.permit-layout{grid-template-columns:minmax(0,1fr)}}@media(max-width:520px){.permit-editor{padding:12px}.permit-dimensions th,.permit-dimensions td{padding:5px 3px;font-size:10px}.permit-dimensions input,.permit-dimensions output{font-size:12px;padding:7px 4px}.permit-dimensions th:first-child{width:24%}}
/* Studies stay alongside the form while scrolling on desktop. */
body:has(#permitsHost:not([hidden])) main{max-width:1720px}
.permit-with-studies{overflow:visible}
.permit-workspace{display:grid;grid-template-columns:minmax(0,1fr) 285px;gap:0;min-width:0;align-items:start}
.permit-studies{position:sticky;top:16px;align-self:start;max-height:calc(100dvh - 32px);overflow-y:auto;background:#f8fbfc;border-left:1px solid #d6e3e8;padding:16px;border-radius:0 0 16px 0;min-width:0}
.permit-studies .permit-section{border:0;padding:0}.permit-studies h3{margin:0 0 14px;font-size:15px;align-items:flex-start}.permit-studies h3>span{display:none}.permit-studies .permit-reference-note{font-size:11px;padding:10px;margin:0 0 12px}.permit-studies .permit-results{min-width:0;table-layout:fixed}.permit-studies .permit-results thead{display:none}.permit-studies .permit-results tr{display:grid;grid-template-columns:minmax(0,1fr) auto;padding:10px 0;border-bottom:1px solid #dfe8eb;gap:6px}.permit-studies .permit-results th,.permit-studies .permit-results td{padding:0;border:0;font-size:11px;min-width:0!important}.permit-studies .permit-results th{grid-column:1;grid-row:1;align-self:center;background:none}.permit-studies .permit-results td:nth-child(2){grid-column:1/-1;grid-row:2;font-size:10px;color:var(--muted)}.permit-studies .permit-results td:last-child{grid-column:2;grid-row:1}.permit-studies .permit-result{font-size:10px;padding:4px 6px}.permit-studies .permit-totals{font-size:11px;line-height:1.6;padding:12px;margin-top:14px}.permit-studies .permit-mismatch{font-size:11px}#permitRequirements{overflow:visible}
@media(min-width:1101px) and (max-width:1399px){.permit-layout{grid-template-columns:150px minmax(0,1fr)}.permit-workspace{grid-template-columns:minmax(0,1fr) 240px}.permit-editor{padding:12px}.permit-axles{min-width:590px}.permit-axles th:first-child{width:95px}.permit-axles select,.permit-axles input{font-size:10px}.permit-sidebar{padding:10px}}
@media(max-width:1100px){.permit-workspace{grid-template-columns:minmax(0,1fr)}.permit-studies{position:static;max-height:none;border-left:0;border-top:1px solid #d6e3e8;border-radius:0 0 16px 16px}.permit-studies .permit-results tr{grid-template-columns:minmax(0,1fr) auto}.permit-studies .permit-results th{font-size:12px}}
/* Make required studies immediately visible without relying on colour alone. */
.permit-studies{background:#fff;border:1px solid #c6d9df;border-top:4px solid var(--accent);box-shadow:0 5px 20px #14313e0d;border-radius:12px;padding:16px;margin:12px 8px 12px 0}
.permit-studies h3{font-size:20px;line-height:1.25;font-weight:750;color:var(--ink);margin-bottom:16px}
.permit-studies .permit-results tr{padding:13px 0;gap:8px}.permit-studies .permit-results th{font-size:13px;line-height:1.4}.permit-studies .permit-results td:nth-child(2){font-size:11px;line-height:1.5}.permit-studies .permit-result{font-size:17px;font-weight:800;min-width:47px;text-align:center;padding:7px 9px;border-radius:7px;line-height:1.1}
.permit-studies .study-required{background:#b4232c;color:#fff;border:1px solid #991c24}.permit-studies .study-not-required{background:#e6f4eb;color:#24633d;border:1px solid #a9d5b9}.permit-studies .permit-result.study-pending{font-size:11px;font-weight:600;min-width:0;max-width:92px;line-height:1.4;background:#eff2f4;color:#526674;border:1px solid #d8e1e5}
.permit-studies .permit-reference-note{font-size:11px;line-height:1.6}.permit-studies .permit-totals{font-size:12px;line-height:1.6;font-weight:600}
@media(max-width:1100px){.permit-studies{margin:12px;max-width:calc(100% - 24px)}}

.permit-studies .permit-result{font-size:13px;min-width:36px;padding:5px 7px;font-weight:750}

.permit-list-entry{position:relative;min-width:0}.permit-list-entry .permit-item{padding-right:32px}.permit-remove-shortcut{position:absolute;right:5px;top:5px;padding:3px 7px!important;font-size:18px!important;line-height:1;background:transparent!important;color:var(--muted)!important;border:0;border-radius:5px}.permit-remove-shortcut:hover{background:#fbe5e5!important;color:#a22828!important}@media(max-width:850px){.permit-list-entry{flex:0 0 180px}.permit-list-entry .permit-item{height:calc(100% - 10px);max-width:100%;min-width:0}}
.permit-axles input[data-prop=weight]{text-align:center;font-weight:700}.permit-axles input[readonly]{background:#e9eff2;color:#526674}.permit-module .weight-ok{background:#bee5cc;color:#14572e;border-color:#479a63}.permit-module .weight-review{background:#ffd49c;color:#793b00;border-color:#cf8a27}.permit-module .weight-over{background:#f6b5b8;color:#891a22;border-color:#c74750}.permit-length-summary{display:grid;grid-template-columns:1fr 1.4fr 1fr;border:1px solid #c6d9df;border-radius:9px;overflow:hidden;margin-top:14px;text-align:center;background:#f5f8fa}.permit-length-summary>div{padding:10px 6px}.permit-length-summary small{font-size:11px;margin:0 0 5px}.permit-length-summary strong{font-size:16px}.permit-length-main{background:#e0efef;border-left:1px solid #c6d9df;border-right:1px solid #c6d9df}.permit-length-note{font-size:10px!important;margin-top:7px;color:var(--muted)}

.permit-axles input[data-prop=next]{text-align:center}
.permit-axles input[data-prop=internal]{text-align:center}.permit-length-title{font-size:15px;margin:22px 0 10px;color:var(--ink)}.permit-studies .permit-length-summary{grid-template-columns:1fr;margin-top:0;text-align:left}.permit-studies .permit-length-summary>div{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px}.permit-studies .permit-length-summary small{margin:0;font-size:11px}.permit-studies .permit-length-summary strong{white-space:nowrap;font-size:15px}.permit-studies .permit-length-main{border:0;border-top:1px solid #c6d9df;border-bottom:1px solid #c6d9df}.permit-studies .permit-length-note{display:block;line-height:1.6}.permit-axles th small{font-size:9px;min-height:0;margin:4px 0 0;font-weight:400}

.permit-studies .permit-length-title{margin-top:0}.permit-studies .permit-length-note{margin-bottom:22px}
