/* Basic */

* {
    box-sizing: border-box;
}

:root {
    --background: #eee;
    --accent: #ffc;
    --input: #fff;
    --color: #000;
    --color-secondary: #666;
    --link: #000;
    --link-visited: #666;
    --hover: #666;
    --radius: 0.25em;
}

html {
    background: var(--background);
    color: var(--color);
    font-family: -apple-system, BlinkMacSystemFont, 'Atkinson Hyperlegible', Ubuntu, "Microsoft Sans Serif", "Segoe UI", Ubuntu, Roboto, Oxygen-Sans, Cantarell, "Helvetica Neue", sans-serif;
    /* font-feature-settings: "ss06" on; */
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
    -ms-text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-size: 17px;
    line-height: 1.5;
}

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section,
summary {
    display: block;
}	

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 1em;
}

h1, h2, h3, h4, h5 { margin: 0 0 0.5rem; font-weight: bold; }

h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; }
h4 { font-size: 1rem; }
h5 { font-size: 1rem; }

a {
    cursor: pointer;
    text-decoration: none;
    color: var(--link);
    transition: ease-in-out 300ms;
}

input {
    max-width: 100%;
    color: var(--color);
    background: var(--input);
    border-radius: var(--radius);
}

button {
    color: var(--color);
    background-color: var(--input);
    border-radius: var(--radius);
}

button, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  outline: none;
  border: 1px solid var(--color);
  border-radius: var(--radius);
  background: none;
  padding: 0.5rem;
}
textarea { max-width: 100%; }
button { font-weight: bold; padding: 0.5rem 2rem; background-color: var(--background); color: var(--color); }
section { margin: 2rem; }

/*
 * Loading indicator
 */
#loading { position: fixed; width: 100%; }
#loading.hidden { display: none; }
#loading div {
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: var(--color);
}
#loading div:before, #loading div:after {
  position: absolute;
  content: '';
  top: 0;
  left: 0;
  bottom: 0;
  background-color: var(--background);
  will-change: left, right;
  animation: loading 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
}
#loading div:after {
  animation: loading-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
  animation-delay: 1.15s;
}
@keyframes loading {
  0% { left: -35%; right: 100%; }
  60% { left: 100%; right: -90%; }
  100% { left: 100%; right: -90%; }
}
@keyframes loading-short {
  0% { left: -200%; right: 100%; }
  60% { left: 107%; right: -8%; }
  100% { left: 107%; right: -8%; }
}

/*
 * Menu button
 */
nav, nav a { display: flex; align-items: center; height: 3rem; padding: 0; }
nav h3 { margin: 0 1em; }
#menu path { transition: all 0.4s cubic-bezier(.645, .045, .355, 1); }
#menu path:nth-child(1),
#menu path:nth-child(2) { stroke-dasharray: 18 43.45; stroke-dashoffset: -11.4852; }
#menu.close path:nth-child(1),
#menu.close path:nth-child(2) { stroke-dasharray: 16.970562 43.45; stroke-dashoffset: -32.4852813; transform: translateX(-5px); }
#menu.back path:nth-child(1),
#menu.back path:nth-child(2) { stroke-dasharray: 8.4852 43.45; stroke-dashoffset: 0; transform: translateX(7px); }
#menu path:nth-child(3) { stroke-dasharray: 18; stroke-dashoffset: 0; opacity: 1; }
#menu.close path:nth-child(3) { stroke-dashoffset: -18; opacity: 0; }

/*
 * Settings screen
 */
#settings h3 { margin-top: 2rem; margin-bottom: 1rem; }
#settings { opacity: 0; height: 0; overflow: hidden; transition: opacity 0.5s ease-out; }
#settings.shown{ opacity: 1; height: auto; margin-bottom: 6rem; }
#settings ul#feeds { margin: 0; padding: 0; list-style-type: none; }
#settings ul#feeds li { margin: 0; padding: 0; }

/*
 * News feed
 */
#news { padding: 0; }
#news a { font-style: normal; text-decoration: none; }
#news h3:not(:empty) { margin-top: 2rem; margin-bottom: 1rem; }
#news li { margin-bottom: 0.5rem; list-style-type: none; }
#news em { padding: 0 0.5rem; color: var(--color-secondary); font-style: normal; }
#news a:visited, #news a:visited em { color: var(--link-visited); }
#news span.marked { background-color: var(--accent); }
#news a:visited span.marked { background-color: var(--background); }