/* What LL Intra adds to the look of the core. Every class starts with in-. Colours and sizes are the core's tokens. */

/* The typeface of LL Intra is Poppins, the one its documents are set in. Everything in the core reads it from --font.
   The files are in intra/assets/font, and index.html links the stylesheet that names them. */
:root { --font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; }

/* The board: columns of cards that are dragged (parts/board.js). The columns stand side by side, all of them, while
   the board itself is 540 px wide, and under each other when it is narrower. Never some beside and some under: the
   keys and the drag go left and right between them. It is the room the board has that decides, not the window. */
.in-board-box { container-type: inline-size; }
.in-board { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 16px; align-items: start; }
@container (min-width: 540px) { .in-board { grid-template-columns: repeat(var(--in-cols, 3), minmax(0, 1fr)); } }
/* A board with more than three columns keeps them side by side at 190 px each and is scrolled sideways inside itself */
@container (min-width: 540px) { .in-board[data-wide] { grid-template-columns: repeat(var(--in-cols), minmax(190px, 1fr)); overflow-x: auto; } }
.in-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 8px; border-radius: var(--r-lg); background: var(--bg-sub); border: 1px solid var(--line); }
.in-col[data-over] { border-color: var(--accent); background: var(--hover); }
.in-col-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px; font-weight: 600; }
.in-col-count { color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.in-col-list { display: flex; flex-direction: column; gap: 6px; min-height: 44px; }
.in-card { display: flex; align-items: flex-start; gap: 6px; padding: 8px 8px 8px 4px; border-radius: var(--r-md); background: var(--bg-raise); border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: var(--text); text-decoration: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.in-card[aria-current="true"] { border-color: var(--accent); }
.in-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.in-card[data-dragging] { opacity: 0.35; }
.in-card[data-done] .in-card-title { color: var(--muted); text-decoration: line-through; }
/* The grip is where a finger drags from, so the page never scrolls from it. Its target is larger than it looks. */
.in-card-grip { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 20px; min-height: 22px; color: var(--faint); cursor: grab; touch-action: none; }
.in-card-grip::before { content: ""; position: absolute; inset: -11px -10px -11px -8px; }
.in-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.in-card-title { overflow-wrap: anywhere; line-height: 1.35; }
.in-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--muted); font-size: 12px; }
.in-card-meta [data-late] { color: var(--red); }
.in-card-label { width: 28px; height: 4px; border-radius: 2px; corner-shape: round; }
.in-ghost { position: fixed; z-index: 1000; margin: 0; pointer-events: none; box-shadow: var(--shadow-md); will-change: transform; }
.in-drop { height: 2px; border-radius: 1px; background: var(--accent); }
@media (hover: hover) and (pointer: fine) { .in-card:hover { border-color: var(--line-strong); } }

/* A card in the panel: its check list and its comments (sections/todo.js) */
.in-check { display: flex; align-items: flex-start; gap: 8px; padding: 5px 0; }
.in-check label { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 8px; }
.in-check-text { overflow-wrap: anywhere; line-height: 1.4; padding-top: 2px; }
.in-check-text[data-done] { color: var(--muted); text-decoration: line-through; }
.in-inline { display: flex; gap: 8px; margin-top: 8px; }
.in-inline .ln-input { flex: 1; min-width: 0; }
.in-comment + .in-comment { margin-top: 12px; }
.in-comment-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--muted); font-size: 12px; }
.in-comment p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
/* A circle says that it is one, or it would get the continuous curve of the core and stop being round */
.in-swatch { display: inline-block; flex: none; width: 12px; height: 12px; border-radius: 50%; corner-shape: round; }

/* The calendar: twelve months, each a grid of a week number and seven days (sections/calendar.js) */
.in-cal { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px 24px; padding: 16px; }
.in-month-grid { display: grid; grid-template-columns: 26px repeat(7, minmax(0, 1fr)); gap: 2px; margin-top: 8px; }
.in-week { display: flex; align-items: center; justify-content: center; min-height: 26px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.in-day { display: flex; align-items: center; justify-content: center; min-height: 32px; border-radius: var(--r-sm); color: var(--text); text-decoration: none; font-variant-numeric: tabular-nums; }
.in-day[data-red] { color: var(--red); }
.in-day[data-ll] { background: color-mix(in srgb, var(--accent) 16%, transparent); font-weight: 600; }
.in-day[data-today] { box-shadow: inset 0 0 0 1.5px var(--accent); }
.in-day[aria-current="true"] { background: var(--active); }
.in-day:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
@media (hover: hover) and (pointer: fine) { a.in-day:hover { background: var(--hover); } }

/* Award Fever. The page is wider than a page for reading: the standing wants the room. */
.in-cf { display: flex; flex-direction: column; gap: 28px; padding: 24px; max-width: 1280px; margin: 0 auto; }
.in-cf-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; }
.in-cf-kpi { display: flex; align-items: center; gap: 10px; margin-top: 8px; min-width: 0; color: inherit; text-decoration: none; }
.in-cf-kpi > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.in-cf-kpi strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.in-cf-scroll { max-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-lg); }
.in-cf-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.in-cf-table th { position: sticky; top: 0; z-index: 1; padding: 8px 12px; background: var(--bg-sub); font-size: 11px; font-weight: 600; color: var(--muted); text-align: left; white-space: nowrap; }
.in-cf-table td { padding: 7px 12px; border-top: 1px solid var(--line); }
.in-cf-table a { color: inherit; text-decoration: none; }
.in-cf-table a:hover { color: var(--accent-text); }
.in-cf-table .in-cf-r { text-align: right; }
.in-cf-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; corner-shape: round; background: var(--c); }
.in-cf-prizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.in-cf-prize { margin: 0; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--bg); }
.in-cf-prize img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--bg-sub); }
.in-cf-prize figcaption { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; font-size: 12px; }
@media (max-width: 640px) { .in-cf { padding: 16px; gap: 22px; } }

/* The standing (parts/standing.js). Its height is fixed: it never grows with how many take part. Everything in it is
   placed in pixels by the part itself, from the width it has. */
.in-stand { position: relative; height: 320px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg); overflow: hidden; }
.in-stand:fullscreen { height: 100vh; border: 0; border-radius: 0; -webkit-mask: none; mask: none; }
.in-stand::after { content: ''; position: absolute; left: 0; right: 0; bottom: 28px; border-top: 1px solid var(--line); }
.in-stand-field { position: absolute; top: 0; bottom: 28px; border-left: 1px solid var(--line); }
.in-stand-field:first-child { border-left: 0; }
.in-stand-field[data-level] { background: color-mix(in oklab, var(--c) 9%, transparent); }
.in-stand-field[data-level]::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--c); }
.in-stand-field > span, .in-stand-goal > span { position: absolute; top: 9px; font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.in-stand-field > span { left: 10px; }
.in-stand-goal { position: absolute; top: 0; bottom: 28px; width: 0; border-left: 2px dashed var(--c); }
.in-stand-goal > span { left: 8px; }
.in-stand-tick { position: absolute; top: calc(100% - 28px); width: 0; height: 6px; border-left: 1px solid var(--line-strong); }
.in-stand-tick > span { position: absolute; top: 9px; left: 0; transform: translateX(-50%); font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.in-stand-tick[data-quiet] { height: 4px; }
.in-stand-tick[data-quiet] > span { display: none; }
.in-ball { position: absolute; z-index: 1; display: grid; place-items: center; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; corner-shape: round; color: #fff; font-size: 11px; font-weight: 700; text-decoration: none;
  box-shadow: 0 0 0 2px var(--bg), 0 1px 3px rgba(0, 0, 0, .25); }
.in-stand:not(.in-stand--laid) .in-ball { visibility: hidden; }
.in-stand--live .in-ball { transition: left .6s var(--ease-out), top .6s var(--ease-out); }
.in-ball[data-me] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.in-ball img { width: 100%; height: 100%; border-radius: 50%; corner-shape: round; object-fit: cover; }
.in-ball:hover, .in-ball:focus-visible { z-index: 3; }
/* The name, when the ball is pointed at. It turns under the ball near the top, and inwards near the sides. */
.in-ball::after { content: attr(data-name); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); padding: 3px 8px; border-radius: var(--r-sm); background: var(--text); color: var(--bg);
  font-size: 11px; font-weight: 500; white-space: nowrap; opacity: 0; pointer-events: none; }
.in-ball:hover::after, .in-ball:focus-visible::after { opacity: 1; }
.in-ball[data-flip]::after { bottom: auto; top: calc(100% + 6px); }
.in-ball[data-edge="l"]::after { left: 0; transform: none; }
.in-ball[data-edge="r"]::after { left: auto; right: 0; transform: none; }
@media (prefers-reduced-motion: reduce) { .in-stand--live .in-ball { transition: none; } }

/* The highest level is a ticket: the level on the band, the picture, the way there with the plane in the middle, the flight */
.in-ticket { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--bg); }
.in-ticket-top { padding: 8px 14px; color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.in-ticket > img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--bg-sub); }
.in-ticket-route { display: flex; align-items: center; gap: 10px; padding: 14px 14px 0; font-size: 18px; font-weight: 700; }
.in-ticket-line { flex: 1; display: flex; justify-content: center; align-items: center; height: 20px; background: linear-gradient(var(--line-strong), var(--line-strong)) center / 100% 0 no-repeat; border: 0; position: relative; }
.in-ticket-line::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px dashed var(--line-strong); }
.in-ticket-line > span { position: relative; padding: 0 8px; background: var(--bg); color: var(--muted); font-size: 16px; font-weight: 400; }
.in-ticket-foot { padding: 14px; text-align: center; color: var(--muted); font-family: var(--mono); font-size: 12px; letter-spacing: .06em; }

/* The mail template editor: the code and the mail it becomes, side by side when there is room, else one at a time */
.in-mail { display: grid; gap: 16px; padding: 16px; height: calc(100dvh - var(--top-h) - 62px); min-height: 360px; }
.in-mail[data-wide] { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.in-mail-code, .in-mail-view { display: flex; flex-direction: column; gap: 10px; min-width: 0; min-height: 0; }
.in-mail-code[hidden], .in-mail-view[hidden] { display: none; }
.in-code { flex: 1; display: flex; min-height: 0; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--bg-raise); overflow: hidden; }
.in-code:focus-within { border-color: var(--accent); }
/* A line of code is 18px high. The numbers beside it and the jump to a line count with that (sections/mail/editor.js).
   The numbers have room left under them, so they can follow the code all the way down past its sideways scrollbar. */
.in-code-nums { flex: none; min-width: 34px; padding: 10px 8px 48px; text-align: right; color: var(--faint); font: 12px/18px var(--mono); user-select: none; overflow: hidden; }
.in-code-nums [data-bad] { color: var(--red); font-weight: 700; }
.in-code textarea { flex: 1; min-width: 0; margin: 0; border: 0; outline: 0; resize: none; padding: 10px 12px 10px 4px; background: transparent; color: var(--text); font: 12px/18px var(--mono); white-space: pre; overflow: auto; tab-size: 2; }
.in-code-problems { flex: none; max-height: 132px; overflow: auto; }
.in-code-problems:empty { display: none; }
.in-code-problem { display: flex; gap: 10px; width: 100%; padding: 5px 8px; border: 0; border-radius: var(--r-sm); background: none; color: var(--text-2); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }
.in-code-problem:hover { background: var(--hover); }
.in-code-problem .ln-num { flex: none; min-width: 52px; color: var(--red); }
.in-mail-inbox { flex: none; display: flex; gap: 8px; align-items: baseline; min-width: 0; font-size: 13px; white-space: nowrap; overflow: hidden; }
.in-mail-inbox span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.in-mail-stage { flex: 1; min-height: 0; display: flex; justify-content: center; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-sub); overflow: hidden; }
.in-mail-frame { width: 100%; height: 100%; border: 0; background: #fff; }
.in-mail-stage[data-phone] .in-mail-frame { width: 375px; max-width: 100%; }
/* A picture of the mail templates, in the panel */
.in-mail-pic { display: flex; gap: 10px; align-items: center; padding: 6px 0; min-width: 0; }
.in-mail-pic-text { flex: 1; min-width: 0; font-size: 13px; }
.in-mail-pic .ln-actions { flex: none; flex-wrap: nowrap; }
.in-mail-thumb { flex: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; object-fit: contain; }
/* The pictures documents are drawn with, in Administration: a card to each kind of document, the sheet in its own proportions */
.in-covers { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 20px 16px; padding: 0 16px 24px; }
.in-cover { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.in-cover[data-busy] { opacity: .55; }
.in-cover-view { aspect-ratio: 210 / 297; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--bg-sub); }
.in-cover-view img { display: block; width: 100%; height: 100%; object-fit: cover; }
.in-cover[data-over] .in-cover-view { outline: 2px solid var(--accent); outline-offset: 2px; }
.in-cover-name { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.in-cover .ln-sub { font-size: 12px; overflow-wrap: anywhere; }
/* The search words of the GDPR page: pills in a box that is typed in */
.in-terms { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: calc(var(--ctl-h) + 4px); padding: 5px 7px; border-radius: var(--r-sm); border: 1px solid var(--field-line); background: var(--bg-raise); cursor: text; }
.in-terms:focus-within { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.in-terms-input { flex: 1 1 140px; min-width: 0; height: 24px; padding: 0 2px; border: 0; background: none; color: inherit; font: inherit; outline: none; }
.in-terms-input::placeholder { color: var(--muted); }
.in-term { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; height: 24px; padding: 0 2px 0 10px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 14%, transparent); font-size: 13px; }
.in-term > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.in-term button { position: relative; flex: none; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 999px; background: none; color: inherit; font-size: 15px; line-height: 1; cursor: pointer; }
.in-term button::after { content: ""; position: absolute; inset: -6px -4px; }   /* a larger place to hit than the cross that is seen */
.in-term button:focus-visible { outline: 2px solid var(--accent); }
@media (hover: hover) { .in-term button:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); } }
@media (pointer: coarse) {
  .in-terms-input { height: 32px; font-size: 16px; }   /* 16px: a phone does not zoom in on the field */
  .in-term { height: 32px; padding-left: 12px; }
  .in-term button { width: 30px; height: 30px; font-size: 18px; }
}
/* The cells of a table in the form of a document: one row of the table to a row of fields, the headings marked */
.in-cells { display: grid; gap: 4px; margin-bottom: 4px; }
textarea.ln-input.in-cell { height: auto; min-height: calc(var(--ctl-h) + 4px); padding: 6px 8px; resize: vertical; }   /* the core gives a textarea 72 px at least: a cell is one line */
textarea.ln-input.in-cell[data-head] { font-weight: 600; background: var(--bg-sub); }
/* The box where LL AI is asked to change what is being edited */
.in-ai { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: color-mix(in srgb, var(--accent) 4%, var(--bg-raise)); }
/* The article of the knowledge base while it is changed: it reads as it will, and each part is typed in where it stands */
.in-open-page { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-raise); }
.in-open { display: block; width: 100%; min-height: 0; padding: 3px 6px; margin: 0; border: 0; border-radius: var(--r-sm); background: none; color: inherit; font-family: inherit; line-height: inherit; resize: none; overflow: hidden; field-sizing: content; }
.in-open:not(.ln-h1):not(.ln-h2) { font-size: inherit; }
.in-open-sub { color: var(--muted); }
.in-open::placeholder { color: var(--muted); }
@media (hover: hover) { .in-open:hover { background: var(--bg-sub); } }
.in-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; background: var(--bg-raise); }
.in-open[data-changed] { background: color-mix(in srgb, var(--amber-dot) 16%, transparent); }   /* differs from the saved article */
.in-open-block { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; align-items: start; }
.in-open-tools { display: flex; gap: 2px; opacity: 0; transition: opacity .12s; }
.in-open-block:hover .in-open-tools, .in-open-block:focus-within .in-open-tools { opacity: 1; }
@media (hover: none) { .in-open-tools { opacity: 1; } }
.in-open-list { margin: 0; padding-left: 22px; }
.in-open-list li { padding-left: 0; }
.in-open-block .ln-banner { min-width: 0; }
.in-open-block .ln-banner .in-open { flex: 1; min-width: 0; }
@media (pointer: coarse) { .in-open:not(.ln-h1):not(.ln-h2) { font-size: 16px; } }   /* a phone does not zoom in on the field */
@media (prefers-reduced-motion: reduce) { .in-open-tools { transition: none; } }
