/* segelfartygkorsord.com — shared stylesheet. Tokens follow package/DESIGN-SYSTEM.md. */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-sv.0196843960.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --canvas: #ffffff;
  --text: #183344;
  --muted: #61717c;
  --navy: #153b52;
  --navy-hover: #0c2b3e;
  --border: #d6e0e6;
  --soft: #edf4f7;
  --soft-hover: #e1edf2;
  --footer: #f7f7f2;
  --ochre: #c9a365;
  --error: #a33737;
  --header-h: 92px;
  --gutter: 20px;
  --radius: 10px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 20px; }
h1, h2, h3 { margin: 0; color: var(--text); font-weight: 600; letter-spacing: -0.01em; }

/* Links: never underlined — state is shown with colour, weight and background. */
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--navy-hover); text-decoration: none; }

:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
  border-radius: 4px;
}

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: calc(1200px + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

@media (min-width: 600px) { :root { --gutter: 24px; } }

.skip-link {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--navy);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
}
.skip-link:focus { top: 16px; color: #fff; }

/* ------------------------------------------------------------ header */
.site-header {
  position: relative;
  z-index: 40;
  height: var(--header-h);
  background: var(--canvas);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand { display: inline-flex; flex: 0 1 auto; min-width: 0; border-radius: 8px; }
.brand picture { display: block; }
/* Logo artwork is 4:1 (480x120 intrinsic); height drives the size, width follows the ratio. */
.site-logo { display: block; width: auto; height: 60px; max-width: 100%; aspect-ratio: 4 / 1; }
.brand--footer .site-logo { height: 52px; }

.nav-list { display: flex; align-items: center; gap: 6px; }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  color: var(--text);
  font-size: 14px;
  line-height: 21px;
  font-weight: 500;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.nav-link::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ochre);
  transform: scale(0);
  transition: transform .2s var(--ease);
}
.nav-link:hover { background: var(--soft); color: var(--navy-hover); }
.nav-link:hover::before { transform: scale(1); }
.nav-link[aria-current="page"] { background: var(--soft); color: var(--navy); font-weight: 600; }
.nav-link[aria-current="page"]::before { transform: scale(1); }

.menu-toggle {
  display: none;
  flex: 0 0 auto;
  width: 44px; height: 44px;
  margin-right: -10px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  transition: background-color .2s var(--ease);
}
.menu-toggle:hover { background: var(--soft); }
.menu-toggle__bars { position: relative; display: block; width: 22px; height: 16px; }
.menu-toggle__bars span {
  position: absolute; left: 0;
  width: 100%; height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform .25s var(--ease), opacity .2s var(--ease), top .25s var(--ease);
}
.menu-toggle__bars span:nth-child(1) { top: 0; }
.menu-toggle__bars span:nth-child(2) { top: 7px; }
.menu-toggle__bars span:nth-child(3) { top: 14px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:nth-child(1) { top: 7px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:nth-child(3) { top: 7px; transform: rotate(-45deg); }

/* Mobile menu: modal panel directly below the header; the panel itself scrolls. */
.mobile-menu {
  position: fixed;
  z-index: 39;
  top: var(--header-h);
  left: 0; right: 0; bottom: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--canvas);
  animation: menu-in .22s var(--ease);
}
.mobile-menu__inner { padding-top: 26px; padding-bottom: 40px; }
.mobile-menu__heading { margin: 0 0 18px; font-size: 28px; line-height: 34px; font-weight: 600; }

.menu-group + .menu-group { margin-top: 26px; }
.menu-group__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 16.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.menu-group__title::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.menu-group li { border-bottom: 1px solid var(--border); }

.menu-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 12px 8px 12px 14px;
  color: var(--text);
  transition: background-color .2s var(--ease);
}
.menu-link::before {
  content: "";
  position: absolute;
  left: 0; top: 12px; bottom: 12px;
  width: 3px;
  border-radius: 3px;
  background: var(--ochre);
  opacity: 0;
}
.menu-link:hover { background: var(--soft); color: var(--text); }
.menu-link[aria-current="page"] { background: var(--soft); }
.menu-link[aria-current="page"]::before { opacity: 1; }
.menu-link__text { display: flex; flex-direction: column; min-width: 0; }
.menu-link__label { font-size: 17px; line-height: 24px; font-weight: 500; }
.menu-link[aria-current="page"] .menu-link__label { font-weight: 600; }
.menu-link__hint { color: var(--muted); font-size: 13px; line-height: 19.5px; }
.menu-link__arrow { flex: 0 0 auto; width: 20px; height: 20px; opacity: .55; transition: transform .2s var(--ease), opacity .2s var(--ease); }
.menu-link:hover .menu-link__arrow { opacity: 1; transform: translateX(3px); }

@keyframes menu-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

/* While the menu is open the header is pinned (body padding keeps the layout still) and the page is locked. */
html.menu-open { overflow: hidden; }
html.menu-open body { padding-top: var(--header-h); }
html.menu-open .site-header { position: fixed; top: 0; left: 0; right: 0; }

@media (max-width: 899px) {
  .nav-desktop { display: none; }
  .menu-toggle { display: inline-flex; }
}
@media (min-width: 900px) {
  .mobile-menu { display: none !important; }
}

/* ------------------------------------------------------------ main + typography */
.main { padding-top: 33px; padding-bottom: 64px; }

.breadcrumbs { margin-bottom: 22px; font-size: 13px; line-height: 19.5px; color: var(--muted); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; }
.breadcrumbs li { display: inline-flex; align-items: center; }
.breadcrumbs li + li::before { content: "/"; margin: 0 8px; color: var(--muted); }
.breadcrumbs a { display: inline-flex; align-items: center; min-height: 32px; color: var(--muted); font-weight: 500; }
.breadcrumbs a:hover { color: var(--navy); }
.breadcrumbs [aria-current="page"] { color: var(--muted); }

.eyebrow {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: 11px;
  line-height: 16.5px;
  font-weight: 500;
  letter-spacing: .02em;
  text-transform: uppercase;
}

h1 { font-size: 54px; line-height: 63.7px; margin-bottom: 32px; letter-spacing: -0.02em; }
.lead { max-width: 1100px; margin-bottom: 28px; color: var(--muted); font-size: 19px; line-height: 28.5px; }

h2 { font-size: 34px; line-height: 40.1px; margin-bottom: 22px; }
h3 { font-size: 20px; line-height: 30px; }

/* ------------------------------------------------------------ notices */
.notice {
  display: grid;
  grid-template-columns: 22px 1fr;
  column-gap: 12px;
  row-gap: 14px;
  align-items: center;
  margin: 0 0 38px;
  padding: 18px;
  border-radius: 12px;
  background: var(--soft);
}
.notice__icon { width: 22px; height: 22px; }
.notice__title { margin: 0; font-size: 16px; line-height: 24px; font-weight: 600; }
.notice__body { grid-column: 1 / -1; color: var(--text); }
.notice__body > :last-child { margin-bottom: 0; }
.notice--message { margin: 24px 0 0; }
.notice--error { background: #fbf0f0; box-shadow: inset 4px 0 0 var(--error); }

/* ------------------------------------------------------------ finder tool */
.tool { margin-bottom: 38px; }
.tool__title { margin-bottom: 20px; font-size: 22px; line-height: 26px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip {
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--soft);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.chip:first-child { min-width: 62px; }
.chip:hover { background: var(--soft-hover); }
.chip[aria-pressed="true"] { background: var(--navy); color: #fff; font-weight: 600; box-shadow: inset 0 -3px 0 var(--ochre); }

.field-label { display: block; margin-bottom: 14px; font-size: 13px; line-height: 19.5px; font-weight: 500; }
.field {
  display: block;
  width: 100%;
  height: 48px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field::placeholder { color: var(--muted); font-weight: 500; letter-spacing: 0; text-transform: none; opacity: 1; }
.field:hover { border-color: #b9c9d2; }
.field:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; border-radius: 9px; }
.field[aria-invalid="true"] { border: 2px solid var(--error); }
.field-hint { margin: 12px 0 24px; color: var(--muted); font-size: 13px; line-height: 19.5px; }

.tool__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 16px;
  font-weight: 600;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn--primary { width: 230px; justify-content: flex-start; background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--navy-hover); color: #fff; }
.btn--secondary { background: #fff; color: var(--navy); border-color: var(--border); }
.btn--secondary:hover { background: var(--soft); color: var(--navy-hover); }

.btn-text {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--navy);
  font-size: 15px;
  font-weight: 500;
  border-radius: 6px;
  transition: color .2s var(--ease);
}
.btn-text:hover { color: var(--navy-hover); }

.results-title { margin: 0 0 26px; font-size: 26px; line-height: 30.7px; }

.answers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 12px;
  margin-bottom: 38px;
}
.answer {
  position: relative;
  min-height: 102px;
  padding: 15px 68px 16px 17px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}
.answer__word { margin: 0 70px 3px 0; font-size: 22px; line-height: 33px; font-weight: 600; letter-spacing: .01em; }
.answer__len { position: absolute; top: 16px; right: 38px; margin: 0; font-size: 12px; line-height: 18px; font-weight: 500; }
.answer__note { margin: 0; color: var(--muted); font-size: 13px; line-height: 19.5px; }
.answer__copy {
  position: absolute;
  top: 39px; right: 28px;
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  transition: background-color .2s var(--ease);
}
.answer__copy:hover { background: var(--soft); }
.answer__copy .icon { width: 20px; height: 20px; }
.answer__status { margin: 0; font-size: 13px; line-height: 19.5px; font-weight: 600; }
.answer__status:empty { display: none; }
.answer__status.is-ok { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--navy); }
.answer__status.is-ok::before { content: ""; width: 16px; height: 16px; background: url("/assets/icons/check.1a6a2eb2e1.svg") center / contain no-repeat; }
.answer__status.is-error { margin-top: 8px; color: var(--error); }

/* ------------------------------------------------------------ topic cards */
.topics { margin-bottom: 26px; }
.topics h2 { margin-bottom: 26px; }
.topic-list { display: grid; gap: 30px; }
.topic {
  display: grid;
  grid-template-columns: 22px 1fr 24px;
  column-gap: 12px;
  align-items: center;
  padding: 18px;
  border-radius: 12px;
  background: var(--soft);
  color: var(--text);
  transition: background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.topic:hover { background: var(--soft-hover); color: var(--text); box-shadow: inset 4px 0 0 var(--ochre); }
.topic__icon { width: 22px; height: 22px; align-self: start; margin-top: 1px; }
.topic__text { display: flex; flex-direction: column; gap: 14px; }
.topic__title { font-weight: 600; line-height: 24px; }
.topic__body { line-height: 24px; }
.topic__arrow { width: 22px; height: 22px; opacity: .5; transition: transform .2s var(--ease), opacity .2s var(--ease); }
.topic:hover .topic__arrow { opacity: 1; transform: translateX(4px); }

/* ------------------------------------------------------------ prose */
.prose { max-width: 780px; }
.prose-section { margin-bottom: 14px; }
.prose-section h2 { margin-bottom: 22px; }
.prose-section p { color: var(--muted); font-size: 16.5px; line-height: 24px; }
.prose p a:not(.arrow-link) {
  padding: 1px 4px;
  margin: 0 -1px;
  border-radius: 4px;
  background: var(--soft);
  color: var(--navy);
  font-weight: 500;
  transition: background-color .2s var(--ease);
}
.prose p a:not(.arrow-link):hover { background: var(--soft-hover); color: var(--navy-hover); }

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--navy);
  font-size: 15px;
  font-weight: 500;
}
.arrow-link__icon { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.arrow-link:hover .arrow-link__icon { transform: translateX(4px); }

.back-links ul { display: flex; flex-direction: column; gap: 0; }

.illustration { max-width: 700px; margin: 12px 0 30px; }
.illustration img { width: 100%; aspect-ratio: 3 / 2; object-fit: contain; }
.pattern { max-width: 700px; margin: 6px 0 34px; }
.pattern img { width: 100%; aspect-ratio: 700 / 240; object-fit: contain; }

.source-list { display: flex; flex-direction: column; }
.source-list li { display: flex; align-items: center; gap: 6px; min-height: 44px; font-size: 15px; font-weight: 500; }
.source-list a { color: var(--navy); }
.source-list a:hover { color: var(--navy-hover); background: var(--soft); border-radius: 4px; }
.ext-icon { width: 16px; height: 16px; }

/* ------------------------------------------------------------ FAQ */
.faq { margin-top: 10px; }
.faq h2 { margin-bottom: 26px; }
.faq__item + .faq__item { margin-top: 6px; }
.faq__btn {
  display: grid;
  grid-template-columns: 1fr 28px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 4px 0;
  border: 0;
  background: none;
  text-align: left;
  font-size: 20px;
  line-height: 30px;
  font-weight: 600;
  border-radius: 6px;
}
.faq__icon { justify-self: end; width: 20px; height: 20px; background: url("/assets/icons/plus.569e858757.svg") center / contain no-repeat; }
.faq__btn[aria-expanded="true"] .faq__icon { background-image: url("/assets/icons/minus.136e32a7b2.svg"); }
.faq__btn:hover { color: var(--navy-hover); }
.faq__a { padding: 12px 0 10px; }
.faq__a p { color: var(--muted); font-size: 16.5px; }

/* ------------------------------------------------------------ 404 */
.error-links { display: flex; flex-wrap: wrap; gap: 12px; }
.error-links .btn--primary { width: auto; }

/* ------------------------------------------------------------ footer */
.site-footer { padding: 30px 0 34px; background: var(--footer); }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  grid-template-areas: "brand nav" "copy copy";
  column-gap: 24px;
}
.footer-brand { grid-area: brand; }
.footer-tagline { margin: 22px 0 8px; color: var(--muted); }
.footer-contact { margin: 0; color: var(--muted); font-size: 14px; }
.footer-contact a { font-weight: 500; }
.footer-nav { grid-area: nav; padding-top: 2px; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 33px; color: var(--text); font-size: 15px; transition: color .2s var(--ease); }
.footer-nav a:hover { color: var(--navy); }
.footer-copy { grid-area: copy; margin: 24px 0 0; color: var(--muted); font-size: 13px; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 899px) {
  .answers { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; grid-template-areas: "brand" "nav" "copy"; }
  .footer-nav { margin-top: 20px; }
  .footer-nav a { min-height: 32px; }
}

@media (max-width: 599px) {
  h1 { font-size: 36px; line-height: 42.5px; margin-bottom: 24px; }
  h2 { font-size: 26px; line-height: 30.7px; }
  .lead { font-size: 17px; line-height: 25.5px; }
  .btn--primary { width: 100%; }
  .error-links .btn { width: 100%; }
  .error-links li { flex: 1 1 100%; }
  .topic-list { gap: 16px; }
}

@media (max-width: 599px) {
  .site-logo { height: 48px; }
  .brand--footer .site-logo { height: 46px; }
}

@media (max-width: 359px) {
  .site-logo, .brand--footer .site-logo { height: 42px; }
  .answer { padding-right: 60px; }
  .answer__word { margin-right: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .mobile-menu, .tool, .answer__copy, .site-footer { display: none !important; }
}
