/* ============================================================
   Hank — den svævende portier. Global; ligger på alle sider.

   Holdt i husets sprog: mørk plade, ingen border-radius, ingen skygge-pral,
   1px rules, mono til etiketter og Cormorant til tale. Han er en dør i hjørnet,
   ikke en chat-boble.

   Skal ikke kollidere med .signal-bar, der ligger fast i bunden.
   ============================================================ */

.hank-laage,
.hank-rude,
.hank-side {
  --h-paper:      #f3ecdc;
  --h-paper-lift: #ece2cd;
  --h-ink:        #171311;
  --h-ink-soft:   #463d34;
  --h-ink-mute:   #8a7c6b;
  --h-accent:     #c1121f;
  --h-rule:       rgba(23,19,17,.16);
  --h-serif: 'Cormorant Garamond', Georgia, serif;
  --h-mono:  'Space Mono', ui-monospace, monospace;
  --h-bund: 62px;   /* fri af signal-bar */
}

/* --- Lågen ------------------------------------------------------------- */
.hank-laage {
  position: fixed;
  right: clamp(12px,2vw,24px);
  bottom: var(--h-bund);
  z-index: 60;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 11px 16px;
  border: 1px solid rgba(243,236,220,.28);
  background: var(--h-ink);
  color: var(--h-paper);
  font-family: var(--h-mono);
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}
.hank-laage:hover { background: #241d19; border-color: rgba(243,236,220,.5); }
.hank-laage:focus-visible { outline: 2px solid var(--h-accent); outline-offset: 2px; }
.hank-laage__mk { color: var(--h-accent); font-size: 13px; }
.hank-laage__navn {
  font-family: var(--h-serif);
  font-size: 19px;
  letter-spacing: .02em;
}
.hank-laage__und {
  font-size: 9px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(243,236,220,.55);
}
@media (max-width: 520px) {
  .hank-laage__und { display: none; }
}

/* Lågen træder tilbage mens ruden er åben — to døre ad gangen er én for meget. */
.hank-aaben .hank-laage { opacity: 0; pointer-events: none; }

/* --- Ruden ------------------------------------------------------------- */
.hank-rude {
  position: fixed;
  right: clamp(12px,2vw,24px);
  bottom: var(--h-bund);
  z-index: 61;
  width: min(420px, calc(100vw - 24px));
  max-height: min(72vh, 640px);
  display: flex;
  flex-direction: column;
  background: var(--h-paper);
  border: 1px solid var(--h-ink);
  color: var(--h-ink);
}
.hank-rude[hidden] { display: none; }

@media (max-width: 560px) {
  .hank-rude {
    right: 0; left: 0; bottom: 0;
    width: 100%;
    max-height: 84vh;
    border-left: 0; border-right: 0; border-bottom: 0;
  }
}

.hank-rude__top {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--h-ink);
  color: var(--h-paper);
}
.hank-rude__titel {
  font-family: var(--h-mono);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(243,236,220,.72);
}
.hank-rude__luk {
  background: none;
  border: 0;
  color: rgba(243,236,220,.72);
  font-family: var(--h-mono);
  font-size: 13px;
  line-height: 1;
  padding: 4px 6px;
  cursor: pointer;
}
.hank-rude__luk:hover { color: var(--h-paper); }
.hank-rude__luk:focus-visible { outline: 2px solid var(--h-accent); outline-offset: 1px; }

.hank-rude__krop {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 16px 14px;
}

/* --- Samtalen ---------------------------------------------------------- */
.hank-stroem {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  gap: 18px;
  align-content: start;
  padding-right: 4px;
}
.hank-tur { max-width: 46ch; }
.hank-tur--dig {
  justify-self: end;
  text-align: right;
  border-right: 2px solid var(--h-accent);
  padding-right: 12px;
}
.hank-replik {
  margin: 0;
  font-family: var(--h-serif);
  font-size: 18px;
  line-height: 1.5;
  color: var(--h-ink);
}
.hank-tur--dig .hank-replik { color: var(--h-ink-soft); font-size: 16px; }
.hank-venter {
  margin: 0;
  font-family: var(--h-mono);
  font-size: 14px;
  letter-spacing: .4em;
  color: var(--h-ink-mute);
}
.hank-citat {
  margin: 10px 0 0;
  padding-left: 12px;
  border-left: 2px solid var(--h-accent);
  font-family: var(--h-serif);
  font-style: italic;
  font-size: 17px;
  line-height: 1.45;
  color: var(--h-ink-soft);
}
.hank-citat cite {
  display: block;
  margin-top: 8px;
  font-family: var(--h-mono);
  font-style: normal;
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--h-ink-mute);
}
.hank-ark {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--h-serif);
  font-style: italic;
  font-size: 19px;
  color: var(--h-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--h-accent);
}
.hank-ark:focus-visible { outline: 2px solid var(--h-accent); outline-offset: 2px; }
.hank-meta {
  display: block;
  margin-top: 6px;
  font-family: var(--h-mono);
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--h-ink-mute);
}

/* --- Startere ---------------------------------------------------------- */
/* Sætninger man kan tage fat i, ikke reklameknapper. Sat i serif som al anden
   tale i ruden, med en tynd oxblood-kant der siger "det her er noget du kan
   sige" frem for "tryk her". */
.hank-startere {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.hank-startere[hidden] { display: none; }
.hank-starter {
  font-family: var(--h-serif);
  font-size: 16px;
  line-height: 1.35;
  text-align: left;
  color: var(--h-ink-soft);
  background: var(--h-paper-lift);
  border: 1px solid var(--h-rule);
  border-left: 2px solid var(--h-accent);
  padding: 8px 12px;
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
}
.hank-starter:hover { background: var(--h-paper); color: var(--h-ink); }
.hank-starter:focus-visible { outline: 2px solid var(--h-accent); outline-offset: 2px; }
.hank-startere--side { gap: 10px; margin-top: clamp(22px,3vw,30px); }
.hank-startere--side .hank-starter { font-size: clamp(16px,1.8vw,18px); padding: 10px 14px; }

@media (prefers-reduced-motion: reduce) {
  .hank-starter { transition: none; }
}

/* --- Formularen -------------------------------------------------------- */
.hank-form {
  flex: 0 0 auto;
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--h-rule);
}
.hank-felt {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  background: var(--h-paper-lift);
  border: 1px solid var(--h-rule);
  border-left: 2px solid var(--h-accent);
  font-family: var(--h-serif);
  font-size: 17px;
  line-height: 1.45;
  color: var(--h-ink);
  resize: vertical;
}
.hank-felt:focus { outline: none; border-color: var(--h-ink-mute); border-left-color: var(--h-accent); }
.hank-send {
  justify-self: start;
  /* En regel et andet sted strækker knapper til fuld bredde i grid. Her skal
     blækket skylle op om ét ord, ikke om hele ruden. */
  width: max-content;
  max-width: 100%;
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  color: var(--h-ink-soft);
  padding: 10px 14px 9px;
  min-height: 0;
}
.hank-send .tk-tryk__ink::before { left: -6px; width: calc(100% + 12px); }
.hank-send .tk-tryk__lbl { font-size: 12px; letter-spacing: .16em; }
/* AI-mærkningen skal kunne læses. Den stod i --h-ink-mute på 9px — 3,45:1,
   under AA, og dermed den mindst læselige tekst i hele ruden. Netop dén sætning
   er den vi ikke må gemme væk. Nu 10px i --h-ink-soft: 9,02:1. */
.hank-fod {
  flex: 0 0 auto;
  margin: 12px 0 0;
  font-family: var(--h-mono);
  font-size: 10px;
  line-height: 1.7;
  letter-spacing: .08em;
  color: var(--h-ink-soft);
}

/* --- Hank i fuld figur på /portier/ ------------------------------------ */
/* Samme markup, mere plads: siden ruller selv, så strømmen skal ikke have
   sin egen scrollboks, og typografien må fylde som på resten af arket. */
.hank-stroem--side {
  overflow: visible;
  max-height: none;
  gap: clamp(20px,3vw,30px);
  margin-top: clamp(24px,3.5vw,36px);
  padding-right: 0;
}
.hank-stroem--side .hank-tur { max-width: 62ch; }
.hank-stroem--side .hank-replik { font-size: clamp(19px,2.2vw,23px); line-height: 1.55; }
.hank-stroem--side .hank-tur--dig .hank-replik { font-size: clamp(17px,1.9vw,20px); }
.hank-stroem--side .hank-citat { font-size: clamp(18px,2vw,21px); }
.hank-stroem--side .hank-ark { font-size: clamp(19px,2.2vw,24px); }
.hank-form--side {
  margin-top: clamp(28px,4vw,44px);
  padding-top: clamp(20px,3vw,28px);
  gap: 14px;
}
.hank-form--side .hank-felt { font-size: clamp(17px,1.9vw,19px); padding: 12px 14px; }
.hank-form--side .hank-send .tk-tryk__lbl { font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  .hank-laage { transition: none; }
}

/* Ved print og i læse-tilstand skal han ikke stå i vejen for digtet. */
@media print {
  .hank-laage, .hank-rude { display: none !important; }
}
