:root { color-scheme: light; font-family: Arial, sans-serif; color: #222; background: #fff; }
* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body { margin: 0; padding-bottom: var(--notice-height, 110px); background: url('img/horzline.gif') repeat-x 0 85px; font-size: 1rem; line-height: 1.3; }
a { color: #333; text-underline-offset: .15em; }
a:hover { color: #924400; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #994800; outline-offset: 3px; }
img { max-width: 100%; height: auto; border: 0; }
.site-header { width: min(650px, calc(100% - 32px)); min-height: 86px; margin: auto; display: flex; align-items: end; gap: 12px; padding: 27px 0 8px; }
.site-header > a:first-child { margin-right: auto; }
.site-header > a:first-child img { display: block; width: 229px; height: 51px; }
.site-header > a:not(:first-child) { flex-shrink: 0; }
.site-header > a:not(:first-child) img { display: block; }
.layout { width: min(650px, calc(100% - 32px)); margin: 0 auto 32px; display: grid; grid-template-columns: minmax(0, 350px) minmax(0, 270px); gap: 30px; align-items: start; }
main { min-width: 0; padding-top: 31px; overflow-wrap: break-word; }
.kalevala-banner { display: block; margin-bottom: 16px; }
#kalevala-banner[src$='big.gif'] { width: 350px; }
#kalevala-banner[src$='small.gif'] { width: 222px; }
h1 { font-size: 1.125rem; font-weight: 400; line-height: 1.3; margin: 0 0 1rem; }
h2 { font-size: 1.125rem; }
p { margin: 0 0 1rem; }
article img { display: inline-block; }
article .caption { font-size: .875rem; }
.poem { border-collapse: collapse; width: 100%; font-size: 1rem; }
.poem td { padding: 0; vertical-align: top; }
.poem tr:has(td:last-child:empty) { height: 1.3em; }
.poem .line-number { width: 2.5em; padding-right: .6em; color: #666; font-size: .875rem; text-align: right; font-variant-numeric: tabular-nums; }
#navigation { background: url('img/navbg.jpg') repeat-x top; padding-top: 25px; min-width: 0; }
#navigation > summary { display: none; }
#nav ul { list-style: none; margin: 2px 0; padding: 0; }
#nav li { margin: 0; padding: 0; }
#nav a { text-decoration: none; display: block; }
#nav li > a:hover { background-color: #e8e8e8; }
#nav .main-link { padding: 1px 23px; font-size: 1.125rem; }
#nav .main-link img, #nav .sub-link img { display: block; max-width: none; }
#nav .main-link:not(:has(img)) { padding-left: 44px; background-image: url('img/arr.gif'); background-repeat: no-repeat; background-position: 18px center; }
#nav .sub-link { padding: 1px 18px 1px 29px; font-size: .875rem; font-style: italic; font-weight: 700; }
#nav .sub-link:has(img) { padding-left: 23px; }
#nav [aria-current='page'] { color: #974700; }
.poem-links { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin: 4px 23px 4px 44px; padding: 0; list-style: none; }
#nav .poem-links a { padding: 2px 5px; min-height: 27px; font-size: .875rem; font-weight: 700; font-style: italic; }
.nav-controls { margin: 28px 12px 24px 52px; font-size: .875rem; }
.nav-controls form + form { margin-top: 18px; }
.nav-controls label { display: block; margin-bottom: 3px; }
.control-row { display: flex; align-items: center; gap: 4px; }
.control-row input, .control-row select { min-width: 0; width: 130px; max-width: 100%; }
input, select, button { font: inherit; padding: 5px; color: #222; background: #fff; border: 1px solid #888; border-radius: 2px; }
button { cursor: pointer; }
button:hover { background: #eee; }
select { appearance: none; padding-right: 20px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23333' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 5px center; }
.page-top { margin-top: 24px; }
#oldSiteNotice { position: fixed; z-index: 10; bottom: 0; left: 0; width: 100%; padding: 12px 20px; background: #fff3a6; border-top: 3px solid #900; color: #222; text-align: center; font-size: .875rem; line-height: 1.5; }
#oldSiteNotice strong { display: block; }
.skip-link { position: absolute; left: 8px; top: -100px; z-index: 5; padding: 8px; background: white; }
.skip-link:focus { top: 8px; }
#route-status:not([hidden]), .empty-content { border-left: 3px solid #ac5800; padding: 8px 12px; background: #fff5e8; }
#picture-view { margin: 0; }
#picture-view figcaption { margin-top: 12px; font-size: .875rem; }
body[data-view='picture'] .layout { display: block; }
body[data-view='picture'] #navigation, body[data-view='copyright'] #navigation { display: none; }
body[data-view='picture'] main { width: 100%; }
.search-results { list-style: none; padding: 0; }
.search-results li { padding: 12px 0; border-top: 1px solid #aaa; }
.search-results p { margin: 6px 0 0; }
@media (max-width: 700px) {
  body { padding-bottom: 0; }
  #oldSiteNotice { position: static; }
  .site-header { gap: 8px; }
  .site-header > a:first-child img { width: min(229px, 52vw); height: auto; }
  .layout { display: flex; flex-direction: column; gap: 0; }
  main { width: 100%; padding-top: 24px; }
  #navigation { width: 100%; order: -1; padding: 8px 0; }
  #navigation > summary { display: list-item; cursor: pointer; padding: 8px 12px; font-weight: 700; margin-left: 18px; }
  #navigation[open] > summary { margin-bottom: 12px; }
  #nav .main-link img, #nav .sub-link img { max-width: 100%; }
  .nav-controls { max-width: 330px; }
  .control-row input, .control-row select { flex: 1; }
  input, select, button { min-height: 40px; font-size: 1rem; }
  #nav .main-link, #nav .sub-link { padding-top: 5px; padding-bottom: 5px; }
  #nav .poem-links a { min-height: 40px; display: flex; align-items: center; }
  .poem-links { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media print {
  body { background: none; padding-bottom: 0; }
  .layout { display: block; width: auto; }
  #navigation, .copyright-link, .site-header > a:last-child, .skip-link, .page-top { display: none; }
  main { padding-top: 1rem; }
  #oldSiteNotice { background: none; position: static; }
}
