/* ===== SealPal PERM cases (perm-desk.js, internal edition) =====
   The list (#perm) uses the workspace table; a case (#permcase) uses the guided layout of guided.css (.gd, .gd-shell,
   .gd-flow) with the stages as its left menu. Dates use the off-white list (offwhite.css). Colours come from the
   guided variables, which already have night values. Phone overrides live in mobile.css. */

/* ---------- The list ---------- */
.pc-table td{vertical-align:top}
.pc-table td strong{display:inline}
.pc-table td>small{white-space:normal}
.pc-table .badge{margin-left:6px;vertical-align:1px}
.pc-stage{display:grid;gap:2px}
.pc-stage b{font-size:14px;font-weight:600}
.pc-stage small,.pc-when small{display:block;margin:0;font-size:12.5px;color:var(--muted)}
.pc-when{display:grid;gap:2px}
.pc-when time{font-weight:600;font-variant-numeric:tabular-nums}
.pc-when.is-late time{color:var(--ow-alert)}
.pc-empty{padding:28px 24px}
.pc-empty p{margin:0;color:var(--muted)}
.pc-foot{display:flex;flex-wrap:wrap;align-items:center;gap:8px 18px;margin:18px 0 0;font-size:13.5px}
.pc-foot .text-link{display:inline-flex;align-items:center;gap:6px;cursor:pointer}
.pc-foot .text-link svg{width:15px;height:15px}
.pc-foot .gd-faint{font-size:13px}
.pc-import{position:relative}
.pc .pc-foot{margin-top:28px}
.pc .pc-del{color:var(--gd-bad)}

/* ---------- A case: the left menu marks a finished stage (perm-desk.js sets .is-done) ---------- */
@media (min-width:1100px){
  .gd-shell.pc .gd-part.is-done>summary::before{content:"";border-color:var(--gd-ok);background:var(--gd-ok-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f7a4d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4 10-10'/%3E%3C/svg%3E") center/12px no-repeat}
  html[data-theme=night] .gd-shell.pc .gd-part.is-done>summary::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237fd8a6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4 10-10'/%3E%3C/svg%3E")}
}

/* ---------- A case: the overview ---------- */
.pc-start h1 .gd-faint{font-size:.55em;font-weight:500}
.pc-tl{margin-top:8px}
.pc-keydates{margin:8px 0 26px}
.pc-keydates h2{font-size:15px;font-weight:650;margin:0 0 6px}
.pc-keydates .ow-dates>li{grid-template-columns:minmax(0,180px) minmax(0,1fr)}
.pc .pc-issues{margin:0 0 22px}
.pc .pc-issues li>.text-link{margin-left:auto;flex:none;font-size:13.5px}

/* ---------- A case: pieces of a step ---------- */
.pc-group{min-width:0;margin:24px 0 0;padding:0;border:0}
.pc-group>legend{padding:0;margin:0 0 8px;font-size:13px;font-weight:650;color:var(--gd-muted)}
.pc-group:first-child{margin-top:0}
.pc-after{padding-top:20px;border-top:1px solid var(--gd-line)}
.pc-list{list-style:none;margin:0;padding:0;border-top:1px solid var(--gd-line)}
.pc-list>li{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 16px;padding:10px 0;border-bottom:1px solid var(--gd-line)}
.pc-list .gd-check{margin:0;flex:1 1 240px}
.pc-list small{font-variant-numeric:tabular-nums}
.pc-verify .pc-val{flex:1 1 100%;margin-left:28px;font-size:13px;line-height:1.55;color:var(--gd-muted);white-space:pre-line}
.pc-none{margin:0 0 18px}
.pc-stat{margin:0 0 16px}
.pc-card{position:relative;min-width:0;margin:0 0 14px;padding:16px 18px 18px;border:1px solid var(--gd-line);border-radius:var(--radius-panel);background:var(--gd-field);display:grid;gap:14px}
.pc-card>legend{float:left;width:100%;padding:0;margin:0;font-size:14.5px;font-weight:650}
.pc-card>legend+*{clear:both}
.pc-card .gd-check{margin:0}
.pc-del-row{position:absolute;top:8px;right:8px}
.pc-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.pc-grid .gd-field>label{font-size:13.5px;font-weight:600}
.pc-card .gd-field>label{font-size:13.5px;font-weight:600}
.pc .pc-card input:not([type=checkbox]),.pc .pc-card select{min-height:44px}
.pc .pc-card textarea{min-height:70px}
.pc-add{display:inline-flex;align-items:center;gap:6px;margin:2px 0 18px}
.pc-add svg{width:15px;height:15px}
.pc-stats{margin:0 0 18px}
.pc-count{margin:-4px 0 12px}
.pc-duties{list-style:none;margin:0 0 12px;padding:0;display:grid;gap:10px}
.pc-duties>li{display:grid;grid-template-columns:28px minmax(0,1fr) 36px;gap:8px;align-items:center}
.pc-duties .gd-duty-n{margin-top:0}
.pc-tool{margin-top:22px}
.pc-dates-tool .pm-form{gap:22px}
.pc-computed{display:flex;flex-wrap:wrap;gap:6px 12px;align-items:baseline;margin:18px 0 0;padding:12px 0 0;border-top:1px solid var(--ow-rule);font-size:14px;color:var(--ow-ink-2)}
.pc-computed b{font-weight:700;color:var(--ow-accent-ink);font-variant-numeric:tabular-nums}

/* The ETA-9141 as drafted, for the review */
.pc-sheet{margin:0 0 18px;border-top:1px solid var(--gd-line)}
.pc-sheet>div{display:grid;grid-template-columns:minmax(0,190px) minmax(0,1fr);gap:4px 18px;padding:10px 0;border-bottom:1px solid var(--gd-line);font-size:14px;line-height:1.6}
.pc-sheet dt{font-weight:600;color:var(--gd-muted)}
.pc-sheet dd{margin:0;min-width:0;overflow-wrap:anywhere}
.pc-gen{margin:0 0 24px}
.pc-gen .btn,.pc-tool summary{display:inline-flex;align-items:center;gap:8px}
.pc-gen svg{width:16px;height:16px}

/* ---------- Drafts ---------- */
.pc-draft{margin:26px 0 0}
.pc-draft:first-child{margin-top:0}
.gd-fields+.pc-draft{margin-top:30px}
.pc-draft-h{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;margin:0 0 10px}
.pc-draft-h h2{margin:0;font-size:16px;font-weight:650}
.pc-draft-h .text-link{margin-left:auto;font-size:13px}
.pc-draft-tag{font-weight:700}
.pc-mail{margin:0 0 10px;border-top:1px solid var(--gd-line)}
.pc-mail>div{display:grid;grid-template-columns:64px minmax(0,1fr);gap:12px;padding:8px 0;border-bottom:1px solid var(--gd-line);font-size:14px;line-height:1.55}
.pc-mail dt{color:var(--gd-muted)}
.pc-mail dd{margin:0;min-width:0;display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;overflow-wrap:anywhere}
.pc .pc-draft-text{min-height:120px;font-size:14.5px;line-height:1.65;white-space:pre-wrap}
.pc-draft-acts{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;margin:10px 0 0}
.pc-draft-acts .gd-check{margin:0 0 0 auto}
.pc-draft-acts small{font-variant-numeric:tabular-nums}
