/* Insyn, design round (2026-10-13): ideas from Figma, Claude, Lovable, Linear and Looker Studio,
   kept in Hyllkoll's look: always light, red/ink/paper, never green. */

/* ---------- menu: search/ask ---------- */
.side-search { display: flex; align-items: center; gap: 10px; margin: 4px 10px 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--page); color: var(--muted); font-size: 14px; cursor: pointer; text-align: left; }
.side-search:hover { border-color: var(--ink-2); color: var(--ink-2); }
.side-search .t { flex: 1; }
.ss-ic { display: inline-flex; } .ss-ic svg { width: 18px; height: 18px; }
kbd { font: 600 11px/1 Inter, system-ui, sans-serif; color: var(--ink-2); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 3px 5px; background: var(--card); }
.side-foot .who-line { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- soft page changes: the main area cross-fades, the menu stays ---------- */
.main { view-transition-name: insyn-main; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
::view-transition-old(insyn-main) { animation: 140ms ease-out both vt-out; }
::view-transition-new(insyn-main) { animation: 220ms ease-out both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }

/* ---------- the search box: input on top, context + send underneath (Claude / Perplexity) ---------- */
.searchbox { flex-direction: column; align-items: stretch; gap: 6px; border-radius: 22px; padding: 14px 12px 10px 20px; }
.searchbox textarea { padding: 4px 0; }
.sb-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sb-ctx { display: inline-flex; align-items: center; gap: 7px; min-width: 0; font-size: 12.5px; color: var(--ink-2); background: var(--page);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); flex-shrink: 0; }
.topics { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.topic { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 14px;
  font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.topic:hover { border-color: var(--ink-2); color: var(--ink); }
.topic[aria-expanded="true"] { background: var(--ink); border-color: var(--ink); color: var(--card); }
.topic .chev { font-size: 10px; transition: transform .15s; }
.topic[aria-expanded="true"] .chev { transform: rotate(180deg); }
.topic-list { width: min(720px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 6px; box-shadow: var(--shadow);
  display: grid; animation: drop .16s ease-out; }
@keyframes drop { from { opacity: 0; transform: translateY(-4px); } }
.topic-q { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 0; background: none; text-align: left; padding: 10px 12px;
  border-radius: 9px; font-size: 14.5px; color: var(--ink); cursor: pointer; }
.topic-q:hover { background: var(--hover); }
.tq-go { color: var(--muted); }
.topic-q:hover .tq-go { color: var(--red); }

/* ---------- "thinking": the step in progress shimmers, a sketch of the result fills in ---------- */
.shimmer, .steps li.live .stxt {
  background: linear-gradient(90deg, var(--ink-2) 0%, var(--ink-2) 38%, #C9C8C3 50%, var(--ink-2) 62%, var(--ink-2) 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 1.8s linear infinite; }
.steps li.live .stxt .gb { color: transparent; }
@keyframes shine { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.skel { display: grid; gap: 11px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.skel span { height: 14px; border-radius: 4px; background: linear-gradient(90deg, #EDEDE9 25%, #F6F6F4 50%, #EDEDE9 75%); background-size: 200% 100%;
  animation: skel 1.4s ease-in-out infinite; }
@keyframes skel { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ---------- the answer in a side panel (Claude artifacts / Lovable preview) ---------- */
.view.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, 46%); align-items: start; }
.chat-col { display: flex; flex-direction: column; min-width: 0; min-height: calc(100vh - 60px); }
.chat-col .thread { width: min(760px, 100%); }
.answer-panel { position: sticky; top: 0; height: calc(100vh - 4px); overflow: auto; border-left: 1px solid var(--line); background: var(--card);
  padding: 18px 22px 22px; display: grid; gap: 14px; align-content: start; animation: panel-in .25s ease-out; }
@keyframes panel-in { from { opacity: 0; transform: translateX(12px); } }
.ap-head { display: grid; gap: 2px; }
.ap-eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--red); }
.ap-title { font-size: 18px; font-weight: 800; }
/* one column that may shrink: a long one-line basis must never widen the panel (same fix as the dialog) */
.answer-panel, .mk-controls { grid-template-columns: minmax(0, 1fr); }
.answer-panel > *, .mk-controls > *, .make-preview > * { min-width: 0; }
.answer-panel .make-preview { min-height: 360px; background: var(--page); }
.answer-panel .mk-controls { display: grid; gap: 12px; }
.mk-controls { display: grid; gap: 12px; align-content: start; }
.ap-foot { position: sticky; bottom: -22px; background: linear-gradient(to top, var(--card) 75%, rgba(253, 253, 251, 0)); padding: 12px 0 2px; display: flex; justify-content: flex-end; }
.art-chip { display: flex; align-items: center; gap: 12px; width: min(460px, 100%); text-align: left; border: 1px solid var(--line); background: var(--card);
  border-radius: 12px; padding: 10px 14px; cursor: pointer; box-shadow: var(--shadow); }
.art-chip:hover { border-color: var(--ink-2); }
.art-chip.on { border-color: var(--red); box-shadow: inset 3px 0 0 var(--red), var(--shadow); }
.art-chip .vicon { color: var(--ink-2); }
.art-txt { display: grid; min-width: 0; }
.art-title { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.art-meta { font-size: 12px; color: var(--muted); }

/* ---------- galleries: Kort and Tavlor (Figma file browser, Looker, Linear filters) ---------- */
.filters-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 16px; }
.fchip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 12px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.fchip:hover { border-color: var(--ink-2); color: var(--ink); }
.fchip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--card); }
.fcount { font-size: 12px; opacity: .65; }
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.gallery > li { display: flex; min-width: 0; }
.boards-gallery { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.gtile, .btile { width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; padding: 0; cursor: pointer;
  box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s, border-color .15s; }
.gtile:hover, .btile:hover { transform: translateY(-2px); border-color: var(--ink-2); box-shadow: 0 2px 6px rgba(20, 20, 20, .06), 0 14px 32px rgba(20, 20, 20, .10); }
.gthumb, .bthumb { position: relative; height: 168px; background: var(--page); border-bottom: 1px solid var(--line); overflow: hidden; }
.bthumb { height: auto; aspect-ratio: 16 / 9; }
.gthumb-in, .bthumb-in { position: absolute; left: 50%; top: 50%; transform-origin: center; pointer-events: none; }
.gthumb-in > .card { width: 100%; height: 100%; }
.bthumb-in { overflow: hidden; }
.bpages { position: absolute; right: 8px; bottom: 8px; font-size: 11.5px; font-weight: 600; background: rgba(253, 253, 251, .92); border: 1px solid var(--line);
  border-radius: 999px; padding: 2px 8px; color: var(--ink-2); }
.gbody { display: grid; gap: 6px; padding: 12px 14px 14px; }
.gname { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; color: var(--ink); min-width: 0; }
.gname > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gmeta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.gmeta .spill, .gmeta .avs { margin-left: auto; }
.gmeta .vicon { color: var(--ink-2); }
.gwhere { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bnew-tile { border-style: dashed; box-shadow: none; align-items: center; justify-content: center; gap: 6px; color: var(--ink-2); font-weight: 600; min-height: 240px; }
.bnew-plus { font-size: 26px; color: var(--red); }
.avs { display: inline-flex; }
.av { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff; border: 2px solid var(--card); margin-left: -7px; }
.av:first-child { margin-left: 0; }
.av0 { background: var(--ink); } .av1 { background: #85847F; } .av2 { background: #4A4A4A; }
.avs.md .av { width: 30px; height: 30px; font-size: 11px; }
.empty { grid-column: 1 / -1; display: grid; justify-items: center; text-align: center; gap: 8px; padding: 36px 16px; background: var(--card); border: 1px dashed var(--line); border-radius: 14px; }
.empty-img { width: 200px; height: auto; border-radius: 10px; }
.empty h3 { font-size: 18px; font-weight: 800; }
.empty p { margin: 0; color: var(--ink-2); max-width: 440px; }
.empty-actions { display: flex; gap: 8px; margin-top: 6px; }

/* ---------- the tavla editor (Figma UI3) ---------- */
@media (min-width: 901px) { .topbar-empty { display: none; } }
.ed-tools { top: auto; bottom: 18px; padding: 5px; gap: 2px; align-items: center; box-shadow: 0 2px 6px rgba(20, 20, 20, .06), 0 10px 30px rgba(20, 20, 20, .12); }
.ed-tools .tb { position: relative; width: 38px; height: 38px; padding: 0; border-radius: 10px; display: grid; place-items: center; }
.ed-tools .tb svg { width: 20px; height: 20px; }
.ed-tools .tb[aria-pressed="true"] { background: var(--red); color: #fff; }
.ed-tools [data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: var(--ink); color: var(--card); font-size: 12px; font-weight: 600; padding: 5px 9px; border-radius: 7px; pointer-events: none; }
.tb-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.tb-zoom { border: 0; background: transparent; font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 6px 4px; border-radius: 8px; cursor: pointer; }
.tb-zoom:hover { background: var(--hover); }
.ed-scroll { padding: 40px 40px 88px; }
.ed-top .avs { margin-right: 6px; }
/* size badge under the selection, constant size whatever the zoom */
.ed-size { position: absolute; left: 50%; top: 100%; transform: translate(-50%, calc(8px / var(--s, 1))); background: var(--red); color: #fff; white-space: nowrap;
  font: 600 calc(11px / var(--s, 1))/1.2 Inter, system-ui, sans-serif; padding: calc(3px / var(--s, 1)) calc(7px / var(--s, 1)); border-radius: calc(5px / var(--s, 1)); }
.ed-sel.group .ed-size { display: block; }
/* smart guides */
.ed-guides { position: absolute; inset: 0; pointer-events: none; z-index: 45; }
.gl { position: absolute; background: var(--red); }
.gl-v { top: 0; bottom: 0; width: calc(1px / var(--s, 1)); }
.gl-h { left: 0; right: 0; height: calc(1px / var(--s, 1)); }
/* placeholders from a page layout */
.slot-box { width: 100%; height: 100%; border: calc(1.5px / var(--s, 1)) dashed #A8A7A2; border-radius: 12px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 8px; color: var(--muted); background: rgba(237, 237, 233, .35); }
.slot-box .vicon svg { width: 44px; height: 32px; }
.slot-label { font-size: 16px; font-weight: 600; }
.slot-add { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 8px 16px; font: 600 15px Inter, sans-serif; cursor: pointer; }
.slot-add:hover { border-color: var(--red); color: var(--red); }
.thumb-page .slot-add, .bthumb-in .el-slot { display: none; }
.layouts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.layout { display: grid; gap: 8px; justify-items: center; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 12px; cursor: pointer;
  font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.layout:hover { border-color: var(--ink); color: var(--ink); }
.layout-pic svg { width: 160px; height: 96px; display: block; }
/* empty page */
.ed-empty { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 6px; pointer-events: none; color: var(--muted); font-size: 20px; }
.ed-empty strong { font-size: 30px; color: var(--ink-2); font-family: "Inter Tight", Inter, sans-serif; }
/* right-click menu */
.ctx-menu { position: fixed; z-index: 110; min-width: 230px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px;
  box-shadow: 0 12px 40px rgba(20, 20, 20, .16); display: grid; animation: pop .12s ease-out; }
.ctx-item { display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 8px;
  font-size: 14px; color: var(--ink); cursor: pointer; }
.ctx-item:hover { background: var(--hover); }
.ctx-item.danger:hover { color: var(--red); }
.ctx-item kbd { font-size: 10.5px; }
.ctx-sep { height: 1px; background: var(--line); margin: 5px 4px; }
.ctx-label { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 4px 10px 2px; }
.ctx-align { display: flex; flex-wrap: wrap; gap: 0; padding: 0 4px; }
/* dragging a page in the strip */
.ed-pagelist { position: relative; }
.ed-pagelist li.dragging { opacity: .35; }
.page-drop { position: absolute; left: 14px; right: 0; height: 3px; border-radius: 2px; background: var(--red); pointer-events: none; }
.ed-pagelist .thumb { cursor: grab; }

/* ---------- ⌘K ---------- */
.cmdk-wrap { position: fixed; inset: 0; z-index: 120; background: rgba(246, 246, 244, .72); backdrop-filter: blur(3px); display: flex; justify-content: center;
  align-items: flex-start; padding: 12vh 16px 16px; animation: fade-in .12s ease-out; }
.cmdk { width: min(640px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 64px rgba(20, 20, 20, .18);
  overflow: hidden; display: flex; flex-direction: column; max-height: 70vh; animation: pop .16s ease-out; }
.cmdk-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--muted); }
.cmdk-input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 16px; color: var(--ink); min-width: 0; }
.cmdk-list { overflow: auto; padding: 6px; }
.cmdk-group { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 10px 4px; }
.cmdk-item { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; text-align: left; padding: 9px 10px; border-radius: 9px;
  cursor: pointer; font-size: 14.5px; color: var(--ink); }
.cmdk-item.on { background: var(--panel2); }
.cmdk-ic { display: inline-flex; color: var(--muted); } .cmdk-ic svg { width: 18px; height: 18px; }
.cmdk-item.on .cmdk-ic, .cmdk-item.on .vicon { color: var(--red); }
.cmdk-item .vicon { color: var(--muted); }
.cmdk-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-meta { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.cmdk-foot { display: flex; gap: 16px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
@keyframes fade-in { from { opacity: 0; } }

@media (max-width: 900px) {
  .side-search { margin: 4px 10px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .shimmer, .steps li.live .stxt { animation: none; color: var(--ink-2); background: none; }
}

/* an answer that proposes several cards (one per key figure): the cards as they will look, key figures two a row */
.many-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.many-item { min-width: 0; display: flex; transition: opacity .15s; }
.many-item > .card { flex: 1; min-width: 0; }
.many-item.wide { grid-column: 1 / -1; }
.many-item.off { opacity: .3; }
.make-preview .many-item .card.scorecard, .many-item .card.scorecard { flex: 1 1 auto; width: auto; height: 150px; min-height: 0; margin: 0; }
.answer-panel .make-preview.many { min-height: auto; }   /* grows with its cards; a set min-height lets the panel's grid squeeze it */
.make-preview .many-item.wide .card { min-height: 280px; }
.data-block .many-item.wide .card { height: 280px; }
.many-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.many-list li { display: flex; align-items: center; gap: 8px; }
.many-list li input[type=text] { flex: 1; min-width: 0; }
.many-list li input[type=checkbox] { accent-color: var(--red); width: 16px; height: 16px; flex: none; }
.many-list li input[type=text]:disabled { color: var(--muted); }
@media (max-width: 520px) {   /* a phone: one card a row, so "2 343 200 kr" fits */
  .data-block .many-grid { grid-template-columns: minmax(0, 1fr); }
  .data-block .many-item .card.scorecard { height: 124px; }
}
