body {
  margin: 0;
  line-height: 1.6;
  color: #333;
  background: #fff;
  font-family: 'Source Sans Pro', sans-serif;
}

* {
  word-break: break-word;
}

article {
  width: 800px;
  min-width: 60%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  margin-top: 1.5em;
}

.code-wrap {
  padding: .5em 1.25ex;
  border: 1px solid #ddd;
  background: #f5f5f5;
}

.diff-hunk-header,
.code-linenum,
.code-text {
  font: .8em Consolas, "Liberation Mono", Menlo, Courier, monospace;
  white-space: pre-wrap;
}

pre {
  font: .8em Consolas, "Liberation Mono", Menlo, Courier, monospace;
  padding: 1em 1.25ex;
  background: #f6f8fa;
  white-space: pre-wrap;
  font-size: 1em;
  border-radius: 2px;
}

section code {
  padding: .5ex;
  border-radius: .5ex;
  background-color: #eff1f4;
}

.code-wrap > code,
pre > code {
  padding: 0;
  background-color: #f5f5f5;
}

/* header */

header {
  width: 100%;
  padding: 0 calc((100% - 800px)*0.5);
  min-height: 56px;
  background-color: #2f8eea;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  line-height: 56px;
  justify-content: flex-start;
  align-items: center;
}

header h1 {
  font-weight: 100;
  font-size: 1.5em;
  display: inline;
}

header h1 :link,
header h1 :visited {
  color: #fff;
}

header h1 sub {
  color: #fff;
  font-style: oblique;
  font-size: small;
}

header .search-bar {
  margin-left: 1em;
  height: 1.6em;
  max-width: 300px;
  padding: .25em .7em;
  background: #1273d0;
  border-radius: .25em;
  border: none;
  color: #98c4ff;
}

a.profile-icon {
  margin-left: auto;
  height: 56px;
  display: flex;
  justify-content: center;
  align-items: center;
}
img.profile-icon {
  height: 2em;
  width: 2em;
  border-radius: 3px;
}

/* content */

section {
  background-color: white;
  margin-bottom: .75em;
  border-radius: 0;
  border-bottom: 1px solid #eee;
}

section.branch-info, section.files {
  border: none;
}

.branch-info > form {
  display: flex;
}

.rev-menu-line {
  flex: 1;
}

.missing-blobs-warning {
  color: black;
}

section.readme {
  padding: calc(2em + 36px) 2em 2em;
  border: 1px #dedede solid;
  border-radius: 3px;
  position: relative;
}

.readme-filename {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 36px;
  line-height: 36px;
  background-color: #f5f5f5;
  border-bottom: 1px solid #dedede;
  font-weight: 600;
  padding: 0 10px;
  box-sizing: border-box;
}

section.collapse {
  margin-bottom: 0;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
}

h3 ~ h4 {
  margin-top: 1em;
}

a:link, a:visited {
  color: #1273d0;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

hr {
  border: 0;
  border-bottom: 1px solid #eee;
}

/* icons */

i {
  font-family: Symbola, 'Apple Color Emoji', 'Android Emoji',
    'Segoe UI Symbol', 'DejaVu Sans', sans-serif;
  font-style: inherit;
  word-break: normal;
}

section img {
  max-width: 100%;
}

.emoji {
  width: 1em;
  height: 1em;
  vertical-align: middle;
}

/* repo page */

.repo-title {
  height: 2em;
}

.repo-title h2 {
  height: 1.2em;
}

.repo-author {
  font-weight: normal;
}

.bgslash {
  color: #888;
}

.petname h2,
.petname h3 {
  float: left;
}

.right-bar {
  float: right;
  display: inline-block;
}

.right-bar .btn {
  margin-top: 0.2em;
}

input { border: 1px solid #eee;}

.btn {
  background: #eee;
  border: 1px solid #e7e7e7;
  border-bottom: 2px solid #ccc;
  margin-top: .5em;
  padding: .3em .6em;
  border-radius: .3em;
  cursor: pointer;
  color: #333;
  font-weight: 600;
}

.btn:hover {
  background: #ddd;
  border: 1px solid #ccc;
  border-bottom: 2px solid #aaa;
}

.btn.btn-primary {
  background: #0092db;
  border: none;
  color: #fff;
}

.btn.btn-primary:hover {
  background: #03a7f9;
}

.name {
  font-size: inherit;
  margin-left: 1ex;
  width: 20em;
}

label {
  cursor: pointer;
}

.name-toggle {
  font-size: 1.3em;
  margin-left: .25ex;
}

.name-checkbox,
.toggle,
.tab-radio {
  position: absolute;
  opacity: 0;
  font-size: 0;
}

.name-checkbox:checked ~ h2 :last-child,
.name-checkbox:checked ~ h3,
.name-checkbox:not(:checked) ~ .name,
.name-checkbox:not(:checked) ~ .name-btn {
  display: none;
}

.clone-urls {
  position: relative;
  width: 21rem;
  max-width: 100%;
  min-width: 3rem;
  height: 1.5rem;
}

select.custom-dropdown.clone-url-protocol {
  border-radius: .3rem 0 0 .3rem;
  width: 5rem;
  position: absolute;
  left: 0;
}

.clone-url-wrapper {
  position: absolute;
  left: 5rem;
  right: 0;
}

.clone-url {
  font-size: 1rem;
  border: 1px #e1e1e1 solid;
  border-radius: 0 .3rem .3rem 0;
  box-sizing: border-box;
  margin: 0;
  padding: .1rem;
  width: 100%;

  background-color: #eaeaea;
  color: #6f6f6f;
  vertical-align: top;
}
.clone-url:hover {
  color: #000;
}

nav {
  margin: 1em 0 1em 0;
  clear: left;
}

nav a {
  border-radius: .5ex;
  padding: 0 1ex 0 0;
  display: inline-block;
  margin-right: .5ex;
}
nav a:hover {
  color: #333;
}

nav a.active {
  font-weight: bold;
}

.raw-link {
  float: right;
  display: inline-block;
}

.header-align {
  margin-top: .25em;
}

/* files list */

table.files {
  border: 1px #dedede solid;
  border-radius: 3px;
}

.files thead td {
  background-color: #f5f5f5;
  border-bottom: 1px solid #dedede;
  padding: 5px 10px;
  box-sizing: border-box;
}

.files tbody td:first-child {
  padding: 0 1ex;
  width: .7rem;
}

.files tbody tr:not(:first-child) td {
  border-top: 1px solid #eaeaea;
}

.files tbody tr:hover {
  background-color: #f5f5f5;
}

/* user page */

.user-id {
  float: right;
  font-weight: normal;
  font-size: small;
  display: inline-block;
  margin: 0;
}

h2 .user-id {
  padding-top: .5em;
}

h3 .user-id {
  padding-top: .25em;
}

/* new issue form */

.wide-input {
  width: 99%;
  display: block;
  font-size: inherit;
  line-height: inherit;
}

/* issues */

.issue-state {
}

.issue-state-open {
}

.issue-state-closed {
  color: black ;
}

/* issue */

.issue-status {
  margin-right: .75ex;
  border-radius: .2em;
}

.open {
  font-weight: bold;
}

.btn.open:hover {
}

.closed {
}

.mention-preview {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tab-links label,
.tab-links a {
  padding: 1ex;
  color: #333;
}

#tab1:checked ~ .tab-links .tab1-link,
#tab2:checked ~ .tab-links .tab2-link {
  text-decoration: underline;
}

#tab1:not(:checked) ~ .tab1,
.tab2 {
  display: none;
}

.tab1,
#tab2:checked ~ .tab2 {
  display: block;
}

.preview-text {
  border: 1px solid #c0bdba;
  min-height: 6em;
  margin: .25ex 0;
  padding: .25ex;
}

.preview-text :first-child {
  margin-top: 0;
}
.preview-text :last-child {
  margin-bottom: 0;
}

.highlight {
  background-color: #ff6;
  padding: .25ex .5ex;
  margin: -.25ex -.5ex;
}

.item-id {
  color: grey;
  line-height: 2;
  font-size: 10pt;
}

/* code and diffs */

.code {
  border-collapse: collapse;
  text-align: left;
  width: 100%;
}

.code th {
  font-family: sans-serif;
  font-size: 1.25em;
  padding-bottom: .5ex;
}

.diff-info {
  font-family: sans-serif;
  font-size: 1.25em;
}

.diff-hunk-header {
  background-color: #eee;
  color: grey;
}

.code td {
  padding: .5ex 1ex .5ex;
}

:target {
  background-color: #fff8d2 !important;
}

.code-linenum {
  vertical-align: top;
  text-align: right;
  color: grey;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  white-space: nowrap;
}

.code-linenum a {
  color: inherit;
}

.code-linenum a:hover {
  color: #9f9999;
}

.code-text {
  white-space: pre-wrap;
  width: 100%;
}

.diff-old { background-color: #ffe2dd; }
.diff-new { background-color: #d1ffd6; }

.code img {
  max-width: 100%;
}

/* Pull requests */

#commits:not(:target) ~ #commits-tab,
#commits:target ~ #files-tab {
  display: none;
}

#commits:not(:target) + .tab-links #files-link,
#commits:target + .tab-links #commits-link {
  font-weight: bold;
}

.date-info {
  font-weight: normal;
  text-align: left;
  color: #666;
}

.compare-commits td:first-child {
  padding-left: 2ex;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 10em;
}

.commit-title {
  word-break: break-all;
}

.pr-tab-links {
  margin: .5em 0 0.25em;
}

.merge-instructions {
  margin-top: .5em;
}

#merge-instructions:not(:checked) + h4 .toggle-open,
#merge-instructions:checked + h4 .toggle-closed,
#merge-instructions:not(:checked) ~ .contents {
  display: none;
}

.toggle-link {
  color: #006eff;
  font-weight: normal;
}

.date { font-size: .8em; color: #666;}

.dib { display: inline-block; }

.w-100 { width: 100%; }

.ml4 { margin-left: 2rem; }
.ml3 { margin-left: 1rem; }
.ml2 { margin-left: 0.5rem; }
.ml1 { margin-left: 0.25rem; }

.mr4 { margin-right: 2rem; }
.mr3 { margin-right: 1rem; }
.mr2 { margin-right: 0.5rem; }
.mr1 { margin-right: 0.25rem; }

.mt2 { margin-top: 0.5rem; }

.float-right { float: right; }

.light-grey { color: #909090; }

select.custom-dropdown {
  -webkit-appearance: none;  /*REMOVES DEFAULT CHROME & SAFARI STYLE*/
  -moz-appearance: none;  /*REMOVES DEFAULT FIREFOX STYLE*/

  -webkit-border-radius: 1rem;
  border: 1px #e1e1e1 solid;
  border-radius: .3em;
  font-size: 1rem;
  padding: .125rem;
  width: 30%;
  cursor: pointer;

  background: #fff url(drop-down-arrow.png) no-repeat right center;
  background-size: 32px 32px; /*TO ACCOUNT FOR @2X IMAGE FOR RETINA */
}

/* Fix select padding in Firefox.
 * https://bugzilla.mozilla.org/show_bug.cgi?id=382142 */
@-moz-document url-prefix() {
  select.custom-dropdown {
    padding: .05rem;
  }
}

select.custom-dropdown:active,
select.custom-dropdown:hover,
select.custom-dropdown:focus {
  outline: 0;
}

select.custom-dropdown optgroup {
  margin: 0.5rem;
}

.fileLocation {
  border: 1px #dedede solid;
  border-bottom: none;
  padding: 0.2rem 0.7rem;
  background-color: #f6f6f6;
}
