/* Reset
*/
/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: "";
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}

html {
  font-family: sans-serif;
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

a { background-color: transparent; }

a:active,
a:hover { outline: 0; }

hr {
  box-sizing: content-box;
  height: 0; }

pre { overflow: auto; }

code,
kbd,
pre,
samp {
  font-family: monospace, monospace;
  font-size: 1em; }

button,
input,
optgroup,
select,
textarea {
  color: inherit;
  font: inherit;
  margin: 0;
}

button { overflow: visible; }

button,
select {
  text-transform: none; }

button,
html input[type="button"],
input[type="reset"],
input[type="submit"] {
  -webkit-appearance: button;
  cursor: pointer;
}

button[disabled],
html input[disabled] {
  cursor: not-allowed; }

button::-moz-focus-inner,
input::-moz-focus-inner {
  border: 0;
  padding: 0; }

input {
  line-height: normal; }

optgroup {
  font-weight: bold; }

button {
  -webkit-appearance: none;
  -moz-appearance: none;
  background: transparent;
  padding: 0;
  border: 0;
  border-radius: 4px;
  line-height: 1;
  outline: 0; }

html {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit; }


/*! HTML5 Boilerplate v4.3.0 | MIT License | http://h5bp.com/ */

html,
button,
input,
select,
textarea {
    color: #222;
}

html {
    font-size: 100%;
    line-height: 1.4;
}

::-moz-selection {
    background: #b3d4fc;
    text-shadow: none;
}

::selection {
    background: #b3d4fc;
    text-shadow: none;
}

hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid #ccc;
    margin: 1rem 0;
    padding: 0;
}

audio,
canvas,
img,
video {
    vertical-align: middle;
}

fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

textarea {
    resize: vertical;
}


/* ==========================================================================
   Author's custom styles
   ========================================================================== */

/* Typography
*/

@font-face {
    font-family: 'Oxygen';
    font-weight: 400;
    font-style: normal;
    src: local('Oxygen'), url('/fonts/Oxygen/Oxygen-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Oxygen';
    font-weight: 300;
    font-style: normal;
    src: local('Oxygen Light'), url('/fonts/Oxygen/Oxygen-Light.ttf') format('truetype');
}

@font-face {
    font-family: 'Oxygen';
    font-weight: 700;
    font-style: normal;
    src: local('Oxygen Bold'), url('/fonts/Oxygen/Oxygen-Bold.ttf') format('truetype');
}

@font-face {
    font-family: 'Comme Mono';
    font-weight: 400;
    font-style: normal;
    src: local('Comme Mono'), url('/fonts/CommeSans/CommeMono-Regular.ttf') format('truetype');
}

body {
    font-family: 'Oxygen', Roboto, DejaVu Sans, Arial, sans-serif;
    font-weight: 400;
    line-height: 1.4;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1 {
    font-size: 2.25rem;    
    font-family: 'Oxygen', Roboto, DejaVu Sans, Arial, sans-serif;
    font-weight: 300; 
    margin-bottom: 0.5rem;
}

h2 {  
    font-size: 1.85rem;      
    font-family: 'Oxygen', Roboto, DejaVu Sans, Arial, sans-serif;
    font-weight: 300;  
    color: #888;
    margin-top: 0.625rem;
    margin-bottom: 0.375rem;
}

h3 {  
    font-size: 1.425rem;
    font-family: 'Oxygen', Roboto, DejaVu Sans, Arial, sans-serif;
    font-weight: 400;    
    color: #888;
    margin-top: 0.625rem;
    margin-bottom: 0.1rem;
}

h4 {  
    font-size: 1.175rem; 
    font-family: 'Oxygen', Roboto, DejaVu Sans, Arial, sans-serif;
    font-weight: 400;    
    color: #888;
    margin-top: 0.625rem;
    margin-bottom: 0.375rem;
}

h5 {  
    font-size: 0.8rem;    
    font-family: 'Oxygen', Roboto, DejaVu Sans, Arial, sans-serif;
    font-weight: 700;	
    color: #aaa;
    text-transform: uppercase;
    margin-top: 0.375rem;
}

h6 {
    font-size: 0.7rem; 
    font-family: 'Oxygen', Roboto, DejaVu Sans, Arial, sans-serif;
    font-weight: 700;
    text-transform: uppercase;
}

strong,
.footer li a {	
    font-family: 'Oxygen', Roboto, DejaVu Sans, Arial, sans-serif;
    font-weight: 700;
}

.datafiles > .box span {
    font-family: 'Comme Mono';	
}

.nav,
.footer,
small {
    font-size: 0.75rem;
}

code,
pre,
kbd {
    font-family: Consolas, "Liberation Mono", Courier, monospace;
    font-weight: normal;
    white-space: pre-wrap;
    word-wrap: normal;
    word-break: keep-all;
    background-color: #e6e6e6;
    padding: 0.125rem 0.3125rem 0.0625rem;
}

/* Colours
*/

body {
    background: #d8d6c9;
    color: #2c373a;
}

a {
    color: #de1b1b;
    text-decoration: none;
    outline: 0;
}

a:hover,
a:focus,
a:active {
    color: #c91313;
}


/* Helper classes
*/

.hide { display: none; }

/* Layout
*/

*, *:before, *:after {
    -moz-box-sizing: border-box;
}

.row > div {    
    width: 96%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 4fr 1fr;
    grid-gap: 0 2rem;
    gap: 0 2rem;
    padding-top: 1.5rem;
    padding-bottom: 0.5rem;
}

.topbar, .header, .row {
    background: #f7f8f2;
}

.topbar > div {
    width: 96%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-gap: 0 2rem;
    gap: 0 2rem;
    padding-top: 1.5rem;
    padding-bottom: 0.5rem;
    align-items: start;
    border-bottom: 1px solid #b9bdc5;
}

.topbar .column {
    display: block;
}

.topbar nav {
    grid-column: end;
}

.topbar nav li {
    text-transform: uppercase;
}

.topbar nav > div > ul {
    text-align: right;
}

.topbar nav li {
    display: inline-block;
}

.topbar nav li a {
    display: block;
    padding: 0 0.5rem .75rem .5rem;
}

.topbar header h1 a {
    font-size: 2.5rem;
    margin-bottom: 0;
    color: #000;
}

.topbar header span {
    display: inline-block;
}

.topbar header img {
    display: inline-block;
    max-width: 160px;
    height: auto;
    vertical-align: baseline;
    margin-right:  0.5em;
}

.search {
    position: relative;
}

#search {
    box-sizing: border-box;
    display: block;
    font-size: 1rem;
    font-family: 'Oxygen', Roboto, DejaVu Sans, Arial, sans-serif;
    font-weight: 400;
    width: 100%;
    border: 2px solid #ccc;
    padding: 0.5em 0 0.5em 0.5em;
    border-radius: 4px;
}

    ::-webkit-input-placeholder { color: #969ba6; }
    ::-moz-placeholder          { color: #969ba6; }
    :-ms-input-placeholder      { color: #969ba6; }

#search:focus {
    color: #2c373a;
    border: 2px solid #de1b1b;
}

#spinner {
    display: inline;
    visibility: hidden;
    position: absolute;
    top: 0.5rem;
    right: 0.35rem;
    z-index: 100;
}

.notfound {
    display: none;
    padding-top: 1em;
}


.row .description p,
.row .description code {
    font-size: 0.875rem;
}

.row .main {
    padding-top: 1rem;
    margin-bottom: 2.5rem;
}

.row .description {
    padding-top: 1rem;
}

.description p,
.main .readme p,
.row .main p {
    margin-bottom: .75rem;
}

.row .main-dataset .readme ul,
.row .static-page ul  {
    line-height: 1.4;
    margin-bottom: 1rem;
    margin-left: 0;
}

.row .main-dataset .readme ul li::before,
.row .static-page ul li::before {
    content: "— ";
    display: inline-block;
    padding-right: 0.45rem;
}

.row .main-dataset ul li,
.row .static-page ul li {
    margin-bottom: 0.45rem;
}

/* homepage dataset list
*/

.datasets > li {
    border-top: 1px solid #b9bdc5;
    margin-top: 0;
}

    .datasets > li.dataset-*:first-child {
        border-top: 0;
    }

.datasets > li a {
    color: #2c373a;
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    grid-gap: 0 2rem;
    gap: 0 2rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.datasets > li a .column {
    display: block;
    margin-top: 0;
}

    .datasets > li a h3          { color: #de1b1b; }
    .datasets > li a span        { color: #2c373a; }
    .datasets > li a span.source { color: #969ba6; }


.datasets > li a:hover * { color: #000; }

/* .datasets > li a:hover * { color: #c91313; } */


.datasets > li a h3 {
    font-size: 100%;
    font-weight: 700;
}

.datasets > li span {
    display: block;
}

.datasets > li span {
    font-size: 0.875rem;
}

/* dataset page
*/

.main-dataset .details h4:first-child {
    padding-top: 0;
}


.main-dataset .details a[href*="//"]:not([href*="http://centraldedados.pt/"])::after { /* external links */
    display: inline-block;
    content: '↗';
    margin-right: 2px;
}


.datafile-box {
    margin-top: 1rem;
}

.datafile-box + .datafile-box {
    margin-top: 0.25rem;
}

.datafile-fieldlist ul {
    margin-left: 0.75rem;
    font-size: 0.8rem;
}

.sources ul {
    margin-left: 0.75rem;
}

.readme h1.title {
    font-size: 1.75rem;
    line-height: 1.3;
    margin-bottom: 0.45rem;
}

.readme h2.subtitle {
    font-size: 0.9rem;
    font-family: 'Oxygen', Roboto, DejaVu Sans, Arial, sans-serif;
    font-weight: 700;
    line-height: 1.3;
    color: #999;
    margin-bottom: 2rem;
}

.readme h1 {
    font-size: 1.5rem;
}

.readme h2 {
    font-size: 1.25rem;
    font-family: 'Oxygen', Roboto, DejaVu Sans, Arial, sans-serif;
    font-weight: 300;
    text-transform: uppercase;
    margin-top: 1rem;
}

.footer {
  background: #d8d6c9;
  padding-top: 1rem;
}

.footer > div {
  background: #d8d6c9;
  padding-top: 1rem;
  display: block;
}

.footer h4 {
  margin-bottom: 1rem;
}

.footer h5 {
    color: #2c373a;
    margin-bottom: 1.75rem;
    text-transform: none;
}

.footer h5 a {
    display: inline-block;
    margin: 0 0.75rem;
    text-transform: uppercase;
}

.footer h5 img {
    display: inline-block;
    height: 18px;
    width: auto;
    vertical-align: bottom;
}

.footer li {
    margin: 1rem 1rem 0 0;
}

.footer ul img {
    display: inline-block;
    height: 32px;
    width: auto;
}

/* Forms -- contact form
*/

form {
    padding: 1.5rem 0;
}

form p {
    padding-top: 1rem;
    margin-bottom: 1rem;
}

form label {
    font-size: 0.875rem;
    font-family: 'Oxygen', Roboto, DejaVu Sans, Arial, sans-serif;
    display: block;
    width: 100%;
    margin-bottom: 1rem;
}

form input {
    display: block;
    width: 100%;
}

input[type="text"],
input[type="email"] {
    display: block;
    background-color: #fefefe;
    border: 1px solid #cacaca;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(10, 10, 10, 0.1) inset;
    box-sizing: border-box;
    color: #2c373a;
    display: block;
    font-size: 1rem;
    height: 2.4375rem;
    margin: 0.45rem 0 1rem;
    padding: 0.5rem;
    transition: box-shadow 0.5s ease 0s, border-color 0.25s ease-in-out 0s;
    width: 100%;
}


textarea {
  display: block;
  height: auto;
  min-height: 50px;
  border-radius: 4px;
  overflow: auto;
  background-color: #fefefe;
  border: 1px solid #cacaca;
  box-shadow: 0 1px 2px rgba(10, 10, 10, 0.1) inset;
  box-sizing: border-box;
  color: #2c373a;
  display: block;
  font-size: 1rem;
  margin: 0.75rem 0 1rem;
  padding: 0.5rem;
  transition: box-shadow 0.5s ease 0s, border-color 0.25s ease-in-out 0s;
  width: 100%;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus  {
    background-color: #fefefe;
    border: 1px solid #888;
    box-shadow: 0 0 5px #cacaca;
    outline: medium none;
    transition: box-shadow 0.5s ease 0s, border-color 0.25s ease-in-out 0s;
}

.button {
    font-size: 0.875rem;
    font-family: 'Oxygen', Roboto, DejaVu Sans, Arial, sans-serif;
    font-weight: 400;
    line-height: 1;
    color: #2c373a;
    background-color: #cacaca;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    padding: 0.75rem 1rem;
    text-align: center;
    transition: background-color 0.25s ease-out 0s, color 0.25s ease-out 0s;
    vertical-align: middle;
}

.button:hover, .button:focus {
    background-color: #888;
}


/* ==========================================================================
   Media Queries
   ========================================================================== */


@media screen and (max-width: 39.9375em) { /* Small only */
    .row > div {
        display: block;
    }
    .topbar > div {
        display: flex;
        flex-direction: column-reverse;
    }
}

@media only screen and (min-width: 480px) {

        .datafiles > ul {
                margin: 0 0 1.25rem;
        }
}


@media only screen and (min-width: 600px) {

        .row > div,
        .topbar > div,
        .nav > div {
                width: 92%;
                margin: 0 auto;
        }

        .datafiles > ul {
                margin: 0 0 1.25rem;
        }

}


@media only screen and (min-width: 900px) {

        .row > div,
        .topbar > div {
                width: 86%;
                margin: 0 auto;
        }

        .header + .row > div {
                width: 86%;
                overflow: auto;
                clear: both;
                margin: 1rem auto 0;
                padding-bottom: 1.325rem;
        }
}

