*, *::before, *::after
  {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, sans-serif;
  }

:root 
  {
  --fonttikoko: 16px;
  }

html, body 
  {
  padding: clamp(2px, 0.5vw, 10px);
  height: 100%;
  }

body
  {
  background: #569;
  font-weight: 400;
  }

.sovellus 
  {
  position: relative;

  max-width: 1200px;  /* Sovelluksen maksimileveys */
  margin: 0 auto;

  /* Valitse toinen: */
  min-height: 100%;   /* Koko sivu rullaa.   */
  height: 100%;       /* Vain "asia" rullaa. */

  display: flex;
  flex-direction: column;
  gap: 0px;
  box-shadow: 0px 0px 8px 1px rgba(0,0,0,0.8);
  }

header 
  {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #eef;
  }

header h1
  {
  color: #559;
  font-size: 2rem;
  font-weight: 400;
  margin: 10px 0;
  }

header h1::before {content: "\2727  ";}
header h1::after  {content: " \2727";}

main /* Tähän tulee varsinainen sisältö. */
  {
  white-space: pre-wrap;
  padding: 2vw 4vw;
  height: 100%;
  overflow-y: auto;
  font-weight: 400;
  font-size: var(--fonttikoko);
  background-color: #f8f8f8;
  }


main p
  {
  xxxwhite-space: pre-wrap;
  xxxborder: solid 1px #aaa;
  xxxmargin-bottom: 1.2em;
  font-size: 1.0em;
  color: #22f;
  font-weight: 400;
  }

main hr
  {
  margin: 1.0em 0;
  border: none;
  border-bottom: solid 1px #bbb;
  }

main h1
  {
  font-size: 1.8em;
  background-color: #abd;
  color: #fff;
  font-weight: 400;
  xxxborder-bottom: solid 1px #bbb;
  padding: 3px;

  margin-bottom: 16px;
  text-align: center;
  }

main h2
  {
  display: block;
  width: fit-content;
  background-color: #79b;
  border-radius: 0 20px 20px 0;

  font-size: 1.4em;
  color: #fff;
  font-weight: 400;
  padding: 3px 16px 3px 8px;
  margin: 0.4em 0 0.6em 0;
  }

main h3
  {
  display: block;
  width: fit-content;

  border: solid 1px #abc;
  border-radius: 0 20px 20px 0;

  font-size: 1.1em;
  color: #448;
  background-color: #eee;

  font-weight: 400;
  padding: 3px 12px 3px 8px;
  margin: 0.3em 0 0.6em 0;

  xxxtext-decoration-line: underline;
  xxxtext-underline-offset: 4px;
  xxxtext-decoration-thickness: 1px;
  }

main h4
  {
  font-size: 1.2em;
  color: #559;
  font-weight: 400;
  margin: 0.3em 0 0.6em 0;
  }

main h5
  {
  font-size: 1.1em;
  color: #559;
  font-weight: 400;
  margin: 0.3em 0 0.6em 0;
  }

main h6
  {
  font-size: 1.1em;
  color: #559;
  font-weight: 400;
  margin: 0.3em 0 0.6em 0;
  }


main h7 /* Tämä korvataan jollain luokalla. */
  {
  font-size: 1.3em;
  color: #00a;
  font-weight: 400;
  margin: 0.3em 0.3em 0.6em 0.0em;
  padding: 0.2em 0.5em;
  border: solid #99f;
  border-width: 3px 10px;
  border-radius: 3px;
  }

main .ruudukko
  {
  display: grid;

  grid-template-columns: 1fr 1fr 1fr; /* fallback vanhoille */
  grid-template-columns: repeat(auto-fit, minmax(calc(10*var(--fonttikoko)), 1fr));

  gap: 0.5rem;
  margin: 0.5em 0em;
  }

main .ruutu
  {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1em 3px;
  background: #eef;
  border: 1px solid #aad;
  border-radius: 8px;
  box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.15);
  text-decoration: none;
  color: #003;
  font-weight: bold;
  word-break: break-word;
  overflow-wrap: anywhere;
  min-height: 4em; /* tai muu arvo, jolla saat hyvän ulkoasun */
  hyphens: auto;
  }

main .ruutu:hover
  {
  background: #ddf;
  }

main ul, main ol
  {
  list-style-position: outside;
  margin: 0.3em 0 0.6em 1.6em;
  xxxborder: solid 1px green;
  }

main a
  {
  color: #55c;
  text-decoration-color: #aac;
  }

nav 
  {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #dde;
  padding: 6px 10px;
  }

nav a, nav button 
  {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  margin: 0 0.5rem;
  text-decoration: none;
  }

.edel, .seur
  {
  color: #89c;
  font-size: 1.6rem;
  }

.hakukenttä
  {
  max-width: 100%;
  }

.zoomaus
  {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: absolute;
  right: 8px;
  bottom: 30px;
  width: 40px;
  height: 70px;
  border: solid 1px #bcd;
  border-radius: 4px;
  padding: 2px;
  background-color: rgba(255,255,255,0.7);
  }

.zoomaus>*
  {
  flex: 1;
  color: #999;
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 0.3rem;
  border: solid 1px #bcd;
  border-radius: 4px;
  background-color: rgba(230,235,240,0);
  cursor: pointer;
  }

footer 
  {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #8ad;
  color: white;
  font-size: 0.8rem;
  font-weight: 100;
  padding: 2px 10px;
  }

footer>* 
  {
  color: white;
  text-decoration: none;
  }

/*------------------------------------------------------*/

@media only screen and (max-width: 400px) 
  {
  .edel, .seur {display: none;}
  }

/*------------------------------------------------------*/

@media (pointer: coarse)
  {
  .zoomaus
    {
    width: 60px;
    height: 105px;
    }

  .zoomaus>*
    {
    font-size: 3.0rem;
    font-weight: 400;
    }
  }

/*------------------------------------------------------*/