/* Loaded last. Colours in the manner of the big Estonian job boards (white, blue, dark text),
   Estonian motifs (barn swallow, flag blue, a folk-belt strip), and the panel a job opens in. */

:root {
  --ink: #14171f;            /* near black, as on the flag */
  --ink-2: #454b58;
  --ink-3: #7a8191;
  --blue: #0072ce;           /* the blue of the Estonian flag */
  --blue-dark: #00579e;
  --blue-soft: #e8f2fb;
  --page: #f5f7fa;
  --line: #e0e5ec;
  --sun: #d9eafb;            /* what was yellow is now pale blue */
  --sun-deep: #0072ce;
  --go: #06b48a;             /* mint green for "go / apply" */
  --go-dark: #049270;
  --star: #f2b90c;
}
.mark { background: linear-gradient(transparent 60%, #b9dcfb 60%, #b9dcfb 94%, transparent 94%); }
.kicker { background: var(--blue-soft); color: var(--blue-dark); }
.brand b { color: var(--blue); }
.langs span { background: var(--blue); }
.steps2 li::before { background: var(--blue); color: #fff; }
.ben-ico { background: var(--blue-soft); color: var(--blue); }
.sticker { background: var(--blue); color: #fff; }
.ticker { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.ticker-label { background: var(--blue); color: #fff; }
.ticker-label i { background: #7dffd8; }
.ticker-track span::after { background: var(--blue); }
.band { background: var(--blue); position: relative; overflow: hidden; isolation: isolate; }
.band p { color: #d5e8fa; }
.band .btn { background: #fff; color: var(--blue-dark); }
.band .btn:hover { background: #eef6fd; }
.hero2 { background: #dfe8f1; }
.hero2::before { background: linear-gradient(90deg, rgba(245,247,250,.97) 0%, rgba(245,247,250,.9) 38%, rgba(245,247,250,0) 68%); }
.star[aria-pressed="true"] { color: var(--star); }
.star[aria-pressed="true"] svg { fill: var(--star); }
.rank { color: #aab2c0; }
.rrow:hover { border-color: #c5d3e3; }
.jpage .why, .why { background: var(--blue-soft); border-left-color: var(--blue); }
.tool[aria-pressed="true"] { background: #fff; border-color: #fff; color: var(--blue-dark); }
.paybox { border-color: var(--blue); }
.filters button[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); }

/* ---------- the swallow ---------- */
.brand { display: inline-flex; align-items: center; gap: 7px; }
.brand-bird { width: 22px; height: 22px; fill: var(--blue); transform: rotate(-28deg); flex: none; }
.bird { position: absolute; fill: currentColor; pointer-events: none; }
.hero2 .bird { color: var(--blue); opacity: .9; z-index: -1; }
.hero2 .bird.b1 { width: 54px; top: 34px; left: 47%; transform: rotate(-24deg); animation: glide 1.6s .2s cubic-bezier(.2, .7, .2, 1) both; }
.hero2 .bird.b2 { width: 30px; top: 86px; left: 56%; transform: rotate(-38deg); opacity: .55; animation: glide 1.9s .5s cubic-bezier(.2, .7, .2, 1) both; }
.hero2 .bird.b3 { width: 20px; top: 54px; left: 62%; transform: rotate(-16deg); opacity: .4; animation: glide 2.2s .8s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes glide { from { opacity: 0; translate: -160px 70px; } }
.band .bird { color: #fff; opacity: .16; z-index: -1; }
.band .bird.b1 { width: 150px; right: 22%; top: -34px; transform: rotate(-26deg); }
.band .bird.b2 { width: 70px; right: 8%; bottom: -8px; transform: rotate(-44deg); }
.sky { position: relative; isolation: isolate; }
.sky .bird { color: var(--blue); opacity: .1; z-index: -1; }
.sky .bird.b1 { width: 120px; right: 2%; top: -18px; transform: rotate(-22deg); }
.sky .bird.b2 { width: 52px; right: 17%; top: 58px; transform: rotate(-40deg); }
@media (max-width: 860px) {
  .hero2 .bird { z-index: 1; }
  .hero2 .bird.b1 { top: 16px; left: 10%; width: 40px; color: #fff; opacity: .95; }
  .hero2 .bird.b2 { top: 52px; left: 24%; width: 24px; color: #fff; opacity: .8; }
  .hero2 .bird.b3 { display: none; }
  .sky .bird.b1 { width: 80px; top: -30px; }
  .sky .bird.b2 { display: none; }
}

/* ---------- a folk-belt strip: eight-pointed stars (kaheksakand) in flag blue ---------- */
.belt {
  height: 18px; margin-bottom: 22px; opacity: .9;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='18' viewBox='0 0 36 18'%3E%3Cg fill='%230072ce'%3E%3Cpath d='M9 1l2 4 4-2-2 4 4 2-4 2 2 4-4-2-2 4-2-4-4 2 2-4-4-2 4-2-2-4 4 2z'/%3E%3Cpath d='M27 6l3 3-3 3-3-3z'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat-x; background-position: center;
  border-top: 2px solid var(--blue); border-bottom: 2px solid var(--blue);
}
.foot { padding-top: 0; border-top: 0; }

/* ---------- a job: summary strip + the ad itself ---------- */
.jsum { background: #fff; border-bottom: 1px solid var(--line); }
.jsum .wrap { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding-top: 14px; padding-bottom: 14px; }
.jsum-title { margin: 0; font: 700 clamp(17px, 2.4vw, 22px)/1.25 var(--display); letter-spacing: -0.03em; }
.jsum-sub { margin-top: 5px; color: var(--ink-2); font-size: 15px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.jsum-why { margin-top: 8px; font-size: 14.5px; color: var(--ink); padding: 7px 11px; background: var(--blue-soft); border-left: 3px solid var(--blue); border-radius: 0 6px 6px 0; }
.jsum-why b { color: var(--blue-dark); }
.jsum-side { display: flex; align-items: center; gap: 14px; }
.ring.small { width: 62px; height: 62px; }
.ring.small b { font-size: 17px; }
.ring.small span { font-size: 8.5px; margin-top: 2px; }
.jsum-side .btn { padding: 11px 18px; font-size: 15px; white-space: nowrap; }
.jframe { position: relative; flex: 1; min-height: 0; background: #fff; }
.jframe iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; position: relative; }
.jframe-wait { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); font-size: 15px; }
.jframe.loaded .jframe-wait { display: none; }
.jplain { flex: 1; overflow: auto; background: #fff; padding-bottom: 28px; }
.jbar .wrap, .jsum .wrap, .jplain .wrap { max-width: 1040px; }
.tool.sq { padding: 8px; }
.jbar-label { white-space: nowrap; }

/* as a page of its own (no JavaScript, or the link opened in a new tab) */
.jfull { display: flex; flex-direction: column; }
.jfull .jframe { height: 78vh; min-height: 480px; flex: none; }

/* as a panel over the list */
dialog.sheet {
  padding: 0; border: 0; background: #fff; color: var(--ink); overflow: hidden;
  width: min(1040px, calc(100vw - 32px)); height: min(900px, calc(100dvh - 32px)); max-width: none; max-height: none;
  border-radius: 14px; box-shadow: 0 30px 80px rgba(10, 20, 40, .35);
}
dialog.sheet[open] { display: flex; flex-direction: column; animation: sheet-in .28s cubic-bezier(.2, .7, .2, 1); }
dialog.sheet::backdrop { background: rgba(14, 22, 38, .58); animation: fade-in .2s; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(26px) scale(.985); } }
@keyframes fade-in { from { opacity: 0; } }
.sheet-body { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.sheet-body.busy { opacity: .5; transition: opacity .15s; }
dialog.sheet .jbar { position: static; border-radius: 14px 14px 0 0; }
body.sheet-open { overflow: hidden; }
@media (max-width: 700px) {
  dialog.sheet { width: 100vw; height: 100dvh; border-radius: 0; }
  dialog.sheet .jbar { border-radius: 0; }
  .jsum .wrap { grid-template-columns: 1fr; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .jsum-side { justify-content: space-between; }
  .jsum-side .btn { flex: 1; }
  .ring.small { width: 52px; height: 52px; }
  .ring.small b { font-size: 15px; }
  .jsum-why { font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .jbar-label { display: none; }
  .jfull .jframe { height: 72vh; }
}
@media print {
  body.sheet-open > *:not(dialog) { display: none !important; }
  dialog.sheet { position: static; width: auto; height: auto; box-shadow: none; }
  dialog.sheet::backdrop { display: none; }
  .jsum-side .btn, .belt { display: none; }
}
@media (prefers-reduced-motion: reduce) { .hero2 .bird, dialog.sheet[open] { animation: none; } }

/* small corrections after looking at it */
.brand { gap: 0; }
.brand-bird { margin-right: 7px; }
.sticker { right: -20px; top: -58px; }
@media (max-width: 860px) { .sticker { right: 2px; top: -56px; } }

/* ---------- the name: CV MATCH with an open heart in flag colours ---------- */
.brand { display: inline-flex; align-items: center; gap: 0; font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: -0.02em; color: var(--ink); }
.brand-heart { width: 30px; height: 30px; margin-right: 9px; flex: none; overflow: visible; }
.brand-heart path { fill: none; stroke-width: 2.6; stroke-linejoin: round; }
.brand-heart .h-blue { stroke: var(--blue); }
.brand-heart .h-black { stroke: var(--ink); }
.brand-cv { color: var(--blue); margin-right: 5px; }
.brand:hover .brand-heart { animation: beat .6s ease; }
@keyframes beat { 30% { transform: scale(1.14); } 60% { transform: scale(.96); } }
.brand-heart { transform-origin: center; }

/* the logo is Dan's own drawing (static/img/logo-*.png); it still beats on hover */
img.brand-heart { width: 40px; height: 40px; margin-right: 8px; display: block; }
.top .wrap { height: 64px; }
@media (max-width: 860px) { .hero2 { background: var(--card); } }
