/* Base styles */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 4rem;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #f7f7f7;
  color: #111;
  line-height: 1.6;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
.site-header {
  background-color: #004B8D; /* dark blue reminiscent of Swedish public websites */
  color: #fff;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: #FECB00;
  color: #111;
  padding: 0.5rem 0.75rem;
  border-radius: 0 0 0.5rem 0.5rem;
  text-decoration: none;
}
.skip-link:focus {
  left: 1rem;
  top: 0;
}
.site-header .header-inner {
  padding-top: 1.1rem;
  padding-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.site-header .site-title {
  margin: 0;
  padding: 0;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.15;
}
.site-header .site-notice {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.35;
  color: #111;
  background: rgba(254, 203, 0, 0.92);
  padding: 0.6rem 0.75rem;
  border-radius: 0.75rem;
}
.site-header a {
  color: #fff;
  text-decoration: none;
}

.site-nav-bar {
  position: sticky;
  top: 0;
  z-index: 500;
  background: #003A6D;
  border-bottom: 4px solid #FECB00;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.site-nav {
  padding: 0.4rem 0;
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0 0.35rem;
  display: flex;
  justify-content: center;
  gap: calc(0.35rem - 2px);
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.site-nav ul::-webkit-scrollbar {
  display: none;
}
.site-nav li {
  margin: 0;
  flex: 0 0 auto;
}
.site-nav a {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
}
.site-nav a:hover {
  background: rgba(255, 255, 255, 0.14);
}
.site-nav a:focus-visible {
  outline: 3px solid #FECB00;
  outline-offset: 2px;
}
.site-nav a[aria-current="page"] {
  background: rgba(254, 203, 0, 0.2);
  box-shadow: inset 0 0 0 1px rgba(254, 203, 0, 0.55);
}
.nav-text-short {
  display: none;
}

@media (min-width: 720px) {
  html {
    scroll-padding-top: 4.5rem;
  }
  .site-nav ul {
    gap: calc(0.6rem - 2px);
  }
}

@media (max-width: 480px) {
  .nav-text-full {
    display: none;
  }
  .nav-text-short {
    display: inline;
  }
  .site-header .site-title {
    font-size: 1.45rem;
  }
  .site-header .site-notice {
    font-size: 0.9rem;
    padding: 0.55rem 0.65rem;
  }
  .site-nav a {
    padding: 0.5rem 0.65rem;
  }
  main.container {
    padding-top: 1.25rem;
    padding-bottom: 2rem;
    gap: 1rem;
  }
  .card {
    padding: 1rem;
  }
  h1.page-title {
    font-size: 1.7rem;
  }
}

/* Main content */
main.container {
  padding-top: 1.25rem;
  padding-bottom: 2.5rem;
  display: grid;
  gap: 1.25rem;
}
.card {
  background: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
h1.page-title {
  margin: 0 0 1rem;
  color: #004B8D;
  font-size: 2rem;
  line-height: 1.2;
}
h2 {
  margin-top: 1.75rem;
  color: #004B8D;
}
.card > h2 {
  margin-top: 0;
}
.form-section,
.output-section {
  margin-top: 0;
}

/* Form styles */
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 0.3rem;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: 3px solid #004B8D;
  outline-offset: 1px;
}
.btn {
  display: inline-block;
  background-color: #0066B3;
  color: #fff;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.btn:hover {
  background-color: #005294;
}

/* Output area */
.output-section label {
  display: block;
  font-weight: bold;
  margin: 0.5rem 0 0.3rem;
}
#outputText {
  width: 100%;
  padding: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  margin-top: 0;
  background-color: #fff;
}
.output-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.copy-status {
  font-size: 0.9rem;
  color: #333;
}
.smallprint {
  font-size: 0.8rem;
  color: #555;
  margin-top: 0.5rem;
}

/* Footer */
.site-footer {
  background-color: #eaeaea;
  padding: 1rem 0;
  margin-top: 3rem;
  font-size: 0.9rem;
  color: #333;
}
