* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: #eff3f0;
  color: #193a35;
  font: 1rem/1.55 "Segoe UI", Arial, sans-serif;
}

header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.15rem clamp(1.25rem, 6vw, 6rem);
  border-bottom: 1px solid #bdcbc3;
}

header strong { font-size: 1.4rem; letter-spacing: -.04em; }
header span { padding-left: 1rem; border-left: 1px solid #a6b6ad; }

main {
  width: min(68rem, 90%);
  margin: clamp(2rem, 10vh, 7rem) auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  box-shadow: 0 1rem 3rem #16352d12;
}

.intro, .card { padding: clamp(1.6rem, 5vw, 4.5rem); }
.intro {
  display: grid;
  align-content: center;
  background: #163e38;
  color: #fff;
  border-top: .4rem solid #acd387;
}

h1, h2, p { margin: 0; }
h1 { max-width: 8ch; font-size: clamp(3rem, 6vw, 5.5rem); line-height: .98; letter-spacing: -.055em; }
.intro p { margin-top: 1.5rem; max-width: 32ch; color: #deebe3; }
.card { background: white; }
h2 { font-size: 2rem; letter-spacing: -.04em; }
.card p { color: #54665f; }
fieldset { padding: 0; margin: 1.75rem 0 0; border: 0; min-width: 0; }
legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
label { display: block; font-weight: 600; margin-bottom: .35rem; }
input, button { width: 100%; border-radius: .35rem; font: inherit; padding: .7rem .9rem; }
input { margin-bottom: 1rem; border: 1px solid #aab8b1; background: #f5f7f5; }
button { border: 0; background: #516b63; color: white; font-weight: 650; }
:disabled { cursor: not-allowed; }

@media (max-width: 44rem) {
  main { grid-template-columns: 1fr; margin: 1.5rem auto; }
  h1 { max-width: none; }
}


.preview-link { display: inline-block; margin-top: 1rem; }
a { color: #175b4d; text-underline-offset: .2em; }
a:focus-visible { outline: 3px solid #387557; outline-offset: 4px; }
.workspace { display: block; box-shadow: none; }
.workspace h1 { max-width: none; font-size: clamp(2.4rem, 5vw, 4rem); margin: 1.25rem 0 2rem; }
.workspace:has(> .options) {
  --inset: clamp(1.6rem, 5vw, 4.5rem);
  display: grid;
  grid-template-areas: "back menu" "title menu";
  grid-template-rows: auto 1fr;
  background: #163e38;
  box-shadow: 0 1rem 3rem #16352d12;
}
.workspace:has(> .options) > a {
  grid-area: back;
  border-top: .4rem solid #acd387;
  padding: 1.5rem var(--inset) 0;
  color: #deebe3;
}
.workspace:has(> .options) > a:focus-visible { outline-color: #acd387; outline-offset: -4px; }
.workspace:has(> .options) h1 {
  grid-area: title;
  align-self: center;
  margin: 0;
  padding: var(--inset);
  color: white;
  font-size: clamp(2.5rem, 5vw, 4.75rem);
}
.options { grid-area: menu; display: grid; padding: 1rem var(--inset); background: white; }
.options a { display: grid; align-content: center; padding: 1.25rem 0; text-decoration: none; }
.options a + a { border-top: 1px solid #bdcbc3; }
.options strong { font-size: 1.35rem; }
.options span { margin-top: .15rem; color: #495e56; }
.options a:is(:hover, :focus-visible) strong { text-decoration: underline; }
.preview-panel { display: block; padding: clamp(1.5rem, 3vw, 2.5rem); background: white; border: 1px solid #bdcbc3; }
@media (max-width: 44rem) {
  .workspace:has(> .options) { grid-template-areas: "back" "title" "menu"; grid-template-rows: auto; }
  .options { padding-block: .25rem; }
}
.preview-panel fieldset { margin: 0; max-width: 36rem; }

/* New permit form */
.permit-page * {
    margin:0;
    padding:0;
    box-sizing:border-box;
}

.permit-page {
    font-family:Segoe UI, Arial, sans-serif;
    background:#f5f6f8;
    padding:30px;
    color:#333;
}

.permit-page .container {
    max-width:1400px;
    margin:auto;
}

.permit-page header {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:20px;
}

.permit-page h1 {
    color:#111;
}

.permit-page .card {
    background:white;
    padding:20px;
    margin-bottom:20px;
    border-radius:8px;
    box-shadow:0 2px 6px rgba(0,0,0,.08);
}

.permit-page .card h2 {
    margin-bottom:15px;
    border-bottom:3px solid #000;
    padding-bottom:8px;
}

.permit-page .grid-2 {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:15px;
}

.permit-page .grid-3 {
    display:grid;
    grid-template-columns:1fr 1fr 1fr;
    gap:15px;
}

.permit-page .grid-4 {
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:15px;
}

.permit-page .form-group {
    display:flex;
    flex-direction:column;
}

.permit-page label {
    margin-bottom:5px;
    font-weight:600;
}

.permit-page input,
.permit-page textarea,
.permit-page select {
    padding:10px;
    border:1px solid #ccc;
    border-radius:4px;
    width:100%;
}

.permit-page textarea {
    resize:vertical;
}

.permit-page .checkbox-group {
    display:grid;
    gap:10px;
}

.permit-page .warning-banner {
    margin-top:20px;
    background:#d91e18;
    color:white;
    font-weight:bold;
    text-align:center;
    padding:15px;
}

.permit-page .success-banner {
    margin-top:10px;
    background:#15aa46;
    color:white;
    font-weight:bold;
    text-align:center;
    padding:15px;
}

.permit-page .inline-radio {
    display:flex;
    align-items:center;
    gap:20px;
}

.permit-page .hazard-table {
    width:100%;
    border-collapse:collapse;
}

.permit-page .hazard-table th {
    background:#444;
    color:white;
    padding:12px;
}

.permit-page .hazard-table td {
    border:1px solid #d0d0d0;
    padding:10px;
    vertical-align:top;
}

.permit-page .hazard-table textarea {
    width:100%;
    min-height:60px;
}

.permit-page .verification-box {
    background:#f28ea1;
    padding:20px;
    display:grid;
    gap:10px;
}

.permit-page .ppe-grid {
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:10px;
}

.permit-page input[type="checkbox"],
.permit-page input[type="radio"] {
    width:auto;
    margin-right:8px;
}

@media(max-width:900px){

    .permit-page .grid-2,
.permit-page .grid-3,
.permit-page .grid-4 {
        grid-template-columns:1fr;
    }

    .permit-page .ppe-grid {
        grid-template-columns:1fr 1fr;
    }

    .permit-page header {
        flex-direction:column;
        align-items:flex-start;
        gap:15px;
    }

}
.permit-page header { padding: 0 0 1rem; }
.permit-page h1 { max-width: none; font-size: clamp(2rem, 5vw, 3.8rem); }
.permit-page h2 { font-size: clamp(1.25rem, 3vw, 1.7rem); }
.permit-page input, .permit-page textarea { font: inherit; min-width: 0; }
.permit-page .inline-radio { flex-wrap: wrap; }
.permit-page .preview-note { margin: .5rem 0 1rem; }
.permit-page:has(#rams-approved:checked) .warning-banner { display: none; }
@media (max-width: 600px) {
    .permit-page { padding: 12px; }
    .permit-page .card { padding: 14px; }
}



.workspace-header { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
