/*
Theme Name: Quipd Reference
Theme URI: https://guide.quipd.no/
Author: Quipd
Author URI: https://www.quipd.no/
Description: Quipd Reference theme for manuals, product guides and support articles.
Version: 1.0.40
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: quipd-quick-refrence
*/


@font-face {
  font-family: "Quipd Guide";
  src: url("assets/fonts/quipd-guide.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --qg-blue: #303f96;
  --qg-green: #8abd3f;
  --qg-peach: #f4c27b;
  --qg-bg: #ffffff;
  --qg-white: #ffffff;
  --qg-text: #232020;
  --qg-muted: #5b5b5b;
  --qg-line: #dedbd5;
  --qg-footer-bg: #ccdff7;
  --qg-max: 1280px;
  --qg-radius: 30px;
  --qg-font-main: "Quipd Guide", "Helvetica Neue", Arial, sans-serif;
  --qg-font-display: "Quipd Guide", "Helvetica Neue", Arial, sans-serif;
}


* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { min-height: 100%; }
html { height: 100%; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  background: var(--qg-bg);
  color: var(--qg-text);
  font-family: var(--qg-font-main, Arial, sans-serif);
  font-synthesis: none;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.qg-wordmark,
.qg-menu-panel a,
.qg-menu-button,
.qg-contact-link,
.qg-button,
.wp-block-button__link {
  font-family: var(--qg-font-display);
}

a { color: var(--qg-blue); text-decoration: none; border-bottom: 0; box-shadow: none; }
a:hover { color: var(--qg-blue); text-decoration: none; border-bottom: 0; box-shadow: none; }
a::before, a::after { text-decoration: none; }

img { max-width: 100%; height: auto; display: block; }
.qg-container { width: min(var(--qg-max), calc(100% - 64px)); margin: 0 auto; }

/* Sticky footer layout */
body > main,
.qg-page,
.qg-page-main,
.qg-front-builder {
  flex: 1 0 auto;
}
.qg-site-header,
.qg-site-footer {
  flex: 0 0 auto;
}
.qg-site-footer {
  margin-top: auto;
}

/* Header */
.qg-site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #dfdfdf;
}
body.admin-bar .qg-site-header { top: 32px; }
.qg-header-bar,
.qg-header-inner {
  min-height: 96px;
  width: min(1400px, calc(100% - 80px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.qg-brand-wrap,
.qg-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.qg-brand-wrap {
  margin-right: auto;
  text-align: left;
}

.qg-brand,
.qg-logo,
.custom-logo-link {
  display: inline-flex;
  align-items: center;
  margin-left: 0;
  margin-right: auto;
  color: var(--qg-blue);
  font-weight: 700;
  letter-spacing: -.055em;
  text-align: left;
  border-bottom: 0 !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

.qg-brand img,
.qg-logo img,
.custom-logo {
  display: block;
  max-height: 58px;
  width: auto;
  margin-left: 0;
  margin-right: auto;
  border-bottom: 0 !important;
  box-shadow: none !important;
}

.custom-logo-link::before,
.custom-logo-link::after,
.qg-brand::before,
.qg-brand::after,
.qg-logo::before,
.qg-logo::after {
  display: none !important;
  content: none !important;
}

.qg-wordmark { font-size: 45px; line-height: .9; color: var(--qg-blue); font-weight: 700; }
.qg-wordmark span { color: var(--qg-green); }
.qg-header-actions { display: flex; align-items: center; gap: 32px; }
/* Header CTA buttons
   Controlled by its own WordPress menu location: Header CTA knapper.
   Styling is intentionally fixed here, so menu items only decide label and URL. */
.qg-header-buttons { display: flex; align-items: center; }
.qg-header-button-list {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.qg-header-button-list li { margin: 0; padding: 0; }
.qg-header-button-list a,
.qg-contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 24px;
  border-radius: 999px;
  background: #e3bf67;
  color: var(--qg-text) !important;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  position: relative;
  text-decoration: none !important;
  border: 0 !important;
  box-shadow: none !important;
  white-space: nowrap;
}
.qg-header-button-list a:hover,
.qg-contact-link:hover {
  background: var(--qg-peach);
  color: var(--qg-text) !important;
}
.qg-header-button-list a::before,
.qg-header-button-list a::after,
.qg-contact-link::before,
.qg-contact-link::after { content: none !important; display: none !important; }
.qg-menu-button {
  appearance: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--qg-blue);
  min-width: 0;
  height: auto;
  padding: 0;
  font: inherit;
  font-family: var(--qg-font-display);
  font-size: 20px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  text-decoration: none;
  box-shadow: none;
}
.qg-menu-button:hover,
.qg-menu-button:focus {
  color: var(--qg-blue);
  background: transparent;
}
.qg-menu-button:focus-visible {
  outline: 2px solid var(--qg-blue);
  outline-offset: 4px;
}
.qg-menu-button i {
  order: -1;
  position: relative;
  display: block;
  width: 24px;
  height: 18px;
  flex: 0 0 24px;
}
.qg-menu-button i,
.qg-menu-button i::before,
.qg-menu-button i::after {
  content: "";
}
.qg-menu-button i::before,
.qg-menu-button i::after,
.qg-menu-button i span {
  position: absolute;
}
.qg-menu-button i::before,
.qg-menu-button i::after {
  left: 0;
  width: 24px;
  height: 2px;
  background: var(--qg-blue);
  transition: transform .2s ease, top .2s ease, opacity .2s ease;
}
.qg-menu-button i::before { top: 3px; box-shadow: 0 6px 0 var(--qg-blue); }
.qg-menu-button i::after { top: 15px; }
.qg-menu-button[aria-expanded="true"] i::before {
  top: 9px;
  transform: rotate(45deg);
  box-shadow: none;
}
.qg-menu-button[aria-expanded="true"] i::after {
  top: 9px;
  transform: rotate(-45deg);
}


.qg-menu-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  color: var(--qg-blue);
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  z-index: 90;
  transition: opacity .18s ease, transform .18s ease;
  max-height: min(520px, calc(100vh - 96px));
  overflow-y: auto;
  border-top: 1px solid #e5e5e5;
  border-bottom: 1px solid #dfdfdf;
}
.qg-menu-panel.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); }
html.qg-menu-open body { overflow: auto; }
html.qg-menu-open .qg-site-header { box-shadow: none; }
.qg-menu-inner { padding: 78px 0 76px; }
.qg-menu-list,
.qg-menu-panel ul {
  margin: 0 auto;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(4, auto);
  grid-auto-flow: column;
  gap: 26px 92px;
  max-width: 980px;
}
.qg-menu-panel li { border-bottom: 0; }
.qg-menu-panel a {
  display: inline;
  color: var(--qg-blue);
  font-size: clamp(25px, 2vw, 32px);
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: -.025em;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}
.qg-menu-panel a:hover { color: var(--qg-blue); text-decoration-color: transparent; }
.qg-menu-panel a::after { content: none; }

/* Front page matching the quipd.no rhythm: intro + large rounded cards */
.qg-front-intro { padding: 78px 0 46px; }
.qg-front-intro h1 {
  font-family: var(--qg-font-display);
  margin: 0 0 18px;
  color: var(--qg-text);
  font-size: clamp(44px, 5.2vw, 82px);
  line-height: .95;
  letter-spacing: -.055em;
  font-weight: 700;
  max-width: 820px;
}
.qg-front-intro p {
  margin: 0;
  max-width: 760px;
  font-size: clamp(22px, 2.1vw, 32px);
  line-height: 1.22;
  color: var(--qg-text);
}
.qg-guide-search-card {
  background: #fff;
  border-radius: var(--qg-radius);
  padding: 34px 42px;
  display: grid;
  grid-template-columns: minmax(280px, .75fr) minmax(420px, 1.25fr);
  gap: 40px;
  align-items: center;
  margin-bottom: 38px;
}
.qg-guide-search-card h2 { font-family: var(--qg-font-display); margin: 0 0 6px; font-size: clamp(30px, 3.2vw, 48px); line-height: 1; letter-spacing: -.04em; }
.qg-guide-search-card p { margin: 0; color: var(--qg-text); }
.qg-search-form { display: flex; align-items: center; background: #fff; border: 1px solid var(--qg-line); border-radius: 999px; overflow: hidden; min-height: 58px; }
.qg-search-form input[type="search"] { flex: 1; border: 0; background: transparent; padding: 0 24px; min-width: 0; height: 58px; font: inherit; outline: none; }
.qg-search-form button { border: 0; background: var(--qg-peach); color: var(--qg-text); height: 58px; min-width: 105px; border-radius: 999px; font: inherit; font-weight: 700; cursor: pointer; }
.qg-search-form button:hover { filter: brightness(.98); }

.qg-section { padding: 42px 0; }
.qg-section-title { max-width: 780px; margin-bottom: 36px; }
.qg-section-title h2 { font-family: var(--qg-font-display); margin: 0 0 12px; font-size: clamp(36px, 4.6vw, 62px); line-height: 1; letter-spacing: -.045em; }
.qg-section-title p { margin: 0; font-size: 22px; line-height: 1.25; }
.qg-section-title-row { display: flex; align-items: end; justify-content: space-between; gap: 28px; max-width: none; }

.qg-solution-grid { display: grid; gap: 42px; }
.qg-solution-card { background: #fff; border-radius: var(--qg-radius); overflow: hidden; }
.qg-solution-card a {
  min-height: 330px;
  display: grid;
  grid-template-columns: minmax(380px, .95fr) minmax(420px, 1.05fr);
  color: var(--qg-text);
}
.qg-solution-image {
  min-height: 330px;
  background-size: cover;
  background-position: center;
}
.qg-solution-a { background: linear-gradient(135deg, rgba(48,63,150,.14), rgba(244,194,123,.25)); }
.qg-solution-b { background: linear-gradient(135deg, rgba(48,63,150,.16), rgba(239,238,235,.9)); }
.qg-solution-c { background: linear-gradient(135deg, rgba(239,238,235,.9), rgba(244,194,123,.25)); }
.qg-solution-content {
  padding: 54px 64px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.qg-solution-content h3 {
  font-family: var(--qg-font-display);
  margin: 0 0 22px;
  font-size: clamp(32px, 3.7vw, 48px);
  line-height: 1.02;
  letter-spacing: -.045em;
  color: var(--qg-text);
  max-width: 640px;
}
.qg-solution-content p {
  margin: 0 0 32px;
  font-size: clamp(21px, 2.1vw, 29px);
  line-height: 1.22;
  max-width: 620px;
  color: var(--qg-text);
}
.qg-solution-content span,
.qg-button,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 32px;
  border-radius: 999px;
  background: var(--qg-peach);
  color: var(--qg-text) !important;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none !important;
}
.qg-solution-content span::after,
.qg-button::after { content: "→"; font-size: 28px; line-height: 1; font-weight: 400; }
.qg-arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--qg-blue);
  font-weight: 700;
  border-bottom: 2px solid rgba(48,63,150,.45);
  line-height: 1.15;
  padding-bottom: 4px;
}
.qg-arrow-link::after {
  content: "→";
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--qg-peach);
  color: var(--qg-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-bottom: 0;
}

/* Guide cards and content pages */
.qg-guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.qg-guide-card { background: #fff; border-radius: 22px; padding: 28px; border: 1px solid var(--qg-line); }
.qg-guide-card h3 { margin: 0 0 10px; font-size: 25px; line-height: 1.1; letter-spacing: -.025em; }
.qg-guide-card p { margin: 0 0 20px; color: var(--qg-muted); font-size: 17px; }
.qg-guide-card a { font-weight: 700; }
.qg-empty { background: #fff; border-radius: 22px; padding: 28px; }
.qg-content { padding: 68px 0; }
.qg-page-main { padding: 68px 0; }
.qg-page-card { background: #fff; border-radius: var(--qg-radius); padding: 56px; }
.qg-page-title { font-family: var(--qg-font-display); margin: 0 0 28px; font-size: clamp(42px, 5vw, 72px); line-height: .98; letter-spacing: -.045em; font-weight: 700; }
.qg-page-body > *:first-child { margin-top: 0; }
.qg-page-body > *:last-child { margin-bottom: 0; }

.qg-content-inner { background: #fff; border-radius: var(--qg-radius); padding: 56px; }
.qg-content h1 { font-family: var(--qg-font-display); margin: 0 0 24px; font-size: clamp(42px, 5vw, 72px); line-height: .98; letter-spacing: -.055em; }
.qg-content h2 { font-size: 34px; line-height: 1.05; margin-top: 42px; }
.qg-content p, .qg-content li { font-size: 19px; }
.qg-meta { color: var(--qg-muted); font-size: 15px; margin-bottom: 22px; }
.qg-sidebar { background: #fff; border-radius: 22px; padding: 28px; margin-top: 32px; }
.qg-sidebar h2, .qg-sidebar h3 { margin-top: 0; }

.qg-footer { background: #fff; border-top: 1px solid #dfdfdf; margin-top: 70px; }
.qg-footer-inner { width: min(1400px, calc(100% - 80px)); margin: 0 auto; padding: 42px 0; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.qg-footer a { font-weight: 700; }
.qg-footer-menu ul { margin: 0; padding: 0; list-style: none; display: flex; gap: 22px; flex-wrap: wrap; }


/* Menu visibility helpers
   Set per menu item from Utseende -> Menyer. */
@media (max-width: 620px) {
  .qg-hide-mobile {
    display: none !important;
  }
}

@media (max-width: 980px) {
  .qg-header-bar { width: min(100% - 32px, 1400px); min-height: 82px; }
  .qg-brand img { max-height: 46px; }
  .qg-wordmark { font-size: 38px; }
  .qg-container { width: min(100% - 32px, var(--qg-max)); }
  .qg-menu-panel { max-height: min(520px, calc(100vh - 82px)); }
  .qg-menu-list, .qg-menu-panel ul { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-flow: row; gap: 18px; }
  .qg-front-intro { padding: 52px 0 30px; }
  .qg-guide-search-card { grid-template-columns: 1fr; gap: 22px; padding: 28px; }
  .qg-solution-card a { grid-template-columns: 1fr; }
  .qg-solution-image { min-height: 250px; }
  .qg-solution-content { padding: 36px 26px 42px; }
  .qg-guide-grid { grid-template-columns: 1fr; }
  .qg-section-title-row { display: block; }
  .qg-footer-inner { width: min(100% - 32px, 1400px); display: block; }
}

@media (max-width: 620px) {
  body.admin-bar .qg-site-header { top: 0; }
  .qg-header-actions { gap: 18px; }
  .qg-front-intro h1 {
  font-family: var(--qg-font-display); font-size: 44px; }
  .qg-front-intro p { font-size: 22px; }
  .qg-search-form { display: grid; grid-template-columns: 1fr; border-radius: 22px; }
  .qg-search-form input[type="search"] { width: 100%; }
  .qg-search-form button { width: 100%; border-radius: 0 0 22px 22px; }
  .qg-solution-content h3 {
  font-family: var(--qg-font-display); font-size: 32px; }
  .qg-solution-content p { font-size: 21px; }
  .qg-content-inner { padding: 30px 24px; }
}


/* Self contained WordPress base cleanup */
.wp-site-blocks,
.entry-content,
.wp-block-group,
.wp-block-columns,
.wp-block-column {
  box-sizing: border-box;
}
.aligncenter {
  clear: both;
  margin-left: auto;
  margin-right: auto;
}
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}
.screen-reader-text:focus {
  background-color: #fff;
  clip: auto !important;
  clip-path: none;
  color: var(--qg-text);
  display: block;
  font-size: 16px;
  height: auto;
  left: 8px;
  line-height: normal;
  padding: 14px 18px;
  text-decoration: none;
  top: 8px;
  width: auto;
  z-index: 100000;
}
.qg-brand,
.qg-brand:hover,
.custom-logo-link,
.custom-logo-link:hover,
.qg-solution-card a,
.qg-solution-card a:hover,
.qg-guide-card a,
.qg-guide-card a:hover,
.qg-menu-panel a,
.qg-menu-panel a:hover {
  text-decoration: none !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
}
.qg-brand::before,
.qg-brand::after,
.custom-logo-link::before,
.custom-logo-link::after,
.qg-solution-card a::before,
.qg-solution-card a::after {
  content: none !important;
  display: none !important;
}
.qg-content a:not(.qg-button) {
  color: var(--qg-blue);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* Footer matching quipd.no */
.qg-site-footer {
  background: var(--qg-footer-bg);
  color: #111;
  margin-top: auto;
  padding: 44px 0 34px;
}
.qg-footer-grid {
  display: grid;
  grid-template-columns: .8fr 1fr 1.2fr;
  gap: 64px;
  align-items: start;
}
.qg-site-footer h3 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
}
.qg-site-footer p,
.qg-site-footer li,
.qg-site-footer a {
  font-size: 18px;
  line-height: 1.55;
  color: #111;
}
.qg-site-footer a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.qg-site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.qg-site-footer li { margin-bottom: 9px; }
.qg-footer-bottom {
  margin-top: 36px;
  font-size: 14px;
  opacity: .75;
}

/* Logo alignment helpers */
.qg-header-inner,
.qg-header-bar {
  justify-content: space-between;
}
.qg-logo,
.qg-brand-wrap,
.custom-logo-link {
  margin-left: 0;
  margin-right: auto;
  text-align: left;
}
.qg-logo img,
.custom-logo {
  display: block;
  margin-left: 0;
  margin-right: auto;
}

/* Remove accidental underline/border effects on media cards and logo links */
.qg-brand-wrap a,
.custom-logo-link,
.qg-solution-card a,
.qg-guide-card a {
  border-bottom: 0 !important;
  box-shadow: none !important;
}
.qg-solution-card a:hover { color: var(--qg-text); }

/* Editable footer page content */
.qg-footer-page-content {
  width: 100%;
}
.qg-footer-editable-grid,
.qg-footer-page-content .wp-block-columns {
  display: grid;
  grid-template-columns: .8fr 1fr 1.4fr;
  gap: 64px;
  align-items: start;
}
.qg-footer-page-content p {
  margin: 0 0 13px;
}
.qg-footer-page-content .wp-block-column {
  margin: 0;
}
.qg-footer-page-content .wp-block-social-links {
  display: flex;
  gap: 18px;
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
}
.qg-footer-page-content .wp-block-social-links li {
  margin: 0;
}


/* Menu visibility helpers
   Set per menu item from Utseende -> Menyer. */
@media (max-width: 620px) {
  .qg-hide-mobile {
    display: none !important;
  }
}

@media (max-width: 980px) {
  .qg-footer-editable-grid,
  .qg-footer-page-content .wp-block-columns {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}


/* Front page builder shortcodes */

.qg-welcome {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(360px, .85fr);
  gap: clamp(36px, 7vw, 120px);
  align-items: center;
  margin: 72px 0;
}
.qg-welcome-copy h2 {
  font-family: var(--qg-font-display);
  margin: 0 0 24px;
  max-width: 720px;
  font-size: clamp(46px, 5vw, 76px);
  line-height: .98;
  letter-spacing: -.045em;
  font-weight: 700;
  color: var(--qg-text);
}
.qg-welcome-copy p {
  margin: 0 0 32px;
  max-width: 620px;
  font-size: clamp(21px, 2.1vw, 28px);
  line-height: 1.25;
  color: var(--qg-text);
}
.qg-welcome-link {
  color: var(--qg-blue);
  font-size: clamp(20px, 2vw, 27px);
  line-height: 1.2;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.qg-welcome-media {
  width: 100%;
}
.qg-welcome-image,
.qg-welcome-placeholder {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 28px;
  display: block;
}
.qg-welcome-placeholder {
  background: linear-gradient(135deg, rgba(48,63,150,.12), rgba(244,194,123,.28));
}

.qg-front-builder {
  padding: 56px 0 72px;
}
.qg-front-builder > .qg-container > *:first-child { margin-top: 0; }
.qg-front-builder > .qg-container > *:last-child { margin-bottom: 0; }
.qg-shortcode-section {
  margin: 56px 0;
}
.qg-shortcode-section:first-child { margin-top: 0; }
.qg-shortcode-section:last-child { margin-bottom: 0; }
.qg-front-builder .qg-section-title {
  margin-top: 0;
}
.qg-contact-cta {
  background: var(--qg-footer-bg);
  border-radius: var(--qg-radius);
  padding: 48px 56px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
}
.qg-contact-cta h2 {
  font-family: var(--qg-font-display);
  margin: 0 0 10px;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1;
  letter-spacing: -.04em;
  font-weight: 700;
}
.qg-contact-cta h2.qg-fit-title {
  white-space: nowrap;
  max-width: 100%;
  overflow: visible;
  display: block;
  transform-origin: left center;
}
.qg-contact-cta p {
  margin: 0;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.25;
}
.qg-quick-refrence {
  grid-template-columns: minmax(0, 1fr) minmax(360px, auto);
}
.qg-quick-ref-form {
  display: grid;
  gap: 18px;
  justify-items: end;
}
.qg-code-inputs {
  display: grid;
  grid-template-columns: repeat(6, var(--qg-code-size, 46px));
  gap: var(--qg-code-gap, 10px);
  justify-content: center;
  max-width: 100%;
}
.qg-code-inputs input {
  width: var(--qg-code-size, 46px);
  height: var(--qg-code-height, 58px);
  border: 0;
  border-bottom: 0;
  border-radius: 10px;
  background: rgba(255,255,255,.55);
  color: var(--qg-text);
  font-family: var(--qg-font-display);
  font-size: var(--qg-code-font-size, 34px);
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  outline: none;
}
.qg-code-inputs input::placeholder {
  color: var(--qg-blue);
  opacity: .55;
}
.qg-code-inputs input:focus {
  background: #fff;
  box-shadow: 0 0 0 3px rgba(48,63,150,.12);
}
.qg-code-inputs input,
.qg-code-inputs input:hover,
.qg-code-inputs input:focus {
  text-decoration: none !important;
  box-shadow: none;
}
.qg-code-inputs input:focus {
  box-shadow: 0 0 0 3px rgba(48,63,150,.12);
}
.qg-quick-refrence-stacked {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  width: min(100%, 760px);
  margin-left: auto;
  margin-right: auto;
  padding: 38px 42px;
  gap: 24px;
}
.qg-quick-refrence-stacked .qg-quick-refrence-copy {
  width: 100%;
}
.qg-quick-refrence-stacked .qg-quick-refrence-copy h2.qg-fit-title {
  transform-origin: center center;
}
.qg-quick-refrence-stacked .qg-quick-ref-form {
  justify-items: center;
  width: 100%;
  gap: 16px;
}
.qg-quick-refrence-stacked .qg-code-inputs {
  margin-top: 0;
}
.qg-quick-refrence-stacked .qg-button {
  margin-top: 2px;
}
.qg-quick-ref-form .qg-button {
  border: 0;
  cursor: pointer;
  font-family: var(--qg-font-main);
}
.qg-page-card.qg-page-card-plain {
  background: transparent;
  border-radius: 0;
  padding: 0;
}

.qg-template-centered {
  flex: 1 0 auto;
  min-height: calc(100vh - var(--qg-header-height, 86px));
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 48px;
  padding-bottom: 48px;
}
.qg-template-centered .qg-container {
  width: min(980px, calc(100% - 64px));
  margin: 0 auto;
}
.qg-template-centered .qg-page-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 0;
  padding: 48px 56px;
}
.qg-template-centered .qg-page-body {
  width: 100%;
}
.qg-template-centered .qg-page-body > *:first-child { margin-top: 0; }
.qg-template-centered .qg-page-body > *:last-child { margin-bottom: 0; }
.qg-page-body .qg-guide-search-card,
.qg-page-body .qg-solution-grid,
.qg-page-body .qg-guide-list,
.qg-page-body .qg-contact-cta {
  margin-top: 0;
}
.qg-guide-list {
  display: grid;
  gap: 18px;
}
.qg-guide-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--qg-line);
  border-radius: 24px;
  padding: 24px 28px;
}
.qg-guide-item h3 {
  margin: 0 0 6px;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.qg-guide-item p {
  margin: 0;
  color: var(--qg-muted);
}
.qg-button.secondary {
  min-height: 44px;
  padding: 0 22px;
  font-size: 16px;
}
.qg-button.secondary::after {
  font-size: 22px;
}


/* Menu visibility helpers
   Set per menu item from Utseende -> Menyer. */
@media (max-width: 620px) {
  .qg-hide-mobile {
    display: none !important;
  }
}

@media (max-width: 980px) {
  .qg-welcome { grid-template-columns: 1fr; gap: 30px; margin: 44px 0; }
  .qg-welcome-media { order: -1; }
  .qg-welcome-copy h2 { font-size: clamp(40px, 10vw, 58px); }
  .qg-contact-cta {
    grid-template-columns: 1fr;
    padding: 36px 28px;
  }
  .qg-quick-refrence-stacked {
    width: min(100%, 680px);
    padding: 34px 28px;
  }
  .qg-template-centered .qg-container {
    width: min(100% - 32px, 980px);
  }
  .qg-template-centered .qg-page-card {
    padding: 36px 28px;
  }
  .qg-quick-ref-form {
    justify-items: start;
  }
  .qg-guide-item {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 620px) {
  .qg-welcome-image, .qg-welcome-placeholder { border-radius: 22px; aspect-ratio: 1 / 1; }
  .qg-quick-refrence-stacked {
    padding: 30px 20px;
    border-radius: 24px;
  }
  .qg-template-centered {
    padding-top: 32px;
    padding-bottom: 32px;
  }
  .qg-code-inputs {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
  }
  .qg-code-inputs input {
    width: 100%;
    min-width: 0;
    height: 52px;
    font-size: 28px;
  }
  .qg-quick-ref-form .qg-button {
    width: 100%;
  }
}


/* Quipd menu visibility controls */
@media (max-width: 620px) {
  .qg-hide-mobile {
    display: none !important;
  }
}

@media (min-width: 621px) {
  .qg-hide-desktop {
    display: none !important;
  }
}


/* PWA hybrid template
   Desktop shows the normal WordPress page content.
   Mobile gets a clean app-style quick reference screen. */
.qg-pwa-mobile-shell {
  display: none;
}
.qg-pwa-desktop {
  display: block;
}

@media (max-width: 900px) {
  body.page-template-template-pwa-hybrid,
  body.page-template-template-pwa-hybrid-php,
  body.qg-pwa-hybrid-template {
    background: #ffffff;
    min-height: 100dvh;
    overflow-x: hidden;
  }

  body.page-template-template-pwa-hybrid .qg-site-header,
  body.page-template-template-pwa-hybrid .qg-site-footer,
  body.page-template-template-pwa-hybrid .qg-pwa-desktop {
    display: none !important;
  }

  body.page-template-template-pwa-hybrid .qg-pwa-hybrid {
    flex: 1 0 auto;
    min-height: 100dvh;
    display: block;
  }

  body.page-template-template-pwa-hybrid .qg-pwa-mobile-shell {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    width: 100%;
    padding: calc(18px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom));
    background: #ffffff;
  }

  .qg-pwa-mobile-topbar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    margin-bottom: 18px;
  }

  .qg-pwa-mobile-logo {
    display: block;
    width: auto;
    max-width: 190px;
    max-height: 42px;
  }

  .qg-pwa-mobile-title {
    margin: 0;
    color: var(--qg-blue);
    font-size: 21px;
    font-weight: 700;
    line-height: 1;
  }

  .qg-pwa-mobile-content {
    flex: 1 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
  }

  .qg-pwa-mobile-content .qg-shortcode-section {
    margin: 0;
  }

  .qg-pwa-mobile-content .qg-quick-refrence-stacked {
    width: min(100%, 560px);
    margin: 0 auto;
    padding: clamp(26px, 7vw, 44px) clamp(18px, 5vw, 38px);
    border-radius: 28px;
    background: var(--qg-footer-bg);
    box-shadow: none;
    gap: 20px;
  }

  .qg-pwa-mobile-content .qg-quick-refrence-copy h2.qg-fit-title {
    font-size: clamp(34px, 11vw, 58px);
    line-height: .96;
    letter-spacing: -.045em;
    white-space: normal;
  }

  .qg-pwa-mobile-content .qg-quick-refrence-copy p {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    font-size: clamp(20px, 6vw, 29px);
    line-height: 1.16;
  }

  .qg-pwa-mobile-content .qg-code-inputs {
    width: auto;
    grid-template-columns: repeat(6, 54px);
    gap: 10px;
    justify-content: center;
  }

  .qg-pwa-mobile-content .qg-code-inputs input {
    width: 54px;
    height: 64px;
    border-radius: 11px;
    font-size: 36px;
    background: rgba(255,255,255,.56);
  }

  .qg-pwa-mobile-content .qg-quick-ref-form .qg-button {
    width: auto;
    min-width: 230px;
    min-height: 60px;
    padding-left: 34px;
    padding-right: 34px;
    font-size: 20px;
  }
}

@media (max-width: 430px) {
  .qg-pwa-mobile-content .qg-code-inputs {
    width: 100%;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 7px;
  }

  .qg-pwa-mobile-content .qg-code-inputs input {
    width: 100%;
    height: 54px;
    font-size: 30px;
  }

  .qg-pwa-mobile-content .qg-quick-ref-form .qg-button {
    min-width: 0;
    width: 100%;
  }
}


/* Responsive sizing for Quipd Reference code box */
.qg-quick-refrence,
.qg-quick-refrence * {
  box-sizing: border-box;
}

.qg-quick-refrence .qg-fit-title {
  max-width: 100%;
}

.qg-quick-refrence-stacked .qg-fit-title {
  white-space: nowrap;
  font-size: var(--qg-fit-title-size, clamp(30px, 8vw, 58px));
  transform: none !important;
  width: auto !important;
}

.qg-quick-refrence-stacked .qg-quick-refrence-copy p {
  overflow-wrap: normal;
  text-wrap: balance;
}

.qg-quick-refrence-stacked .qg-quick-ref-form,
.qg-quick-refrence-stacked .qg-code-inputs {
  max-width: 100%;
}

.qg-quick-refrence-stacked .qg-quick-ref-form .qg-button {
  max-width: 100%;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .qg-pwa-mobile-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .qg-pwa-mobile-content .qg-quick-refrence-stacked {
    width: 100%;
    max-width: min(560px, calc(100vw - 32px));
    padding: clamp(24px, 6vw, 40px) clamp(14px, 4vw, 32px);
  }

  .qg-pwa-mobile-content .qg-quick-refrence-copy h2.qg-fit-title {
    font-size: var(--qg-fit-title-size, clamp(30px, 10vw, 52px));
    white-space: nowrap;
    line-height: .96;
    transform: none !important;
    width: auto !important;
  }

  .qg-pwa-mobile-content .qg-quick-refrence-copy p {
    font-size: clamp(18px, 5.2vw, 28px);
  }
}

@media (max-width: 380px) {
  .qg-pwa-mobile-content {
    padding-left: 12px;
    padding-right: 12px;
  }

  .qg-pwa-mobile-content .qg-quick-refrence-stacked {
    max-width: calc(100vw - 24px);
  }
}


/* PWA template safety override v1.0.34
   WordPress normally outputs page-template-template-pwa-hybrid-php,
   while older CSS expected page-template-template-pwa-hybrid. Keep both. */
@media (max-width: 900px) {
  body.qg-pwa-hybrid-template,
  body.page-template-template-pwa-hybrid-php {
    background: #ffffff;
    min-height: 100dvh;
    overflow-x: hidden;
  }

  body.qg-pwa-hybrid-template .qg-site-header,
  body.qg-pwa-hybrid-template .qg-site-footer,
  body.qg-pwa-hybrid-template .qg-pwa-desktop,
  body.page-template-template-pwa-hybrid-php .qg-site-header,
  body.page-template-template-pwa-hybrid-php .qg-site-footer,
  body.page-template-template-pwa-hybrid-php .qg-pwa-desktop {
    display: none !important;
  }

  body.qg-pwa-hybrid-template .qg-pwa-hybrid,
  body.page-template-template-pwa-hybrid-php .qg-pwa-hybrid {
    flex: 1 0 auto;
    min-height: 100dvh;
    display: block;
  }

  body.qg-pwa-hybrid-template .qg-pwa-mobile-shell,
  body.page-template-template-pwa-hybrid-php .qg-pwa-mobile-shell {
    display: flex !important;
  }
}


/* PWA hybrid template robust mobile override v1.0.35
   This does not depend on WordPress body classes. It is scoped to the template markup itself. */
@media (max-width: 900px) {
  .qg-pwa-hybrid .qg-pwa-desktop {
    display: none !important;
  }

  .qg-pwa-hybrid .qg-pwa-mobile-shell {
    display: flex !important;
    flex-direction: column;
    min-height: 100dvh;
    width: 100%;
    padding: calc(18px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom));
    background: #ffffff;
  }

  body:has(.qg-pwa-hybrid) .qg-site-header,
  body:has(.qg-pwa-hybrid) .qg-site-footer {
    display: none !important;
  }

  body:has(.qg-pwa-hybrid) {
    background: #ffffff;
    min-height: 100dvh;
    overflow-x: hidden;
  }
}


/* Dynamic footer login/logout link */
.qg-auth-state-link {
  font-weight: 700;
}


/* Quipd login state menu visibility controls */
body.logged-in .qg-hide-logged-in {
  display: none !important;
}

body:not(.logged-in) .qg-hide-logged-out {
  display: none !important;
}
