/* Shared, quiet fields. Labels and focus/error cues remain visible. */
:is(#main-content, .jh-card) :where(
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=hidden]):not([type=submit]):not([type=reset]):not([type=button]):not([type=image]),
  textarea, select
) {
  box-sizing: border-box;
  max-width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  box-shadow: none;
  background: var(--theme-soft, #f1f5f3);
  color: var(--ink, #082635);
}

:is(#main-content, .jh-card) :is(input, textarea, select):focus-visible {
  outline: 2px solid var(--theme-accent, #087f75);
  outline-offset: 2px;
  box-shadow: none;
}
:is(#main-content, .jh-card) :is(input, textarea, select):is([aria-invalid=true], :user-invalid) {
  outline: 2px solid var(--theme-danger, #bb3d36);
  outline-offset: 2px;
}
:is(#main-content, .jh-card) :is(input, textarea)::placeholder {
  color: var(--muted, #526b77);
  opacity: 1;
}
:is(#main-content, .jh-card) :is(input, textarea, select):disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* One writing surface, without a box around another box. */
#main-content .jf-comments form,
#main-content .jf-thread-composer {
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
#main-content .jf-thread-composer textarea {
  min-height: 84px;
  margin: 8px 0;
  line-height: 1.6;
}
#main-content .jf-thread-composer p { margin: 6px 0; }
#main-content .jf-thread-composer .form-actions { margin-top: 10px; }
#main-content .office-combobox input { border-radius: 6px 0 0 6px; }
#main-content .office-combobox button {
  border: 0;
  border-radius: 0 6px 6px 0;
  background: var(--theme-soft, #f1f5f3);
}

/* Borderless surfaces across public pages and dashboards. Transparent borders
   retain existing box dimensions, spacing, backgrounds and shadows. Keep native
   choice controls and map symbols legible; SVG strokes are artwork, not frames.
   Focus/error outlines and Windows high-contrast rendering remain untouched. */
@media (forced-colors: none) {
  :root body :where(*):not(:where(
    svg, svg *,
    input[type=checkbox], input[type=radio], input[type=range],
    .maplibregl-popup-tip, .leaflet-popup-tip,
    .am-legend i, .am-atlas-beacon
  )) {
    border-color: transparent !important;
  }
  :root body .jc-banner::after {
    border-color: transparent !important;
  }
}

@media (forced-colors: active) {
  :is(#main-content, .jh-card) :is(input, textarea, select) { border: 1px solid ButtonText; }
  .jh-card { border: 1px solid CanvasText; }
}
