/* Mobile layer for the restored 2011 layout (fixed 940px, three floated columns). Loaded after style.css.
   Above 980px nothing changes, so desktop looks as archived. Below it the columns stack: article, then side column, then the menu. */
@media (max-width: 979px) {
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body { overflow-x: hidden; }
  img { max-width: 100%; height: auto; }

  #wrapper, #header_sub, #header_main, #container, #main {
    float: none; width: auto; max-width: 100%; box-sizing: border-box;
  }
  #container { background: #eeeeee; }

  /* top strip */
  #header_sub { background-image: none; padding: 4px 0; }
  #header_sub_left, #header_sub_right { float: none; display: block; padding: 4px 10px; font-size: 13px; line-height: 20px; }
  #header_sub_right font { font-size: 14px; }
  #header_sub_right a { display: inline-block; padding: 4px 0; font-size: 14px; }

  /* logo, breadcrumb, search */
  #header_main_left, #header_main_center, #header_main_right { float: none; padding-left: 10px; padding-right: 10px; }
  #header_main_left h1 { padding: 10px 0 4px; }
  #header_main_center { padding-top: 4px; padding-bottom: 4px; }
  #header_main_center b, #header_main_center #headline { display: none; }
  #header_main_center p { font-size: 13px; line-height: 20px; overflow-wrap: anywhere; }
  #header_main_right { padding-top: 4px; padding-bottom: 8px; }
  #header_main_right input[type="text"] { width: 62%; max-width: 280px; font-size: 16px; padding: 6px; box-sizing: border-box; }
  #header_main_right input[type="submit"] { font-size: 16px; padding: 6px 12px; }

  /* columns */
  #main_left, #main_right { float: none; width: auto; box-sizing: border-box; padding: 7px 7px 3px; }
  #main_right { padding-top: 3px; }
  .main_left_title_out, .main_left_body_out, .results_title_out, .results_body_out,
  .main_right_title_out, .main_right_body_out { width: auto; box-sizing: border-box; }
  .main_right_title_out, .main_right_body_out { margin-left: 0; margin-right: 0; }
  .main_left_title_in h1, .main_right_title_in h1 { font-size: 16px; line-height: 22px; }

  /* reading text */
  .main_left_body_in, .main_right_body_in { font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; }
  .main_left_body_in p, .main_right_body_in p { font-size: 16px; line-height: 1.9; }
  .main_left_body_in h2, .main_right_body_in h2 { font-size: 19px; line-height: 1.5; }
  .main_left_body_in h3, .main_left_body_in h4, .main_left_body_in h5,
  .main_right_body_in h3, .main_right_body_in h4, .main_right_body_in h5 { font-size: 15px; line-height: 1.6; }
  #approval_date { font-size: 13px; }
  .photo { max-width: 42%; height: auto; }
  .main_left_body_in table, .main_right_body_in table { max-width: 100%; }
  .main_left_body_in pre { overflow-x: auto; white-space: pre-wrap; }

  /* lists: larger tap targets */
  .related_links li, .related_blog li, .ybbs li { font-size: 15px; line-height: 1.6; padding-top: 12px; padding-bottom: 12px; background-position: 5px 19px; }
  .results_body_in h2 { font-size: 16px; }
  .results_body_in p, .results_body_in h3 { font-size: 14px; line-height: 1.7; }
  .ad_in { padding: 12px; }
  .ad_in img { max-width: 100%; height: auto; }

  /* side menu moves below the content and becomes a wrapped grid */
  #lnv { float: none; width: auto; box-sizing: border-box; background-image: none; }
  #lnv ul { display: flex; flex-wrap: wrap; gap: 3px; }
  #lnv li { flex: 1 1 45%; min-width: 130px; }
  #lnv li.lnv_home { flex-basis: 100%; }
  #lnv li a, #lnv li.lnv_home a { padding-top: 12px; padding-bottom: 12px; font-size: 14px; }

  /* footer */
  #footer_in { font-size: 13px; line-height: 2.2; }
  #footer_in a { display: inline-block; padding: 2px 4px; }
  #footer_out, #footer_in { background-image: none; }
  #footer_out { background-color: #666666; }
}

@media (max-width: 479px) {
  .photo { max-width: 38%; margin-right: 10px; }
  .main_left_body_in { padding-left: 12px; padding-right: 12px; }
}
