@charset "UTF-8";

/* Load after the existing common styles. Desktop rules remain unchanged.
 * 980px is the original canvas; 16px gutters require 1012px of space.
 * The bxSlider track deliberately remains wider than its own viewport.
 */
@media screen and (max-width: 1011px) {
  header,
  header *,
  #conteiner,
  #mainWrap,
  #mainWrap *,
  #side-bar,
  #side-bar *,
  footer,
  footer * {
    box-sizing: border-box;
  }

  header,
  #conteiner,
  footer {
    overflow-wrap: anywhere;
  }

  /* The desktop logo overlaps two header rows. Give it its own narrow row. */
  header h1 {
    width: auto;
    margin: 0;
    padding: 8px 16px 0;
    background: #2c539e;
  }

  header h1 a {
    position: static;
    width: 171px;
    max-width: 100%;
    height: auto;
  }

  header img,
  #mainWrap img,
  #side-bar img,
  footer img {
    max-width: 100%;
    height: auto;
  }

  header h1 img {
    display: block;
  }

  .head-inner,
  #middle-head .head-inner,
  #bottom-head nav {
    width: auto;
    min-width: 0;
    margin-right: 16px;
    margin-left: 16px;
    padding-left: 0;
  }

  #top-head {
    padding: 12px 0;
  }

  header h2 {
    float: none;
    margin-bottom: 12px;
  }

  #rss-search {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    float: none;
    width: auto;
    min-width: 0;
  }

  #rss-search a,
  #rss-search form,
  #rss-search .textwidget {
    float: none;
    max-width: 100%;
    margin-left: 0;
  }

  #rss-search form {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 1 300px;
    min-width: 0;
  }

  #rss-search input[type="text"] {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
  }

  #rss-search input[type="image"] {
    flex: 0 0 auto;
    max-width: 100%;
  }

  #middle-head ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    position: static;
    width: auto;
    margin: 0;
  }

  #middle-head li {
    float: none;
    max-width: 100%;
  }

  #middle-head li a,
  #middle-head li img {
    display: block;
  }

  #bottom-head nav > ul.clear {
    display: flex;
    flex-wrap: wrap;
    float: none;
    width: auto;
  }

  #bottom-head nav > ul > li {
    flex: 1 1 auto;
    float: none;
    min-width: 0;
    max-width: 100%;
  }

  #bottom-head nav li,
  #bottom-head nav li a,
  #bottom-head nav p a {
    white-space: normal;
  }

  /* Open submenus in their own row, so they cannot run off either edge.
   * Retain the existing hover behavior and also permit keyboard focus.
   */
  #bottom-head nav ul li ul,
  #bottom-head nav ul li ul li ul {
    position: static;
    width: auto;
    margin-left: 0;
  }

  #bottom-head nav ul li ul li a {
    width: auto;
  }

  #bottom-head nav ul li:focus-within > ul > li {
    height: auto;
    overflow: visible;
  }

  #bottom-head nav p {
    float: none;
    width: auto;
  }

  /* Keep the main content and sidebar in reading order, inside one shell. */
  #conteiner {
    width: auto;
    max-width: 980px;
    margin: 16px;
  }

  #mainWrap {
    display: flow-root;
    float: none;
    width: 100%;
    min-width: 0;
    margin: 0;
  }

  #side-bar {
    display: flow-root;
    float: none;
    width: 300px;
    max-width: 100%;
    margin: 32px auto 0;
  }

  #mainWrap .oneCulmn h2,
  #mainWrap .twoCulmn h2,
  #mainWrap .listCat h2 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px 12px;
    height: auto;
    min-height: 1.5em;
  }

  #mainWrap .oneCulmn h2 a,
  #mainWrap .twoCulmn h2 a,
  #mainWrap .listCat h2 a {
    position: static;
    margin-top: 0;
  }

  #mainWrap .twoCulmn,
  #mainWrap .interviewCat > div.clear {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  #mainWrap .twoCulmn::after,
  #mainWrap .interviewCat > div.clear::after {
    content: none;
  }

  #mainWrap .twoCulmn > div,
  #mainWrap .interviewCat > div.clear > div.clear {
    float: none;
    clear: none;
    width: auto;
    min-width: 0;
  }

  /* Existing summary cards crop at 8.8em; narrow cards must grow with text. */
  #mainWrap .interviewCat > div.clear > div.clear {
    height: auto;
    min-height: 8.8em;
    overflow: visible;
  }

  #mainWrap #tablist li,
  #mainWrap .interCatlist li,
  #mainWrap #tablist li a,
  #mainWrap .interCatlist li a {
    max-width: 100%;
    white-space: normal;
  }

  #mainWrap #tablist li a,
  #mainWrap .interCatlist li a {
    display: inline-block;
  }

  #mainWrap .featureCat div .cat-right {
    float: none;
    width: auto;
    margin-left: 156px;
  }

  body.post-type-archive-feature .featureList div dl {
    float: none;
    width: auto;
    margin-left: 116px;
  }

  body.post-type-archive-feature .featureList #nowMagazine dl {
    width: auto;
    margin-left: 156px;
  }

  body.post-type-archive-feature .featureList .nowList,
  body.post-type-archive-feature .featureList .backList {
    display: block;
    clear: both;
    float: none;
    width: auto;
  }

  body.post-type-archive-interview .interviewList div dl,
  body.tax-interview-cat .listCat div dl,
  body.term-bukken .bukkenList div dl {
    float: none;
    width: auto;
    margin-left: 156px;
  }

  /* Do not constrain the moving ol.bxslider or remove its viewport clip. */
  #mainWrap .bx-wrapper {
    width: 100%;
    min-width: 0;
  }

  #mainWrap .bx-viewport {
    max-width: 100%;
  }

  #mainWrap .bx-next {
    right: 0;
  }

  #mainWrap article .sectionWrap,
  #mainWrap article .sectionWrap div,
  #mainWrap article .sectionWrap p,
  #mainWrap article figure,
  #mainWrap article .wp-caption,
  #mainWrap iframe,
  #mainWrap object,
  #mainWrap embed,
  #mainWrap video {
    max-width: 100%;
  }

  #mainWrap video {
    height: auto;
  }

  #mainWrap pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  /* Wide data tables have their own scroll area; all cells stay available. */
  #mainWrap article table {
    display: block;
    max-width: 100% !important;
    overflow-x: auto;
  }

  #mainWrap form,
  #mainWrap input,
  #mainWrap select,
  #mainWrap textarea {
    min-width: 0;
    max-width: 100%;
  }

  #mainWrap .wpcf7-form-control-wrap {
    display: block;
    max-width: 100%;
  }

  #mainWrap .wpcf7 input[type="text"],
  #mainWrap .wpcf7 input[type="email"],
  #mainWrap .wpcf7 input[type="tel"],
  #mainWrap .wpcf7 input[type="url"],
  #mainWrap .wpcf7 input[type="number"],
  #mainWrap .wpcf7 select,
  #mainWrap .wpcf7 textarea {
    width: 100%;
  }

  #mainWrap #prevnextNav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  #mainWrap #prevnextNav li {
    padding: 8px;
    margin: 0;
    max-width: 100%;
  }

  footer #page-top p,
  footer #sitemap ul,
  footer #page-link ul,
  footer #copy small {
    width: auto;
    margin-right: 16px;
    margin-left: 16px;
  }

  footer li {
    display: inline-block;
    float: none;
    max-width: 100%;
    margin-top: 4px;
    margin-bottom: 4px;
    white-space: normal;
  }
}

/* The original pair of 315px columns plus a 20px gap needs 650px inside
 * the shell, or 682px including its two 16px gutters.
 */
@media screen and (max-width: 681px) {
  #mainWrap .twoCulmn,
  #mainWrap .interviewCat > div.clear {
    grid-template-columns: minmax(0, 1fr);
  }

  #mainWrap .featureCat .cat-img,
  body.post-type-archive-feature .featureList div a.featureIcon,
  body.post-type-archive-interview .interviewList div a.catchImg,
  body.tax-interview-cat .listCat div a.catchImg,
  body.term-bukken .bukkenList div a.catchImg {
    float: none;
    height: auto;
    margin-bottom: 12px;
    overflow: visible;
  }

  #mainWrap .featureCat div .cat-right,
  body.post-type-archive-feature .featureList div dl,
  body.post-type-archive-feature .featureList #nowMagazine dl,
  body.post-type-archive-interview .interviewList div dl,
  body.tax-interview-cat .listCat div dl,
  body.term-bukken .bukkenList div dl {
    margin-left: 0;
  }

  /* Contact tables are labels and controls, so stack them instead of making
   * the visitor pan sideways to reach fields and the send button.
   */
  #mainWrap .wpcf7 table,
  #mainWrap .wpcf7 tbody,
  #mainWrap .wpcf7 tr,
  #mainWrap .wpcf7 th,
  #mainWrap .wpcf7 td {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
  }
}
