.visit-case,
.visit-case * { box-sizing: border-box; min-width: 0; }
.visit-case[hidden], .visit-case [hidden] { display: none !important; }
.visit-case {
  grid-column: 1 / -1;
  width: min(100%, 1230px);
  margin: 22px auto;
  overflow: hidden;
  border: 2px solid #243d33;
  border-radius: 13px;
  color: #243d33;
  background: #f4eedf;
  box-shadow: 8px 9px 0 #b8bba2;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  scroll-margin-top: 16px;
}
.visit-case :is(h2,h3,p,span,strong) { overflow-wrap: anywhere; }
.visit-case-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(20px, 3vw, 32px);
  color: #fffaf0;
  background: #243d33;
}
.visit-case-head p,
.visit-case-label,
.visit-case-switch button span {
  margin: 0 0 8px;
  font: 850 .66rem/1.35 ui-monospace, Menlo, monospace;
  letter-spacing: .075em;
}
.visit-case-head h2 { margin: 0 0 8px; font-size: clamp(1.9rem, 3.5vw, 3.1rem); line-height: 1; letter-spacing: -.055em; }
.visit-case-head div > span { font-size: .85rem; line-height: 1.5; }
.visit-case-folder { flex: none; align-self: start; padding: 12px; border: 3px double #f8dfaa; color: #f8dfaa; font: 900 .68rem/1.25 ui-monospace, Menlo, monospace; text-align: center; transform: rotate(6deg); }
.visit-case-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 2px solid #243d33; }
.visit-case-switch button { display: grid; gap: 4px; min-height: 88px; padding: 13px 17px; border: 0; color: #294333; background: #e9e7d7; text-align: left; cursor: pointer; }
.visit-case-switch button + button { border-left: 2px solid #243d33; color: #833e2d; background: #f2e1d0; }
.visit-case-switch button[aria-pressed="true"] { background: #d9ead7; box-shadow: inset 0 -6px #4e7754; }
.visit-case-switch button + button[aria-pressed="true"] { background: #f6d6bd; box-shadow: inset 0 -6px #a65637; }
.visit-case-switch button strong { font-size: clamp(.95rem, 1.5vw, 1.2rem); }
.visit-case-switch button small { font-size: .73rem; }
.visit-case-sides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; padding: clamp(16px, 2.5vw, 27px); }
.visit-case:not([data-next-side="complete"]) .visit-case-sides { grid-template-columns: minmax(0, 1fr); }
.visit-case-side { display: flex; flex-direction: column; align-items: start; padding: clamp(16px, 2vw, 24px); border: 2px solid #557660; background: #fffdf4; box-shadow: 4px 5px 0 #c9cbb4; }
.visit-case-invoice { border-color: #a35e43; background: #fff6eb; box-shadow: 4px 5px 0 #ddbea4; }
.visit-case-label { color: #42634c; }
.visit-case-invoice .visit-case-label { color: #965037; }
.visit-case-side h3 { margin: 0 0 10px; font-size: clamp(1.5rem, 2.4vw, 2.25rem); letter-spacing: -.045em; line-height: 1.1; }
.visit-case-side h3:focus { outline: none; }
.visit-case-side h3:focus-visible { outline: 3px solid #087d9a; outline-offset: 4px; }
.visit-case-side > p:not(.visit-case-label) { margin: 0 0 11px; font-size: .86rem; line-height: 1.55; }
.visit-case-limit,
.visit-case-cost { padding: 9px 11px; border-left: 4px solid #4e7754; background: #e9f0df; }
.visit-case-cost { border-color: #a65637; background: #f9e6d4; }
.visit-case-invoice[data-call="request"]::after,
.visit-case-invoice[data-call="approve"]::after { order: -1; align-self: end; margin-bottom: 12px; padding: 6px 9px; border: 3px double #a65637; color: #903c2e; content: "REQUESTED · PENDING"; font: 900 .62rem/1.2 ui-monospace, Menlo, monospace; transform: rotate(4deg); }
.visit-case-invoice[data-call="approve"]::after { content: "APPROVED · TOO SOON"; transform: rotate(-5deg); }
.visit-case-side-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; }
.visit-case :is(button,a):focus-visible { outline: 3px solid #087d9a; outline-offset: 3px; }
.visit-case-side-actions :is(button,a),
.visit-case-next :is(button,a) { display: inline-flex; align-items: center; min-height: 44px; padding: 9px 12px; border: 2px solid #315943; border-radius: 4px; color: #fffdf4; background: #315943; font: 800 .76rem/1.3 Inter, ui-sans-serif, sans-serif; text-align: left; text-decoration: none; cursor: pointer; }
.visit-case-invoice .visit-case-side-actions button { border-color: #9b5134; background: #9b5134; }
.visit-case :is(button,a):hover { filter: brightness(1.1); }
.visit-case-next { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; padding: 16px clamp(16px, 2.5vw, 27px); border-top: 2px solid #243d33; background: #e0e9d9; }
.visit-case-next p { flex: 1 1 250px; margin: 0; font-size: .83rem; line-height: 1.45; }
.visit-case-next button { border-color: #304967; background: #304967; }
.visit-case-next #visit-case-claim-open { border-color: #243d33; background: #243d33; box-shadow: 3px 3px 0 #a9bba1; }
.visit-case-next #visit-case-private-open { color: #315943; background: #fffdf4; }
.visit-case-next a { color: #315943; background: #fffdf4; }
@media (max-width: 700px) {
  .visit-case { margin: 16px auto; box-shadow: 5px 6px 0 #b8bba2; }
  .visit-case-head { padding: 20px 16px; }
  .visit-case-folder { display: none; }
  .visit-case-switch button { min-height: 78px; padding: 11px; }
  .visit-case-switch button strong { font-size: .9rem; }
  .visit-case-switch button small { font-size: .68rem; }
  .visit-case-sides { grid-template-columns: minmax(0, 1fr); padding: 15px; }
  .visit-case[data-next-side="complete"][data-active-side="real"] .visit-case-invoice,
  .visit-case[data-next-side="complete"][data-active-side="invoice"] .visit-case-real { display: none; }
  .visit-case-side { padding: 17px; }
  .visit-case-side-actions { display: grid; width: 100%; }
  .visit-case-next { display: grid; }
  .visit-case-next :is(button,a) { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .visit-case *, .visit-case *::before, .visit-case *::after { animation: none !important; transition: none !important; }
}
