body {
    /* Pad content if we have a fixed navbar. */
    /*padding-top: 50px;*/
    padding-bottom: 90px;
}

/* DISABLED: Override the default bootstrap behavior where horizontal description lists 
   will truncate terms that are too long to fit in the left column 
*/
/*.dl-horizontal dt {
    white-space: normal;
}*/

/* Remove the clear button ([x]) that IE10+ places in input boxes. */
input::-ms-clear {
  display: none;
}

.inblock {
    display:inline-block;
}

.center-inblock {
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
}

.alert-base {
  background-color: #ffffff;
  border-color: #ffffff;
  color: #333333;
}
.alert-base hr {
  border-top-color: #ffffff;
}
.alert-base .alert-link {
  color: #2a6496;
}

.menuitem > .panel {
    margin-bottom: 0;
}

.checkbox-md {
    -moz-transform: scale(1.25);
    -ms-transform: scale(1.25);
    -o-transform: scale(1.25);
    -webkit-transform: scale(1.25);
    transform: scale(1.25);
}

.checkbox-lg {
    -moz-transform: scale(1.5);
    -ms-transform: scale(1.5);
    -o-transform: scale(1.5);
    -webkit-transform: scale(1.5);
    transform: scale(1.5);
}

.btn-toolbar .btn-group {
    margin-top: 10px;
}

.nogutter > [class*="col-"] {
    padding-right:0;
    padding-left:0;
}

.pl0 { padding-left:0 !important; }
.pr0 { padding-right:0 !important; }

.progress {
    background:transparent !important;
    box-shadow:none !important;
    margin-top: 10px;
    margin-bottom: 10px;
}
.progress-bar {
    border-radius:4px !important;
}

table.standard {
  width: 100%;
  margin: 0 auto;
  clear: both;
  border-collapse: separate;
  border-spacing: 0;
}
table.standard thead th,
table.standard tfoot th {
  font-weight: bold;
}
table.standard thead th,
table.standard thead td {
  background-color: #ffffff;
  padding: 10px 18px;
  border-bottom: 1px solid #111111;
}
table.standard thead th:active,
table.standard thead td:active {
  outline: none;
}
table.standard tfoot th,
table.standard tfoot td {
  padding: 10px 18px 10px 4px;
  border-top: 1px solid #111111;
}

table.standard tbody th,
table.standard tbody td {
  padding: 4px 4px;
}

table.standard.striped tbody tr:nth-child(odd) { background-color:white; }
table.standard.striped tbody tr:nth-child(even) { background-color:whitesmoke; }

table.standard td > a {
    display:block;
    min-height: 10px;
    width:100%; 
}

.martop0 { margin-top: 0; }
.martop2 { margin-top: 2px; }
.martop4 { margin-top: 4px; }
.martop5 { margin-top: 5px; }
.martop10 { margin-top: 10px; }
.martop15 { margin-top: 15px; }
.martop20 { margin-top: 20px; }
.martop30 { margin-top: 30px; }

.marleft2 { margin-left: 2px; }
.marleft4 { margin-left: 4px; }
.marleft5 { margin-left: 5px; }
.marleft10 { margin-left: 10px; }
.marleft15 { margin-left: 15px; }
.marleft30 { margin-left: 30px; }

.mb0 { margin-bottom: 0; }
.mb5 { margin-bottom: 5px; }
.mb10 { margin-bottom: 10px; }
.mb15 { margin-bottom: 15px; }

.maxw20 { max-width: 20px; }
.maxw40 { max-width: 40px; }
.maxw60 { max-width: 60px; }
.maxw80 { max-width: 80px; }
.maxw100 { max-width: 100px; }
.maxw120 { max-width: 120px; }
.maxw140 { max-width: 140px; }

.minw20 { min-width: 20px; }
.minw25 { min-width: 25px; }
.minw30 { min-width: 30px; }
.minw35 { min-width: 35px; }
.minw40 { min-width: 40px; }
.minw45 { min-width: 45px; }
.minw50 { min-width: 50px; }
.minw60 { min-width: 60px; }
.minw80 { min-width: 80px; }
.minw100 { min-width: 100px; }
.minw120 { min-width: 120px; }
.minw140 { min-width: 140px; }

.w0 { width: 0; }
.w20 { width: 20px; }
.w25 { width: 25px; }
.w30 { width: 30px; }
.w35 { width: 35px; }
.w40 { width: 40px; }
.w45 { width: 45px; }
.w50 { width: 50px; }
.w60 { width: 60px; }
.w80 { width: 80px; }
.w85 { width: 85px; }
.w90 { width: 90px; }
.w100 { width: 100px; }
.w120 { width: 120px; }
.w140 { width: 140px; }
.w160 { width: 160px; }
.w180 { width: 180px; }

table.dataTable thead th,
table.dataTable thead td {
  padding: 10px 18px 10px 4px !important;
}

th .select-all-results {
    margin-left: 12px !important;
}

/* Centered Tabs from http://stackoverflow.com/a/9422253 */
.nav-tabs.centered > li, .nav-pills > li {
    float:none;
    display:inline-block;
    *display: inline;     /* for IE7*/
    *zoom:1;              /* for IE7*/

}

.nav-tabs.centered {
    text-align:center;
}

/* Button Separator from http://stackoverflow.com/a/21725547/16387 */
.btn-separator:after {
    content: ' ';
    display: block;
    float: left;
    background: #ADADAD;
    margin: 4px 4px 0 6px;
    height: 22px;
    width: 1px;
}

.btn-group-separator {
    padding-left: 6px !important;
    border-left: 1px solid #ADADAD !important;
}

.btn-group-separator-rt {
    padding-right: 6px !important;
    border-right: 1px solid #ADADAD !important;
}

.navbar-fixed-bottom .container {
    padding-top: 8px;
}

.notransition {
    -webkit-transition: none;
    -moz-transition: none;
    -o-transition: none;
    transition: none;
}

/* DataTable headers focus borders */

.sorting:focus,
.sorting_asc:focus,
.sorting_desc:focus {
    border-color: #66afe9;
    outline: 0;
    -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
}

/* DataTable first-column selector (checkbox glyph) */
table.firstColSelector tr td:first-child {
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
	*cursor: hand;
}
 
table.firstColSelector tr td:first-child:before {
    /* These rules are a copy of rules from bootstrap's glyphicon class. */
    position:relative;
    top: 1px;
    display:inline-block;
    content: "\e157"; /* glyphicon-unchecked */
    font-family: 'Glyphicons Halflings';
    font-style: normal;
    font-weight: normal;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

table.firstColSelector tr td.dataTables_empty:first-child:before {
    content: '';
}

table.firstColSelector tr.selected td:first-child:before {
    content: "\e067"; /* glyphicon-check */
}

/* Custom margins for jQuery Datatables "TableTools" toolbar container */
div.DTTT_container {
    margin-top: 5px;
    margin-bottom: 0 !important;
}
/* Custom z-index to fix TableTools + FixedHeader extension integration work. */
div.DTTT_print_info {
    z-index: 2003 !important;
}

.form-checkbox-list {
    height: auto;
    overflow-y:auto;
}

.span-rows {
    float: right;
}

.toast {
    opacity: 1 !important;
}

.dropdown .dropdown-toggle:focus {
  outline: thin dotted;
  outline: 5px auto -webkit-focus-ring-color;
  outline-offset: -2px;
}

.headIcon { margin-right: 4px; font-size: smaller; }

.accountPage {
    background-color: #41464A;
}

.accountPage .headIcon::before {
    content:"\e043";    /* glyphicon-book */
    color: #41464A;
}

.applicationPage {
    background-color: #6B787F;
}

 .applicationPage .headIcon::before {
    content:"\e032";    /* glyphicon-list-alt */
    color: #6B787F;
}

.contactPage {
    background-color: #3C5973;
}

.contactPage .headIcon::before {
    content:"\e008";    /* glyphicon-user */
    color: #3C5973;
}

.paymentPage {
    background-color: #506259;
}

.paymentPage .headIcon::before {
    content: "\e177";   /* glyphicon-credit-card */
    color: #506259;
}

.searchPage {
    background-color: #41464A;
}

.searchPage .headIcon::before {
    content:"\e003";    /* glyphicon-search */
    color: #41464A;
}

.pageContent {
    background-color: #ffffff;
    -moz-border-radius: 4px;
    -webkit-border-radius: 4px;
    border-radius: 4px;
}

.form-input {
  /*display: block;
  width: 100%;*/
  height: 34px;
  padding: 6px 12px;
  font-size: 14px;
  line-height: 1.42857143;
  color: #555555;
  background-color: #ffffff;
  background-image: none;
  border: 1px solid #cccccc;
  border-radius: 4px;
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}
.form-input:focus {
  border-color: #66afe9;
  outline: 0;
  -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
  box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
}

/* Custom, iPhone Retina
@media only screen and (min-width : 320px) { */
    /*.body-content {
        padding: 0;
    }*/
    /*.container
    {
        min-width: 600px !important;
    }
}*/

/* Extra Small Devices, Phones */
@media only screen and (min-width : 480px) {
    .mt-xs-15 { margin-top: 15px; }
    .pb-xs-10 { padding-bottom: 10px; }
}

/* Small Devices, Tablets */
@media only screen and (min-width : 640px) {
    /*.navbar-fixed-bottom .container {
        padding-top: 20px;
        padding-bottom: 20px;
    }*/

    .mt-sm-10 { margin-top: 10px; }
    .mt-sm-20 { margin-top: 20px; }
    .mt-sm-30 { margin-top: 30px; }

    .form-checkbox-list {
        height: 184px;
    }
}

/* Medium Devices, Desktops */
@media only screen and (min-width : 860px) {
    /*.jumbotron {
        margin-top: 20px;
    }*/
}

/* Large Devices, Wide Screens */
@media only screen and (min-width : 1200px) {
}


/* ===================================================================
   Touch device refinements

   Presentation only. No layout restructuring, no markup changes, no
   behaviour changes -- every rule below is scoped to (pointer: coarse),
   so desktop rendering is byte-for-byte what it was before.

   Measured on the login screen at 375x812 before adding this:
     inputs   14px font, 34px tall
     buttons  34px tall
     "Forgot your password?"  16px tall

   Bootstrap 3 was designed in 2013 for mouse input, which is where
   those numbers come from.
   =================================================================== */

/* Matches genuine touch devices, and any viewport up to iPad-landscape
   width. Either condition alone leaves gaps: an iPad with a keyboard can
   report a fine pointer, and a narrow desktop window is not a touch device
   but still benefits from larger targets. */
@media (pointer: coarse), (max-width: 1024px) {

  /* iOS Safari zooms the whole page whenever a focused input has a
     font-size below 16px. Bootstrap 3 ships 14px, so tapping any field
     jerks the layout and the user has to pinch back out. Raising this to
     16px is the only reliable fix -- it changes nothing about how the
     control works. */
  .form-control,
  .form-input,
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="tel"],
  input[type="search"],
  input[type="date"],
  textarea,
  select {
    font-size: 16px;
  }

  /* Apple and Google both put the minimum comfortable touch target at
     around 44px. Bootstrap 3's 34px controls are fine under a mouse and
     fiddly under a thumb. min-height wins over Bootstrap's fixed height
     without having to override each rule individually. */
  .form-control,
  .form-input,
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="tel"],
  input[type="search"],
  input[type="date"],
  select {
    min-height: 44px;
  }

  .btn,
  button,
  input[type="submit"],
  input[type="button"] {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  /* Checkboxes and radios are exempt -- stretching them looks wrong.
     Give them room around the control instead, which is what people
     actually aim at. */
  input[type="checkbox"],
  input[type="radio"] {
    min-height: 0;
    width: 18px;
    height: 18px;
  }
  .checkbox label,
  .radio label {
    padding-top: 6px;
    padding-bottom: 6px;
  }

  /* Navigation links are tap targets too. */
  .navbar-nav > li > a {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  /* Standalone links inside forms -- "Forgot your password?" measured
     16px tall, which is a small thing to hit accurately on a phone.
     Padding enlarges the tap area without moving the text. */
  .form-group a,
  .form-horizontal a,
  p > a {
    display: inline-block;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  /* The default blue-grey flash on tap reads as a rendering glitch on
     modern devices. A soft neutral is less distracting. */
  a,
  .btn,
  button {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.06);
  }

  /* Table rows in search results are effectively buttons. */
  .table > tbody > tr > td {
    padding-top: 12px;
    padding-bottom: 12px;
  }
}

/* Stop iOS inflating text when the device is rotated to landscape.
   Applies everywhere; harmless on desktop. */
html {
  -webkit-text-size-adjust: 100%;
}

/* Wide content -- tables in particular -- should scroll inside its own
   container rather than pushing the whole page sideways. Bootstrap's
   .table-responsive already does this; the momentum scrolling makes it
   feel native rather than sticky. */
.table-responsive {
  -webkit-overflow-scrolling: touch;
}

/* Nothing should be able to force a horizontal scrollbar on a phone.
   max-width is a safety net, not a layout change -- anything already
   within its container is unaffected. */
@media (max-width: 767px) {
  img,
  table,
  pre {
    max-width: 100%;
  }
}



/* -------------------------------------------------------------------
   Search results readability

   Measured on the results grid: the "Donated" column holds currency but
   was left-aligned with proportional digits, so amounts did not line up
   and were slow to compare down the column. The table also had no
   scrolling container, meaning a narrow phone could push the whole page
   sideways rather than scrolling the grid.

   Presentation only. Column order, contents and behaviour unchanged.
   ------------------------------------------------------------------- */

/* Money reads far better right-aligned with fixed-width digits: the
   decimal points stack, so comparing amounts is a glance instead of a
   read. tabular-nums stops digits shifting width as values change. */
#searchResultsTable td:nth-child(3),
#searchResultsTable th:nth-child(3) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* The Tomchei number is an identifier rather than a quantity, so it stays
   left-aligned -- but fixed-width digits still make it easier to scan for
   a particular number. */
#searchResultsTable td:nth-child(1) {
  font-variant-numeric: tabular-nums;
}

/* With a couple of dozen results on a phone screen, the header scrolls
   away and the columns lose their meaning. Sticky keeps it in view.
   Falls back harmlessly to normal behaviour on anything that does not
   support it. */
#searchResultsTable thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background-color: #fff;
}

/* Long addresses should wrap inside their cell rather than widening the
   column and forcing the table off-screen. */
#searchResultsTable td {
  overflow-wrap: break-word;
}

/* Safety net for narrow phones. If the grid genuinely cannot fit, it
   scrolls within itself instead of dragging the page sideways -- the
   usual cause of a layout that drifts and will not come back. Only
   applies below tablet width, so the desktop grid is untouched. */
/* (Removed an earlier display:block scroll wrapper here: making the table a
   block disabled table-layout:fixed, which broke the phone column widths.
   The fixed percentage layout below guarantees fit instead.) */



/* -------------------------------------------------------------------
   A light refresh

   The app was entirely greyscale -- Bootstrap 3 defaults, no accent
   anywhere, which is most of why it reads as 2014. This introduces one
   accent colour and softens two hard edges. Nothing is restructured and
   no colour is invented: #2a6496 was already in this stylesheet as the
   link colour, so it is promoted rather than added.
   ------------------------------------------------------------------- */

/* A thin accent line across the top of the navbar. Costs three pixels
   and is the single clearest signal that something has been attended to. */
#siteNavbar,
.navbar-default {
  border-top: 3px solid #2a6496;
}

/* Bootstrap 3 separates the navbar from the page with a hard 1px line.
   A soft shadow instead reads as depth rather than a border, which is
   the main stylistic difference between 2014 and now. */
.navbar-default {
  border-bottom-color: transparent;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Links were #777 grey -- indistinguishable from body text at a glance.
   The accent makes them findable without shouting. */
a {
  color: #2a6496;
}
a:hover,
a:focus {
  color: #1d456b;
}

/* Keyboard focus was Bootstrap's dotted outline, which is hard to see and
   dated. A soft ring in the accent colour is clearer and reads as current.
   Only applies to keyboard navigation, so mouse users see no change. */
a:focus-visible,
.btn:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #2a6496;
  outline-offset: 2px;
}

/* Focused fields get the accent rather than Bootstrap's default blue glow,
   so the whole interface agrees with itself. */
.form-control:focus,
.form-input:focus {
  border-color: #2a6496;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 6px rgba(42, 100, 150, 0.35);
}

/* Search result rows respond to hover. Small thing, but it makes a dense
   grid feel navigable rather than static. */
#searchResultsTable tbody tr:hover {
  background-color: #f4f8fb;
}

/* Buttons pick up a subtle press state. Bootstrap 3 has one already; this
   just makes it quick enough to feel responsive rather than laggy. */
.btn {
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}



/* -------------------------------------------------------------------
   Typography and surfaces

   The single most dated thing about the interface was the typeface.
   Bootstrap 3 asks for "Helvetica Neue, Helvetica, Arial" -- and since
   Windows has none of the first two, every PC user has been reading
   Arial. Switching to the system stack means each device uses the face
   it was designed around: Segoe UI on Windows, SF on iPad and Mac,
   Roboto on Android.

   Nothing is downloaded, nothing is restructured. The metrics are close
   enough to Arial that the layout does not move.
   ------------------------------------------------------------------- */

body,
.btn,
input,
button,
select,
textarea,
.navbar,
.form-control,
.form-input {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
}

/* Headings carry a little more weight now that the face has more range
   available to it. Sizes are untouched, so nothing reflows. */
h1, h2, h3, h4, .panel-title {
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Buttons read as slightly more deliberate at 500 without becoming loud.
   Bootstrap 3 sets 400, which under Segoe UI looks faint. */
.btn {
  font-weight: 500;
}

/* 4px was the 2014 house style; 6px is closer to current convention and
   is small enough that nobody will consciously notice -- they will just
   register that it looks newer. */
.btn,
.form-control,
.form-input,
.alert,
.panel,
.well,
.navbar {
  border-radius: 6px;
}

/* -------------------------------------------------------------------
   Search results header

   The grid is where the day is actually spent, and its header row was a
   hard 1px near-black rule under white -- stark, and the heaviest line
   on the page. A tinted band with a soft border gives the same
   separation with far less shouting.
   ------------------------------------------------------------------- */

#searchResultsTable thead th,
table.standard thead th {
  background-color: #f7f9fb;
  border-bottom: 1px solid #dde5ec;
  color: #4a5866;
  font-weight: 600;
}

/* Row separators in the same soft family, so the grid reads as a set of
   rows rather than a stack of boxes. */
#searchResultsTable tbody td,
table.standard tbody td {
  border-top-color: #eef2f6;
}

/* -------------------------------------------------------------------
   Text colour

   #333 on white is heavier than it needs to be. A slightly softer,
   very faintly cool near-black is easier over a long session and reads
   as more considered, without losing contrast (still well past AA).
   ------------------------------------------------------------------- */

body {
  color: #2f3945;
}



/* -------------------------------------------------------------------
   Search results on a phone

   Measured: the four columns want ~447px, so on a 375px iPhone the grid
   was cramped and every cell competed at the same size. The name is what
   the eye searches for; the address is confirmation once the name is
   found. Below 480px the type sizes now say so: name full-size and
   weighted, address smaller and muted, number and amount compact with
   lining figures. Nothing is hidden and column order is unchanged.
   ------------------------------------------------------------------- */

@media (max-width: 767px) {

  #searchResultsTable {
    table-layout: fixed;      /* stops the address column bullying the rest */
    width: 100%;
  }

  /* Tomchei number: compact, digits align */
  #searchResultsTable th:nth-child(1),
  #searchResultsTable td:nth-child(1) {
    width: 17%;
    font-size: 13px;
  }

  /* Name: the column people actually scan -- give it the space and weight */
  #searchResultsTable th:nth-child(2),
  #searchResultsTable td:nth-child(2) {
    width: 34%;
  }
  #searchResultsTable td:nth-child(2) a {
    font-weight: 600;
  }

  /* Donated: compact */
  #searchResultsTable th:nth-child(3),
  #searchResultsTable td:nth-child(3) {
    width: 21%;
    font-size: 13px;
  }

  /* Address: present but subordinate */
  #searchResultsTable th:nth-child(4),
  #searchResultsTable td:nth-child(4) {
    width: 28%;
    font-size: 12px;
  }
  #searchResultsTable td:nth-child(4) a {
    color: #7a8794;
  }

  /* Tighter cells overall; the 44px row height still holds for touch */
  #searchResultsTable td {
    padding-left: 6px;
    padding-right: 6px;
  }
  #searchResultsTable th {
    padding-left: 6px;
    padding-right: 6px;
    font-size: 12px;
  }
}


/* Long values in the phone grid: clamp names and addresses to two lines
   with an ellipsis, instead of letting a 70-character address wrap to
   seven lines and blow one row up to triple height. The full text is a
   tap away on the account page. */
@media (max-width: 767px) {
  #searchResultsTable td:nth-child(2) a,
  #searchResultsTable td:nth-child(4) a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* The Donated cell's markup carries an inline min-width:180px (it lays a
   date and amount side by side on desktop). Inline styles outrank the
   stylesheet, so on a phone the div escaped its 91px cell and overlapped
   the Address column. !important is the designed override for exactly
   this case; the date and amount simply stack instead. */
@media (max-width: 767px) {
  #searchResultsTable td:nth-child(3) > div {
    min-width: 0 !important;
    max-width: 100% !important;
  }
  #searchResultsTable td:nth-child(3) .w90 {
    width: auto;
  }
}

/* On a phone the Donated column says how much and how many times:
   "$ 12.34 (2)". The last-payment date and note are desktop detail --
   stacked on a narrow screen they read as clutter (and they are one tap
   away on the account's Donations tab). */
@media (max-width: 767px) {
  #searchResultsTable td:nth-child(3) .w90 { display: none; }  /* date */
  #searchResultsTable td:nth-child(3) em   { display: none; }  /* note */
}

/* -------------------------------------------------------------------
   Search results column proportions (all widths)

   The grid used table-layout:auto, so the browser sized columns from
   whatever content happened to be present. On the default screen -- the
   newest records, many with no name or address yet -- that produced wildly
   different layouts run to run: Name 27% one moment, over half the table
   the next, with Donated and Address squeezed against the edge.

   Fixed proportions make the grid look the same regardless of what the
   rows contain.
   ------------------------------------------------------------------- */

#searchResultsTable {
  table-layout: fixed;
  width: 100%;
}

#searchResultsTable th:nth-child(1), #searchResultsTable td:nth-child(1) { width: 12%; white-space: nowrap; }  /* Tomchei */
#searchResultsTable th:nth-child(2), #searchResultsTable td:nth-child(2) { width: 30%; }  /* Name    */
#searchResultsTable th:nth-child(3), #searchResultsTable td:nth-child(3) { width: 22%; }  /* Donated */
#searchResultsTable th:nth-child(4), #searchResultsTable td:nth-child(4) { width: 38%; }  /* Address */

/* -------------------------------------------------------------------
   Column separation

   The grid had no vertical separation and only 4px of horizontal cell
   padding, so four columns of similar-looking text ran together and the
   eye lost its place mid-row.

   Two changes rather than one: real breathing room first (whitespace does
   most of the work), then a hairline rule as a guide for the eye. The
   rules are lighter than the row separators and stop short of the table's
   outer edges, so the grid reads as structure rather than as a
   spreadsheet.
   ------------------------------------------------------------------- */

#searchResultsTable td,
#searchResultsTable th {
  padding-left: 12px;
  padding-right: 12px;
}

/* Rules between columns only -- never on the outside edge. */
#searchResultsTable td + td,
#searchResultsTable th + th {
  border-left: 1px solid #edf1f5;
}

/* The header's rules can be a touch stronger: they anchor the columns
   the eye is about to scan down. */
#searchResultsTable th + th {
  border-left-color: #dde5ec;
}

/* Zebra striping was a neutral grey against a cool-toned header and
   accent. Matching it to the palette makes the whole grid agree with
   itself. */
#searchResultsTable tbody tr.even,
#searchResultsTable tbody tr:nth-child(even) {
  background-color: #f7f9fb;
}

/* Hover stays distinct from the stripe so it still reads as feedback. */
#searchResultsTable tbody tr:hover {
  background-color: #eef4f9;
}

/* Phones: keep the rules but tighten the padding again -- 12px each side
   on four columns is a lot of a 375px screen. */
@media (max-width: 767px) {
  #searchResultsTable td,
  #searchResultsTable th {
    padding-left: 7px;
    padding-right: 7px;
  }
}

/* -------------------------------------------------------------------
   Narrow-screen column widths -- last in the file on purpose.

   The base proportions above apply at every width, so any narrow-screen
   override has to come after them to win (same specificity, later rule).
   An earlier attempt put these first and they were silently ignored,
   which left 6-digit Tomche numbers clipped at the cell edge on phones.

   Below 768px the number needs a bigger share: it cannot wrap and cannot
   shrink, whereas names and addresses both clamp gracefully.
   ------------------------------------------------------------------- */

@media (max-width: 767px) {
  #searchResultsTable th:nth-child(1), #searchResultsTable td:nth-child(1) { width: 19%; }  /* Tomchei */
  #searchResultsTable th:nth-child(2), #searchResultsTable td:nth-child(2) { width: 30%; }  /* Name    */
  #searchResultsTable th:nth-child(3), #searchResultsTable td:nth-child(3) { width: 23%; }  /* Donated */
  #searchResultsTable th:nth-child(4), #searchResultsTable td:nth-child(4) { width: 28%; }  /* Address */
}

/* The Donated cell's inline min-width:180px lays date and amount side by
   side. Between 768px and roughly 1000px the column is narrower than that,
   so the content escaped into Address. Neutralise the inline minimum
   wherever the column cannot honour it; the parts simply stack. */
@media (max-width: 1000px) {
  #searchResultsTable td:nth-child(3) > div {
    min-width: 0 !important;
    max-width: 100% !important;
  }
  #searchResultsTable td:nth-child(3) .w90 { width: auto; }
}
