/* APT #8: preserve the historical student/book content on a narrow viewport.
   Opt-in through the existing Rails layout contract; never style other cohorts. */
.apt-education .apt-article {min-width:0}
.apt-education .apt-article h1.fancy {text-align:center}
.apt-education .apt-article h1, .apt-education .apt-article h2,
.apt-education .apt-article h3, .apt-education .apt-article h4 {
  max-width:100%; overflow-wrap:break-word;
}
.apt-education .apt-article p, .apt-education .apt-article li {overflow-wrap:break-word}
.apt-education .apt-article pre, .apt-education .apt-article code {max-width:100%;overflow-x:auto}
.apt-education .apt-article img {max-width:100%;height:auto}
.apt-education .apt-article table {display:block;max-width:100%;width:auto;overflow-x:auto;border-collapse:collapse}
.apt-education .apt-article table td, .apt-education .apt-article table th {padding:6px;vertical-align:top}
.apt-education .apt-article table[width="380"] {display:table;width:100%;table-layout:fixed}
.apt-education .apt-article table[width="380"] td {width:50%;overflow-wrap:anywhere}
.apt-education .apt-article a {overflow-wrap:anywhere}
.apt-book-search {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));
  gap:16px;margin:20px 0}
.apt-book-search form {border:1px solid #d7e1e5;border-radius:9px;padding:16px;
  display:flex;flex-direction:column;gap:10px;background:#f7fafb;min-width:0}
.apt-book-search label {font-weight:700}
.apt-book-search input, .apt-book-search select {width:100%;min-width:0;padding:10px;
  border:1px solid #9baeb9;border-radius:6px;background:white;color:#213747}
.apt-book-search button {background:#173f5d;color:white;border:0;border-radius:6px;
  min-height:44px;padding:10px 14px;font-weight:700}
.apt-book-search button:hover {background:#275779}
.apt-book-search button:focus-visible {outline:3px solid #cf2929;outline-offset:2px}
.apt-book-search .apt-book-logo img {max-height:48px;width:auto}
@media(max-width:460px){
  .apt-education .apt-article table[width="380"] {display:block;width:100%}
  .apt-education .apt-article table[width="380"] tbody,
  .apt-education .apt-article table[width="380"] tr,
  .apt-education .apt-article table[width="380"] td {display:block;width:100%}
}

.apt-education .apt-education-credit{text-align:center;margin:20px 0 0;color:#5a6c78;font-size:13px}

/* The original printer-friendly Word link is unavailable: provide a real
   browser print layout for the existing article instead of a broken file. */
@media print {
  .apt-education .apt-article {display:block;max-width:none;width:100%;padding:0;
    margin:0;color:#111;background:white;border:0;box-shadow:none}
  .apt-education .apt-article table {display:table;max-width:100%;width:100%;
    overflow:visible;page-break-inside:auto}
  .apt-education .apt-article img {max-width:100%;height:auto}
  .apt-education .apt-article a {color:inherit}
  .site-header, .site-nav, .site-footer, .apt-education .apt-book-search {display:none!important}
  .apt-education {display:block!important}
}
