/* the shell's own rules again, so they win over the component sheet */
.main{min-width:0;display:flex;flex-direction:column;gap:20px}.card{margin:0}
.btn{color:var(--ink);text-decoration:none}.btn.primary{color:var(--primary-ink)}.btn.accent{color:#2B1D00}
/* one height for fields and buttons, so a button next to an input lines up */
.btn,button{min-height:48px}.btn.sm,button.sm,td button,td .btn{min-height:40px}
.in,input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),select{min-height:48px}
/* layout helpers every page can use */
.toolbar{display:flex;flex-wrap:wrap;gap:10px 12px;align-items:flex-end}
.toolbar>*{min-width:0}.toolbar>.f{flex:1 1 180px}.toolbar>.f.wide{flex:2 1 260px}
.toolbar label{margin-top:0}
.grid-2,.grid-3,.grid-4{display:grid;gap:14px}
.grid-2{grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr))}
.grid-3{grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr))}
.grid-4{grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr))}
.actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:flex-end}
.actions.start{justify-content:flex-start}
.card-head{display:flex;flex-wrap:wrap;gap:8px 12px;align-items:center;justify-content:space-between;margin-bottom:14px}
.card-head h2,.card-head h3{margin:0}
.form-row{display:grid;gap:4px}
.hint{font-size:14px;color:var(--muted);margin:4px 0 0}
.req{color:var(--danger,#b3261e);font-weight:700}
.acts-row details.del>summary{color:var(--danger,#b3261e)}.acts-row details.del{margin-inline-start:auto}
td.num,th.num{text-align:end;font-variant-numeric:tabular-nums;white-space:nowrap}
/* tables read easier on a wide screen: the row under the pointer is tinted */
.main tbody tr:hover>td{background:color-mix(in srgb,var(--primary) 5%,transparent)}
/* page head: the menu group above, then the page name */
.top .crumb{display:block;font-size:13px;font-weight:700;letter-spacing:.3px;color:var(--primary);margin-bottom:2px}
.top h1{font-size:29px}
/* wide screens: the whole panel uses the full width. Plain cards (no table, no inner grid) sit side by side and
   grow to fill the row — a card left alone on a row stretches across it — while tables, filters, tabs and
   anything with its own layout stay full width. */
@media (min-width:821px){
  .main{flex-direction:row;flex-wrap:wrap;align-items:stretch;gap:20px}
  .main>*{flex:1 1 100%}
  .main>.card:not(:has(table,.scroll,.split,.split2,.grid-2,.grid-3,.grid-4,.grid2,.acts,.stats,.two,.tabs,.mods,.toolbar,.cal,.sheet,.paper,.rt,.plans,.steps,.bars,iframe,pre,.tarea)){flex:1 1 min(100%,540px)}
  .main>.card{width:auto}
  .acts{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}
}
