/* Room Science (mbras.ae). One stylesheet for the whole site.
   Base rules are the phone layout; wider screens are added with min-width queries.
   Layout after the 2010-2012 Habrahabr front page: centred wordmark, large lowercase
   section words, a tab strip, a reading column and a right column of pale panels. */

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: #222;
  font: 16px/1.6 Arial, "Helvetica Neue", Helvetica, sans-serif;
}
.page { max-width: 1170px; margin: 0 auto; padding: 0 16px; }

a { color: #2f6d99; }
a:visited { color: #76598f; }
a:hover { color: #b3402e; }
img { max-width: 100%; height: auto; }
.hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Top line: two quiet links and the search box */
.topline { padding: 10px 0 0; font-size: 13px; color: #888; }
.toplinks { margin: 0 0 8px; }
.toplinks a { color: #888; margin-right: 14px; }
.search { display: flex; }
.search input {
  flex: 1; min-width: 0;
  border: 1px solid #c9c9c9; padding: 5px 7px;
  font: 13px Arial, Helvetica, sans-serif; color: #222; background: #fff;
}
.search button {
  margin-left: 4px; padding: 4px 10px;
  border: 1px solid #c9c9c9; background: #f3f3f0; color: #444;
  font: 13px Arial, Helvetica, sans-serif; cursor: pointer;
}

/* Wordmark and motto */
.masthead { text-align: center; margin: 26px 0 6px; }
.wordmark {
  display: inline-block; margin: 0;
  font: normal 34px/1.1 Arial, Helvetica, sans-serif;
  color: #4f84a6; text-decoration: none; letter-spacing: -0.5px;
}
a.wordmark:visited { color: #4f84a6; }
.motto { margin: 8px auto 0; max-width: 30em; font-size: 13px; line-height: 1.45; color: #8a8a8a; }

/* Large lowercase section words */
.mainnav { margin: 24px 0 14px; font-size: 24px; line-height: 1.3; }
.mainnav a { color: #5f93b8; margin-right: 18px; }
.mainnav a:visited { color: #5f93b8; }
.mainnav a[aria-current] { color: #222; text-decoration: none; }

/* Tab strip of hubs */
.tabs { display: flex; flex-wrap: wrap; margin: 0 0 26px; padding: 0; list-style: none; font-size: 14px; }
.tabs li { margin: 0 2px 2px 0; }
.tabs a, .tabs span { display: block; padding: 6px 12px; background: #ecebe5; color: #555; }
.tabs a:visited { color: #555; }
.tabs span { background: #d8e5ee; color: #222; }

/* Columns */
.cols { display: block; }
.side { margin-top: 36px; }

/* Feed entries */
.entry { margin: 0 0 44px; }
.entry h2 { margin: 0 0 6px; font-size: 22px; font-weight: normal; line-height: 1.25; }
.entry h2 a { color: #333; }
.entry h2 a:visited { color: #5a5a5a; }
.filed { margin: 0 0 12px; font-size: 13px; color: #888; }
.filed a { color: #888; }
.entry figure { margin: 0 0 12px; }
.entry p.excerpt { margin: 0 0 10px; }
.tagline { margin: 0 0 4px; font-size: 12px; color: #999; }
.tagline a { color: #888; margin-right: 6px; }
.meta { margin: 0; font-size: 12px; color: #999; }
.more { font-size: 14px; }

/* Right column panels */
.panel { background: #f1f0ea; padding: 16px 18px 8px; margin: 0 0 20px; }
.panel h2, .panel h3 { margin: 0 0 12px; font-size: 22px; font-weight: normal; color: #9a9a92; }
.panel ul { margin: 0; padding: 0; list-style: none; }
.panel li { margin: 0 0 12px; font-size: 14px; line-height: 1.4; }
.panel li a { color: #4a4a46; }
.panel li a:visited { color: #6e6a75; }
.panel p { font-size: 14px; line-height: 1.45; color: #555; margin: 0 0 12px; }

/* Article */
.note h1 { margin: 0 0 8px; font-size: 26px; font-weight: normal; line-height: 1.25; color: #222; }
.note .meta { margin-bottom: 18px; }
.note h2 { margin: 34px 0 10px; font-size: 21px; font-weight: normal; line-height: 1.3; color: #222; }
.note h3 { margin: 24px 0 8px; font-size: 17px; font-weight: bold; color: #333; }
.note p, .note li { max-width: 42em; }
.note ul, .note ol { padding-left: 1.3em; }
.note li { margin-bottom: 6px; }
figure { margin: 22px 0; }
figure img { display: block; width: 100%; }
figcaption { margin-top: 6px; font-size: 13px; line-height: 1.45; color: #6d6d6d; max-width: 46em; }
.note table { border-collapse: collapse; margin: 18px 0; font-size: 14px; line-height: 1.4; width: 100%; }
.note th, .note td { border: 1px solid #d6d6d0; padding: 6px 8px; text-align: left; vertical-align: top; }
.note th { background: #f1f0ea; font-weight: bold; }
.note td.n, .note th.n { text-align: right; white-space: nowrap; }
.sources { margin-top: 36px; }
.sources ol { font-size: 14px; line-height: 1.45; }
.sources li { margin-bottom: 8px; }
.pager { margin: 30px 0 0; font-size: 14px; }
.pager p { margin: 0 0 6px; }

/* Plain pages and lists */
.plain h1 { margin: 0 0 14px; font-size: 26px; font-weight: normal; }
.plain h2 { margin: 30px 0 10px; font-size: 21px; font-weight: normal; }
.plain p, .plain li { max-width: 42em; }
.hublist { margin: 0; padding: 0; list-style: none; }
.hublist li { margin: 0 0 22px; }
.hublist a { font-size: 20px; }
.hublist p { margin: 4px 0 0; color: #666; font-size: 15px; }
.srclist { padding-left: 1.2em; font-size: 15px; }
.srclist li { margin-bottom: 10px; }
.srclist .cited { display: block; font-size: 13px; color: #888; }
.srclist .cited a { color: #888; }
.results li { margin-bottom: 14px; }

/* Footer */
.foot { margin: 56px 0 28px; font-size: 13px; color: #8f8f8f; }
.foot p { margin: 0 0 8px; max-width: 46em; }
.foot a { color: #7d7d7d; margin-right: 12px; }

/* Wider phones and tablets */
@media (min-width: 600px) {
  .topline { display: flex; justify-content: space-between; align-items: center; }
  .toplinks { margin: 0; }
  .search input { width: 230px; flex: none; }
  .wordmark { font-size: 40px; }
  .mainnav { font-size: 28px; }
  .mainnav a { margin-right: 24px; }
  .entry h2 { font-size: 25px; }
  .note h1 { font-size: 30px; }
}

/* Desktop: reading column and right panels */
@media (min-width: 1000px) {
  .page { padding: 0 24px; }
  .masthead { margin-top: 34px; }
  .wordmark { font-size: 44px; }
  .mainnav { font-size: 30px; margin-top: 30px; }
  .cols { display: grid; grid-template-columns: minmax(0, 1fr) 330px; column-gap: 44px; }
  .side { margin-top: 0; }
  main { max-width: 760px; }
}
