/* Main typeface for the whole app: IBM Plex Sans Thai (OFL, self-hosted in /fonts so CSP style-src 'self' allows it; Thai and Latin
   subsets, 400–700). The synced theme names 'Prompt' but never loads it, so browsers fell back to Segoe UI / Leelawadee UI.
   Weights 300 and below resolve to 400 (lightest face shipped). Emails, PDFs and report previews keep their own fonts. */
@font-face { font-family:'IBM Plex Sans Thai'; font-style:normal; font-weight:400; font-display:swap; src:url('/fonts/ibm-plex-sans-thai/ibm-plex-sans-thai-thai-400-normal.woff2') format('woff2'); unicode-range:U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC; }
@font-face { font-family:'IBM Plex Sans Thai'; font-style:normal; font-weight:500; font-display:swap; src:url('/fonts/ibm-plex-sans-thai/ibm-plex-sans-thai-thai-500-normal.woff2') format('woff2'); unicode-range:U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC; }
@font-face { font-family:'IBM Plex Sans Thai'; font-style:normal; font-weight:600; font-display:swap; src:url('/fonts/ibm-plex-sans-thai/ibm-plex-sans-thai-thai-600-normal.woff2') format('woff2'); unicode-range:U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC; }
@font-face { font-family:'IBM Plex Sans Thai'; font-style:normal; font-weight:700; font-display:swap; src:url('/fonts/ibm-plex-sans-thai/ibm-plex-sans-thai-thai-700-normal.woff2') format('woff2'); unicode-range:U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC; }
@font-face { font-family:'IBM Plex Sans Thai'; font-style:normal; font-weight:400; font-display:swap; src:url('/fonts/ibm-plex-sans-thai/ibm-plex-sans-thai-latin-400-normal.woff2') format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:'IBM Plex Sans Thai'; font-style:normal; font-weight:500; font-display:swap; src:url('/fonts/ibm-plex-sans-thai/ibm-plex-sans-thai-latin-500-normal.woff2') format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:'IBM Plex Sans Thai'; font-style:normal; font-weight:600; font-display:swap; src:url('/fonts/ibm-plex-sans-thai/ibm-plex-sans-thai-latin-600-normal.woff2') format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:'IBM Plex Sans Thai'; font-style:normal; font-weight:700; font-display:swap; src:url('/fonts/ibm-plex-sans-thai/ibm-plex-sans-thai-latin-700-normal.woff2') format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
:root:root { --font-sans:'IBM Plex Sans Thai', system-ui, -apple-system, 'Segoe UI', 'Leelawadee UI', Roboto, Arial, sans-serif; --default-font-family:var(--font-sans); }

/* CKN Works readability: scale rem-based text and controls together. */
html {
    font-size: 112.5%;
}

/* Shared white register layout for Projects and MA. */
.works-register { display:grid; grid-template-columns:minmax(0,1fr); gap:16px; min-width:0; background:#fff; }
.works-register-heading { display:flex; justify-content:space-between; align-items:flex-end; flex-wrap:wrap; gap:12px; }
.works-register-heading h1 { margin:0; font-size:1.4rem; font-weight:700; }
.works-register-heading p { margin:4px 0 0; font-size:.82rem; color:#475467; }
.works-register-heading p a { text-decoration:underline; text-underline-offset:2px; }
.works-register-tabs { display:flex; gap:12px; border-bottom:1px solid #e4e7ec; }
.works-register-tabs a { padding:8px 12px 10px; color:#475467; border-bottom:2px solid transparent; }
.works-register-tabs a[aria-current="page"] { border-bottom-color:#a61d16; color:#101828; font-weight:600; }
.works-register-tabs small, .works-register-meta { color:#475467; font-size:.78rem; }
.works-register-selected { border-color:#a61d16; }
.works-register-toolbar { display:flex; align-items:end; justify-content:space-between; flex-wrap:wrap; gap:10px; }
.works-register-toolbar ckn-select { flex:0 1 16rem; }
.works-register-card { border:1px solid #e4e7ec; border-radius:12px; background:#fff; }
.works-register-card > header { display:flex; justify-content:space-between; align-items:baseline; gap:8px; padding:12px 16px; border-bottom:1px solid #e4e7ec; }
.works-register-card h2 { margin:0; font-size:.95rem; font-weight:650; }
.works-register-card > header span { color:#475467; white-space:nowrap; font-size:.75rem; }
.works-ma-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:8px 14px; padding:12px 16px; }
.works-ma-title { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-bottom:3px; }
.works-ma-period { white-space:nowrap; }
.works-ma-template { grid-column:1 / -1; justify-self:end; }
.works-ma-row + .works-ma-row { border-top:1px solid #e4e7ec; }
.works-register-link { padding:0; font:inherit; font-weight:600; text-align:start; cursor:pointer; overflow-wrap:anywhere; }
.works-register-link:hover { text-decoration:underline; text-underline-offset:3px; }
.works-ma-row progress { grid-column:1 / -1; appearance:none; display:block; width:100%; height:6px; border:0; border-radius:6px; background:#eef0f3; accent-color:#067647; }
.works-ma-row progress::-webkit-progress-bar { background:#eef0f3; border-radius:6px; }
.works-ma-row progress::-webkit-progress-value { background:#067647; border-radius:6px; }
.works-ma-row progress::-moz-progress-bar { background:#067647; border-radius:6px; }
.works-ma-row[data-tone="warn"] progress::-webkit-progress-value { background:#a84408; }
.works-ma-row[data-tone="warn"] progress::-moz-progress-bar { background:#a84408; }
.works-ma-envelope { display:grid; grid-template-columns:max-content minmax(0,1fr); gap:8px 16px; padding:12px 16px; border:1px solid #e4e7ec; border-radius:8px; background:#f8fafc; font-size:.82rem; }
.works-ma-envelope dt { color:#475467; }
.works-ma-envelope dd { margin:0; overflow-wrap:anywhere; }
.works-ma-audience { list-style:none; padding:0; margin:0; max-height:9rem; overflow:auto; }
.works-ma-audience li { display:inline; }
.works-ma-audience li:not(:last-child)::after { content:", "; }
.works-ma-mail { padding:20px; border-top:6px solid #a61d16; }
.works-ma-mail h3 { font-weight:700; margin:0 0 12px; overflow-wrap:anywhere; }
.works-ma-mail p { margin:12px 0; overflow-wrap:anywhere; }
.works-ma-deadline { margin:14px 0; padding:12px; border-radius:8px; background:#fef3c7; color:#78350f; font-weight:650; }
.works-ma-deadline[data-expired="true"] { background:#fee4e2; color:#912018; }
.works-ma-facts { margin:0; border:1px solid #e4e7ec; border-radius:8px; overflow:hidden; }
.works-ma-facts > div { display:grid; grid-template-columns:minmax(0,2fr) minmax(0,3fr); }
.works-ma-facts > div + div, .works-ma-mail footer { border-top:1px solid #e4e7ec; }
.works-ma-facts dt, .works-ma-facts dd { margin:0; padding:8px 12px; overflow-wrap:anywhere; }
.works-ma-facts dt { background:#f8fafc; color:#475467; }
.works-ma-mail footer { margin-top:16px; padding-top:12px; }
@media (max-width:650px) {
    .works-ma-row { grid-template-columns:minmax(0,1fr); }
}

/* Keep document print sizing unchanged. */
@media print {
    html {
        font-size: 100%;
    }
}

[data-test="organization-order-row"][draggable="true"] {
    cursor: grab;
}
[data-test="organization-order-row"][draggable="true"]:active {
    cursor: grabbing;
}

/* Keep all customer detail sections visible on narrow screens. */
.customer-view-tabs [role="tablist"] {
    flex-wrap: wrap;
}

/* Language selection belongs to this app; shared themes stay in sync. */
.works-language-switcher { margin-left: auto; flex-shrink: 0; width: 10rem; }
/* Customer Portal: the name in the rail is a link to บัญชีของฉัน (src/apps/index.ts). */
.works-user-link { color: inherit; text-decoration: none; border-radius: 8px; margin: -4px -6px; padding: 4px 6px; flex: 1; min-width: 0; }
.works-user-link:hover { background: rgba(16, 24, 40, .06); }
.works-user-link:hover .ckn-user-name { text-decoration: underline; text-underline-offset: 2px; }
.works-user-link:focus-visible { outline: 2px solid #b42318; outline-offset: 1px; }
.works-language-auth { position: absolute; top: 1rem; right: 1rem; }
.ckn-header { gap: .75rem; }
.ckn-header-title { min-width: 0; }
@media (max-width: 480px) { .ckn-header { gap: .5rem; } .works-language-switcher { flex: 0 0 92px; width: 92px; min-width: 0; } .works-language-switcher select { min-width: 0; padding-left: .45rem; padding-right: .3rem; }
  .ckn-header-title { flex: 1 1 auto; min-width: 4.5rem; } }
/* Rail text the synced theme draws too faint (2.5–3.9:1 on the rail): lifted to ≥4.5:1 here, the theme stays in sync.
   Thai section labels lose the uppercase tracking: spacing splits Thai vowels and tone marks from their consonant. */
.ckn-nav-section { color: rgb(var(--rail-rgb) / .64); }
.ckn-nav-section:lang(th) { letter-spacing: 0; font-size: .6875rem; }
.ckn-user-role { color: rgb(var(--rail-rgb) / .64); }
.ckn-nav-search-input::placeholder { color: rgb(var(--rail-rgb) / .66); }
/* The active item already has a tint and weight; the inset side stripe repeated it. */
.ckn-nav-item.active { box-shadow: none; }
@media print { .works-language-switcher { display: none !important; } }

.works-assistant-trigger { margin-left: auto; flex-shrink: 0; }
.works-assistant-trigger + .works-language-switcher { margin-left: 0; }
.ckn-header-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media print { .works-assistant-trigger { display: none !important; } }
/* A drawer mounted in the sticky header must escape the header's lower stacking level. */
.ckn-header:has(.works-assistant-trigger [data-part="panel"][aria-modal="true"]:not([aria-hidden="true"])) { z-index: 80; }

/* Keep the chat composer visible while the conversation scrolls independently. */
.works-assistant-chat-log { max-height: min(38dvh, 26rem); overflow-y: auto; overscroll-behavior: contain; }
.works-assistant-chat-log > * { flex-shrink: 0; }
.works-assistant-chat-message[data-role="user"] { margin-left: 1rem; background: color-mix(in srgb, currentColor 4%, transparent); }

/* Right-edge chat panel. The native top layer also keeps it usable above open forms. */
.works-assistant-chat-shell dialog[data-part="modal"] {
    position: fixed;
    inset: 0 0 0 auto;
    border-radius: 0;
    margin: 0;
    padding: 0;
    width: min(42rem, 100vw);
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
}
.works-assistant-chat-shell dialog[data-part="modal"] > [data-part="dialog"] {
    width: 100%; max-width: none; height: 100%; margin: 0; align-items: stretch;
}
.works-assistant-chat-shell dialog[data-part="modal"] > [data-part="dialog"] > [data-part="content"] {
    display: flex; flex-direction: column; height: 100%; min-height: 0; border-radius: 0;
}
.works-assistant-chat-shell dialog[data-part="modal"] > [data-part="dialog"] > [data-part="content"] > [data-part="header"] { flex-shrink: 0; }
.works-assistant-chat-shell dialog[data-part="modal"] > [data-part="dialog"] > [data-part="content"] > [data-part="body"] {
    display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden;
}
/* Content projection can introduce a wrapper; it must also participate in the bounded flex layout. */
.works-assistant-chat-shell .ckn-modal__body > :has(> .works-assistant-panel-body) { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; overflow: hidden; }
.works-assistant-panel-body { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; min-width: 0; overflow: hidden; }
.works-assistant-panel-body > :not(.works-assistant-chat-log) { flex-shrink: 0; }
.works-assistant-panel-body > .ckn-alert { max-height: 8rem; overflow-y: auto; }
.works-assistant-chat-shell .works-assistant-chat-log {
    flex: 1 1 0; min-height: 0; max-height: none; overflow-y: auto; overflow-x: hidden;
}
.works-assistant-chat-shell dialog[open] { animation: works-assistant-slide-in .16s ease-out; }
@keyframes works-assistant-slide-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .works-assistant-chat-shell dialog[open] { animation: none; } }

/* Conversation-focused Assistant: quiet answers, user bubbles and one integrated composer. */
.works-assistant-chat-shell dialog[data-part="modal"] > [data-part="dialog"] > [data-part="content"] > [data-part="header"] {
    gap: .5rem; border-bottom: 0; padding: 1rem 1.25rem .75rem;
}
.works-assistant-chat-shell [data-part="title"] { font-size: 1rem; font-weight: 600; }
.works-assistant-toolbar { margin-left: auto; display: flex; align-items: center; }
.works-assistant-icon-button { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; padding: 0; border: 0; border-radius: .65rem; background: transparent; color: #666; cursor: pointer; }
.works-assistant-icon-button:hover { background: #f3f3f3; color: #222; }
.works-assistant-icon-button:focus-visible, .works-assistant-send:focus-visible { outline: 2px solid #888; outline-offset: 3px; }
.works-assistant-chat-shell dialog[data-part="modal"] > [data-part="dialog"] > [data-part="content"] > [data-part="body"] { padding: .5rem .6rem max(.5rem, env(safe-area-inset-bottom)); }
.works-assistant-chat-shell .works-assistant-chat-log { gap: 1.5rem; padding: 1rem 0 1.5rem; scrollbar-width: thin; }
.works-assistant-welcome { display: flex; flex-direction: column; justify-content: center; align-items: center; flex: 1 0 auto; text-align: center; gap: .75rem; padding: 2rem .5rem; }
.works-assistant-spark { display: grid; place-items: center; width: 3rem; height: 3rem; border: 1px solid #e7e7e7; border-radius: 50%; font-size: 1.65rem; color: #222; }
.works-assistant-welcome h2 { margin: .5rem 0 0; font-size: 1.45rem; font-weight: 600; letter-spacing: -.025em; line-height: 1.35; }
.works-assistant-welcome > p { margin: 0; color: #777; font-size: .875rem; line-height: 1.6; }
.works-assistant-suggestions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: .75rem; }
.works-assistant-suggestions button { border: 1px solid #e4e4e4; border-radius: 999px; padding: .6rem .85rem; background: white; color: #555; font-size: .8rem; line-height: 1.4; cursor: pointer; }
.works-assistant-suggestions button:hover { background: #f7f7f7; border-color: #ccc; }
.works-assistant-chat-message { min-width: 0; padding: 0; border: 0; line-height: 1.65; overflow-wrap: anywhere; }
.works-assistant-chat-message[data-role="user"] { align-self: flex-end; width: fit-content; max-width: 86%; margin: 0 0 0 auto; padding: .75rem 1rem; border-radius: 1.35rem; background: #f3f3f3; color: #222; }
.works-assistant-chat-message[data-role="assistant"] { width: 100%; padding: 0 .25rem; background: transparent; }
.works-assistant-speaker { display: flex; align-items: center; gap: .4rem; margin: 0 0 .65rem; color: #333; font-size: .8rem; font-weight: 600; }
.works-assistant-speaker > span { font-size: 1.1rem; }
.works-assistant-scope { margin: .25rem 0 .65rem; color: #888; font-size: .72rem; }
.works-assistant-sources { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .65rem; }
.works-assistant-sources a { display: block; max-width: 100%; border: 1px solid #e9e9e9; border-radius: 999px; background: #fafafa; padding: .2rem .65rem; color: #666; text-decoration: none; font-size: .72rem; overflow-wrap: anywhere; }
.works-assistant-sources a:hover { background: #f0f0f0; color: #222; }
.works-assistant-search-details { margin-top: .65rem; color: #888; font-size: .72rem; }
.works-assistant-search-details summary { cursor: pointer; }
.works-assistant-composer { position: relative; flex-shrink: 0; margin: .5rem 0 0; border: 1px solid #e2e2e2; border-radius: 1.5rem; background: #f7f7f7; box-shadow: 0 2px 8px #00000004; }
.works-assistant-composer:focus-within { border-color: #c4c4c4; box-shadow: 0 0 0 2px #00000004; }
.works-assistant-composer label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.works-assistant-composer [data-part="root"] { margin: 0; }
.works-assistant-chat-shell .works-assistant-composer textarea { display: block; width: 100%; min-height: 5.5rem; max-height: 11rem; margin: 0; padding: .9rem 3.5rem .9rem 1rem; border: 0; border-radius: 1.5rem; background: transparent; box-shadow: none; outline: none; resize: none; font: inherit; line-height: 1.6; }
.works-assistant-chat-shell .works-assistant-composer textarea:focus, .works-assistant-chat-shell .works-assistant-composer textarea:focus-visible { border: 0; outline: none; box-shadow: none; }
.works-assistant-chat-shell .works-assistant-composer textarea::placeholder { color: #929292; }
.works-assistant-chat-shell .works-assistant-send { position: absolute; right: .65rem; bottom: .65rem; display: grid; place-items: center; width: 2.2rem; height: 2.2rem; padding: 0; border: 0; border-radius: 50%; background: #252525; color: white; cursor: pointer; transition: background .15s; }
.works-assistant-chat-shell .works-assistant-send:hover:not(:disabled) { background: #444; }
.works-assistant-chat-shell .works-assistant-send:disabled { background: #dedede; color: #a6a6a6; cursor: default; }
.works-assistant-footnote { flex-shrink: 0; margin: .65rem .3rem 0; color: #969696; font-size: .65rem; line-height: 1.5; text-align: center; }
@media (max-width: 480px) {
    .works-assistant-chat-shell dialog[data-part="modal"] > [data-part="dialog"] > [data-part="content"] > [data-part="body"] { padding: .5rem .6rem max(.5rem, env(safe-area-inset-bottom)); }
    .works-assistant-welcome h2 { font-size: 1.3rem; }
    .works-assistant-suggestions { flex-direction: column; }
    .works-assistant-chat-message[data-role="user"] { max-width: 90%; }
}

.works-assistant-chat-shell .works-assistant-send svg, .works-assistant-chat-shell .works-assistant-send path { color: inherit; stroke: currentColor; fill: none; }

/* Markdown stays readable inside a narrow chat, including Thai text and wide tables/code. */
.works-assistant-chat-message .ckn-markdown { line-height: 1.75; overflow-wrap: anywhere; min-width: 0; }
.works-assistant-chat-message .ckn-markdown > :first-child { margin-top: 0; }
.works-assistant-chat-message .ckn-markdown > :last-child { margin-bottom: 0; }
.works-assistant-chat-message .ckn-markdown p { margin: .65rem 0; }
.works-assistant-chat-message .ckn-markdown :is(h1,h2,h3,h4,h5,h6) { font-weight: 650; line-height: 1.4; margin: 1.2rem 0 .5rem; }
.works-assistant-chat-message .ckn-markdown h1 { font-size: 1.4rem; }
.works-assistant-chat-message .ckn-markdown h2 { font-size: 1.25rem; }
.works-assistant-chat-message .ckn-markdown :is(h3,h4,h5,h6) { font-size: 1.1rem; }
.works-assistant-chat-message .ckn-markdown :is(ul,ol) { margin: .65rem 0; padding-left: 1.5rem; }
.works-assistant-chat-message .ckn-markdown ul { list-style: disc; }
.works-assistant-chat-message .ckn-markdown ol { list-style: decimal; }
.works-assistant-chat-message .ckn-markdown li { margin: .3rem 0; }
.works-assistant-chat-message .ckn-markdown strong { font-weight: 650; }
.works-assistant-chat-message .ckn-markdown em { font-style: italic; }
.works-assistant-chat-message .ckn-markdown a[href] { color: #1d4ed8; text-decoration: underline; text-underline-offset: .15em; }
.works-assistant-chat-message .ckn-markdown code { font-family: ui-monospace,monospace; font-size: .85em; background: #f1f1f1; border-radius: .3rem; padding: .12rem .3rem; }
.works-assistant-chat-message .ckn-markdown pre { max-width: 100%; overflow-x: auto; margin: .8rem 0; padding: .9rem; border: 1px solid #e5e5e5; border-radius: .7rem; background: #f7f7f7; font-family: ui-monospace,monospace; font-size: .875rem; line-height: 1.6; white-space: pre; overflow-wrap: normal; }
.works-assistant-chat-message .ckn-markdown pre code { padding: 0; background: transparent; font: inherit; }
.works-assistant-chat-message .ckn-markdown blockquote { margin: .8rem 0; padding: .1rem .8rem; border-left: 3px solid #d4d4d4; color: #666; }
.works-assistant-chat-message .ckn-markdown table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: .8rem 0; }
.works-assistant-chat-message .ckn-markdown :is(th,td) { border: 1px solid #ddd; padding: .45rem .7rem; text-align: left; min-width: 6rem; }
.works-assistant-chat-message .ckn-markdown th { background: #f6f6f6; font-weight: 650; }
.works-assistant-chat-message .ckn-markdown hr { margin: 1rem 0; border: 0; border-top: 1px solid #e5e5e5; }

/* File toolbars align buttons with the input edge, excluding the shared field bottom margin. */
[data-test="file-documents-panel"] .items-end [data-part="root"] { margin-bottom: 0; }

.works-assistant-attach { position: absolute; left: .65rem; bottom: .65rem; width: 2.2rem; height: 2.2rem; border: 0; border-radius: 50%; background: #ededed; font-size: 1.4rem; cursor: pointer; }
.works-assistant-chat-shell .works-assistant-composer textarea { padding-bottom: 3.2rem; }
.works-assistant-uploads { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; max-height: 8rem; overflow-y: auto; }
.works-assistant-upload { display: flex; align-items: center; gap: .5rem; border: 1px solid #ddd; border-radius: .6rem; padding: .35rem .5rem; max-width: 100%; font-size: .8rem; }
.works-assistant-upload span { overflow-wrap: anywhere; min-width: 0; }
.works-assistant-upload button { border: 0; background: transparent; cursor: pointer; font-size: 1.2rem; }

/* Customer reports (design 0075): review first — what needs a person, then one row per schedule per period. */
.works-auto-reports { display: flex; flex-direction: column; gap: 1rem; }
.auto-report-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.auto-report-card-top > div { min-width: 0; }
.auto-report-reader, .auto-report-settings { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.auto-report-readerbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem 1rem; }
.auto-report-readerbar h2 { font-size: 1.3rem; font-weight: 650; margin: 0 .5rem .45rem 0; }
.auto-report-readerbar > ckn-select { flex: 1 1 14rem; max-width: 22rem; }
.auto-report-readerbar-end { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-left: auto; }
.auto-report-delivery { display: flex; align-items: center; gap: .6rem; border: 1px solid #e5e7eb; border-radius: .6rem; padding: .45rem .8rem; background: #fafafa; font-size: .875rem; }
.auto-report-indicator { flex: 0 0 .55rem; height: .55rem; border-radius: 50%; background: #b7791f; }
.auto-report-indicator.is-ready { background: #168348; }
.auto-report-toolbar { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,1fr); align-items: end; gap: .85rem; }
.auto-report-reader-body { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1.25rem; }
.auto-report-paper { flex: 999 1 560px; min-width: 0; background: #e5e7eb; border-radius: 1rem; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; }
.auto-report-nopdf { min-height: 320px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; text-align: center; padding: 2rem 1rem; background: #fff; border-radius: .4rem; }
.auto-report-nopdf p { margin: 0; color: #6b7280; max-width: 32rem; }
.auto-report-frame { width: 100%; height: calc(100vh - 13rem); min-height: 480px; border: 0; border-radius: .4rem; background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.12); }
.auto-report-reader-body { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
.auto-report-paper { flex: 1 1 auto; }
.auto-report-docbar { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .75rem 1.25rem; background: #fff; border: 1px solid #e5e7eb; border-radius: 1rem; padding: .85rem 1.1rem; }
.auto-report-docbar-info { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: .4rem; }
.auto-report-docbar-title { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .75rem; }
.auto-report-docbar-title h3 { margin: 0; font-size: 1.1rem; font-weight: 650; }
.auto-report-docbar-facts { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: 0; font-size: .875rem; }
.auto-report-docbar-facts > div { display: flex; gap: .4rem; align-items: baseline; min-width: 0; }
.auto-report-docbar-facts dt { color: #6b7280; }
.auto-report-docbar-facts dd { margin: 0; display: flex; flex-wrap: wrap; gap: .3rem; min-width: 0; overflow-wrap: anywhere; }
.auto-report-docbar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.auto-report-why { font-size: .875rem; color: #b91c1c; }
.auto-report-why summary { cursor: pointer; }
.auto-report-why p { margin: .3rem 0 0; color: #4b5563; }
.auto-report-pop { position: relative; }
.auto-report-pop > summary { list-style: none; }
.auto-report-pop > summary::-webkit-details-marker { display: none; }
.auto-report-pop-trigger { display: inline-flex; align-items: center; gap: .3rem; min-height: 2.5rem; padding: .3rem .8rem; border: 1px solid #d1d5db; border-radius: .5rem; background: #fff; cursor: pointer; font-size: .875rem; }
.auto-report-pop-trigger:focus-visible { outline: 2px solid #a41f1f; outline-offset: 2px; }
.auto-report-pop-panel { position: absolute; right: 0; top: calc(100% + .35rem); z-index: 30; width: min(24rem, 90vw); max-height: 60vh; overflow-y: auto; background: #fff; border: 1px solid #e5e7eb; border-radius: .75rem; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: .5rem; }
.auto-report-menu { width: 15rem; display: flex; flex-direction: column; }
.auto-report-menu > a, .auto-report-menu > button { display: block; width: 100%; text-align: left; font: inherit; font-size: .9rem; padding: .6rem .7rem; min-height: 2.75rem; box-sizing: border-box; border: 0; border-radius: .4rem; background: none; color: #171717; text-decoration: none; cursor: pointer; }
.auto-report-menu > a:hover, .auto-report-menu > button:hover { background: #f3f4f6; }
.auto-report-menu > p { margin: .3rem .7rem; }
.auto-report-chip { display: inline-block; max-width: 100%; padding: .05rem .55rem; border-radius: 999px; background: #f3f4f6; font-size: .8rem; overflow-wrap: anywhere; }
.auto-report-chip.is-cc { background: #f9fafb; color: #4b5563; }
.auto-report-mail { display: flex; flex-direction: column; gap: .6rem; }
.auto-report-mail-subject { font-weight: 600; font-size: .9rem; overflow-wrap: anywhere; }
.auto-report-mail-text { font-size: .875rem; white-space: pre-line; overflow-wrap: anywhere; max-height: 22rem; overflow-y: auto; padding: .6rem .75rem; background: #fafafa; border: 1px solid #f3f4f6; border-radius: .5rem; }
.auto-report-settings-tools { display: flex; justify-content: flex-end; margin-bottom: .8rem; }
.auto-report-side-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.auto-report-card-list { display: grid; gap: .85rem; }
.auto-report-card { border: 1px solid #e5e7eb; border-radius: .8rem; padding: 1.1rem; margin-bottom: .85rem; min-width: 0; overflow-wrap: anywhere; background: #fff; }
.auto-report-card h3 { font-size: 1.05rem; font-weight: 650; margin-bottom: .3rem; }
.auto-report-card-details { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; margin-top: 1rem; }
.auto-report-card-details span { display: block; font-size: .75rem; color: #6b7280; margin-bottom: .3rem; }
.auto-report-card-details strong { display: block; font-weight: 550; }
.auto-report-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: 1rem; }
.auto-report-empty { padding: 2.5rem 1rem; text-align: center; border: 1px dashed #d1d5db; border-radius: .8rem; }
.auto-report-empty p { color: #6b7280; margin-top: .4rem; }
.auto-report-form-section { font-size: 1rem; font-weight: 650; margin: 1.3rem 0 .8rem; }
.auto-report-form-summary { padding: .7rem .9rem; background: #f8f8f8; border: 1px solid #e5e7eb; border-radius: .5rem; }
@media (max-width: 800px) { .auto-report-toolbar { grid-template-columns: 1fr; } .auto-report-readerbar-end { margin-left: 0; } .auto-report-docbar-actions { width: 100%; } }
@media (max-width: 480px) { .auto-report-card-details { grid-template-columns: 1fr; } .auto-report-card { padding: .85rem; } .auto-report-card-top { flex-wrap: wrap; } .auto-report-paper { padding: .5rem; } .auto-report-frame { height: 75vh; min-height: 360px; } }
.auto-report-card-list .auto-report-card { margin-bottom: 0; }
/* Hidden views/loading hosts must not create gaps between page sections. */
.works-auto-reports { display: block; }
.works-auto-reports > ckn-alert { margin-bottom: 1rem; }

/* Company knowledge library and safe Markdown reader. */
.knowledge-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:1rem; margin:0 0 1.2rem; }
.knowledge-heading h2 { font-size:1.5rem; font-weight:650; }
.knowledge-filters { display:grid; grid-template-columns:minmax(0,2fr) repeat(2,minmax(0,1fr)) repeat(3,auto); gap:.8rem; align-items:end; margin:1rem 0 .6rem; }
.knowledge-cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem; }
.knowledge-card { border:1px solid #e5e7eb; border-radius:.8rem; background:#fff; padding:1.1rem; min-width:0; overflow-wrap:anywhere; }
.knowledge-card p { margin-top:.45rem; }
.knowledge-card-title { display:block; font-size:1.1rem; font-weight:650; margin-top:.65rem; text-decoration:none; }
.knowledge-card-title:hover { text-decoration:underline; }
.knowledge-empty { padding:2.5rem 1rem; text-align:center; border:1px dashed #d1d5db; border-radius:.8rem; }
.knowledge-reader-grid { display:grid; grid-template-columns:minmax(0,1fr) 17rem; gap:1.5rem; }
.knowledge-article { min-width:0; padding:1.4rem; border:1px solid #e5e7eb; border-radius:.8rem; background:#fff; }
.knowledge-article > h1 { font-size:1.7rem; font-weight:650; overflow-wrap:anywhere; }
.knowledge-aside { min-width:0; overflow-wrap:anywhere; }
.knowledge-aside h3 { font-weight:650; margin:1rem 0 .6rem; }
.knowledge-aside p { margin-bottom:.6rem; }
.knowledge-reference { display:block; text-decoration:underline; margin:.5rem 0; }
.knowledge-reference-picker { display:flex; align-items:center; gap:.7rem; margin-top:.8rem; }
.knowledge-reference-picker ckn-select { flex:1; min-width:0; }
.knowledge-reference-chip { display:flex; justify-content:space-between; align-items:center; gap:.6rem; margin:.5rem 0; padding:.5rem; background:#f8f8f8; border-radius:.4rem; overflow-wrap:anywhere; }
.knowledge-search-results { padding:1rem; border:1px solid #e5e7eb; border-radius:.8rem; margin:1rem 0; }
.knowledge-search-results h3 { font-weight:650; }
.knowledge-search-results article { padding:.7rem 0; border-bottom:1px solid #eee; overflow-wrap:anywhere; }
.knowledge-search-results a { font-weight:600; text-decoration:underline; }
.knowledge-markdown { overflow-wrap:anywhere; line-height:1.8; }
.knowledge-markdown :is(h1,h2,h3,h4) { font-weight:650; margin:1.2rem 0 .6rem; line-height:1.4; }
.knowledge-markdown h1 { font-size:1.5rem; }.knowledge-markdown h2 { font-size:1.3rem; }.knowledge-markdown h3 { font-size:1.1rem; }
.knowledge-markdown p { margin:.7rem 0; }.knowledge-markdown ul { list-style:disc; padding-left:1.5rem; }.knowledge-markdown ol { list-style:decimal; padding-left:1.5rem; }
.knowledge-markdown a { color:#1d4ed8; text-decoration:underline; }
.knowledge-markdown pre { max-width:100%; overflow-x:auto; background:#f6f6f6; padding:.8rem; border-radius:.5rem; font-family:monospace; }
.knowledge-markdown code { font-family:monospace; background:#f6f6f6; padding:.1rem .25rem; border-radius:.2rem; }
.knowledge-markdown table { display:block; overflow-x:auto; max-width:100%; border-collapse:collapse; }.knowledge-markdown :is(th,td) { border:1px solid #ddd; padding:.4rem .7rem; }
.knowledge-markdown blockquote { padding-left:1rem; border-left:3px solid #ccc; color:#666; }
@media(max-width:1100px){.knowledge-cards{grid-template-columns:repeat(2,minmax(0,1fr));}.knowledge-filters{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:650px){.knowledge-heading{flex-direction:column;}.knowledge-cards,.knowledge-reader-grid,.knowledge-filters{grid-template-columns:1fr;}.knowledge-article{padding:1rem;}.knowledge-reference-picker{flex-wrap:wrap;}.knowledge-reference-chip{align-items:flex-start;flex-wrap:wrap;}}

/* Case fields from customer issue workbooks. */
.case-tracking-section { border:1px solid #e5e7eb; border-radius:.6rem; padding:1rem; margin:0 0 .8rem; min-width:0; }
.case-tracking-section > summary { font-weight:650; cursor:pointer; }
.case-tracking-section[open] > summary { margin-bottom:1rem; }
.case-tracking-section h3 { font-weight:650; margin-bottom:.75rem; }
.case-tracking-read-grid { display:grid; align-items:start; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.case-tracking-section dl > div { margin:.6rem 0; }
.case-tracking-section dt { color:#6b7280; font-size:.8rem; margin-bottom:.2rem; }
.case-tracking-section dd { white-space:pre-wrap; overflow-wrap:anywhere; }
.case-stage-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.6rem; }
@media(max-width:650px){.case-tracking-read-grid,.case-stage-grid{grid-template-columns:1fr;}.case-tracking-section{padding:.8rem;}}

/* Callback-only layout; the shared authentication theme stays in sync. */
.ckn-auth-body:has(.works-oauth-callback) {
    background: radial-gradient(ellipse at 50% 0%, #fbeeee 0, transparent 55%), #f7f8fa;
    min-height: 100dvh;
}
.ckn-auth-shell:has(.works-oauth-callback) {
    background: transparent;
    gap: 0;
    width: min(100%, 28rem);
    padding: 2rem 1.25rem;
    margin-inline: auto;
}
.ckn-auth-shell:has(.works-oauth-callback) .ckn-auth-brand {
    margin-bottom: 1.75rem;
}
.ckn-auth-card:has(.works-oauth-callback) {
    border: 1px solid #e6e8ed;
    border-radius: 1.25rem;
    padding: 2.25rem 2rem 1.5rem;
    box-shadow: 0 12px 40px -16px rgb(28 32 40 / 18%);
    background: #fff;
}
.works-oauth-callback { text-align: center; }
.works-oauth-status-icon {
    display: flex; align-items: center; justify-content: center;
    width: 3.25rem; height: 3.25rem; margin: 0 auto 1.25rem;
    border: 1px solid #f0d6d6; border-radius: 1rem;
    background: #fff4f4; color: #a71919; font-size: 1.35rem;
}
.works-oauth-eyebrow { margin: 0 0 .6rem; color: #8a6060; font-size: .65rem; font-weight: 600; letter-spacing: .15em; }
.works-oauth-heading { margin: 0; color: #202126; font-size: 1.4rem; line-height: 1.4; font-weight: 650; text-wrap: balance; }
.works-oauth-message { margin: .85rem 0 1.5rem; color: #697180; font-size: .875rem; line-height: 1.8; text-wrap: pretty; overflow-wrap: anywhere; }
.works-oauth-actions { display: flex; }
.works-oauth-actions > * { flex: 1; }
.works-oauth-actions [data-part="root"], .works-oauth-actions a, .works-oauth-actions button { width: 100%; justify-content: center; }
.works-oauth-footnote { margin: 1.75rem 0 0; padding-top: 1.1rem; border-top: 1px solid #eef0f3; color: #8b919c; font-size: .7rem; line-height: 1.6; }
@media (max-width: 480px) {
    .ckn-auth-card:has(.works-oauth-callback) { padding: 1.75rem 1.25rem 1.25rem; }
    .works-oauth-heading { font-size: 1.25rem; }
}

/* Keep the Case editor tab strip within narrow modal viewports. */
.case-editor-tabs { min-width:0; max-width:100%; margin-bottom:1rem; }

/* A file drag over the Assistant queues attachments through the normal picker validation. */
.works-assistant-panel-body { position:relative; }
.works-assistant-drop-overlay { position:absolute; inset:.25rem; z-index:20; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.65rem; padding:1.25rem; border:2px dashed #a51d1d; border-radius:1rem; background:rgba(255,247,247,.96); color:#8c1919; text-align:center; pointer-events:none; }
.works-assistant-drop-overlay strong { font-size:1.15rem; }
.works-assistant-drop-overlay span { font-size:.8rem; }

/* Case workspace: primary issue first, operational context alongside it. */
.ticket-workspace { width: 100%; max-width: none; margin: 0; min-width: 0; color: #202329; }
.ticket-breadcrumb { display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; color: #747984; font-size: .78rem; }
.ticket-provider { padding: .12rem .45rem; border-radius: 5px; background: #f1f3f6; font-size: .7rem; font-weight: 650; letter-spacing: .04em; }
.ticket-workspace #ticketTabs { display: block; max-width: 100%; overflow-x: auto; margin-bottom: 1rem; }
.ticket-workspace #ticketTabs [role=tablist] { flex-wrap: nowrap; min-width: max-content; }
/* Progress strip on the ticket page: New > On Process > Wait for Test > Wait for Confirm > Done (display only). */
.flow-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .4rem; }
.flow-step > i { display: block; height: .3rem; border-radius: 999px; background: #dfe3e8; }
.flow-step > span { display: block; margin-top: .3rem; color: #8a909b; font-size: .72rem; line-height: 1.3; overflow-wrap: anywhere; }
.flow-step.flow-done > i { background: #1f8a4c; }
.flow-step.flow-cur > i { background: #344054; }
.flow-step.flow-cur > span { color: #202329; font-weight: 600; }
.flow-step.flow-off > span { text-decoration: line-through; }
@media (max-width: 640px) { .flow-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ticket-overview-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(260px,320px); gap: 1.1rem; align-items: start; }
.ticket-overview-grid > div { min-width: 0; }
.ticket-workspace [data-test=tk-description] p { color: #384151; font-size: .94rem; line-height: 1.85; overflow-wrap: anywhere; }
.ticket-workspace [data-test=tk-latest] li { line-height: 1.65; overflow-wrap: anywhere; }
.ticket-workspace [data-test=tk-details], .ticket-workspace [data-test=tk-service] { font-size: .83rem; overflow-wrap: anywhere; }
.ticket-resolution { border: 1px solid #e3e7e5; border-radius: 12px; background: #fff; padding: 1rem 1.15rem; }
.ticket-section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .4rem; }
.ticket-section-heading h2 { font-size: .94rem; font-weight: 650; margin: 0; }
.ticket-resolution dl { margin: .5rem 0 0; }
.ticket-resolution dl > div { padding: .85rem 0; border-bottom: 1px solid #eceef1; }
.ticket-resolution dl > div:last-child { border: 0; padding-bottom: .1rem; }
.ticket-resolution dt { font-size: .76rem; font-weight: 600; color: #697182; margin-bottom: .35rem; }
.ticket-resolution dd { margin: 0; font-size: .9rem; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; }
.ticket-resolution dd small { display: block; color: #747b87; margin-top: .45rem; }
.ticket-sla-help { margin-top: .9rem; border-top: 1px solid #eceef1; padding-top: .7rem; font-size: .74rem; color: #757c88; }
.ticket-sla-help summary, .ticket-audit summary { cursor: pointer; }
.ticket-sla-help p { line-height: 1.65; margin-bottom: 0; }
.ticket-audit { border: 1px solid #e4e6ea; border-radius: 10px; background: #fff; padding: .85rem 1rem; font-size: .82rem; }
.ticket-audit summary { font-weight: 600; }
.ticket-audit[open] summary { margin-bottom: .8rem; }
.ticket-workspace .case-tracking-reader { min-width: 0; }
.ticket-workspace .case-tracking-read-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: .8rem; margin-bottom: .8rem; }
.ticket-workspace .case-tracking-read-grid > .case-tracking-section { margin: 0; }
.ticket-workspace .case-tracking-read-grid dl { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); column-gap: 1.1rem; margin: 0; }
.ticket-workspace .case-tracking-read-grid .ticket-tracking-wide { grid-column: 1 / -1; }
.ticket-workspace .case-tracking-section { min-width: 0; border: 1px solid #e4e6ea; border-radius: 12px; padding: 1rem 1.1rem; background: #fff; margin-bottom: 1rem; }
.ticket-workspace .case-tracking-section h3 { font-size: .94rem; font-weight: 650; margin: 0 0 .85rem; }
.ticket-workspace .case-tracking-section dl > div { margin: 0; min-width: 0; padding: .6rem 0; border-top: 1px solid #eef0f2; }
.ticket-workspace .case-tracking-section dt { font-size: .75rem; color: #747b87; margin-bottom: .3rem; }
.ticket-workspace .case-tracking-section dd { margin: 0; font-size: .88rem; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.ticket-workspace [data-test=tk-timeline], .ticket-workspace [data-test=tk-composer] { width: 100%; max-width: none; margin-left: 0; margin-right: 0; scroll-margin-top: 1rem; }
.ticket-workspace [data-test=tk-timeline] li { line-height: 1.75; overflow-wrap: anywhere; }
@media (max-width: 1100px) {
 .ticket-workspace .case-tracking-read-grid dl { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .ticket-overview-grid { grid-template-columns: minmax(0,1fr); }
 .ticket-overview-grid > div:last-child { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
}
@media (max-width: 650px) {
 .ticket-workspace .case-tracking-read-grid dl { grid-template-columns: minmax(0,1fr); }
 .ticket-overview-grid > div:last-child, .ticket-workspace .case-tracking-read-grid { grid-template-columns: minmax(0,1fr); }
 .ticket-section-heading { align-items: flex-start; }
}

.ticket-workspace .ticket-facts { margin: 0; }
.ticket-workspace .ticket-facts > div { padding: .65rem 0; border-bottom: 1px solid #eceef1; }
.ticket-workspace .ticket-facts > div:first-child { padding-top: .1rem; }
.ticket-workspace .ticket-facts > div:last-child { border-bottom: 0; padding-bottom: .1rem; }
.ticket-workspace .ticket-facts dt { font-size: .72rem; color: #757d8b; margin-bottom: .25rem; }
.ticket-workspace .ticket-facts dd { margin: 0; font-size: .85rem; line-height: 1.65; overflow-wrap: anywhere; color: #303744; }
.ticket-workspace .ticket-facts a { color: inherit; text-underline-offset: 3px; }
.ticket-workspace .ticket-facts small { display: block; color: #747b87; }

/* Root-only account switch, owned by Works rather than the shared shell. */
.works-user-switch-control { padding: 12px 14px; border-top: 1px solid var(--color-line, #e5e7eb); }
.works-user-switch { min-width: 0; }

.works-user-switch-auth { position: fixed; left: 16px; bottom: 16px; width: min(280px, calc(100vw - 32px)); z-index: 50; }
.works-user-switch-auth .works-user-switch-control { background: white; border: 1px solid #e5e7eb; border-radius: 12px; }

/* Mobile browsers: 92vh is taller than the visible area (address bar, system bar), so a long dialog's
   bottom buttons could not be scrolled into view. dvh follows the visible viewport. */
@supports (height: 1dvh) {
    .ckn-modal__modal { top: 2dvh; max-height: 96dvh; padding-bottom: max(1rem, env(safe-area-inset-bottom)); overscroll-behavior: contain; }
    :where(.ckn-modal__modal).ckn-dialog-sm { top: 10dvh; max-height: 88dvh; }
}

/* Filter / search / action row: inputs, selects and buttons share one height and sit on one baseline. */
.works-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem; margin-bottom: .75rem; }
.works-toolbar :is(input:not([type="checkbox"]):not([type="radio"]), select, ckn-button :is(button, a)) { box-sizing: border-box; height: 2.5rem; min-height: 2.5rem; }
.works-toolbar ckn-button :is(button, a) { display: inline-flex; align-items: center; justify-content: center; }

/* Repository pages: header, cards, copy rows, breadcrumbs. */
.works-pagehead { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem; margin: .5rem 0 .25rem; }
.works-pagehead h1 { font-size: 1.5rem; font-weight: 650; line-height: 1.2; }
.works-badge { font-size: .75rem; line-height: 1.4; padding: .05rem .55rem; border: 1px solid var(--color-line-strong); border-radius: 999px; color: var(--color-g4); }
.works-card { border: 1px solid var(--color-line); border-radius: var(--radius-md); background: var(--color-paper); overflow: hidden; margin-bottom: 1rem; }
.works-card table { width: 100%; border-collapse: collapse; }
.works-card td, .works-card th { padding: .6rem .85rem; vertical-align: middle; }
.works-card thead th { font-size: .8125rem; color: var(--color-g4); font-weight: 600; text-align: left; background: color-mix(in oklab, var(--color-ink) 3%, transparent); }
.works-card tbody tr + tr td, .works-card thead + tbody tr:first-child td { border-top: 1px solid var(--color-line); }
.works-card tbody tr:hover { background: color-mix(in oklab, var(--color-ink) 4%, transparent); }
.works-card-pad { padding: .85rem 1rem; }
.works-copyrow { display: flex; align-items: flex-end; gap: .5rem; }
.works-copyrow > :first-child { flex: 1; min-width: 0; }
.works-copyrow :is(input, ckn-button :is(button, a)) { box-sizing: border-box; height: 2.5rem; min-height: 2.5rem; }
.works-copyrow input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8125rem; }
.works-copyrow ckn-input { margin-bottom: 0 !important; }
.works-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; font-size: .875rem; }
.works-crumbs a { text-decoration: none; font-weight: 600; }
.works-crumbs a:hover { text-decoration: underline; }
.works-crumbs .works-sep { color: var(--color-g4); }
.works-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 800px) { .works-grid2 { grid-template-columns: 1fr; } }
.works-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8125rem; }
.works-pre { margin: 0; padding: .85rem 1rem; overflow-x: auto; font-size: .8125rem; line-height: 1.5; }
.works-muted { color: var(--color-g4); font-size: .875rem; }

/* Toolbars: search and filters first, action buttons last (and at the right). ckn-table projects its
   toolbar slot before its search box, so the search is moved to the front here. */
ckn-table [data-part="tools"] { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; width: 100%; }
ckn-table [data-part="tools"] [data-part="search"] { order: -1; flex: 1 1 16rem; min-width: 0; }
ckn-table [data-part="tools"] > ckn-content > [slot="toolbar"] { margin-left: auto; }

/* Ticket pages (OPE-020): every button is at least 40x40px to click, in the register (incl. its
   dialog, which stays inside the page's DOM) and on the ticket page. The host tags do not survive in
   the DOM, so the hooks are the template roots' own classes: .tickets-root and .ticket-workspace. */
:is(.tickets-root, .ticket-workspace) :is(
    .ckn-button__root, [data-part="actionButton"], [data-part="pickerButton"], [data-part="exportButton"], [data-part="filterMenuButton"], [data-part="expand"],
    [data-part="selectionClear"], [data-part="link"], [data-part="tab"], [data-part="clear"], [data-part="toggle"], [data-part="close"], [data-part="cancel"], [data-part="confirm"],
    [data-part="search"] button) { box-sizing: border-box; min-width: 2.5rem; min-height: 2.5rem; display: inline-flex; align-items: center; justify-content: center; gap: .375rem; }
:is(.tickets-root, .ticket-workspace) :is([data-part="search"] input, [data-part="sizeSelect"]) { box-sizing: border-box; min-height: 2.5rem; }
.tickets-root [data-part="actionButton"] { padding-inline: .625rem; white-space: nowrap; }

/* Long unbroken text (a 194-character title) must wrap inside its cell, card or page, not push the
   table wide or run through the edge. The title column is capped so the other columns keep room. */
.ticket-workspace { overflow-wrap: anywhere; word-break: break-word; }
.tickets-root .ticket-title-cell { max-width: 24rem; overflow-wrap: anywhere; word-break: break-word; }
.tickets-root :is([data-part="card"], [data-part="cardTitle"], [data-part="cardDescription"]) { min-width: 0; max-width: 100%; overflow-wrap: anywhere; word-break: break-word; }

/* Customer portal Tickets: "waiting for you" is yellow everywhere on the page (status badge, "waiting on" badge and
   its stat card dot). The ckn theme has no yellow tone, so the page maps it to badge tone `pend` and stat tone
   `neutral`, used for nothing else there, and only those are recoloured here. */
/* Ticket status tone `pend` (design 0074 part 2: "waiting on the customer") is the same yellow on staff pages, in the
   ticket status settings and on the portal, so one status has one colour everywhere. */
:is(.tickets-root, .ticket-workspace, .ticket-status-root, [data-test="tk-head"]) :is([data-part="badge"], .ckn-badge__root)[class*="--badge-bg:transparent"],
[data-test="portal-cases"] [data-part="badge"][class*="--badge-bg:transparent"] { --badge-bg: #FDE047; --badge-fg: var(--color-ink); --badge-shadow: none; }
[data-test="portal-case-stats"] [data-part="dot"].bg-g3 { background-color: #FACC15; }

/* ── Tickets list in the prototype's style ("CKN Works Prototype", Tickets page): header actions, New banner,
   filter chips with counts, project filter, a five-column work list (Case ID · subject · assignee ·
   status/waiting on · commit). Scoped to .tkl so the table view and the dialog keep the standard theme. */
.tkl { --tk-surface:#fff; --tk-surface-2:#f2f4f7; --tk-line:#e4e7ec; --tk-line-2:#d0d5dd; --tk-text:#101828; --tk-muted:#475467; --tk-faint:#98a2b3;
  --tk-brand:#b42318; --tk-brand-soft:#fef3f2; --tk-ok:#067647; --tk-ok-soft:#ecfdf3; --tk-warn:#b54708; --tk-warn-soft:#fffaeb; --tk-bad:#d92d20; --tk-bad-soft:#fef3f2;
  --tk-info:#175cd3; --tk-info-soft:#eff8ff; --tk-new:#3d5a80; --tk-new-soft:#eef3f8; --tk-mono:ui-monospace,"IBM Plex Mono",Consolas,monospace;
  display:flex; flex-direction:column; gap:16px; color:var(--tk-text); }
.tkl-head { display:flex; align-items:flex-start; gap:12px; flex-wrap:wrap; }
.tkl-h1 { font-size:1.375rem; font-weight:600; margin:0; line-height:1.3; }
.tkl-sub { color:var(--tk-muted); font-size:.8125rem; margin:0; }
.tkl-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.tkl-row.tight { gap:4px; }
.tkl-actions { margin-left:auto; }
.tkl-push { margin-left:auto; }
.tkl-stack { display:flex; flex-direction:column; gap:12px; }
.tkl-stack.tight { gap:4px; }
.tkl-start { align-items:flex-start; }
.tkl-btn { height:34px; padding:0 12px; border-radius:8px; border:1px solid var(--tk-line-2); background:var(--tk-surface); color:var(--tk-text); cursor:pointer;
  display:inline-flex; align-items:center; gap:6px; white-space:nowrap; font:inherit; font-size:.875rem; }
.tkl-btn:hover { background:var(--tk-surface-2); }
.tkl-btn.sm { height:30px; padding:0 10px; font-size:.8125rem; }
.tkl-btn.pri { background:var(--tk-brand); color:#fff; border-color:var(--tk-brand); }
.tkl-btn.pri:hover { filter:brightness(1.07); }
.tkl-btn:focus-visible, .tkl-chip:focus-visible, .tkl-li:focus-visible { outline:2px solid var(--tk-brand); outline-offset:2px; }
.tkl-banner { border-radius:10px; padding:12px 14px; display:flex; gap:12px; align-items:center; flex-wrap:wrap; background:var(--tk-new-soft); color:var(--tk-new); }
.tkl-chips { gap:8px; }
.tkl-chip { height:30px; padding:0 12px; border-radius:16px; border:1px solid var(--tk-line); background:var(--tk-surface); color:var(--tk-text); cursor:pointer;
  font:inherit; font-size:.8125rem; display:inline-flex; align-items:center; gap:6px; }
.tkl-chip:hover { border-color:var(--tk-line-2); }
.tkl-chip b { font-family:var(--tk-mono); font-weight:500; font-size:.72rem; color:var(--tk-faint); }
.tkl-chip.on { background:var(--tk-brand-soft); color:var(--tk-brand); border-color:var(--tk-brand); font-weight:500; }
.tkl-chip.on b { color:var(--tk-brand); }
.tkl-filters { margin-top:10px; }
.tkl-filters .tkl-proj { width:auto; min-width:14rem; max-width:22rem; }
.tkl-filters .tkl-search { flex:1 1 16rem; max-width:26rem; }
.tkl-filters :is(.tkl-proj, .tkl-search) { margin:0; }
.tkl-list { background:var(--tk-surface); border:1px solid var(--tk-line); border-radius:12px; overflow:hidden; box-shadow:0 1px 2px rgba(16,24,40,.05); }
.tkl-li { display:grid; grid-template-columns:130px minmax(0,1fr) 180px 190px 120px; gap:12px; align-items:center; padding:11px 16px;
  border-top:1px solid var(--tk-line); cursor:pointer; color:inherit; text-decoration:none; }
.tkl-li:first-child { border-top:0; }
.tkl-li:hover { background:var(--tk-surface-2); }
.tkl-li.head { cursor:default; font-size:.75rem; color:var(--tk-faint); background:var(--tk-surface-2); }
.tkl-li.isnew { background:var(--tk-new-soft); }
.tkl-li.isnew:hover { filter:brightness(.98); }
.tkl-full { grid-column:1/-1; }
.tkl-min { min-width:0; }
.tkl-id { gap:3px; align-items:flex-start; min-width:0; }
.tkl-code { font-family:var(--tk-mono); font-size:.75rem; color:var(--tk-muted); overflow-wrap:anywhere; }
.tkl-t1 { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:500; }
.tkl-t2 { font-size:.78rem; color:var(--tk-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tkl-strong { color:var(--tk-text); }
.tkl-small { font-size:.75rem; }
.tkl-who { display:flex; align-items:center; gap:7px; min-width:0; }
.tkl-av { width:26px; height:26px; border-radius:50%; background:var(--tk-info-soft); color:var(--tk-info); display:grid; place-items:center; font-size:.68rem; font-weight:600; flex:none; }
.tkl-pill { display:inline-flex; align-items:center; gap:5px; font-size:.75rem; padding:1px 9px; border-radius:20px; white-space:nowrap; font-weight:500; }
.tkl-pill.p-new { background:var(--tk-new-soft); color:var(--tk-new); }
.tkl-li.isnew .tkl-pill.p-new { background:#fff; }
.tkl-pill.p-proc { background:var(--tk-info-soft); color:var(--tk-info); }
.tkl-pill.p-wait { background:var(--tk-warn-soft); color:var(--tk-warn); }
.tkl-pill.p-done { background:var(--tk-ok-soft); color:var(--tk-ok); }
.tkl-pill.p-bad { background:var(--tk-bad-soft); color:var(--tk-bad); }
.tkl-pill.p-cancel { background:var(--tk-surface-2); color:var(--tk-faint); text-decoration:line-through; }
/* Ticket status pills, soft ("F", 2026-11-21): a light fill and deep text of the status's colour family, a dot and an edge in
   its chart colour (--st-dot = TONE_COLOR in src/helper/ticket/status-catalog.ts: keep in step), the edge dashed for a
   family's light shade (Waiting: deploy / test, Closed) so the two statuses of one family stay apart. */
.tkl-pill[class*="st-"] { border:1px solid var(--st-dot); }
.tkl-pill[class*="st-"]::before, .tkl-pill.tkl-dot[class*="st-"]::before { content:""; width:6px; height:6px; border-radius:50%; background:var(--st-dot); flex:none; }
.tkl-pill.st-err { --st-dot:#e15759; background:#fdecec; color:#b3261e; }
.tkl-pill.st-warn { --st-dot:#f28e2b; background:#fef1e4; color:#b45309; }
.tkl-pill.st-warn-lt { --st-dot:#f9b26e; background:#fff8f0; color:#b45309; border:1px dashed #f28e2b; }
.tkl-pill.st-pend { --st-dot:#edc948; background:#fcf6dc; color:#8a6a00; }
.tkl-pill.st-pend-lt { --st-dot:#f2da8a; background:#fefbee; color:#8a6a00; border:1px dashed #edc948; }
.tkl-pill.st-ok { --st-dot:#59a14f; background:#eaf5e8; color:#2e6b27; }
.tkl-pill.st-ok-lt { --st-dot:#8cd17d; background:#f4faf2; color:#2e6b27; border:1px dashed #59a14f; }
.tkl-pill.st-neutral { --st-dot:#bab0ac; background:#f3f2f1; color:#5f5856; }
.tkl-pill.st-past { --st-dot:#bab0ac; background:#f3f2f1; color:#5f5856; text-decoration:line-through; }
.tkl-pill.st-cur { --st-dot:#4e79a7; background:#e8eef5; color:#2f5480; }
.tkl-pill.st-off { opacity:.55; }
.tkl-pill.p-type { background:var(--tk-surface-2); color:var(--tk-muted); font-family:var(--tk-mono); font-size:.68rem; }
.tkl-owner { font-size:.72rem; padding:1px 7px; border-radius:6px; background:var(--tk-surface-2); color:var(--tk-muted); white-space:nowrap; }
.tkl-owner.ae { background:var(--tk-ok-soft); color:var(--tk-ok); }
.tkl-owner.dev { background:var(--tk-info-soft); color:var(--tk-info); }
.tkl-owner.bad { background:var(--tk-bad-soft); color:var(--tk-bad); }
.tkl-note { font-size:.75rem; color:var(--tk-faint); }
.tkl-num { font-family:var(--tk-mono); font-variant-numeric:tabular-nums; font-size:.8125rem; }
.tkl-faint { color:var(--tk-faint); }
.tkl :is(.warn) { color:var(--tk-warn); }
.tkl :is(.bad) { color:var(--tk-bad); }
.tkl :is(.ok) { color:var(--tk-ok); }
.tkl .newc { color:var(--tk-new); }
.tkl-more { padding:10px 16px; border-top:1px solid var(--tk-line); display:flex; justify-content:center; }
@media (max-width:1000px) { .tkl-li { grid-template-columns:110px minmax(0,1fr) 160px 160px; } .tkl-li > :nth-child(5) { display:none; } }
/* Tickets list (design A1): Case ID · Case Type · Customer · Subject · PIC · Status · Commit, plus the focus cards above it. */
.tkl-li.tk7 { grid-template-columns:150px 76px 150px minmax(0,1fr) 150px 150px 176px; align-items:start; padding:13px 16px; }
.tkl-li.tk7.head { align-items:center; padding:10px 16px; }
.tkl-li.tk7.over { background:#fffbfa; }
.tkl-li.tk7 > :nth-child(5) { display:block; }
.tkl-nopic { display:inline-block; font-size:.75rem; color:var(--tk-muted); border:1px dashed var(--tk-line-2); border-radius:999px; padding:1px 9px; white-space:nowrap; }
.tkl-pill.tkl-dot { font-weight:600; padding:2px 10px; }
.tkl-pill.tkl-dot::before { content:""; width:6px; height:6px; border-radius:50%; background:currentColor; flex:none; }
/* A long status name ("ปิดเคสอัตโนมัติภายใน 3 วัน") wraps inside its 150px column instead of running over the next one. */
.tkl-li.tk7 .tkl-pill { white-space:normal; max-width:100%; border-radius:12px; }
.tkl-crow { display:flex; justify-content:space-between; gap:8px; font-size:.75rem; }
.tkl-crow .tkl-num { font-size:.75rem; color:var(--tk-muted); }
.tkl-crow b { font-weight:600; white-space:nowrap; }
.tkl-cbar { height:4px; border-radius:2px; background:var(--tk-line); margin-top:6px; overflow:hidden; }
.tkl-cbar i { display:block; height:100%; border-radius:2px; background:var(--tk-faint); }
.tkl-cleft.bad b { color:var(--tk-bad); } .tkl-cleft.bad .tkl-cbar i { background:var(--tk-bad); }
.tkl-cleft.warn b { color:var(--tk-warn); } .tkl-cleft.warn .tkl-cbar i { background:#dc6803; }
.tkl-cleft.ok b { color:var(--tk-ok); } .tkl-cleft.ok .tkl-cbar i { background:#079455; }
.tkl-cleft.mute b { color:var(--tk-faint); }
.tkl-focusrow { display:grid; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); gap:12px; }
.tkl-focus { display:grid; grid-template-columns:1fr auto; grid-template-areas:"l n" "h n"; gap:2px 12px; align-items:center; text-align:left;
  padding:14px 16px; border-radius:12px; border:1px solid var(--tk-line); background:var(--tk-surface); color:var(--tk-text); cursor:pointer; font:inherit;
  box-shadow:0 1px 2px rgba(16,24,40,.05); border-top:3px solid var(--tk-c); }
.tkl-focus:hover { border-color:var(--tk-line-2); border-top-color:var(--tk-c); }
.tkl-focus:focus-visible { outline:2px solid var(--tk-brand); outline-offset:2px; }
.tkl-focus.on { background:var(--tk-c-soft); border-color:var(--tk-c); }
.tkl-focus.f-new { --tk-c:var(--tk-new); --tk-c-soft:var(--tk-new-soft); }
.tkl-focus.f-pic { --tk-c:#5b21b6; --tk-c-soft:#f5f3ff; }
.tkl-focus.f-soon { --tk-c:var(--tk-warn); --tk-c-soft:var(--tk-warn-soft); }
.tkl-focus-label { grid-area:l; font-size:.875rem; font-weight:600; }
.tkl-focus-hint { grid-area:h; font-size:.75rem; color:var(--tk-muted); }
.tkl-focus-num { grid-area:n; font-family:var(--tk-mono); font-size:1.75rem; font-weight:500; line-height:1; color:var(--tk-c); }
.tkl-focus.zero .tkl-focus-num { color:var(--tk-faint); }
@media (max-width:1000px) { .tkl-li.tk7 { grid-template-columns:130px minmax(0,1fr) 140px 150px; } .tkl-li.tk7 > :is(:nth-child(2), :nth-child(3), :nth-child(5)) { display:none; } }
@media (max-width:820px) { .tkl-li.tk7 { grid-template-columns:minmax(0,1fr) auto; } .tkl-li.tk7 > :nth-child(7) { grid-column:1/-1; } }
@media (max-width:820px) {
  .tkl-li { grid-template-columns:minmax(0,1fr) auto; gap:4px 10px; }
  .tkl-li.head { display:none; }
  .tkl-li > :nth-child(1) { grid-column:1/-1; flex-direction:row; align-items:center; gap:6px; }
  .tkl-li > :nth-child(3) { display:none; }
  .tkl-actions { margin-left:0; }
}

/* ── Ticket detail in the prototype's style: header card (number, pills, title, progress, banner), then a work column
   (next step, activity) beside a facts column (files, people, time and KPI, ticket details). Uses the .tkl tokens above. */
.tkv { display:flex; flex-direction:column; gap:16px; }
.tkv a { color:inherit; }
.tkv-card { background:var(--tk-surface); border:1px solid var(--tk-line); border-radius:12px; padding:16px; box-shadow:0 1px 2px rgba(16,24,40,.05); min-width:0; }
.tkv-no { font-family:var(--tk-mono); font-size:.8125rem; font-weight:500; color:var(--tk-text); }
.tkv-title { font-size:1.375rem; font-weight:600; margin:6px 0 2px; line-height:1.35; overflow-wrap:anywhere; }
.tkv-steps { margin-top:14px; }
.tkv-banner { margin-top:14px; }
.tkv-small { font-size:.8125rem; }
.tkl-banner.bad { background:var(--tk-bad-soft); color:var(--tk-bad); }
.tkl-banner.info { background:var(--tk-info-soft); color:var(--tk-info); }
.tkl-banner.warn { background:var(--tk-warn-soft); color:var(--tk-warn); }
.tkl-pill.p-tag { background:var(--tk-surface-2); color:var(--tk-muted); font-weight:400; }
.tkv-tabs #ticketTabs { display:block; max-width:100%; overflow-x:auto; }
.tkv-grid { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(260px,1fr); gap:16px; align-items:start; }
.tkv-col { display:flex; flex-direction:column; gap:16px; min-width:0; }
.tkv-h2 { font-size:.95rem; font-weight:600; margin:0; }
.tkv-h2.mb { margin-bottom:8px; }
.tkv-manage { border-top:1px solid var(--tk-line); padding-top:10px; }
/* Next step as the prototype draws it: a task per step (tick · label · owner · Step n · action), extra actions, then the action form. */
.tkv-tasks { display:flex; flex-direction:column; }
.tkv-task { display:grid; grid-template-columns:22px minmax(0,1fr) auto; gap:10px; align-items:center; padding:10px 0; border-top:1px solid var(--tk-line); }
.tkv-task:first-child { border-top:0; padding-top:0; }
.tkv-tick { width:20px; height:20px; border-radius:50%; border:1.5px solid var(--tk-line-2); display:grid; place-items:center; font-size:.7rem; color:#fff; }
.tkv-task.done .tkv-tick { background:var(--tk-ok); border-color:var(--tk-ok); }
.tkv-task-l { font-size:.9rem; margin-bottom:2px; }
.tkv-task.done .tkv-task-l { color:var(--tk-faint); text-decoration:line-through; }
.tkv-act { display:flex; flex-direction:column; gap:10px; border-top:1px solid var(--tk-line); padding-top:12px; }
.tkv-g2 { display:grid; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); gap:10px; }
.tkv-mail { display:flex; flex-direction:column; gap:8px; }
.tkv-mail-h { display:grid; grid-template-columns:auto minmax(0,1fr); gap:6px 12px; align-items:center; font-size:.8125rem; padding:10px 12px; border:1px solid var(--tk-line, #e4e7ec); border-radius:8px; background:var(--tk-surface-2, #f2f4f7); }
.tkv-mail-h > span:nth-child(odd) { color:var(--tk-muted); }
.tkv-mail-h b { font-weight:500; overflow-wrap:anywhere; }
.tkv-mail textarea { font-size:.8125rem; line-height:1.6; }
.tkv-act-btns { justify-content:flex-end; }
.tkv-pic { display:flex; flex-direction:column; gap:8px; border-top:1px solid var(--tk-line); padding-top:10px; margin-top:4px; }
.tkv-manage > summary { cursor:pointer; color:var(--tk-muted); font-size:.8125rem; margin-bottom:8px; }
.tkl-chip.xs { height:26px; padding:0 10px; font-size:.75rem; }
.tkv-empty { padding:10px 0; }
.tkv-composer { border-top:1px solid var(--tk-line); margin-top:8px; padding-top:14px; }
.tkv-kv { display:flex; justify-content:space-between; gap:10px; padding:7px 0; border-top:1px solid var(--tk-line); font-size:.8125rem; }
.tkv-h2 + .tkv-kv, .tkv-kv:first-of-type { border-top:0; }
.tkv-kv > span:first-child { color:var(--tk-muted); flex:none; }
.tkv-kv > span:last-child { text-align:right; min-width:0; overflow-wrap:anywhere; }
.tkv-kv.wide { flex-direction:column; gap:2px; }
.tkv-kv.wide > span:last-child { text-align:left; white-space:pre-line; }
.tkv-kv a { color:var(--tk-info); }
.tkv-right { justify-content:flex-end; }
@media (max-width:1000px) { .tkv-grid { grid-template-columns:minmax(0,1fr); } }
@media (max-width:640px) { .tkv-title { font-size:1.2rem; } }

/* ── merged: newticket (prototype restyle) ── */

/* ── New-ticket dialog in the prototype's style ("เปิด ticket ใหม่"): an info note, paired fields, subject and details,
   attachments in the form, request time folded away, "more details" for the rest. Uses the .tkl tokens. */
.tkl .tkn-form { display:flex; flex-direction:column; gap:12px; }
.tkl .tkn-note { padding:8px 12px; font-size:.8125rem; }
.tkl .tkn-g2 { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:12px; align-items:start; }
.tkl .tkn-g2 > * { min-width:0; }
.tkl .tkn-help { margin:4px 0 0; font-size:.75rem; color:var(--tk-faint); }
.tkl .tkn-add-contact { display:inline-block; margin-top:4px; font-size:.75rem; color:var(--tk-brand); text-decoration:none; }
.tkl .tkn-add-contact:hover { text-decoration:underline; }
.tkl .tkn-closed { align-self:end; }
.tkl .tkn-files { border:1.5px dashed var(--tk-line-2); border-radius:10px; padding:10px 12px; }
.tkl .tkn-details > summary { cursor:pointer; color:var(--tk-muted); font-size:.8125rem; }
.tkl .tkn-details[open] > summary { margin-bottom:8px; }
.tkl .tkn-more { border-top:1px solid var(--tk-line); padding-top:10px; }
.tkl .tkn-form :is(ckn-input, ckn-select, ckn-combobox, ckn-textarea) [data-part="root"], .tkl .tkn-form .ckn-input__root { margin-bottom:0; }
@media (max-width:640px) { .tkl .tkn-g2 { grid-template-columns:minmax(0,1fr); } }
.tkn-page { display:flex; flex-direction:column; gap:16px; }
.tkn-page .tkl-head { align-items:center; }
.tkn-actions { display:flex; justify-content:flex-end; gap:8px; }

/* ── merged: home (prototype restyle) ── */

/* ── Home: what to work on now (design 2026-11-25). One panel of my tickets with tabs, then the queue nobody has taken.
   Colour carries time only: red overdue, amber today/tomorrow; everything else is ink and grey. Uses the .tkl tokens. */
.tkh { gap:16px; }
.tkh-head { display:flex; justify-content:space-between; align-items:flex-end; gap:16px; flex-wrap:wrap; }
.tkh-h1 { font-size:1.375rem; font-weight:600; margin:0; line-height:1.3; letter-spacing:-.01em; }
.tkh-lede { margin:4px 0 0; font-size:.875rem; color:var(--tk-muted); }
.tkh-lede b { color:var(--tk-brand); font-weight:600; }
.tkh-head-r { display:flex; align-items:center; gap:16px; }
.tkh-today { font-size:.875rem; color:var(--tk-muted); }
.tkh a.tkl-btn { text-decoration:none; display:inline-flex; align-items:center; }
.tkh-panel { background:var(--tk-surface); border:1px solid var(--tk-line); border-radius:12px; box-shadow:0 1px 2px rgba(16,24,40,.05); overflow:hidden; }
.tkh-ph { display:flex; align-items:baseline; justify-content:space-between; gap:12px; padding:12px 20px; }
.tkh-h2 { font-size:.9375rem; font-weight:600; margin:0; }
.tkh-count { color:var(--tk-muted); font-size:.875rem; }
.tkh-tabs { display:flex; gap:4px; padding:0 16px; border-bottom:1px solid var(--tk-line); flex-wrap:wrap; }
.tkh-tab { display:flex; gap:6px; align-items:center; padding:9px 8px; margin:0 4px -1px; font:inherit; font-size:.8125rem; color:var(--tk-muted); background:none; border:0; border-bottom:2px solid transparent; cursor:pointer; white-space:nowrap; }
.tkh-tab:hover { color:var(--tk-text); }
.tkh-tab b { font-weight:500; font-size:.75rem; background:var(--tk-surface-2); color:var(--tk-muted); border-radius:999px; padding:0 7px; }
.tkh-tab.on { color:var(--tk-brand); border-bottom-color:var(--tk-brand); font-weight:600; }
.tkh-tab.on b { background:var(--tk-brand-soft); color:var(--tk-brand); }
.tkh-colh { display:flex; gap:12px; padding:8px 20px 6px; font-size:.75rem; color:#667085; }
.tkh-grow { flex:1; }
.tkh-gh { display:flex; align-items:center; gap:6px; padding:5px 20px; background:#f9fafb; border-top:1px solid var(--tk-line); font-size:.75rem; font-weight:600; color:#344054; }
.tkh-gh svg { color:#667085; flex:none; }
.tkh-gh span { font-weight:400; color:var(--tk-muted); }
.tkh-gh.late { background:var(--tk-bad-soft); border-top-color:#fee4e2; color:var(--tk-brand); }
.tkh-gh.late svg, .tkh-gh.late span { color:var(--tk-brand); }
.tkh-row { display:flex; align-items:center; gap:12px; min-height:44px; padding:6px 20px; border-top:1px solid var(--tk-surface-2); color:inherit; text-decoration:none; }
.tkh-row:hover { background:#f9fafb; }
.tkh-row.late { background:#fffbfa; border-top-color:#fee4e2; }
.tkh-row.late:hover { background:var(--tk-bad-soft); }
.tkh-what { flex:1; min-width:0; display:flex; flex-direction:column; gap:1px; color:inherit; text-decoration:none; }
.tkh-title { font-weight:500; font-size:.875rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tkh-meta { display:flex; gap:10px; font-size:.75rem; color:var(--tk-muted); white-space:nowrap; overflow:hidden; }
.tkh-strong { color:var(--tk-text); font-weight:500; }
.tkh-pri { font-weight:600; }
.tkh-pri.hi { color:var(--tk-brand); }
.tkh-pri.mid { color:var(--tk-warn); }
.tkh-num { font-variant-numeric:tabular-nums; }
.tkh-st { width:112px; flex:none; font-size:.75rem; color:var(--tk-muted); }
.tkh-sla { width:84px; flex:none; font-size:.75rem; color:var(--tk-muted); }
.tkh-sla.bad { color:var(--tk-brand); }
.tkh-due { width:96px; flex:none; text-align:right; font-size:.8125rem; color:var(--tk-muted); font-variant-numeric:tabular-nums; }
.tkh-due.bad { color:var(--tk-brand); font-weight:600; }
.tkh-due.warn { color:var(--tk-warn); font-weight:600; }
.tkh-due.set { color:var(--tk-info); }
.tkh-go { width:16px; flex:none; color:var(--tk-faint); opacity:0; transition:opacity .15s, transform .15s; }
.tkh-row:hover .tkh-go { opacity:1; transform:translateX(2px); }
.tkh-foot { display:block; width:100%; padding:12px 20px; border:0; border-top:1px solid var(--tk-line); background:none; font:inherit; font-size:.875rem; color:var(--tk-info); text-align:left; text-decoration:none; cursor:pointer; }
.tkh-foot:hover { background:#f9fafb; }
.tkh-empty { padding:36px 20px 40px; text-align:center; display:flex; flex-direction:column; align-items:center; gap:6px; }
.tkh-empty p { margin:0; color:var(--tk-muted); }
.tkh-empty .tkh-empty-h { font-size:1.0625rem; font-weight:600; color:var(--tk-text); }
.tkh-next { margin-top:10px; display:flex; align-items:center; gap:12px; padding:12px 16px; border:1px solid var(--tk-line); border-radius:10px; text-align:left; color:inherit; text-decoration:none; max-width:520px; width:100%; }
.tkh-next:hover { background:#f9fafb; }
.tkh-next .tkh-due { width:auto; }
.tkh-wrow { display:flex; align-items:center; gap:12px; padding:7px 20px; border-top:1px solid var(--tk-surface-2); }
/* Lead (Operation Admin): three "to decide" cards side by side, team load below. */
.tkh-cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; align-items:start; }
.tkh-cards .tkh-ph { padding:10px 16px; }
.tkh-crow { display:flex; align-items:center; gap:10px; padding:7px 16px; border-top:1px solid var(--tk-surface-2); color:inherit; text-decoration:none; }
.tkh-crow:hover { background:#f9fafb; }
.tkh-cards .tkh-sla { width:auto; flex:none; text-align:right; font-weight:600; }
.tkh-cards .tkh-sla:not(.bad):not(.warn) { font-weight:400; }
.tkh-cards .tkh-foot, .tkh-cards .tkh-empty-line { padding-left:16px; padding-right:16px; }
.tkh-sla.warn { color:var(--tk-warn); }
.tkh-trow { display:flex; align-items:center; gap:16px; padding:6px 20px; border-top:1px solid var(--tk-surface-2); color:inherit; text-decoration:none; font-size:.8125rem; }
.tkh-trow:hover { background:#f9fafb; }
.tkh-thead { font-size:.6875rem; color:#667085; border-top:0; padding-top:2px; }
.tkh-thead:hover { background:none; }
.tkh-tname { width:200px; flex:none; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tkh-tbar { flex:1; min-width:80px; }
.tkh-bar { display:flex; height:6px; border-radius:3px; background:var(--tk-surface-2); overflow:hidden; }
.tkh-bar i { display:block; height:100%; }
.tkh-bar .late { background:#d92d20; }
.tkh-bar .rest { background:#98a2b3; }
.tkh-tn { width:64px; flex:none; text-align:right; font-variant-numeric:tabular-nums; }
.tkh-tn.bad { color:var(--tk-brand); font-weight:600; }
.tkh-tstat { width:120px; flex:none; white-space:nowrap; }
.tkh-tstat.ok { color:var(--tk-ok); font-weight:600; }
.tkh-tstat.warn { color:var(--tk-warn); font-weight:600; }
.tkh-tstat.info { color:var(--tk-info); }
@media (max-width:1100px) { .tkh-cards { grid-template-columns:minmax(0,1fr); } }
@media (max-width:640px) { .tkh-tbar, .tkh-tstat { display:none; } .tkh-tname { width:auto; flex:1; } .tkh-trow { padding-left:16px; padding-right:16px; } }
.tkh-empty-line { margin:0; padding:16px 20px; border-top:1px solid var(--tk-surface-2); color:var(--tk-muted); }
.tkh :is(.tkh-row, .tkh-crow, .tkh-trow, .tkh-what, .tkh-tab, .tkh-foot, .tkh-next):focus-visible { outline:2px solid var(--tk-brand); outline-offset:-2px; }
@media (prefers-reduced-motion:reduce) { .tkh-go { transition:none; } }
@media (max-width:900px) { .tkh-sla, .tkh-colh .tkh-sla { display:none; } }
@media (max-width:640px) { .tkh-h1 { font-size:1.3rem; } .tkh-st, .tkh-go, .tkh-colh { display:none; } .tkh-due { width:auto; }
  .tkh-row, .tkh-wrow, .tkh-ph, .tkh-gh, .tkh-foot { padding-left:16px; padding-right:16px; } }

/* ── merged: portal (prototype restyle) ── */

/* ── Customer Portal in the prototype's customer view (cHome / cTicket / cNewPage): greeting, waiting banner, tiles,
   a four-column ticket list, and the ticket page with a four-step strip. Builds on the .tkl / .tkv classes above. */
.tkp { gap:16px; }
.tkp-stack { display:flex; flex-direction:column; gap:16px; min-width:0; }
.tkp-nav { gap:6px; }
.tkp-nav .tkl-btn { text-decoration:none; }
.tkp-banner { margin:0; }
.tkl-banner.ok { background:var(--tk-ok-soft); color:var(--tk-ok); }
.tkp-tiles { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:12px; }
.tkp-tile { background:var(--tk-surface); border:1px solid var(--tk-line); border-radius:12px; padding:14px 16px; box-shadow:0 1px 2px rgba(16,24,40,.05);
  cursor:pointer; text-align:left; display:flex; flex-direction:column; gap:2px; font:inherit; color:var(--tk-text); }
.tkp-tile:hover { border-color:var(--tk-line-2); }
.tkp-tile .n { font-size:1.75rem; font-weight:600; font-family:var(--tk-mono); line-height:1.2; }
.tkp-tile .l { font-size:.8125rem; color:var(--tk-muted); }
.tkp-tile.hl { background:var(--tk-warn-soft); }
.tkp-tile.hl .n { color:var(--tk-warn); }
.tkp-tile.on { border-color:var(--tk-brand); box-shadow:0 0 0 1px var(--tk-brand); }
.tkp-filters { align-items:flex-end; }
.tkp-customer { min-width:14rem; max-width:22rem; }
.tkp-search { flex:1 1 18rem; max-width:30rem; flex-wrap:nowrap; }
.tkl-li.tkp-li { grid-template-columns:170px minmax(0,1fr) 150px 170px 140px; }
/* Portal · Tickets: what waits on the customer (at most three), the status filter as one segmented control, then the list. */
.tkp-waiting { background:var(--tk-warn-soft); border:1px solid #f5d0a9; border-radius:12px; padding:12px 16px; display:flex; flex-direction:column; gap:8px; }
.tkp-waiting-head { display:flex; justify-content:space-between; align-items:center; gap:12px; color:var(--tk-warn); }
.tkp-waiting-row { display:grid; grid-template-columns:170px minmax(0,1fr) auto auto; gap:12px; align-items:center; background:var(--tk-surface); border:1px solid #f0e0cc;
  border-radius:8px; padding:8px 12px; color:inherit; text-decoration:none; }
.tkp-waiting-row:hover { border-color:var(--tk-warn); }
.tkp-waiting-go { color:var(--tk-warn); font-weight:600; font-size:.8125rem; white-space:nowrap; }
.tkp-seg { display:inline-flex; border:1px solid var(--tk-line-2); border-radius:10px; overflow:hidden; background:var(--tk-surface); align-self:flex-end; }
.tkp-seg-btn { height:38px; padding:0 14px; border:0; border-left:1px solid var(--tk-line-2); background:none; font:inherit; font-size:.875rem; color:var(--tk-text); cursor:pointer; white-space:nowrap; }
.tkp-seg-btn:first-child { border-left:0; }
.tkp-seg-btn.warn { color:var(--tk-warn); font-weight:600; }
.tkp-seg-btn.on { background:var(--tk-text); color:#fff; }
.tkp-filter { min-width:10rem; max-width:14rem; }
/* Way back to the Tickets list from เปิด Ticket and from one Ticket: a real button-sized target, not a small crumb. */
/* Used on staff pages too (outside .tkl), hence the fallbacks. */
.tkp-back { align-self:flex-start; display:inline-flex; align-items:center; gap:6px; height:36px; padding:0 12px 0 8px; border:1px solid var(--tk-line-2, #d0d5dd); border-radius:8px;
  background:var(--tk-surface, #fff); color:var(--tk-text, #101828); font:inherit; font-size:.875rem; font-weight:500; text-decoration:none; cursor:pointer; }
.tkp-back:hover { border-color:var(--tk-brand, #b42318); color:var(--tk-brand, #b42318); }
.tkp-filters { flex-wrap:wrap; gap:8px; }
.tkp-pager { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }
.tkl-li.tkp-mine { background:var(--tk-warn-soft); }
.tkl-owner.tkp-wait { background:var(--tk-warn-soft); color:var(--tk-warn); }
.tkp-page { margin:0 8px; }
.tkp-link { border:0; background:none; padding:0; font:inherit; color:inherit; cursor:pointer; text-decoration:underline; text-underline-offset:2px; }
.tkp-steps { grid-template-columns:repeat(4,minmax(0,1fr)); }
.tkp-desc { margin:0 0 10px; color:var(--tk-muted); font-size:.875rem; white-space:pre-line; overflow-wrap:anywhere; }
.tkp-pre { white-space:pre-line; }
.tkp-gap { margin:0 0 10px; }
.tkp-actions { justify-content:flex-end; margin-top:4px; }
/* Portal · เปิด Ticket: one card in two numbered sections on the same edges (two equal columns, then full-width fields), then send. */
.tkp-create { width:100%; display:flex; flex-direction:column; gap:12px; }
.tkp-create .tkl-sub { margin:2px 0 0; }
.tkp-create-card { padding:0; }
.tkp-step { display:flex; flex-direction:column; gap:12px; padding:20px 24px; }
.tkp-step + .tkp-step { border-top:1px solid var(--tk-line); }
.tkp-step-h { margin:0; display:flex; align-items:center; gap:10px; flex-wrap:wrap; font-size:1rem; font-weight:600; }
.tkp-step-h .tkl-sub { margin:0; font-weight:400; font-size:.8125rem; }
.tkp-step-no { flex:none; width:24px; height:24px; border-radius:50%; background:var(--tk-brand); color:#fff; display:inline-flex; align-items:center; justify-content:center; font-size:.8125rem; font-weight:700; }
.tkp-step-no.off { background:var(--tk-surface-2); color:var(--tk-muted); }
.tkp-step-2col { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.tkp-create-foot { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px;
  padding:12px 24px; border-top:1px solid var(--tk-line); background:var(--tk-surface-2); border-radius:0 0 12px 12px; }
.tkp-foot-ok { color:var(--tk-ok); font-size:.875rem; font-weight:600; }
@media (max-width:640px) { .tkp-step-2col { grid-template-columns:minmax(0,1fr); } .tkp-step, .tkp-create-foot { padding-left:16px; padding-right:16px; } }
@media (max-width:1000px) { .tkl-li.tkp-li { grid-template-columns:140px minmax(0,1fr) 170px; } .tkl-li.tkp-li > :nth-child(3), .tkl-li.tkp-li > :nth-child(5) { display:none; }
  .tkp-waiting-row { grid-template-columns:minmax(0,1fr) auto; } .tkp-waiting-row > :nth-child(1), .tkp-waiting-row > :nth-child(3) { display:none; } }
@media (max-width:820px) {
  .tkl-li.tkp-li { grid-template-columns:minmax(0,1fr) auto; }
  .tkl-li.tkp-li > :nth-child(1) { grid-column:1/-1; }
  .tkl-li.tkp-li > :nth-child(4) { display:flex; }
  .tkp-steps { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* ── merged: settings (prototype restyle) ── */

/* ── Ticket settings in the prototype's style (ticket-type settings): table-like cards per group beside a note card.
   Builds on the .tkl / .tkv tokens above; everything new is prefixed tks-. */
.tks { gap:16px; }
.tks .tks { gap:16px; }
.tks-tabs #ticketSettingsSection { display:block; max-width:100%; overflow-x:auto; }
.tks-stack { display:flex; flex-direction:column; gap:16px; min-width:0; }
.tks-split { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(240px,1fr); gap:16px; align-items:start; }
.tks-tools { gap:12px; align-items:center; }
/* Toolbar: drop the form/tab default bottom margins so the search box and filter pills share one centre line. */
.tks-tools [data-part="root"], .tks-tools [data-part="list"] { margin:0; }
.tks-grow { flex:1 1 16rem; min-width:0; max-width:28rem; }
.tks-group-h { display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; padding:12px 16px; }
.tks-row { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) auto; gap:12px; align-items:center; padding:10px 16px; border-top:1px solid var(--tk-line); font-size:.8125rem; }
.tks-row.status { grid-template-columns:175px minmax(0,1fr) 110px auto; }
.tks-row.rule { grid-template-columns:200px minmax(0,1fr); align-items:start; }
/* Status dialog, step 3: one question per row, answers as a segmented control on the right. */
.tks-qgroup { display:flex; flex-direction:column; gap:6px; margin-top:12px; }
.tks-qlist { border:1px solid var(--tk-line); border-radius:10px; }
.tks-q { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:10px 14px; }
.tks-q + .tks-q { border-top:1px solid var(--tk-line); }
.tks-q-text { display:flex; flex-direction:column; gap:2px; min-width:0; }
.tks-q [data-part="root"] { margin:0; flex-shrink:0; }
/* The theme gives the "buttons" radio variant no selected look; show the chosen answer filled. */
.tks-q [role="radio"][aria-checked="true"] { background:var(--tk-text); color:var(--tk-surface); font-weight:600; }
.tks-row.head { font-size:.75rem; color:var(--tk-faint); background:var(--tk-surface-2); padding-top:8px; padding-bottom:8px; }
.tks-actions { display:flex; gap:6px; justify-content:flex-end; flex-wrap:wrap; }
.tks-old { margin-top:6px; padding-top:6px; border-top:1px dashed var(--tk-line); display:flex; flex-direction:column; gap:3px; }
.tks-mt { margin-top:4px; }
.tks-r { text-align:right; overflow-wrap:anywhere; }
.tks-end { justify-content:flex-end; }
.tks-wrap { white-space:normal; overflow:visible; }
.tks-note { display:flex; flex-direction:column; gap:10px; }
.tks-note p { margin:0; }
.tks .tkl-sub { margin:0; }
/* Flow tab and the Edit dialog's flow lines: "event (condition) → status". */
.tks-row.flow { grid-template-columns:170px minmax(0,1fr) auto; align-items:start; }
.tks-lines { display:flex; flex-direction:column; gap:6px; min-width:0; }
.tks-line { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.tks-line.auto { color:var(--tk-text); }
.tks-arrow { color:var(--tk-faint); }
.tks-who { font-size:.6875rem; color:var(--tk-faint); min-width:3.5rem; }
.tks-edit-line { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(0,1fr) 5.5rem minmax(0,1fr) auto; gap:8px; align-items:end; padding:8px 0; border-top:1px dashed var(--tk-line); }
.tks-edit-line .tks-days-off { visibility:hidden; }
@media (max-width:1000px) { .tks-split { grid-template-columns:minmax(0,1fr); } }
@media (max-width:720px) {
  .tks-row, .tks-row.status, .tks-row.rule, .tks-row.flow, .tks-edit-line { grid-template-columns:minmax(0,1fr); gap:6px; }
  .tks-edit-line .tks-days-off { display:none; }
  .tks-row.head { display:none; }
  .tks-r { text-align:left; }
  .tks-actions { justify-content:flex-start; }
}

/* ── merged: reports (prototype restyle) ── */
/* ── Customer reports (/reports/auto) in the prototype's style ("รายงานลูกค้า"): title with a Weekly / Monthly switch,
   customer and period pickers, a banner per report, the document card, the PDF on paper, and the latest-status table.
   Uses the .tkl / .tkv tokens and classes defined for the Tickets pages. */
.tkr { display:flex; flex-direction:column; gap:16px; }
.tkr-head { gap:10px; }
.tkr-head .tkl-h1 { margin-right:4px; }
.tkr-seg { display:inline-grid; grid-auto-flow:column; grid-auto-columns:1fr; background:var(--tk-surface-2); border-radius:8px; padding:3px; }
.tkr-seg button { border:0; background:none; border-radius:6px; padding:4px 12px; cursor:pointer; font:inherit; font-size:.8125rem; color:var(--tk-muted); }
.tkr-seg button.on { background:var(--tk-surface); color:var(--tk-text); font-weight:500; box-shadow:0 0 0 1px var(--tk-line); }
.tkr-pick { gap:8px; }
.tkr-pick .tkr-select { min-width:14rem; max-width:24rem; margin:0; }
.tkr-delivery { display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:.8125rem; color:var(--tk-muted); }
.tkr-delivery strong { color:var(--tk-text); font-weight:500; }
.tkr-body { display:flex; flex-direction:column; gap:12px; }
.tkr-why { font-size:.8125rem; color:var(--tk-bad); }
.tkr-why > summary { cursor:pointer; }
.tkr-docinfo .tkl-sub { margin-top:2px; }
.tkr-actions { gap:6px; }
.tkr-actions .tkl-btn[disabled] { opacity:.55; cursor:default; }
.tkr-facts { margin-top:8px; }
.tkr-facts .tkv-kv > span:last-child { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:4px; }
.tkr-chip { display:inline-flex; align-items:center; font-size:.75rem; padding:1px 8px; border-radius:6px; background:var(--tk-info-soft); color:var(--tk-info); overflow-wrap:anywhere; }
.tkr-chip.is-cc { background:var(--tk-surface-2); color:var(--tk-muted); }
.tkr-paper { background:var(--tk-surface-2); border:1px solid var(--tk-line); border-radius:12px; padding:12px; }
.tkr-paper .auto-report-frame { display:block; width:100%; min-height:72vh; border:1px solid var(--tk-line); border-radius:6px; background:#fff; }
.tkr-paper .auto-report-nopdf { background:#fff; border:1px dashed var(--tk-line-2); border-radius:8px; padding:24px; text-align:center; color:var(--tk-muted); }
.tkr-scroll { overflow-x:auto; }
.tkr-tbl { width:100%; border-collapse:collapse; font-size:.8125rem; }
.tkr-tbl th { text-align:left; font-weight:500; color:var(--tk-faint); font-size:.75rem; padding:8px 10px; background:var(--tk-surface-2); white-space:nowrap; }
.tkr-tbl td { padding:9px 10px; border-top:1px solid var(--tk-line); vertical-align:top; }
.tkr-tbl .tkl-t1, .tkr-tbl .tkl-t2 { max-width:22rem; }
.tkr-row { cursor:pointer; }
.tkr-row:hover td { background:var(--tk-surface-2); }
.tkr-row.is-current td { background:var(--tk-brand-soft); }
.tkr-mail { border:1px solid var(--tk-line-2); border-radius:10px; overflow:hidden; margin:8px 0; }
.tkr-mail-h { background:var(--tk-surface-2); padding:8px 12px; font-size:.8125rem; display:grid; grid-template-columns:52px minmax(0,1fr); gap:2px 8px; color:var(--tk-muted); align-items:center; }
.tkr-mail-h b { font-weight:500; color:var(--tk-text); overflow-wrap:anywhere; }
.tkr-mail-body { margin:0; padding:10px 12px; white-space:pre-wrap; line-height:1.65; font-size:.875rem; overflow-wrap:anywhere; }
@media (max-width:820px) {
  .tkr-head .tkl-push, .tkr-actions { margin-left:0; }
  .tkr-pick .tkr-select { min-width:0; flex:1 1 100%; max-width:none; }
  .tkr-paper .auto-report-frame { min-height:60vh; }
}
.tkr .tkl-banner.ok { background:var(--tk-ok-soft); color:var(--tk-ok); }
.tks :is(.tkl-code, code) { overflow-wrap:anywhere; word-break:break-word; min-width:0; }
/* Portal side lists read left to right, not as label/value pairs. */
.tkp-side .tkv-kv { justify-content:flex-start; }
.tkp-side .tkv-kv > span:last-child { text-align:left; }
/* Customer reports reader: the frozen PDF drawn as page images (works without a browser PDF viewer). */
.tkr-pages { display:flex; flex-direction:column; align-items:center; gap:14px; }
.tkr-page { display:block; width:100%; max-width:900px; height:auto; background:#fff; border:1px solid var(--tk-line); border-radius:4px; box-shadow:0 1px 6px rgba(0,0,0,.12); }
/* Customer reports: the SUMMARY editor above the report pages (design 0078). */
.tkr-summary { display:flex; flex-direction:column; gap:10px; margin-bottom:14px; }
.tkr-summary .tkr-summary-text { margin:0; }
.tkr-summary textarea { line-height:1.7; }

/* ── merged: reports pickers and history tab ── */
/* Customer reports: customer -> Weekly/Monthly pickers, tabs, and the sent-report history. */
.tkr .tkr-seg[role="tablist"] button { padding:5px 14px; }
.tkr-freq { display:contents; }
.tkr .tkr-select-sm { min-width:10rem; max-width:14rem; }
.tkr-history { display:flex; flex-direction:column; gap:12px; }
.tkr-history .tkr-pick { margin:0; }
.tkr-history-empty { border:1.5px dashed var(--tk-line-2); border-radius:10px; padding:24px 16px; text-align:center; color:var(--tk-muted); }
.tkr-history-empty p { margin:4px 0 0; }
.tkr-history-to { max-width:18rem; overflow-wrap:anywhere; font-size:.78rem; color:var(--tk-muted); }
.tkr-history .tkr-row { cursor:pointer; }
@media (max-width:640px) { .tkr .tkr-select-sm { max-width:none; width:100%; } }

/* ── merged: report pickers by customer, month and week ── */
/* Customer reports: customer -> Weekly/Monthly -> project schedule -> month (-> week), and the create / no-schedule cards. */
.tkr .tkr-period { gap:8px; flex-wrap:wrap; }
.tkr .tkr-pick-hint { margin:4px 0 0; }
.tkr .tkr-create, .tkr .tkr-noschedule { display:flex; flex-direction:column; align-items:center; gap:8px; text-align:center; }
.tkr .tkr-create p, .tkr .tkr-noschedule p { margin:0; max-width:560px; color:var(--tk-muted); }

/* ── Customer reports workspace (design "A + B", 2026-11-21): the report list on the left, the document in the middle, the
   edits and the approve button on the right, each scrolling on its own, so the page fits one screen. Stacks on narrow screens. ── */
/* Sized by the reader's own width (the app sidebar takes 220-270px), not the viewport: see the @container rules below. */
.tkr { container:tkr / inline-size; }
/* The workspace grows with its content and the page scrolls (no scrolling box inside it); clip, not hidden, so the
   list, the paper and the approve bar can stick while the page scrolls. */
.tkr3 { display:grid; grid-template-columns:280px minmax(0,1fr); min-height:max(480px, calc(100dvh - var(--tkr-top, 140px) - 24px)); background:var(--tk-surface); border:1px solid var(--tk-line); border-radius:12px; overflow:clip; }
.tkr3-list { display:flex; flex-direction:column; min-height:0; border-right:1px solid var(--tk-line); }
.tkr3-list-head { display:flex; flex-direction:column; gap:10px; padding:14px; border-bottom:1px solid var(--tk-line); }
.tkr3-list-head .tkr-seg { align-self:stretch; }
.tkr3-list-head .tkr-seg button { padding:4px 10px; font-size:.8rem; }
.tkr3-search { height:38px; border:1px solid var(--tk-line-2); border-radius:8px; padding:0 12px; font:inherit; font-size:.875rem; background:var(--tk-surface); color:var(--tk-text); min-width:0; }
.tkr3-chips { display:flex; flex-wrap:wrap; gap:6px; }
.tkr3-chip { border:1px solid var(--tk-line-2); background:var(--tk-surface); border-radius:999px; padding:3px 10px; font:inherit; font-size:.78rem; cursor:pointer; color:var(--tk-text); }
.tkr3-mailstate { display:inline-flex; align-items:center; gap:6px; font-size:.78rem; color:var(--tk-muted); padding:3px 10px; border-radius:999px; background:var(--tk-surface-2); white-space:nowrap; }
.tkr3-chip.on { background:var(--tk-text); border-color:var(--tk-text); color:#fff; }
.tkr3-items { list-style:none; margin:0; padding:0; overflow:auto; flex:1; min-height:0; }
/* A row: the name (up to two lines) with its status pill, then the period and any warning on a full-width line. */
.tkr3-item { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:4px 8px; width:100%; text-align:left; border:0; border-bottom:1px solid var(--tk-line); background:none; padding:12px 14px; font:inherit; font-size:.875rem; cursor:pointer; color:var(--tk-text); }
.tkr3-item .tkl-pill { font-size:.7rem; padding:0 7px; flex:none; grid-row:1; grid-column:2; align-self:start; margin-top:2px; }
.tkr3-item:hover { background:var(--tk-surface-2); }
.tkr3-item.is-current { background:var(--tk-brand-soft); box-shadow:inset 3px 0 0 var(--tk-brand); }
.tkr3-item-top { display:contents; }
.tkr3-item-top strong { grid-row:1; grid-column:1; font-weight:600; line-height:1.4; overflow:hidden; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow-wrap:anywhere; }
.tkr3-item-sub { grid-row:2; grid-column:1 / -1; font-size:.78rem; line-height:1.45; color:var(--tk-muted); }
.tkr3-edit .tkr-summary { margin-bottom:0; }
.tkr3-item-warn { color:var(--tk-bad); }
.tkr3-list-empty { padding:16px 12px; margin:0; }
.tkr3-main { min-width:0; min-height:0; display:flex; flex-direction:column; }
.tkr3-view { flex:1; min-height:0; display:grid; grid-template-columns:minmax(0,1fr) 380px; }
.tkr3-doc { display:flex; flex-direction:column; min-height:0; min-width:0; }
.tkr3-doc-head { display:flex; flex-direction:column; gap:6px; padding:12px 20px; border-bottom:1px solid var(--tk-line); }
.tkr3-doc-title { display:flex; align-items:center; gap:12px; }
.tkr3-doc-name { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.tkr3-doc-name strong { font-size:1.05rem; }
.tkr3-doc-sub { font-size:.82rem; color:var(--tk-muted); margin-top:2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tkr3-doc-title .tkr-actions { margin-left:auto; flex:none; }
/* One quiet line under the title (the pill beside the name already shows the status), so the document keeps the height. */
.tkr .tkl-banner.tkr3-strip { margin:0; padding:0; background:none; display:flex; align-items:center; gap:6px; flex-wrap:wrap; font-size:.82rem; border-radius:0; }
.tkr3-strip .tkr-why p { margin:4px 0 0; }
.tkr3-period-pop { display:flex; flex-direction:column; gap:8px; min-width:260px; padding:10px; right:0; left:auto; }
.tkr3-period { gap:8px; flex-wrap:wrap; }
.tkr3-pages { flex:1; background:var(--tk-surface-2); padding:24px; }
.tkr3-pages .tkr-pages { gap:18px; }
/* Whole page in view: the pane is a size container, so each page image is capped at its height (minus the padding).
   Stacked layouts (below) have no fixed pane height: there 100cqh falls back to the viewport height. */
.tkr3-pages.is-fit { container-type:size; scroll-snap-type:y proximity; padding:12px; }
.tkr-page-clip { display:block; width:100%; max-width:900px; }
button.tkr-page-clip { padding:0; border:0; background:none; font:inherit; cursor:zoom-in; }
button.tkr-page-clip:focus-visible { outline:3px solid var(--tk-brand); outline-offset:3px; }
/* A page enlarged over the whole window (click a page): every page at the chosen width (480-960px), scrolls; click or Esc closes.
   It sits outside .tkr: a container-query box would make position:fixed relative to it, not to the window. */
.tkr-zoom { position:fixed; inset:0; z-index:1000; display:flex; flex-direction:column; align-items:center; gap:16px; padding:64px 16px 32px; overflow:auto; background:rgba(16,24,40,.78); cursor:zoom-out; }
.tkr-zoom-img { display:block; width:min(var(--zoom-w, 640px), 100%); height:auto; flex:none; background:#fff; border-radius:4px; box-shadow:0 8px 32px rgba(0,0,0,.35); scroll-margin-top:64px; }
/* The size controls sit outside the overlay, so pressing them does not close it. */
.tkr-zoom-bar { position:fixed; top:12px; right:16px; z-index:1001; display:flex; align-items:center; gap:4px; padding:4px; border-radius:999px; background:#fff; box-shadow:0 2px 8px rgba(0,0,0,.25); }
.tkr-zoom-bar button { width:40px; height:40px; border:0; border-radius:50%; background:none; color:#101828; font-size:22px; line-height:1; cursor:pointer; }
.tkr-zoom-bar button:hover:not([disabled]) { background:#f2f4f7; }
.tkr-zoom-bar button[disabled] { color:#98a2b3; cursor:default; }
.tkr-zoom-level { min-width:48px; text-align:center; font-size:.85rem; color:#475467; font-variant-numeric:tabular-nums; }
/* Whole page: each page is a box of its own proportions (--ar: width / height), no taller than the pane. */
.tkr3-pages.is-fit .tkr-page-clip { aspect-ratio:var(--ar, 0.7071); max-width:min(100%, calc((100cqh - 24px) * var(--ar, 0.7071))); overflow:hidden; background:#fff; border:1px solid var(--tk-line); border-radius:4px; box-shadow:0 1px 6px rgba(0,0,0,.12); scroll-snap-align:center; }
.tkr3-pages.is-fit .tkr-page { width:100%; max-width:none; border:0; border-radius:0; box-shadow:none; }
.tkr3-pages .auto-report-nopdf { background:#fff; border:1px dashed var(--tk-line-2); border-radius:8px; padding:24px; text-align:center; color:var(--tk-muted); }
.tkr3-edit { display:flex; flex-direction:column; border-left:1px solid var(--tk-line); }
.tkr3-edit-body { flex:1; padding:4px 20px; display:flex; flex-direction:column; gap:0; }
.tkr3-acc { border:1px solid var(--tk-line); border-radius:10px; margin:0; }
.tkr3-acc > summary { display:flex; align-items:center; gap:8px; padding:12px 14px; min-height:44px; box-sizing:border-box; cursor:pointer; font-weight:600; list-style:none; }
.tkr3-acc > summary::-webkit-details-marker { display:none; }
.tkr3-acc > summary::before { content:"▸"; color:var(--tk-muted); font-size:.75rem; }
.tkr3-acc[open] > summary::before { content:"▾"; }
.tkr3-acc > summary .tkl-note, .tkr3-acc > summary .tkl-pill { margin-left:auto; font-weight:400; }
.tkr3-acc > summary .tkl-pill + .tkl-note { margin-left:0; }
.tkr3-acc-body { padding:2px 14px 14px; display:flex; flex-direction:column; gap:10px; }
.tkr3-edit .tkr-remark { grid-template-columns:minmax(0,1fr); gap:6px; }
.tkr3-edit .tkr-facts { margin-top:0; }
.tkr3-edit-foot { display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:14px 16px; border-top:1px solid var(--tk-line); background:var(--tk-surface); }
.tkr3-edit-foot .tkl-btn.pri { min-height:44px; padding:0 22px; }
.tkr3-empty { flex:1; display:flex; flex-direction:column; min-height:0; }
/* A period with no report yet: the review layout with a blank sheet where the pages go (2026-11-21). */
.tkr3-sheet { width:min(100%, 520px, calc((100dvh - var(--tkr-top,140px) - 160px) * 0.7071)); min-width:min(100%, 300px); aspect-ratio:1 / 1.4142; margin:0 auto; background:#fff; border:1px solid var(--tk-line); border-radius:4px; box-shadow:0 1px 6px rgba(0,0,0,.08); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; padding:32px; box-sizing:border-box; text-align:center; }
.tkr3-sheet-body { display:flex; flex-direction:column; align-items:center; gap:10px; }
.tkr3-sheet-body strong { font-size:1.05rem; }
.tkr3-sheet p { margin:0; max-width:360px; color:var(--tk-muted); line-height:1.55; }
.tkr3-sheet-icon { width:56px; height:56px; display:grid; place-items:center; border-radius:50%; background:var(--tk-surface-2); font-size:1.5rem; }
.tkr3-empty .tkr3-pages { display:flex; align-items:center; }
/* Design A (2026-11-21): one toolbar on the report title row. ‹ waiting n/N › is one grouped control. */
.tkr3-nav { display:inline-flex; align-items:stretch; border:1px solid var(--tk-line-2); border-radius:8px; background:var(--tk-surface); }
.tkr3-nav-btn { min-width:34px; border:0; background:none; font:inherit; font-size:1rem; color:var(--tk-text); cursor:pointer; }
.tkr3-nav-btn:hover:not([disabled]) { background:var(--tk-surface-2); }
.tkr3-nav-btn[disabled] { color:var(--tk-faint); cursor:default; }
.tkr3-nav > .auto-report-pop { border-left:1px solid var(--tk-line); border-right:1px solid var(--tk-line); }
.tkr3-nav-mid { display:flex; align-items:center; gap:4px; height:100%; min-height:32px; padding:0 10px; font-size:.82rem; cursor:pointer; list-style:none; white-space:nowrap; }
.tkr3-nav-mid::-webkit-details-marker { display:none; }
.tkr3-doc-title { align-items:flex-start; }
.tkr3-strip .tkr-why { display:inline; }
.tkr3-strip .tkr-why > summary { display:inline; text-decoration:underline; }
/* The edits: flat sections split by a rule (no box in a box); quiet save buttons, enabled once something changed. */
.tkr3-link { border:0 !important; background:none !important; color:var(--tk-muted) !important; text-decoration:underline; box-shadow:none !important; }
.tkr3-edit-body { container:tkredit / inline-size; }
/* The list (as a column) and the approve bar stay in view while the page scrolls. */
.tkr3:not(.is-list-overlay) .tkr3-list { position:sticky; top:12px; align-self:start; max-height:calc(100dvh - 24px); }
.tkr3-edit-foot { position:sticky; bottom:0; z-index:2; }
/* The app's scrolling body keeps 3rem of padding at the bottom, and sticky stops that far above the window edge, which
   left the approve bar floating with the edits showing under it: this page drops that padding (keeping a small gap). */
.ckn-content-body:has(.tkr3) { padding-bottom:0; }
.tkr { padding-bottom:16px; }
.tkr3-edit .tkr3-acc { border:0; border-bottom:1px solid var(--tk-line); border-radius:0; }
.tkr3-edit .tkr3-acc:last-child { border-bottom:0; }
.tkr3-edit .tkr3-acc > summary { padding:16px 0 12px; }
.tkr3-edit .tkr3-acc-body { padding:0 0 18px; }
.tkr3-edit .tkr3-acc-body > .tkl-row { align-items:center; gap:10px; }
@container tkredit (min-width:520px) {
  .tkr3-edit .tkr-remark { grid-template-columns:minmax(0,1fr) minmax(0,1.2fr); align-items:center; gap:12px; }
}
/* The list folds away (☰): the middle then takes its width. Two sizes decide the layout:
   reader width R (beside the app sidebar): list 280 at >= 1360, 240 below, one column below 820;
   middle width M (what is left): edits 380 at >= 1100, 320 below, and below 960 the edits go under the document
   in one scroll with the approve bar stuck to the bottom, so the document never drops under ~640px. */
.tkr3.is-list-closed, .tkr3.is-list-overlay { grid-template-columns:minmax(0,1fr); }
.tkr3.is-list-closed .tkr3-list { display:none; }
/* Narrow screens: the open list slides over the document instead of squeezing it; the scrim closes it. */
.tkr3 { position:relative; }
.tkr3.is-list-overlay .tkr3-list { position:absolute; top:var(--tkr-list-top,0); left:var(--tkr-list-left,0); bottom:auto; z-index:6; width:min(380px, calc(100% - var(--tkr-list-left,0px) - 8px)); height:min(var(--tkr-list-max,70vh), 640px); background:var(--tk-surface); border:1px solid var(--tk-line-2); border-radius:12px; overflow:hidden; box-shadow:0 12px 32px rgba(16,24,40,.18); }
/* Starts under the button row, so the customer-name button stays clickable and closes the list again. */
.tkr3-scrim { position:absolute; inset:0; top:var(--tkr-list-top,0); z-index:5; border:0; padding:0; background:rgba(16,24,40,.12); cursor:pointer; }
/* The report title is the switcher: click the customer to open the list. */
/* The customer name is the way to switch report: drawn as a select-like button so it reads as clickable. */
.tkr3-switch { display:inline-flex; align-items:center; gap:10px; min-height:36px; border:1px solid var(--tk-line-2); background:var(--tk-surface); padding:4px 10px 4px 12px; margin:0; border-radius:10px; font:inherit; color:inherit; cursor:pointer; text-align:left; box-shadow:0 1px 2px rgba(0,0,0,.04); max-width:100%; }
.tkr3-switch strong { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tkr3-switch:hover { background:var(--tk-surface-2); border-color:var(--tk-muted); }
.tkr3-switch:focus-visible { outline:2px solid var(--tk-accent, #c4161c); outline-offset:2px; }
.tkr3-switch-caret { display:grid; place-items:center; width:24px; height:24px; border-radius:6px; background:var(--tk-surface-2); color:var(--tk-text); font-size:.85rem; flex:none; }
.tkr3-main { container:tkrmain / inline-size; }
@container tkr (max-width:1359px) {
  .tkr3:where(:not(.is-list-closed, .is-list-overlay)) { grid-template-columns:240px minmax(0,1fr); }
  .tkr3-pages { padding:18px; }
}
@container tkrmain (max-width:1099px) {
  .tkr3-view { grid-template-columns:minmax(0,1fr) 320px; }
}
@container tkrmain (max-width:959px) {
  .tkr3-view { display:flex; flex-direction:column; }
  .tkr3-doc { flex:none; }
  .tkr3-pages, .tkr3-pages.is-fit { flex:none; overflow:visible; container-type:normal; }
  /* contents: the approve bar then sticks to the bottom of the whole column, so it shows while reading the document. */
  .tkr3-edit { display:contents; }
  .tkr3-edit-body { flex:none; min-height:auto; overflow:visible; border-top:1px solid var(--tk-line); }
  .tkr3-edit-foot { position:sticky; bottom:0; z-index:1; box-shadow:0 -4px 12px rgba(0,0,0,.06); }
}
/* "Whole page" with room beside it: the title row spans both columns, the paper column is one page wide (--tkr-page-w,
   measured in fitPage), and the edits take the rest. Stacked layouts keep the document above the edits. */
@container tkrmain (min-width:960px) {
  .tkr3-view.is-fit { grid-template-columns:var(--tkr-page-w, 46%) minmax(0,1fr); grid-template-rows:auto minmax(0,1fr);; background:linear-gradient(to right, var(--tk-surface-2) var(--tkr-page-w, 46%), transparent 0); }
  .tkr3-view.is-fit .tkr3-doc-head { background:var(--tk-surface); }
  .tkr3-view.is-fit .tkr3-doc { display:contents; }
  .tkr3-view.is-fit .tkr3-doc-head { grid-column:1 / -1; grid-row:1; }
  /* The paper stays beside the edits while the page scrolls: one screen tall (--tkr-pages-h, set in fitPage); more pages scroll inside it. */
  .tkr3-view.is-fit .tkr3-pages { grid-column:1; grid-row:2; position:sticky; top:12px; align-self:start; height:var(--tkr-pages-h, 70vh); overflow:auto; }
  .tkr3-view.is-fit .tkr3-edit { grid-column:2; grid-row:2; }
  .tkr3-view.is-fit .tkr3-edit-body { padding:4px 28px 16px; }
  .tkr3-view.is-fit .tkr3-edit-body > * { width:100%; max-width:760px; box-sizing:border-box; }
  .tkr3-view.is-fit .tkr3-edit-foot { padding:14px 28px; }
}
@container tkr (max-width:819px) {
  /* clip, not hidden: hidden would trap the sticky approve bar inside a box that never scrolls. */
  .tkr3:not(.is-list-closed), .tkr3.is-list-closed { grid-template-columns:minmax(0,1fr); height:auto; min-height:0; overflow:clip; }
  .tkr3-list { border-right:0; border-bottom:1px solid var(--tk-line); }
  .tkr3-items { max-height:280px; }
  .tkr3:not(.is-list-overlay) .tkr3-list { position:static; max-height:none; }
  .tkr3.is-list-overlay .tkr3-items { max-height:none; }
  .tkr3-view { overflow:visible; }
  .tkr3-doc-title { flex-wrap:wrap; }
  .tkr3-doc-title .tkr-actions { margin-left:0; }
  .tkr3-doc-head { padding:12px 14px; }
  .tkr3-pages { padding:12px; }
}

/* ── อีเมล (Outlook) (mail-page.ts, prototype pInbox): tabs and list on the left, the reader on the right. Uses the .tkl tokens. ── */
.mailapp { display:grid; grid-template-columns:minmax(280px,360px) minmax(0,1fr); background:var(--tk-surface); border:1px solid var(--tk-line); border-radius:12px; overflow:hidden; box-shadow:0 1px 2px rgba(16,24,40,.05); height:calc(100vh - 190px); min-height:540px; }
.mside { display:flex; flex-direction:column; border-right:1px solid var(--tk-line); min-height:0; background:var(--tk-surface); }
.mtabs { display:flex; flex-wrap:wrap; gap:4px; padding:10px; border-bottom:1px solid var(--tk-line); flex:none; }
.mtab { border:0; background:none; padding:6px 9px; border-radius:7px; cursor:pointer; color:var(--tk-muted); font-size:.78rem; white-space:nowrap; display:inline-flex; gap:5px; align-items:center; font:inherit; }
.mtab.on { background:var(--tk-surface-2); color:var(--tk-text); font-weight:500; }
.mtab b { font-weight:500; font-size:.7rem; font-family:var(--tk-mono); color:var(--tk-faint); }
.mtab:focus-visible, .mrow:focus-visible { outline:2px solid var(--tk-brand); outline-offset:-2px; }
.mmine { display:flex; gap:6px; align-items:center; font-size:.75rem; color:var(--tk-muted); padding:8px 14px; border-bottom:1px solid var(--tk-line); flex:none; }
.mlist { overflow-y:auto; flex:1; min-height:0; }
.mrow { display:grid; grid-template-columns:34px minmax(0,1fr); gap:10px; width:100%; text-align:left; border:0; border-bottom:1px solid var(--tk-line); background:none; padding:12px 14px; cursor:pointer; color:inherit; position:relative; font:inherit; }
.mrow:hover { background:var(--tk-surface-2); }
.mrow.on { background:var(--tk-brand-soft); }
.mrow.unread::before { content:""; position:absolute; left:5px; top:20px; width:6px; height:6px; border-radius:50%; background:var(--tk-info); }
.mav { width:34px; height:34px; border-radius:50%; background:var(--tk-surface-2); color:var(--tk-muted); display:grid; place-items:center; font-size:.75rem; font-weight:600; flex:none; }
.mav.out { background:var(--tk-brand-soft); color:var(--tk-brand); }
.mav.lg { width:40px; height:40px; font-size:.8rem; }
.mmain { display:flex; flex-direction:column; gap:2px; min-width:0; }
.mtop { display:flex; gap:8px; align-items:baseline; }
.mfrom { font-weight:600; font-size:.8125rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:1; }
.mtime { font-size:.72rem; color:var(--tk-faint); flex:none; }
.msubj { font-size:.8125rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mprev { font-size:.75rem; color:var(--tk-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mtags { display:flex; gap:6px; align-items:center; margin-top:3px; flex-wrap:wrap; }
.mtags .tkl-pill { font-size:.68rem; }
.mread { overflow-y:auto; min-height:0; padding:22px 26px; display:flex; flex-direction:column; gap:16px; }
.mhead h2 { font-size:1.125rem; font-weight:600; line-height:1.4; margin:0; }
.mhead-who { margin-top:10px; gap:10px; flex-wrap:nowrap; align-items:center; }
.mhead-name { flex:1; }
.mact { background:var(--tk-surface-2); border-radius:10px; padding:12px 14px; display:flex; flex-direction:column; gap:2px; font-size:.8125rem; }
.mact.bad { background:var(--tk-bad-soft); color:var(--tk-bad); }
.mact.ok { background:var(--tk-ok-soft); flex-direction:row; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.mact.ok a.tkl-code { color:inherit; }
.mact-btns { margin-top:6px; align-items:center; }
.mact-cust { min-width:12rem; margin:0; }
.mbody { white-space:pre-wrap; font-size:.875rem; line-height:1.75; color:var(--tk-text); overflow-wrap:anywhere; }
.matt { border-top:1px solid var(--tk-line); padding-top:14px; }
.mfiles { display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:8px; margin-top:8px; }
.mfile { display:flex; gap:8px; align-items:center; padding:8px 10px; border:1px solid var(--tk-line); border-radius:8px; font-size:.8125rem; cursor:pointer; }
.mfile-n { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mempty { padding:40px 20px; text-align:center; color:var(--tk-faint); font-size:.8125rem; }
@media (max-width:900px) { .mailapp { grid-template-columns:minmax(0,1fr); height:auto; } .mside { border-right:0; border-bottom:1px solid var(--tk-line); } .mlist { max-height:340px; } .mread { padding:18px; } }

/* ── ทีมและภาระงาน + รายงาน SLA / KPI (team-workload-page.ts, sla-report-page.ts; prototype pTeam / pReports). Uses the .tkl tokens. ── */
.tmw-wrap { overflow-x:auto; }
.tmw { width:100%; min-width:860px; border-collapse:collapse; font-size:.8125rem; }
.tmw th { text-align:left; font-size:.75rem; font-weight:500; color:var(--tk-muted); background:var(--tk-surface-2); padding:10px 12px; white-space:nowrap; }
.tmw td { padding:11px 12px; border-top:1px solid var(--tk-line); vertical-align:middle; }
.tmw tbody tr:hover { background:var(--tk-surface-2); }
.tmw .r { text-align:right; }
.tmw-load { width:20%; }
.tmw-proj { color:var(--tk-muted); max-width:240px; }
.tmw-barrow { display:flex; align-items:center; gap:8px; }
.tmw-bar { flex:1; height:8px; border-radius:4px; background:var(--tk-surface-2); overflow:hidden; min-width:80px; }
.tmw-bar i { display:block; height:100%; background:var(--tk-info); border-radius:4px; }
.tmw-form { display:flex; flex-direction:column; gap:10px; }
.tmw-check { font-size:.8125rem; }
.sla-month { min-width:12rem; margin:0; }
.sla-tiles { display:grid; grid-template-columns:repeat(auto-fit, minmax(170px, 1fr)); gap:12px; }
.sla-tile { background:var(--tk-surface); border:1px solid var(--tk-line); border-radius:12px; padding:14px 16px; box-shadow:0 1px 2px rgba(16,24,40,.05); display:flex; flex-direction:column; gap:2px; }
.sla-n { font-size:1.75rem; font-weight:600; font-family:var(--tk-mono); line-height:1.2; }
.sla-n.ok { color:var(--tk-ok); }
.sla-n.bad { color:var(--tk-bad); }
.sla-l { font-size:.8125rem; color:var(--tk-muted); }
.sla-charts { display:grid; grid-template-columns:repeat(auto-fit, minmax(420px, 1fr)); gap:16px; }
@media (max-width:900px) { .sla-charts { grid-template-columns:minmax(0,1fr); } }

/* ── Bell drawer การแจ้งเตือน (notification-bell.ts, prototype bell / .drawer / .todo). The drawer carries .tkl for the tokens. ── */
.ntf { position:relative; display:inline-flex; }
.ntf-btn { position:relative; display:inline-grid; place-items:center; width:36px; height:36px; border-radius:8px; border:1px solid transparent; background:none; color:inherit; cursor:pointer; }
.ntf-btn:hover { background:rgba(127,127,127,.12); }
.ntf-btn:focus-visible { outline:2px solid #b42318; outline-offset:2px; }
.ntf-dot { position:absolute; top:0; right:0; min-width:18px; height:18px; padding:0 5px; border-radius:9px; background:#d92d20; color:#fff; font-size:12px; font-family:ui-monospace,monospace; display:grid; place-items:center; }
.ntf-bg { position:fixed; inset:0; background:rgba(15,12,10,.25); z-index:40; }
.ntf-drawer { position:fixed; top:0; right:0; bottom:0; width:min(460px,100%); background:var(--tk-surface); border-left:1px solid var(--tk-line); z-index:41; padding:18px; display:flex; flex-direction:column; overflow:hidden; gap:12px; box-shadow:-8px 0 24px rgba(16,24,40,.12); text-align:left; }
.ntf-h { margin:0; font-size:1.0625rem; font-weight:600; }
.ntf-p { margin:0; }
.ntf-list { display:flex; flex-direction:column; flex:1; min-height:0; overflow:auto; }
.ntf-todo { display:grid; grid-template-columns:4px minmax(0,1fr); gap:10px; align-items:stretch; padding:7px 0 7px 18px; color:inherit; text-decoration:none; }
.ntf-todo:hover { background:var(--tk-surface-2); }
.ntf-sev { width:4px; border-radius:2px; background:var(--tk-info); }
.ntf-sev.bad { background:var(--tk-bad); } .ntf-sev.warn { background:var(--tk-warn); }
.ntf-top { display:flex; gap:6px; align-items:baseline; min-width:0; }
.ntf-t1 { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:500; font-size:.875rem; }
.ntf-t2 { display:block; font-size:.78rem; color:var(--tk-muted); margin-top:2px; }
.ntf-t2.bad { color:var(--tk-bad); } .ntf-t2.warn { color:var(--tk-warn); }
.ntf-empty { padding:16px 0; }
.ntf-all, .ntf-act { align-self:flex-start; flex:none; }
.ntf-more { margin:2px 0 8px 32px; align-self:flex-start; }
.ntf-total { margin-left:6px; font-size:.8rem; font-weight:500; color:var(--tk-muted); }
.ntf-link { padding:0; border:0; background:none; color:var(--tk-info); font:inherit; font-size:.8rem; cursor:pointer; text-decoration:underline; }
.ntf-link:focus-visible, .ntf-head:focus-visible { outline:2px solid #b42318; outline-offset:2px; }
.ntf-sec { display:flex; flex-direction:column; border-top:1px solid var(--tk-line); flex:none; }
.ntf-head { display:flex; align-items:center; gap:8px; width:100%; padding:10px 4px; border:0; background:none; color:var(--tk-text); font:inherit; font-size:.875rem; text-align:left; cursor:pointer; }
.ntf-head:hover { background:var(--tk-surface-2); }
.ntf-head.on { font-weight:600; }
.ntf-caret { flex:none; color:var(--tk-muted); transition:transform .15s; }
.ntf-head.on .ntf-caret { transform:rotate(90deg); }
.ntf-hl { flex:1; min-width:0; }
.ntf-num { flex:none; min-width:24px; padding:1px 8px; border-radius:10px; font-size:.75rem; font-weight:600; text-align:center; background:var(--tk-surface-2); color:var(--tk-info); }
.ntf-num.bad { color:var(--tk-bad); } .ntf-num.warn { color:var(--tk-warn); }

/* ── CR form: man-day per Short Form line, total = sum (crs-page.ts). ── */
.cr-effort { display:flex; flex-direction:column; gap:6px; }
.cr-effort-row { display:grid; grid-template-columns:minmax(0,1fr) 9rem; gap:12px; align-items:center; padding:4px 0; border-top:1px solid var(--tk-line, #e4e7ec); font-size:.875rem; }
.cr-effort-row ckn-input { margin:0; }
.cr-effort-total { font-weight:600; }
.cr-effort-total .tkl-num { text-align:right; padding-right:12px; }

/* ── Report review: Remark per case, editable for one report (report-automation-page.ts, migration 0101). ── */
.tkr-remarks { display:flex; flex-direction:column; }
.tkr-remark { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.4fr); gap:12px; align-items:center; padding:8px 0; border-top:1px solid var(--tk-line, #e4e7ec); }
.tkr-remark-t { font-size:.8125rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
@media (max-width:760px) { .tkr-remark { grid-template-columns:minmax(0,1fr); } }
/* Team workload per project team (2026-11-20): tabs, approval cards, per-ticket hand-over rows. */
.tmw-tabs { display:flex; flex-wrap:wrap; gap:6px; margin:4px 0 12px; }
.tmw-tabs button { border:1px solid var(--tk-line); background:var(--tk-surface); border-radius:999px; padding:5px 14px; cursor:pointer; font:inherit; font-size:.8125rem; color:var(--tk-muted); }
.tmw-tabs button.on { background:var(--tk-info-soft); border-color:var(--tk-info); color:var(--tk-info); font-weight:500; }
.tmw-box { border:1px solid var(--tk-line); border-radius:10px; padding:12px 14px; margin-bottom:14px; background:var(--tk-surface); }
.tmw-h2 { font-size:.9375rem; font-weight:600; margin:16px 0 8px; }
.tmw-box .tmw-h2 { margin-top:0; }
.tmw-card { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 0; border-top:1px solid var(--tk-line); flex-wrap:wrap; }
.tmw-card-main { display:flex; flex-direction:column; gap:2px; font-size:.8125rem; min-width:0; }
.tmw-muted { color:var(--tk-muted); }
.tmw-duty { display:block; color:var(--tk-faint); font-size:.7rem; }
.tmw-pic { display:grid; grid-template-columns:1fr 220px; gap:10px; align-items:center; font-size:.8125rem; border-top:1px solid var(--tk-line); padding-top:6px; }
.tmw-pic-t { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
@media (max-width:640px) { .tmw-pic { grid-template-columns:1fr; } }
.sla-proj { color:inherit; text-decoration:none; }
.sla-proj:hover { color:var(--tk-brand); text-decoration:underline; }
/* Customer Portal: "เปิด Ticket ใหม่" is the main action, set apart from the section tabs (2026-11-20). */
.tkp-nav .tkp-new { margin-left:auto; padding:9px 18px; font-size:.9375rem; font-weight:600; border-radius:8px; box-shadow:0 2px 6px rgba(0,0,0,.12); }
.tkp-nav .tkp-new span { font-size:1.1rem; line-height:1; margin-right:2px; }
.tkp-nav .tkp-new.on { box-shadow:0 0 0 3px var(--tk-brand-soft, rgba(0,0,0,.08)); }
/* SLA / KPI charts drawn with plain elements (sla-report-page.ts; prototype barsSvg / pie, its colours). */
.slab { display:flex; flex-direction:column; gap:6px; margin-top:8px; }
.slab-plot { position:relative; height:200px; margin-left:26px; padding-top:16px; border-bottom:1px solid var(--tk-line-2); }
.slab-bars { position:relative; height:100%; display:grid; align-items:end; }
.slab-tick { position:absolute; left:0; right:0; height:0; border-top:1px solid var(--tk-line); text-indent:-26px; line-height:0; font-size:.68rem; color:var(--tk-faint); pointer-events:none; }
.slab-col { height:100%; display:flex; align-items:flex-end; min-width:0; }
.slab-col i { position:relative; display:block; width:100%; border-radius:2px 2px 0 0; min-height:0; }
.slab-col b { position:absolute; bottom:100%; left:0; right:0; text-align:center; font-size:.66rem; font-weight:500; color:var(--tk-muted); padding-bottom:1px; }
.slab-x { display:grid; margin-left:26px; font-size:.7rem; color:var(--tk-muted); text-align:center; }
.slab-x span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:0 2px; }
.sla-legend { display:flex; flex-wrap:wrap; gap:6px 14px; font-size:.75rem; color:var(--tk-text); }
.sla-legend.center { justify-content:center; }
.sla-legend span { display:inline-flex; align-items:center; gap:6px; }
.sla-legend i { width:9px; height:9px; border-radius:2px; flex:none; }
.slap { display:flex; align-items:center; justify-content:center; gap:24px; flex-wrap:wrap; padding:12px 0; }
.slap .sla-legend { flex-direction:column; }
.slap-disc { width:170px; height:170px; border-radius:50%; flex:none; }
.slap-disc.donut { -webkit-mask:radial-gradient(circle, transparent 38%, #000 39%); mask:radial-gradient(circle, transparent 38%, #000 39%); }

/* Ticket replies: who owes the next message, seen at a glance. */
/* Staff list: the customer wrote last and nobody has answered. */
.tk-reply-new { display:inline-block; margin-top:4px; background:var(--tk-warn); color:#fff; border-radius:999px; padding:1px 10px; font-size:12px; font-weight:700; }
/* Staff ticket: the "customer replied" banner and the three kinds of message in the activity list. */
.tkl-banner.reply { background:var(--tk-warn-soft); color:var(--tk-warn); border:1px solid #fed7aa; }
/* Staff ticket activity as a chat: the customer left (orange), the team right, internal notes dashed, changes as centred lines. */
.tk-chat-list { list-style:none; margin:8px 0 0; padding:0 4px 0 0; display:flex; flex-direction:column; gap:6px; max-height:min(480px, 60vh); overflow-y:auto; overscroll-behavior:contain; }
.tk-chat { display:flex; flex-direction:column; gap:1px; max-width:70%; flex-shrink:0; }
.tk-chat.cust { align-self:flex-start; }
.tk-chat.team { align-self:flex-end; align-items:flex-end; }
.tk-chat-meta { display:flex; align-items:center; gap:4px; font-size:11px; color:var(--tk-muted); }
.tk-chat-bubble { padding:6px 10px; font-size:13px; line-height:1.45; white-space:pre-wrap; overflow-wrap:anywhere; }
/* pre-wrap is for the typed text only: inherited, it turns the file box's template whitespace into tall blank lines. */
.tk-chat-bubble attachment-box, .tkp-bubble attachment-box { display:block; white-space:normal; margin-top:4px; }
.tk-chat-bubble [data-test=attach], .tkp-bubble [data-test=attach] { white-space:normal; }
/* In a message a picture speaks for itself: drop its file-name line (the name stays as the thumbnail's tooltip); PDFs keep theirs. */
.tk-chat-bubble figure[data-kind=image] [data-test=attach-caption], .tkp-bubble figure[data-kind=image] [data-test=attach-caption] { display:none; }
/* Pictures in a message: the picture at its own shape, rounded, like a chat app; click still opens the full size. */
.tk-chat-bubble figure[data-kind=image], .tkp-bubble figure[data-kind=image] { width:auto; }
.tk-chat-bubble figure[data-kind=image] [data-test=attach-thumb], .tkp-bubble figure[data-kind=image] [data-test=attach-thumb] { display:none; }
.tk-chat-bubble .attach-img, .tkp-bubble .attach-img { display:block; max-width:200px; max-height:150px; width:auto; height:auto; border-radius:12px; cursor:zoom-in; box-shadow:0 1px 3px rgb(0 0 0 / .12); }
/* The box's empty label row and list margin would leave a gap under the sender line. */
.tk-chat-bubble [data-test=attach] > div:first-child, .tkp-bubble [data-test=attach] > div:first-child { display:none; }
.tk-chat-bubble [data-test=attach] > div, .tkp-bubble [data-test=attach] > div { margin-top:0; }
.tk-chat.team .tk-chat-bubble [data-test=attach] > div, .tkp-msg.mine .tkp-bubble [data-test=attach] > div { justify-content:flex-end; }
/* Room for the rounded corner and shadow: the scrolling list clips anything flush with its edge. */
.tk-chat.pic, .tkp-msg.pic { padding:2px 6px 4px; }
/* A message of pictures only: no bubble frame, just the pictures. */
.tk-chat.pic .tk-chat-bubble, .tkp-msg.pic .tkp-bubble { background:none !important; border:0 !important; padding:0; }
.tk-chat.pic .tk-chat-bubble attachment-box, .tkp-msg.pic .tkp-bubble attachment-box { margin-top:0; }
.tk-chat.cust .tk-chat-bubble { background:#fff7ed; border:1px solid #fed7aa; color:var(--tk-text); border-radius:10px 10px 10px 3px; }
.tk-chat.team .tk-chat-bubble { background:var(--tk-info-soft); color:var(--tk-text); border-radius:10px 10px 3px 10px; }
.tk-chat.team.int .tk-chat-bubble { background:#fefce8; border:1px dashed #ca8a04; }
.tk-chat.sys { align-self:center; max-width:100%; }
.tk-chat.sys .tk-chat-meta { display:none; }
.tk-chat.sys .tk-chat-bubble { padding:2px 10px; font-size:11px; color:var(--tk-muted); background:var(--tk-surface-2); border-radius:999px; text-align:center; }
/* ── Activity chat, DM style (2026-11-26): stamps between groups, joined pill bubbles, amber + lock = internal ── */
.tk-tabs { display:flex; gap:18px; margin:6px -16px 4px; padding:0 16px; border-bottom:1px solid var(--tk-line); overflow-x:auto; overflow-y:hidden; scrollbar-width:none; }
.tk-tabs::-webkit-scrollbar { display:none; }
.tk-tab { border:0; background:none; padding:8px 0 9px; margin-bottom:-1px; border-bottom:2px solid transparent; color:var(--tk-muted); font:inherit; font-size:.8125rem; white-space:nowrap; cursor:pointer; }
.tk-tab b { font-weight:400; font-size:.75rem; color:var(--tk-faint); margin-left:4px; }
.tk-tab.on { color:var(--tk-text); font-weight:500; border-bottom-color:var(--tk-brand); }
.tk-tab.on b { color:var(--tk-brand); }
.tk-tab:focus-visible { outline:2px solid var(--tk-brand); outline-offset:2px; border-radius:4px; }
.tk-chat-list { gap:2px; padding:4px 8px 8px 4px; scrollbar-width:thin; scrollbar-color:var(--tk-line-2) transparent; }
.tk-chat-list::-webkit-scrollbar { width:6px; }
.tk-chat-list::-webkit-scrollbar-thumb { background:var(--tk-line-2); border-radius:3px; }
.tk-chat-list::-webkit-scrollbar-button { display:none; }
.tk-chat-stamp { align-self:center; font-size:12px; color:var(--tk-faint); margin:14px 0 4px; }
.tk-chat-ev { align-self:center; text-align:center; font-size:12px; color:var(--tk-faint); margin:1px 0; max-width:90%; }
.tk-chat-who { font-size:12px; color:var(--tk-faint); display:flex; align-items:center; gap:4px; margin:8px 6px 3px; }
.tk-chat-who.team, .tk-chat-who.team.int { align-self:flex-end; }
.tk-chat-who.cust { align-self:flex-start; }
.tk-lock { width:12px; height:12px; color:#c4a040; vertical-align:-1px; margin-right:4px; }
.tk-chat { position:relative; gap:0; max-width:72%; }
.tk-chat .tk-chat-bubble { font-size:.875rem; padding:8px 14px; border:0; border-radius:20px; }
.tk-chat.team .tk-chat-bubble { background:var(--tk-info-soft); }
.tk-chat.team.int .tk-chat-bubble { background:#fff6d6; border:0; }
.tk-chat.cust .tk-chat-bubble { background:var(--tk-surface-2); border:0; }
.tk-chat.team.first .tk-chat-bubble { border-bottom-right-radius:6px; }
.tk-chat.team.mid .tk-chat-bubble { border-top-right-radius:6px; border-bottom-right-radius:6px; }
.tk-chat.team.last .tk-chat-bubble { border-top-right-radius:6px; }
.tk-chat.cust.first .tk-chat-bubble { border-bottom-left-radius:6px; }
.tk-chat.cust.mid .tk-chat-bubble { border-top-left-radius:6px; border-bottom-left-radius:6px; }
.tk-chat.cust.last .tk-chat-bubble { border-top-left-radius:6px; }
.tk-chat.pic { padding:2px 0; }
.tk-chat.pic .tk-chat-bubble { padding:0; background:none !important; }
.tk-chat-bubble .attach-img { max-width:220px; max-height:180px; border-radius:16px; box-shadow:0 1px 4px rgb(16 24 40 / .16); }
.tk-chat-del { position:absolute; top:50%; transform:translateY(-50%); right:calc(100% + 6px); width:28px; height:28px; display:grid; place-items:center; border:0; border-radius:50%; background:none; color:var(--tk-faint); cursor:pointer; opacity:0; transition:opacity .15s; }
.tk-chat.cust .tk-chat-del { right:auto; left:calc(100% + 6px); }
.tk-chat:hover .tk-chat-del, .tk-chat-del:focus-visible { opacity:1; }
.tk-chat-del:hover { color:var(--tk-bad); background:var(--tk-bad-soft); }
.tkp-composer-row.int { background:#fffbea; border-color:#f2d27a; }
.tk-mode { flex:none; align-self:center; display:inline-flex; align-items:center; gap:2px; height:30px; padding:0 10px; border:0; border-radius:999px; background:var(--tk-surface); color:#93370d; box-shadow:inset 0 0 0 1px #f2d27a; font:inherit; font-size:12px; font-weight:500; white-space:nowrap; cursor:pointer; }
.tk-mode.pub { color:var(--tk-brand); box-shadow:inset 0 0 0 1px var(--tk-brand); }
.tk-mode .tk-lock { margin-right:3px; }
.tk-mode:focus-visible { outline:2px solid var(--tk-brand); outline-offset:2px; }
.tkv-reply-sub { margin:4px 14px 0; font-size:12px; color:var(--tk-faint); }
/* Composer: two tabs on the box's top edge; a bottom bar of fixed height holds the mode's note or option, so nothing moves */
.tk-ctabs { display:flex; gap:2px; margin:0 0 0 14px; }
.tk-ctab { display:inline-flex; align-items:center; gap:2px; border:1px solid transparent; border-bottom:0; background:none; font:inherit; font-size:.8125rem; color:var(--tk-muted); padding:6px 14px; border-radius:10px 10px 0 0; cursor:pointer; position:relative; top:1px; }
.tk-ctab:hover { color:var(--tk-text); }
.tk-ctab.on { background:#fffbea; border-color:#f2d27a; color:#93370d; font-weight:500; }
.tk-ctab.on.pub { background:var(--tk-surface); border-color:var(--tk-line-2); color:var(--tk-brand); }
.tk-ctab:focus-visible { outline:2px solid var(--tk-brand); outline-offset:2px; }
.tk-cbox { border:1px solid var(--tk-line-2); border-radius:16px; background:var(--tk-surface); padding:4px; }
.tk-cbox.int { background:#fffbea; border-color:#f2d27a; }
.tk-cbox:focus-within { box-shadow:0 0 0 3px var(--tk-brand-soft); }
.tk-cbox .tkp-composer-row { border:0; background:transparent; box-shadow:none; padding:1px; }
.tk-cbox .tkp-composer-row:focus-within { box-shadow:none; }
.tk-cbar { display:flex; align-items:center; gap:8px; flex-wrap:wrap; min-height:34px; margin:2px 4px 0; padding:2px 6px 0; border-top:1px dashed var(--tk-line); font-size:12px; color:var(--tk-faint); }
.tk-cbar-note { display:inline-flex; align-items:center; }
.tk-cbar-end { margin-left:auto; font-size:12px; }
.tk-cbar-end + .tk-cbar-end { margin-left:8px; }
.tk-cbar-select [data-part=root] { display:flex; align-items:center; gap:6px; }
.tk-cbar-select [data-part=label] { margin:0 !important; font-size:12px !important; font-weight:400 !important; color:var(--tk-faint) !important; white-space:nowrap; }
.tk-cbar-select [data-part=control] { height:28px !important; min-height:28px !important; width:auto !important; padding:0 28px 0 10px !important; font-size:12px !important; border-radius:999px !important; }
.tk-quick { display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-top:10px; padding-top:10px; border-top:1px dashed var(--tk-line); font-size:12px; color:var(--tk-muted); }
.tk-quick span { margin-right:auto; }
.tk-quick-ic { width:14px; height:14px; color:var(--tk-muted); flex:none; }
.tk-quick .tkl-chip { display:inline-flex; align-items:center; gap:6px; }
.tk-quick .tkl-chip:hover .tk-quick-ic { color:var(--tk-brand); }
/* Portal conversation, same DM style */
.tkp-chat { gap:2px; scrollbar-width:thin; scrollbar-color:var(--tk-line-2) transparent; }
.tkp-msg-meta:empty { display:none; }
.tkp-msg.sys .tkp-bubble { background:none; padding:0 8px; }
.tkp-msg.sys.stamp { margin-top:12px; }
.tkp-msg.mine .tkp-bubble, .tkp-msg.team .tkp-bubble { border-radius:20px; }
.tkp-msg.mine.more .tkp-bubble { border-bottom-right-radius:6px; }
.tkp-msg.mine.cont .tkp-bubble { border-top-right-radius:6px; }
.tkp-msg.team.more .tkp-bubble { border-bottom-left-radius:6px; }
.tkp-msg.team.cont .tkp-bubble { border-top-left-radius:6px; }
.tkp-msg.pic .tkp-bubble { padding:0; background:none !important; }
.tkp-bubble .attach-img { max-width:220px; max-height:180px; border-radius:16px; box-shadow:0 1px 4px rgb(16 24 40 / .16); }
/* Customer portal: banner, then the conversation as a chat (yours right, the team's left, status lines centred). */
.tkp-reply { border-radius:12px; padding:12px 16px; display:flex; flex-direction:column; gap:2px; margin-bottom:12px; }
.tkp-reply strong { font-size:16px; }
.tkp-reply.team { background:var(--tk-info-soft); color:var(--tk-info); border:1px solid #b2ddff; }
.tkp-reply.wait { background:var(--tk-surface-2); color:var(--tk-muted); border:1px solid var(--tk-line); }
/* Portal · one Ticket: the conversation and the reply box are one card, the box docked under the messages. */
.tkp-convo { padding:0; overflow:hidden; display:flex; flex-direction:column; }
.tkp-convo-h { padding:14px 16px 0; }
.tkp-convo > .tkp-chat { margin:12px 16px 16px; }
.tkp-convo > .tkv-empty { margin:12px 16px 16px; }
/* The reply box as a chat input: paperclip · text · send in one row; attached files show as thumbnails under it. */
.tkp-composer { border-top:1px solid var(--tk-line); background:var(--tk-surface); padding:12px 16px; display:flex; flex-direction:column; gap:8px; }
.tkp-composer-ask { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:10px 12px; border-radius:10px;
  background:var(--tk-warn-soft); color:var(--tk-warn); font-size:.875rem; font-weight:500; }
/* One rounded input box holding paperclip · text · send, as in a chat app; the box shows focus, the parts inside have no borders. */
.tkp-composer-row { display:flex; align-items:flex-end; gap:4px; padding:5px; border:1px solid var(--tk-line-2); border-radius:24px; background:var(--tk-surface);
  transition:border-color .15s, box-shadow .15s; }
.tkp-composer-row:focus-within { border-color:var(--tk-brand); box-shadow:0 0 0 3px var(--tk-brand-soft); }
.tkp-composer-input { flex:1; min-width:0; margin:0 !important; }
.tkp-composer-input > * { margin:0 !important; }
.tkp-composer-input label { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.tkp-composer-input textarea { display:block; box-sizing:border-box; height:38px; min-height:38px; max-height:180px; margin:0; padding:8px 6px; line-height:22px;
  border:0 !important; outline:0 !important; box-shadow:none !important; background:transparent; resize:none; }
.tkp-icon-btn { flex:none; width:38px; height:38px; display:inline-flex; align-items:center; justify-content:center; border:0; border-radius:50%;
  background:transparent; color:var(--tk-muted); cursor:pointer; }
.tkp-icon-btn:hover { background:var(--tk-surface-2); color:var(--tk-text); }
.tkp-send { flex:none; width:38px; height:38px; display:inline-flex; align-items:center; justify-content:center; border:0; border-radius:50%;
  background:var(--tk-brand); color:#fff; cursor:pointer; transition:filter .15s; }
.tkp-send svg { margin-left:-2px; }
.tkp-send:hover { filter:brightness(.9); }
.tkp-send:disabled { opacity:.5; cursor:default; }
.tkp-icon-btn:focus-visible, .tkp-send:focus-visible { outline:2px solid var(--tk-brand); outline-offset:2px; }
/* Team side · one Ticket: the reply box above the same chat input: reply type as a segmented switch, a one-line hint, then the input. */
.tkv-reply { display:flex; flex-direction:column; gap:8px; }
.tkv-seg { display:inline-flex; padding:3px; gap:2px; border-radius:10px; background:var(--tk-surface-2); }
.tkv-seg-btn { height:32px; padding:0 14px; border:0; border-radius:8px; background:transparent; font:inherit; font-size:.875rem; color:var(--tk-muted); cursor:pointer; }
.tkv-seg-btn.on { background:var(--tk-surface); color:var(--tk-text); font-weight:600; box-shadow:0 1px 2px rgba(16,24,40,.12); }
.tkv-seg-btn.pub.on { color:var(--tk-warn); }
.tkv-reply-hint { margin:0; font-size:.8125rem; color:var(--tk-muted); }
.tkv-reply-hint.pub { color:var(--tk-warn); font-weight:500; }
/* Only the thumbnails of the attachment box: its own label row and drop zone stay hidden (Ctrl+V still pastes). */
.tkp-composer-files [data-test="attach"] > div:first-child, .tkp-composer-files [data-test="attach-zone"] { display:none; }.tkp-chat { list-style:none; margin:12px 0 0; padding:0 4px 0 0; display:flex; flex-direction:column; gap:12px; max-height:min(480px, 60vh); overflow-y:auto; overscroll-behavior:contain; }
.tkp-msg { display:flex; flex-direction:column; gap:3px; max-width:80%; flex-shrink:0; }
.tkp-msg.mine { align-self:flex-end; align-items:flex-end; }
.tkp-msg.team { align-self:flex-start; }
.tkp-msg-meta { font-size:12px; color:var(--tk-muted); }
.tkp-bubble { padding:10px 14px; font-size:14px; white-space:pre-wrap; overflow-wrap:anywhere; }
.tkp-msg.mine .tkp-bubble { background:var(--tk-brand); color:#fff; border-radius:14px 14px 4px 14px; }
.tkp-msg.team .tkp-bubble { background:var(--tk-surface-2); color:var(--tk-text); border-radius:14px 14px 14px 4px; }
.tkp-msg.sys { align-self:center; max-width:100%; }
.tkp-msg.sys .tkp-msg-meta { display:none; }
.tkp-msg.sys .tkp-bubble { padding:3px 12px; font-size:12px; color:var(--tk-muted); background:var(--tk-surface-2); border-radius:999px; }

/* Report title block (2026-11-21): two lines — [customer ▾] status … toolbar / project · period · state —
   and every toolbar control the same 36px height, centred on the title row. */
.tkr3-doc-head .tkr3-doc-title { align-items:center; }
.tkr3-doc-meta { display:flex; flex-wrap:wrap; align-items:center; gap:2px 10px; margin-top:6px; font-size:.82rem; }
.tkr3-doc-meta .tkr3-doc-sub { margin:0; white-space:normal; }
.tkr3-doc-meta .tkr3-strip { font-weight:500; }
.tkr3-doc-meta .tkr3-strip::before { content:"·"; color:var(--tk-faint); margin-right:4px; }
.tkr3-doc-head .tkr-actions { align-items:center; }
.tkr3-doc-head .tkr-actions > .tkl-btn, .tkr3-doc-head .tkr-actions > .auto-report-pop > .auto-report-pop-trigger, .tkr3-doc-head .tkr3-nav { height:36px; min-height:36px; box-sizing:border-box; }
.tkr3-doc-head .tkr-actions > .auto-report-pop > .auto-report-pop-trigger { padding:0 12px; }
.tkr3-doc-head .tkr3-nav-mid { min-height:0; height:34px; }
.tkr3-doc-head .tkr-actions > a.tkl-btn { display:inline-flex; align-items:center; padding:0 12px; text-decoration:none; }
.tkr3-doc-head .tkr-actions { flex-wrap:wrap; flex:0 1 auto; max-width:100%; }
@container tkrmain (max-width:600px) { .tkr3-doc-meta .tkr3-strip::before { content:none; } }
/* T2 (2026-11-21): "waiting for you" is its own bar above the report; the title row keeps only this report's tools. */
.tkr3-queue { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:-12px -20px 12px; padding:8px 20px; background:#fff8ec; border-bottom:1px solid #f3e1b8; font-size:.875rem; }
.tkr3-queue-k { font-weight:600; }
.tkr3-queue-at { color:var(--tk-muted); }
.tkr3-queue .tkl-btn.sm, .tkr3-queue .auto-report-pop-trigger { height:32px; min-height:32px; }
.tkr .tkr3-queue-next { background:var(--tk-text); border-color:var(--tk-text); color:#fff; font-weight:600; padding:0 14px; }
.tkr .tkr3-queue-next:hover { background:#000; }
.tkr3-queue .auto-report-pop-panel { right:0; left:auto; }
.tkr3-tool-k { color:var(--tk-muted); font-size:.75rem; margin-right:2px; }
@container tkr (max-width:819px) { .tkr3-queue { margin:-12px -14px 12px; padding:8px 14px; } }
/* No report yet: the title block spans paper and edits too, as on a report (whole-page layout). */
@container tkrmain (min-width:960px) {
  .tkr3-view.tkr3-unmade { grid-template-rows:auto minmax(0,1fr); }
  .tkr3-unmade .tkr3-doc { display:contents; }
  .tkr3-unmade .tkr3-doc-head { grid-column:1 / -1; grid-row:1; }
  .tkr3-unmade .tkr3-pages { grid-column:1; grid-row:2; }
  .tkr3-unmade .tkr3-edit { grid-column:2; grid-row:2; }
}

/* ── Customer reports landing (2026-11-23, design 3 "สิ่งที่ต้องทำวันนี้"): what waits on a person; a report opens the reader ── */
.tkrh { background:var(--tk-surface); border:1px solid var(--tk-line); border-radius:12px; }
.tkrh-main { min-width:0; padding:20px 24px; display:flex; flex-direction:column; gap:16px; }
.tkrh-head { display:flex; flex-wrap:wrap; align-items:flex-start; gap:12px; }
.tkrh-intro { display:flex; flex-direction:column; gap:4px; flex:1 1 320px; }
.tkrh-head-links { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.tkrh-sent { font:inherit; font-size:.85rem; color:var(--tk-ok); background:var(--tk-ok-soft); border:0; border-radius:999px; padding:6px 12px; cursor:pointer; white-space:nowrap; }
.tkrh-sent:hover, .tkrh-sent:focus-visible { outline:2px solid var(--tk-ok); outline-offset:1px; }
.tkrh-title { margin:0; font-size:1.2rem; font-weight:600; }
.tkrh-intro .tkl-note { margin:0; }
.tkrh-group { display:flex; flex-direction:column; gap:4px; }
.tkrh-group-title { margin:0; font-size:.85rem; font-weight:600; color:var(--tk-muted); }
.tkrh-row { display:flex; align-items:center; gap:10px; width:100%; text-align:left; font:inherit; color:inherit; padding:7px 10px; border:1px solid var(--tk-line); border-radius:8px; background:var(--tk-surface); cursor:pointer; }
.tkrh-row:hover, .tkrh-row:focus-visible { border-color:var(--tk-text); outline:none; }
.tkrh-dot { width:8px; height:8px; border-radius:50%; flex:none; background:var(--tk-warn); }
.tkrh-row.is-fix .tkrh-dot { background:var(--tk-bad); }
.tkrh-row.is-ready .tkrh-dot { background:var(--tk-info); }
.tkrh-more { align-self:flex-start; font:inherit; font-size:.8rem; color:var(--tk-info); background:none; border:0; padding:4px 2px; cursor:pointer; }
.tkrh-more:hover, .tkrh-more:focus-visible { text-decoration:underline; outline:none; }
.tkrh-more.is-none { display:none; }
.tkrh-q-main { display:flex; flex-direction:column; gap:2px; flex:1; min-width:0; }
.tkrh-q-main strong { font-size:.88rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tkrh-q-sub { font-weight:400; color:var(--tk-muted); font-size:.85rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tkrh-q-why { font-size:.78rem; color:var(--tk-warn); }
.tkrh-row.is-fix .tkrh-q-why { color:var(--tk-brand); }
.tkrh-row.is-ready .tkrh-q-why { color:var(--tk-info); }
.tkrh-q-side { display:flex; flex-direction:column; align-items:flex-end; gap:1px; flex:none; }
.tkrh-tag { font-size:.72rem; color:var(--tk-muted); white-space:nowrap; }
.tkrh-q-due { font-size:.75rem; color:var(--tk-muted); white-space:nowrap; }
.tkrh-row.is-late .tkrh-q-due { color:var(--tk-bad); font-weight:600; }
.tkrh-act { flex:none; display:inline-flex; align-items:center; height:30px; padding:0 12px; border-radius:7px; border:1px solid var(--tk-line-2); font-size:.8rem; font-weight:500; white-space:nowrap; }
.tkrh-act.is-primary { background:var(--tk-brand); border-color:var(--tk-brand); color:#fff; }
.tkrh-empty { margin:0; padding:12px; border-radius:10px; background:var(--tk-ok-soft); color:var(--tk-ok); }
@media (max-width:760px) {
  .tkrh-main { padding:16px; }
  .tkrh-row { flex-wrap:wrap; }
  .tkrh-q-side { align-items:flex-start; flex-direction:row; flex-wrap:wrap; }
}
.tkrh-filter { display:flex; flex-wrap:wrap; align-items:flex-end; gap:10px; }
.tkrh-filter .tkr-select { min-width:220px; }
.tkr-history-filter { gap:10px; padding:8px 12px; border-radius:8px; background:var(--tk-info-soft); color:var(--tk-info); font-size:.85rem; }

/* Operation dashboard scorecard (operations-page.ts): ring vs target, outcome bar, legend dots. */
.ops-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); gap: 1rem; margin-bottom: 1rem; }
.ops-kpi { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; text-align: left; }
.ops-ring { position: relative; width: 9rem; height: 9rem; flex: none; border-radius: 50%; }
.ops-ring-hole { position: absolute; inset: 1rem; border-radius: 50%; background: var(--color-white); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ops-ring-value { font-size: 1.3rem; font-weight: 700; line-height: 1.1; }
.ops-kpi-body { flex: 1 1 14rem; min-width: 0; display: flex; flex-direction: column; gap: .5rem; }
.ops-kpi-title { margin: 0; font-size: 1rem; font-weight: 700; }
.ops-bar { display: flex; height: .5rem; border-radius: 999px; overflow: hidden; background: var(--color-line); }
.ops-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .15rem 1rem; font-size: .8rem; }
.ops-dot { width: .55rem; height: .55rem; border-radius: 2px; flex: none; }
.ops-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: .5rem; margin-bottom: .75rem; }
.ops-headline { margin: 0 0 .15rem; font-size: 1.2rem; font-weight: 700; }
.ops-ring { width: 7rem; height: 7rem; }
.ops-ring-hole { inset: .6rem; }
.ops-ring-tick { position: absolute; left: calc(50% - 1.5px); top: -4px; width: 3px; height: calc(.6rem + 8px); background: #1C1917; border-radius: 2px; transform-origin: 1.5px calc(3.5rem + 4px); }
.ops-met { background: #2563EB; }
.ops-unknown { background: repeating-linear-gradient(45deg, #d1d5db 0 4px, #e5e7eb 4px 8px); }
.ops-text-blue { color: #1D4ED8; }
.ops-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); border: 1px solid var(--color-line); border-radius: .75rem; overflow: hidden; background: var(--color-white); margin-bottom: 1rem; }
.ops-tile { display: flex; flex-direction: column; gap: .1rem; padding: .7rem 1rem; text-align: left; font: inherit; color: inherit; background: var(--color-white); border: 0; border-right: 1px solid var(--color-line); cursor: pointer; }
.ops-tile:hover { background: #f9fafb; }
.ops-tile:focus-visible { outline: 2px solid #2563EB; outline-offset: -2px; }
.ops-tile-value { font-size: 1.4rem; font-weight: 700; line-height: 1.15; }
.ops-late { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .5rem 0; border-top: 1px solid #f3f4f6; }
.ops-rank { width: 1.4rem; height: 1.4rem; border-radius: .5rem; background: #f3f4f6; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; flex: none; }
.ops-late-main { flex: 1 1 22rem; min-width: 0; }
.ops-mono { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }
.ops-ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ops-late-where { width: 8rem; }
.ops-late-owner { width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-late-bar { width: 13rem; display: flex; align-items: center; gap: .6rem; }
.ops-late-track { flex: 1; height: 6px; border-radius: 3px; background: #f3f4f6; }
.ops-late-fill { height: 6px; border-radius: 3px; background: var(--color-err); }
.ops-link { margin-top: .5rem; padding: .5rem 0; border: 0; background: none; font: inherit; font-weight: 600; color: #1D4ED8; cursor: pointer; }
/* Operation dashboard: denser queue and workload lists (this page only). */
.ops-compact table { font-size: .78rem; }
.ops-compact th { padding-top: .4rem; padding-bottom: .4rem; font-size: .7rem; }
.ops-compact td { padding-top: .4rem; padding-bottom: .4rem; line-height: 1.35; }
.ops-owner-row { display: flex; justify-content: space-between; gap: .5rem; padding: .35rem 0; border-bottom: 1px solid var(--color-line); font-size: .8rem; }
/* Status tiles: number beside its label, one short row each. */
.ops-tile { display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; align-items: center; padding: 1rem 1.25rem; }
.ops-tile > :nth-child(2) { grid-row: 1 / span 2; grid-column: 1; font-size: 2.2rem; }
.ops-tile > :nth-child(1), .ops-tile > :nth-child(3) { grid-column: 2; font-size: .88rem; line-height: 1.4; }
.ops-tile > :nth-child(1) { color: var(--color-ink, #111827); font-weight: 600; }

/* Customer news ("ข่าวสาร redesign" canvas, 2026-11-25): portal feed, article, staff list and composer. Own tokens
   on .nw in the site palette; the font stays the theme's. Category tone: --nw-dot colours the dot, --nw-ink the label. */
.nw { --nw-ink:#171717; --nw-ink2:#374151; --nw-muted:#4b5563; --nw-faint:#6b7280; --nw-line:#e5e7eb; --nw-line2:#d1d5db; --nw-bg:#f7f7f8;
  --nw-soft:#f3f4f6; --nw-brand:#991b1b; --nw-brand-soft:#fef2f2; --nw-brand-line:#fecaca; --nw-bad:#dc2b2b; --nw-info:#1d4ed8; --nw-info-soft:#eff6ff;
  --nw-card-line:#e5e7eb; --nw-lift:0 1px 2px rgba(0,0,0,.07), 0 8px 22px -8px rgba(0,0,0,.18); --nw-lift-sm:0 1px 2px rgba(0,0,0,.07), 0 2px 6px -2px rgba(0,0,0,.10);
  --nw-ok:#157f47; --nw-ok-dot:#22a05c; --nw-ok-soft:#f0fdf4; --nw-warn:#c2410c; --nw-warn-dot:#db6704; --nw-warn-soft:#fff7ed;
  display:flex; flex-direction:column; gap:24px; color:var(--nw-ink); font-size:.9375rem; line-height:1.6;
  margin:-24px -28px; padding:32px 36px 72px; background:var(--nw-bg); min-height:calc(100vh - 58px); box-sizing:border-box; }
.nw ::selection { background:#fee2e2; color:#7f1d1d; }
.nw :is(h1,h2,h3,p) { margin:0; }
.nw a { color:inherit; text-decoration:none; }
.nw-c-important { --nw-dot:var(--nw-bad); --nw-ink-c:var(--nw-brand); }
.nw-c-system-update { --nw-dot:var(--nw-info); --nw-ink-c:var(--nw-info); }
.nw-c-guide { --nw-dot:var(--nw-ok-dot); --nw-ink-c:var(--nw-ok); }
.nw-c-general { --nw-dot:#9ca3af; --nw-ink-c:var(--nw-muted); }
.nw-c-survey { --nw-dot:var(--nw-warn-dot); --nw-ink-c:var(--nw-warn); }
.nw-cat { display:inline-flex; align-items:center; gap:6px; font-weight:600; color:var(--nw-ink-c); white-space:nowrap; }
.nw-cat::before, .nw-seg-dot::before { content:""; width:7px; height:7px; border-radius:50%; background:var(--nw-dot); flex:none; }
.nw-pin { display:inline-flex; align-items:center; gap:5px; color:var(--nw-brand); font-weight:600; white-space:nowrap; }
.nw-ico { width:14px; height:14px; flex:none; }
.nw-ico-fill { fill:currentColor; }
.nw-ico-line { fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.nw-meta { display:flex; flex-wrap:wrap; align-items:center; gap:4px 14px; font-size:.8125rem; color:var(--nw-muted); }
.nw-num { font-variant-numeric:tabular-nums; }
.nw-unread-dot { width:8px; height:8px; border-radius:50%; background:var(--nw-brand); flex:none; margin-top:calc(.75em - 4px); }
.nw-btn { height:44px; padding:0 18px; border-radius:12px; border:1px solid var(--nw-line2); background:#fff; color:var(--nw-ink2); font:inherit; font-size:.875rem;
  font-weight:600; display:inline-flex; align-items:center; justify-content:center; gap:8px; cursor:pointer; white-space:nowrap; transition:background-color .15s, border-color .15s; }
.nw-btn:hover { background:#fafafa; border-color:#9ca3af; }
.nw-btn.sm { height:36px; padding:0 14px; border-radius:10px; }
.nw-btn.pri { background:var(--nw-brand); border-color:var(--nw-brand); color:#fff; }
.nw-btn.pri:hover { background:#7f1d1d; }
.nw-btn.dark { background:var(--nw-ink); border-color:var(--nw-ink); color:#fff; }
.nw-btn.danger { color:var(--nw-brand); border-color:var(--nw-brand-line); }
.nw-btn.danger:hover { background:var(--nw-brand-soft); }
.nw-btn:disabled { opacity:.5; cursor:not-allowed; }
.nw :is(.nw-btn, button, a, input, select, summary):focus-visible { outline:2px solid var(--nw-brand); outline-offset:2px; }
.nw-link { padding:0; border:0; background:none; font:inherit; font-size:.8125rem; font-weight:600; color:var(--nw-ink); cursor:pointer;
  text-decoration:underline; text-underline-offset:3px; text-decoration-color:var(--nw-line2); }
.nw-link:hover { text-decoration-color:currentColor; }
.nw-card { background:#fff; border:1px solid var(--nw-card-line); border-radius:16px; box-shadow:var(--nw-lift); }
.nw-panel { background:#fff; border:1px solid var(--nw-card-line); border-radius:16px; padding:20px; display:flex; flex-direction:column; gap:12px; box-shadow:var(--nw-lift); }
/* Raised surfaces (design 6A): a soft two-layer shadow lifts every card off the grey page; borders stay thin. */
:is(.nw-statuschip, .nw-hero, .nw-pcard, .nw-table, .nw-editor, .nw-article, .nw-toggle) { border-color:var(--nw-card-line) !important; box-shadow:var(--nw-lift); }
.nw-pn a { box-shadow:var(--nw-lift-sm); }
.nw-panel-title { font-size:1.0625rem; font-weight:700; }
.nw-panel-sub { font-size:.8125rem; color:var(--nw-muted); margin-top:-8px !important; }
.nw-note { font-size:.875rem; color:var(--nw-muted); }
.nw-empty { padding:48px 20px; border:1px dashed var(--nw-line2); border-radius:16px; display:flex; flex-direction:column; align-items:center; gap:4px; text-align:center; color:var(--nw-muted); }
.nw-empty strong { color:var(--nw-ink); }

/* Masthead + segmented controls (shared). */
.nw-head { display:flex; align-items:flex-end; gap:16px 24px; flex-wrap:wrap; }
.nw-head-text { flex:1 1 420px; min-width:0; display:flex; flex-direction:column; gap:6px; }
.nw-sr { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.nw-head { align-items:center; }
.nw-h1 { font-size:2.5rem; line-height:1.15; font-weight:700; letter-spacing:-.02em; }
.nw-sub { color:var(--nw-ink); font-size:1rem; font-weight:700; }
.nw-statuschip { display:inline-flex; align-items:center; gap:12px; padding:10px 16px; border-radius:12px; background:#fff; border:1px solid var(--nw-line); font-size:.875rem; }
.nw-statuschip span { color:var(--nw-muted); }
.nw-led { position:relative; width:10px; height:10px; border-radius:50%; flex:none; background:var(--nw-ok-dot); }
.nw-led.is-live { background:var(--nw-bad); outline:4px solid #fee2e2; }
.nw-led.is-planned { background:var(--nw-warn-dot); }
.nw-led.is-ok { background:var(--nw-ok-dot); }
/* Live dot: a ring that keeps spreading out (ease-out, 2s). With reduced motion it only breathes in opacity, no movement. */
.nw-led.is-live::after { content:""; position:absolute; inset:0; border-radius:50%; background:var(--nw-bad); animation:nw-live 2s cubic-bezier(.16,1,.3,1) infinite; }
@keyframes nw-live { from { transform:scale(1); opacity:.6; } 75%, to { transform:scale(3); opacity:0; } }
@media (prefers-reduced-motion: reduce) {
  .nw-led.is-live::after { display:none; }
  .nw-led.is-live { animation:nw-breathe 2s ease-in-out infinite; }
}
@keyframes nw-breathe { 50% { opacity:.45; } }
.nw-seg { display:inline-flex; flex-wrap:wrap; gap:4px; padding:4px; border-radius:12px; background:#fff; border:1px solid var(--nw-card-line); box-shadow:var(--nw-lift-sm); }
.nw-seg button { height:36px; padding:0 12px; border:0; border-radius:9px; background:transparent; color:var(--nw-ink2); font:inherit; font-size:.875rem;
  display:inline-flex; align-items:center; gap:7px; cursor:pointer; white-space:nowrap; transition:background-color .15s; }
.nw-seg button:hover { background:var(--nw-soft); }
.nw-seg button.on { background:var(--nw-brand-soft); color:var(--nw-brand); font-weight:700; box-shadow:inset 0 0 0 1px var(--nw-brand-line); }
.nw-seg button.on b { color:var(--nw-brand); }
.nw-seg b { font-weight:500; color:var(--nw-faint); font-variant-numeric:tabular-nums; }
/* One line while there is room (menu open included): the search field gives up width first. */
.nw-toolbar { display:flex; align-items:center; gap:10px; flex-wrap:nowrap; }
.nw-toggle { display:inline-flex; align-items:center; gap:8px; height:44px; padding:0 14px; border-radius:12px; background:#fff; border:1px solid var(--nw-line2);
  font-size:.875rem; color:var(--nw-ink2); cursor:pointer; }
.nw-toggle input { width:16px; height:16px; margin:0; accent-color:var(--nw-brand); }
.nw-toggle b { color:var(--nw-brand); }
.nw-tools { margin-left:auto; flex:1 1 auto; min-width:0; display:flex; gap:8px; flex-wrap:nowrap; align-items:center; justify-content:flex-end; }
.nw-tools .nw-search { flex:1 1 220px; min-width:130px; max-width:17rem; width:auto; margin:0; }
.nw-tools .nw-system { flex:0 1 11rem; min-width:7.5rem; width:auto; margin:0; }
.nw-toolbar > .nw-seg, .nw-toolbar > .nw-toggle { flex:none; }

/* Portal feed. */
.nw-live { display:flex; align-items:center; gap:16px; flex-wrap:wrap; padding:16px 20px; border-radius:14px; background:var(--nw-brand-soft); border:1px solid var(--nw-brand-line); }
.nw-live-text { flex:1 1 420px; min-width:0; }
.nw-live-when { font-size:.8125rem; color:var(--nw-brand); font-weight:600; }
.nw-live-title { font-size:1rem; font-weight:600; overflow-wrap:anywhere; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.nw-live-body { font-size:.875rem; color:var(--nw-muted); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; }
.nw-live a { font-size:.875rem; font-weight:600; color:var(--nw-brand); }
.nw-layout { display:grid; align-items:start; }
.nw-stream { min-width:0; display:flex; flex-direction:column; gap:28px; }
.nw-pinned { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.nw-hero { grid-column:1 / -1; display:flex; flex-direction:column; gap:12px; padding:32px; border-radius:18px; background:#fff; border:1px solid var(--nw-line);
  box-shadow:0 1px 2px rgba(0,0,0,.04), 0 10px 28px -16px rgba(0,0,0,.18); transition:border-color .15s; }
.nw-hero:hover, .nw-pcard:hover { border-color:var(--nw-line2); }
.nw-hero-title { font-size:1.75rem; line-height:1.3; font-weight:700; letter-spacing:-.015em; display:flex; gap:12px; align-items:flex-start; overflow-wrap:anywhere; }
.nw-hero-title > span:last-child { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.nw-hero-ex { font-size:1rem; line-height:1.7; color:var(--nw-muted); max-width:75ch; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; }
.nw-hero-foot { display:flex; align-items:center; gap:12px; flex-wrap:wrap; justify-content:space-between; margin-top:4px; }
.nw-hero-go { display:inline-flex; align-items:center; gap:8px; height:40px; padding:0 16px; border-radius:10px; background:var(--nw-ink); color:#fff; font-size:.875rem; font-weight:600; }
.nw-hero + .nw-pcard:last-child { grid-column:1 / -1; }
.nw-pcard { display:flex; flex-direction:column; gap:8px; padding:22px 24px; border-radius:16px; background:#fff; border:1px solid var(--nw-line); transition:border-color .15s; min-width:0; }
.nw-pcard-title { font-size:1.125rem; line-height:1.45; font-weight:700; display:flex; gap:10px; align-items:flex-start; overflow-wrap:anywhere; }
.nw-pcard-title > span:last-child { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.nw-pcard-ex { font-size:.875rem; color:var(--nw-muted); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; }
.is-unread :is(.nw-hero-title, .nw-pcard-title, .nw-item-title) { font-weight:700; }
.nw-feed { display:flex; flex-direction:column; }
.nw-feed-title { font-size:1.375rem; font-weight:700; letter-spacing:-.01em; margin-bottom:4px !important; }
.nw-day { display:flex; align-items:center; gap:14px; margin:20px 0 12px; }
.nw-feed-title + .nw-day, .nw-feed > .nw-day:first-child { margin-top:8px; }
.nw-day-chip { display:inline-flex; align-items:baseline; gap:8px; padding:6px 14px; border-radius:10px; background:var(--nw-ink); color:#fff; }
.nw-day-chip b { font-size:1.375rem; line-height:1.2; letter-spacing:-.02em; font-variant-numeric:tabular-nums; }
.nw-day-chip span { font-size:.875rem; font-weight:500; }
.nw-day-rule { flex:1; height:1px; background:var(--nw-line2); }
.nw-day-count { font-size:.8125rem; color:var(--nw-muted); font-weight:500; }
/* Each news item is its own card with air between them; the day header above still groups them. */
.nw-item { display:flex; flex-direction:column; gap:6px; padding:20px 24px; margin-bottom:12px; background:#fff; border:1px solid var(--nw-card-line);
  border-radius:16px; transition:background-color .15s, border-color .15s; min-width:0; box-shadow:var(--nw-lift); }
.nw-item:hover { background:#fafafa; }
.nw-item-title { display:flex; align-items:flex-start; gap:10px; font-size:1.0625rem; line-height:1.5; font-weight:700; overflow-wrap:anywhere; }
.nw-item-title > span:last-child { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.nw-item-ex { font-size:.875rem; color:var(--nw-muted); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; max-width:80ch; }
.nw-more { align-self:center; margin-top:20px; }
/* The rail keeps its own scroll, so service status and holidays stay reachable however long the feed is. */
.nw-rail { position:sticky; top:16px; display:flex; flex-direction:column; gap:20px; min-width:0; max-height:calc(100vh - 96px); overflow-y:auto;
  overscroll-behavior:contain; scrollbar-width:thin; padding:2px 8px 14px; margin:-2px -8px 0; }
.nw-tl { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:16px; }
.nw-tl { gap:6px; }
.nw-tl-item { width:100%; display:grid; grid-template-columns:12px minmax(0,1fr); gap:12px; padding:10px 12px; margin:0 -12px; box-sizing:content-box; max-width:100%;
  border:0; border-radius:12px; background:transparent; font:inherit; color:inherit; text-align:left; cursor:pointer; transition:background-color .15s; }
.nw-tl-item:hover { background:var(--nw-soft); }
.nw-tl-item:focus-visible { outline:2px solid var(--nw-brand); outline-offset:0; }
.nw-tl-item .nw-led { margin-top:6px; }
.nw-tl-text { min-width:0; display:flex; flex-direction:column; gap:2px; }
/* Arrived here from "follow the status": the notice glows twice, then settles (colour only, so it also reads with reduced motion). */
.nw-tl-item.is-flash { animation:nw-flash 2.2s cubic-bezier(.16,1,.3,1); }
@keyframes nw-flash {
  0% { background:#fee2e2; box-shadow:0 0 0 0 rgba(220,43,43,.45); }
  25% { background:#fee2e2; box-shadow:0 0 0 6px rgba(220,43,43,0); }
  40% { background:#fef2f2; box-shadow:0 0 0 0 rgba(220,43,43,.35); }
  65% { background:#fef2f2; box-shadow:0 0 0 6px rgba(220,43,43,0); }
  100% { background:transparent; box-shadow:none; }
}
.nw-tl-when { font-size:.75rem; font-weight:600; }
.nw-tl-when.is-live { color:var(--nw-brand); } .nw-tl-when.is-planned { color:var(--nw-warn); } .nw-tl-when.is-ok { color:var(--nw-ok); }
.nw-tl-title { font-size:.875rem; font-weight:600; overflow-wrap:anywhere; }
.nw-tl-body { font-size:.8125rem; color:var(--nw-muted); white-space:pre-line; overflow-wrap:anywhere; }
.nw-tl-body.is-folded { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.nw-tl-body.is-hidden { display:none; }
.nw-cal-head { display:flex; align-items:center; gap:8px; }
.nw-cal-nav { width:32px; height:32px; border-radius:8px; border:1px solid var(--nw-line); background:#fff; display:grid; place-items:center; cursor:pointer; color:var(--nw-ink2); }
.nw-cal-nav:hover { border-color:var(--nw-line2); }
.nw-cal-month { flex:1; text-align:center; font-size:.875rem; font-weight:600; }
.nw-cal-month b { color:var(--nw-brand); }
.nw-cal-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:2px; text-align:center; }
.nw-cal-wd { font-size:.75rem; color:var(--nw-faint); padding-bottom:2px; }
.nw-cal-d { height:34px; display:grid; place-items:center; border-radius:9px; font-size:.8125rem; font-variant-numeric:tabular-nums; }
.nw-cal-d.is-weekend { color:#9ca3af; }
.nw-cal-d.is-today { box-shadow:inset 0 0 0 1.5px var(--nw-ink); font-weight:600; }
.nw-cal-d.is-holiday { background:var(--nw-brand); color:#fff; font-weight:700; }
.nw-hols { list-style:none; margin:0; padding:14px 0 0; border-top:1px solid #e5e7eb; display:flex; flex-direction:column; gap:10px; font-size:.8125rem; }
.nw-hols li { display:grid; grid-template-columns:4.25rem minmax(0,1fr); gap:10px; }
.nw-hols b { color:var(--nw-brand); }
.nw-hols span { overflow-wrap:anywhere; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }

/* Article. */
.nw-back { display:inline-flex; align-items:center; gap:6px; font-size:.875rem; color:var(--nw-muted) !important; }
.nw-back:hover { color:var(--nw-ink) !important; }
.nw-article-wrap { display:grid; align-items:start; }
.nw-article { padding:44px 52px 52px; border-radius:20px; background:#fff; border:1px solid var(--nw-line); min-width:0; }
.nw-article-title { font-size:2rem; line-height:1.35; font-weight:700; letter-spacing:-.02em; margin-top:14px !important; max-width:34em; overflow-wrap:anywhere; text-wrap:balance; }
.nw-byline { display:flex; align-items:center; gap:12px; margin-top:20px; padding-bottom:26px; border-bottom:1px solid #e5e7eb; font-size:.875rem; color:var(--nw-muted); }
.nw-byline strong { display:block; color:var(--nw-ink); font-weight:600; }
.nw-avatar { width:36px; height:36px; border-radius:50%; background:var(--nw-brand-soft); color:var(--nw-brand); display:grid; place-items:center; font-weight:700; font-size:.8125rem; flex:none; }
.nw-prose { max-width:68ch; margin-top:28px; font-size:1.0625rem; line-height:1.85; color:#1f2937; overflow-wrap:anywhere; }
.nw-prose :is(p, ul, ol, blockquote, pre, table) { margin:0 0 1.1em; }
.nw-prose h1, .nw-prose h2 { font-size:1.5rem; line-height:1.4; font-weight:700; letter-spacing:-.01em; color:var(--nw-ink); margin:1.6em 0 .5em; scroll-margin-top:24px; }
.nw-prose h3 { font-size:1.2rem; font-weight:700; color:var(--nw-ink); margin:1.4em 0 .4em; }
.nw-prose > :first-child, .nw-prose > div > :first-child { margin-top:0; }
.nw-prose ul { list-style:disc; padding-left:1.5em; } .nw-prose ol { list-style:decimal; padding-left:1.5em; }
.nw-prose li { margin-bottom:.35em; }
.nw-prose a { color:var(--nw-brand); text-decoration:underline; text-underline-offset:3px; }
.nw-prose blockquote { padding:16px 20px; border:0; border-radius:14px; background:var(--nw-warn-soft); color:#7c2d12; font-size:1rem; }
.nw-prose blockquote > :last-child { margin-bottom:0; }
.nw-prose code { font-family:ui-monospace, Consolas, monospace; font-size:.9em; background:#f3f4f6; padding:2px 6px; border-radius:6px; }
.nw-prose pre { background:#f3f4f6; padding:14px 16px; border-radius:12px; overflow-x:auto; } .nw-prose pre code { background:none; padding:0; }
.nw-prose hr { border:0; border-top:1px solid var(--nw-line); margin:2em 0; }
.nw-prose table { border-collapse:collapse; display:block; overflow-x:auto; } .nw-prose :is(th,td) { border:1px solid var(--nw-line); padding:6px 10px; }
.nw-pn { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:44px; padding-top:28px; border-top:1px solid #e5e7eb; }
.nw-pn a { display:flex; flex-direction:column; gap:4px; padding:16px 18px; border-radius:12px; border:1px solid var(--nw-line); min-width:0; }
.nw-pn a:hover { border-color:var(--nw-line2); }
.nw-pn a.is-next { grid-column:2; text-align:right; }
.nw-pn small { font-size:.8125rem; color:var(--nw-muted); }
.nw-pn span { font-size:.9375rem; font-weight:600; overflow-wrap:anywhere; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.nw-aside { position:sticky; top:16px; display:flex; flex-direction:column; gap:28px; min-width:0; }
.nw-aside h2 { font-size:.875rem; font-weight:700; margin-bottom:10px !important; }
.nw-toc { list-style:none; margin:0; padding:0; border-left:1px solid var(--nw-line); }
.nw-toc button { display:block; width:100%; text-align:left; padding:6px 14px; border:0; background:none; font:inherit; font-size:.875rem; color:var(--nw-muted); cursor:pointer; overflow-wrap:anywhere; }
.nw-toc button:hover { color:var(--nw-ink); }
.nw-toc button.on { color:var(--nw-ink); font-weight:600; margin-left:-1px; border-left:2px solid var(--nw-brand); }
.nw-related-box { padding:16px 18px 6px; }
.nw-related-box h2 { padding-bottom:10px; margin-bottom:0 !important; border-bottom:1px solid var(--nw-line); font-size:.9375rem !important; }
.nw-related { display:flex; flex-direction:column; }
.nw-related a { display:flex; flex-direction:column; gap:3px; padding:12px 0; border-top:1px solid var(--nw-line); }
.nw-related a:first-child { border-top:0; }
.nw-related a:hover strong { color:var(--nw-brand); }
.nw-related strong { font-size:.875rem; font-weight:500; line-height:1.5; color:var(--nw-ink2); overflow-wrap:anywhere; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.nw-related small { font-size:.75rem; color:var(--nw-muted); }

/* Staff list. */
.nw-tabs { display:flex; gap:24px; border-bottom:1px solid var(--nw-line); overflow-x:auto; scrollbar-width:none; }
.nw-tabs button { height:44px; padding:0 2px; border:0; border-bottom:2px solid transparent; margin-bottom:-1px; background:none; font:inherit; font-size:.9375rem; color:var(--nw-muted);
  cursor:pointer; display:inline-flex; align-items:center; gap:8px; white-space:nowrap; }
.nw-tabs button:hover { color:var(--nw-ink); }
.nw-tabs button.on { border-bottom-color:var(--nw-brand); color:var(--nw-ink); font-weight:700; }
.nw-badge { min-width:20px; height:20px; padding:0 6px; border-radius:99px; background:var(--nw-brand-soft); color:var(--nw-brand); font-size:.75rem; font-weight:700; display:inline-grid; place-items:center; }
.nw-table { position:relative; background:#fff; border:1px solid var(--nw-line); border-radius:16px; }
.nw-bulk { display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:12px 20px; background:var(--nw-ink); color:#fff; border-radius:15px 15px 0 0; font-size:.875rem; }
.nw-bulk button { height:32px; padding:0 12px; border-radius:8px; border:1px solid #4b5563; background:transparent; color:#fff; font:inherit; cursor:pointer; }
.nw-bulk button:hover { background:rgba(255,255,255,.08); }
.nw-bulk button.is-danger { border-color:var(--nw-bad); background:var(--nw-bad); font-weight:600; }
.nw-bulk button.is-quiet { margin-left:auto; border-color:transparent; color:#d1d5db; }
/* Rows: a clear 1px rule between them, a little more height, and a hover tint so the eye can follow one row across. */
.nw-row { position:relative; display:grid; grid-template-columns:28px minmax(0,1fr) 200px 96px 170px 84px; gap:16px; align-items:center; padding:16px 20px; border-top:1px solid var(--nw-line2); transition:background-color .12s; }
.nw-row:not(.head):hover { background:#fafafa; }
.nw-sort button { display:inline-flex; align-items:center; gap:4px; padding:4px 6px; margin:-4px -6px; border:0; border-radius:6px; background:none; font:inherit; color:inherit; cursor:pointer; }
.nw-sort button:hover { background:var(--nw-soft); color:var(--nw-ink); }
.nw-sort button span { color:#9ca3af; font-size:.75rem; }
.nw-sort.on button { color:var(--nw-ink); font-weight:700; } .nw-sort.on button span { color:var(--nw-brand); }
.nw-recent { display:flex; flex-direction:column; gap:2px; padding:10px 16px; border-top:1px solid var(--nw-line); }
.nw-recent:first-child { border-top:0; }
.nw-recent a { font-size:.875rem; font-weight:600; overflow-wrap:anywhere; }
.nw-recent a:hover { color:var(--nw-brand); }
.nw-row.head + .nw-row { border-top-color:var(--nw-line2); }
.nw-row.head { border-top:0; padding-top:10px; padding-bottom:10px; font-size:.75rem; color:var(--nw-faint); background:#fafafa; border-radius:15px 15px 0 0; }
.nw-bulk + .nw-row.head { border-radius:0; }
.nw-row.is-picked { background:var(--nw-brand-soft); }
.nw-row:last-child { border-radius:0 0 15px 15px; }
.nw-row input[type="checkbox"] { width:16px; height:16px; margin:0; accent-color:var(--nw-brand); }
.nw-row-main { min-width:0; display:flex; flex-direction:column; gap:3px; cursor:pointer; }
.nw-row-title { display:flex; align-items:center; gap:8px; min-width:0; font-size:.9375rem; font-weight:600; }
.nw-row-title > span:last-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.nw-row-title .nw-ico { color:var(--nw-brand); }
.nw-row-sub { display:flex; align-items:center; gap:10px; min-width:0; font-size:.8125rem; color:var(--nw-muted); }
.nw-row-sub > span:last-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.nw-status { display:flex; flex-direction:column; gap:2px; font-size:.75rem; color:var(--nw-muted); }
.nw-pill { align-self:flex-start; display:inline-flex; align-items:center; gap:6px; padding:2px 10px; border-radius:99px; font-size:.75rem; font-weight:600; }
.nw-pill::before { content:""; width:6px; height:6px; border-radius:50%; background:currentColor; }
.nw-pill.s-published { color:var(--nw-ok); background:var(--nw-ok-soft); }
.nw-pill.s-scheduled { color:var(--nw-info); background:var(--nw-info-soft); }
.nw-pill.s-draft { color:var(--nw-warn); background:var(--nw-warn-soft); }
.nw-pill.s-expired, .nw-pill.s-archived { color:var(--nw-muted); background:#f3f4f6; }
.nw-reads { font-size:.8125rem; color:var(--nw-muted); } .nw-reads b { color:var(--nw-ink); font-size:.9375rem; }
.nw-who { display:flex; align-items:center; gap:8px; min-width:0; font-size:.8125rem; }
.nw-who > span:last-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.nw-initials { width:28px; height:28px; border-radius:50%; background:var(--nw-info-soft); color:var(--nw-info); display:grid; place-items:center; font-size:.6875rem; font-weight:700; flex:none; }
.nw-acts { display:flex; justify-content:flex-end; gap:4px; }
.nw-icon { width:36px; height:36px; border-radius:9px; border:1px solid transparent; background:transparent; color:var(--nw-muted); display:grid; place-items:center; cursor:pointer; }
.nw-icon:hover, .nw-icon[aria-expanded="true"] { background:#f6f7f9; border-color:var(--nw-line2); color:var(--nw-ink); }
.nw-icon[aria-pressed="true"] { color:var(--nw-brand); }
.nw-menu { position:absolute; right:20px; top:calc(100% - 8px); z-index:20; width:220px; padding:6px; border-radius:12px; background:#fff; border:1px solid var(--nw-line);
  box-shadow:0 12px 32px -8px rgba(0,0,0,.24); display:flex; flex-direction:column; }
.nw-menu button { text-align:left; height:38px; padding:0 12px; border:0; border-radius:8px; background:transparent; font:inherit; font-size:.875rem; color:var(--nw-ink); cursor:pointer; }
.nw-menu button:hover, .nw-menu button:focus-visible { background:#f6f7f9; outline:none; }
.nw-menu hr { border:0; height:1px; background:#e5e7eb; margin:6px 4px; }
.nw-menu button.is-danger { color:var(--nw-brand); font-weight:600; }
.nw-table-foot { display:flex; align-items:center; gap:12px; padding:14px 20px; font-size:.8125rem; color:var(--nw-muted); border-top:1px solid #f3f4f6; }
.nw-table-foot .nw-btn { margin-left:auto; }

/* Composer. */
.nw-compose-bar { display:flex; align-items:center; gap:12px 16px; flex-wrap:wrap; padding-bottom:4px; }
.nw-compose-bar strong { font-size:1.125rem; }
.nw-compose-bar .nw-sep { width:1px; height:24px; background:var(--nw-line); }
.nw-saved { font-size:.8125rem; color:var(--nw-muted); }
.nw-compose-bar .nw-push { margin-left:auto; display:flex; gap:8px; flex-wrap:wrap; }
.nw-compose { display:grid; gap:24px; align-items:start; }
.nw-editor { background:#fff; border:1px solid var(--nw-line); border-radius:18px; overflow:hidden; min-width:0; }
.nw-editor-head { padding:24px 28px 8px; }
.nw-editor-head .ckn-input__label, .nw-editor-head label { font-size:.8125rem; }
.nw-title-input textarea { font-size:1.625rem !important; line-height:1.35 !important; font-weight:700; letter-spacing:-.015em; border:0 !important; border-bottom:1px solid #e5e7eb !important; border-radius:0 !important;
  padding:6px 0 12px !important; box-shadow:none !important; outline:none !important; background:transparent !important; resize:none !important; field-sizing:content; min-height:0 !important; }
.nw-mdbar { display:flex; align-items:center; gap:4px; flex-wrap:wrap; padding:8px 20px; border-top:1px solid #e5e7eb; border-bottom:1px solid #e5e7eb; background:#fafafa; }
.nw-mdbar .nw-seg { margin-right:8px; padding:3px; } .nw-mdbar .nw-seg button { height:30px; font-size:.8125rem; padding:0 12px; }
.nw-toolset { display:inline-flex; align-items:center; gap:2px; flex-wrap:wrap; }
.nw-tool { width:34px; height:34px; border:0; border-radius:8px; background:transparent; color:var(--nw-ink2); font:inherit; font-weight:700; cursor:pointer; display:grid; place-items:center; }
.nw-tool:hover { background:var(--nw-soft); }
.nw-tool.i { font-style:italic; font-weight:500; }
.nw-tool-sep { width:1px; height:20px; background:var(--nw-line); margin:0 4px; }
.nw-mdbar .nw-help { margin-left:auto; font-size:.8125rem; color:var(--nw-muted); }
.nw-panes { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); min-height:520px; }
.nw-panes.m-write, .nw-panes.m-preview { grid-template-columns:minmax(0,1fr); }
.nw-pane-src { border-right:1px solid #e5e7eb; background:#fafafa; }
.nw-panes.m-write .nw-pane-src { border-right:0; }
.nw-pane-src textarea { min-height:520px !important; border:0 !important; border-radius:0 !important; background:transparent !important; box-shadow:none !important; outline:none !important;
  padding:22px 26px !important; font-size:.9375rem !important; line-height:1.8 !important; resize:vertical; }
.nw-pane-src .ckn-textarea__label { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.nw-pane-view { padding:22px 30px; min-width:0; }
.nw-pane-view .nw-prose { margin-top:0; font-size:1rem; }
.nw-pane-empty { color:var(--nw-faint); font-size:.9375rem; }
.nw-editor-foot { display:flex; align-items:center; gap:16px; flex-wrap:wrap; padding:10px 24px; border-top:1px solid #e5e7eb; font-size:.75rem; color:var(--nw-muted); }
.nw-editor-foot code { font-family:ui-monospace, Consolas, monospace; }
.nw-editor-foot span:last-child { margin-left:auto; }
.nw-side { position:sticky; top:16px; display:flex; flex-direction:column; gap:16px; min-width:0; }
.nw-catpick { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.nw-catpick button { height:42px; border-radius:10px; border:1px solid var(--nw-line2); background:#fff; color:var(--nw-ink2); font:inherit; font-size:.875rem;
  display:inline-flex; align-items:center; justify-content:center; gap:7px; cursor:pointer; }
.nw-catpick button.on { border:1.5px solid var(--nw-brand); background:var(--nw-brand-soft); color:var(--nw-brand); font-weight:600; }
.nw-side .nw-seg { display:flex; } .nw-side .nw-seg button { flex:1; justify-content:center; }
.nw-side :is(ckn-input, ckn-select, ckn-checkbox, ckn-checkbox-group) { margin:0; }
.nw-preview-card { padding:14px 16px; border-radius:12px; background:var(--nw-bg); display:flex; flex-direction:column; gap:6px; }
.nw-preview-card .nw-item-title { font-size:.9375rem; }
.nw-history summary { cursor:pointer; font-weight:600; font-size:.875rem; }
.nw-history ol { list-style:none; margin:10px 0 0; padding:0; display:flex; flex-direction:column; gap:8px; font-size:.8125rem; }
.nw-history li { display:flex; gap:8px; flex-wrap:wrap; } .nw-history li span:last-child { color:var(--nw-muted); }
.nw-danger { display:flex; gap:8px; flex-wrap:wrap; }
.nw-restore { display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:12px 16px; border-radius:12px; background:var(--nw-info-soft); color:#1e40af; font-size:.875rem; }
.nw-restore .nw-push { margin-left:auto; display:flex; gap:8px; }

/* Staff: service status tab (design 7, toned down). */
.nw-st-layout { display:grid; grid-template-columns:minmax(0,1fr); gap:24px; align-items:start; }
.nw-prose-sm { margin-top:0 !important; font-size:.9375rem !important; color:var(--nw-muted); max-width:none; }
.nw-st-main { min-width:0; display:flex; flex-direction:column; gap:22px; }
.nw-st-h { display:flex; align-items:center; gap:8px; font-size:1rem; font-weight:700; margin-bottom:10px !important; }
.nw-st-h b { font-weight:500; color:var(--nw-muted); }
.nw-dot { width:8px; height:8px; border-radius:50%; flex:none; background:var(--nw-dot-c, var(--nw-faint)); }
.nw-dot.is-live { --nw-dot-c:var(--nw-bad); } .nw-dot.is-planned { --nw-dot-c:var(--nw-warn-dot); } .nw-dot.is-ok { --nw-dot-c:var(--nw-ok-dot); }
.nw-live-card { overflow:hidden; }
.nw-live-card + .nw-live-card { margin-top:12px; }
.nw-live-head { display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:10px 20px; background:var(--nw-brand-soft); border-bottom:1px solid #fee2e2;
  color:var(--nw-brand); font-size:.8125rem; font-weight:600; }
.nw-live-head span:nth-child(2) { color:var(--nw-muted); font-weight:500; }
.nw-live-seen { margin-left:auto; padding:1px 10px; border-radius:99px; background:#fff; border:1px solid var(--nw-brand-line); font-weight:500; }
.nw-livecard-body { padding:18px 20px; display:flex; flex-direction:column; gap:10px; }
.nw-livecard-body h3 { font-size:1.125rem; font-weight:700; overflow-wrap:anywhere; }
.nw-livecard-body p { color:var(--nw-muted); white-space:pre-line; overflow-wrap:anywhere; }
.nw-chips { display:flex; gap:6px; flex-wrap:wrap; align-items:center; font-size:.8125rem; }
.nw-chips > b { color:var(--nw-muted); font-weight:600; }
.nw-chip { padding:2px 10px; border-radius:99px; background:var(--nw-soft); border:1px solid var(--nw-line); }
.nw-actions { display:flex; gap:8px; flex-wrap:wrap; padding-top:12px; border-top:1px solid var(--nw-line); }
.nw-plan { display:grid; grid-template-columns:76px minmax(0,1fr) auto; gap:18px; align-items:center; padding:16px 20px; border-top:1px solid var(--nw-line); }
.nw-plan:first-child { border-top:0; }
.nw-tile { text-align:center; border-radius:12px; overflow:hidden; border:1px solid var(--nw-line); background:#fff; }
.nw-tile small { display:block; background:var(--nw-soft); color:var(--nw-ink2); font-size:.75rem; font-weight:600; padding:2px 0; border-bottom:1px solid var(--nw-line); }
.nw-tile b { display:block; font-size:1.5rem; line-height:1.3; font-variant-numeric:tabular-nums; }
.nw-tile span { display:block; font-size:.75rem; color:var(--nw-muted); padding-bottom:4px; }
.nw-tile.is-red { border-color:var(--nw-brand-line); } .nw-tile.is-red small { background:var(--nw-bad); color:#fff; border-bottom:0; }
.nw-plan-main { min-width:0; display:flex; flex-direction:column; gap:4px; }
.nw-plan-meta { display:flex; gap:8px; align-items:center; flex-wrap:wrap; font-size:.8125rem; }
.nw-plan-meta .nw-chip { font-size:.75rem; }
.nw-soon { color:var(--nw-warn); font-weight:600; }
.nw-plan-title { font-size:1rem; font-weight:700; overflow-wrap:anywhere; }
.nw-plan-who { font-size:.8125rem; color:var(--nw-muted); }
.nw-plan-acts { display:flex; gap:6px; flex-wrap:wrap; }
/* Past and cancelled notices: full-width rows (state, title and who, window), ruled like the news table. */
.nw-past-row { padding:14px 20px; border-top:1px solid var(--nw-line2); display:grid; grid-template-columns:150px minmax(0,1fr) minmax(200px, 34%); gap:4px 18px; align-items:center; }
.nw-past-row:first-child { border-top:0; }
.nw-past-row .nw-meta { grid-column:1; grid-row:1 / span 2; }
.nw-past-row .nw-past-title { grid-column:2; }
.nw-past-row .nw-plan-who { grid-column:2; }
.nw-past-row .nw-past-when { grid-column:3; grid-row:1 / span 2; text-align:right; color:var(--nw-muted); font-size:.8125rem; }
@container nw (max-width: 760px) { .nw-past-row { grid-template-columns:minmax(0,1fr); } .nw-past-row > * { grid-column:1 !important; grid-row:auto !important; text-align:left !important; } }
.nw-past-title { font-weight:600; color:var(--nw-ink2); overflow-wrap:anywhere; }
.nw-more-link { display:inline-flex; align-items:center; gap:8px; padding:0; border:0; background:none; font:inherit; font-size:1rem; font-weight:700; color:var(--nw-ink); cursor:pointer; }
.nw-more-link span { font-size:.8125rem; font-weight:500; color:var(--nw-muted); }
.nw-st-aside { position:sticky; top:16px; display:flex; flex-direction:column; gap:12px; min-width:0; }
.nw-preview-box { overflow:hidden; }
.nw-preview-box > h3 { padding:12px 16px; background:var(--nw-soft); border-bottom:1px solid var(--nw-line); font-size:.9375rem; font-weight:700; }
.nw-preview-list { padding:12px; display:flex; flex-direction:column; gap:8px; }
.nw-preview-item { padding:10px 12px; border-radius:10px; border:1px solid var(--nw-line); background:#fff; }
.nw-preview-item small { display:inline-flex; align-items:center; gap:6px; font-size:.6875rem; font-weight:700; }
.nw-preview-item small.is-live { color:var(--nw-brand); } .nw-preview-item small.is-planned { color:var(--nw-warn); }
.nw-preview-item strong { display:block; margin-top:4px; font-size:.8125rem; overflow-wrap:anywhere; }

/* Staff: company holidays tab (design 8). */
.nw-hol-bar { display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:12px 14px; }
.nw-hol-bar strong.nw-year { font-size:1.25rem; min-width:4rem; text-align:center; font-variant-numeric:tabular-nums; }
.nw-hol-bar .nw-push { margin-left:auto; display:flex; gap:8px; flex-wrap:wrap; }
.nw-hol-sum b.is-up { color:var(--nw-brand); }
.nw-hol-layout { display:grid; grid-template-columns:minmax(0,1fr) clamp(280px, 28%, 340px); gap:24px; align-items:start; }
.nw-hol-year { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:14px; min-width:0; }
.nw-hol-month { padding:12px 12px 10px; border-radius:14px; background:#fff; border:1px solid var(--nw-line); box-shadow:var(--nw-lift-sm); }
.nw-hol-month.is-now { border-color:var(--nw-ink); }
.nw-hol-month-head { display:flex; align-items:baseline; gap:6px; margin-bottom:8px; font-size:.875rem; font-weight:700; }
.nw-hol-month-head span { margin-left:auto; font-size:.75rem; color:var(--nw-brand); }
.nw-hol-month-head span.is-past { color:var(--nw-faint); }
.nw-hol-grid { display:grid; grid-template-columns:repeat(7, minmax(0,1fr)); gap:2px; text-align:center; }
.nw-hol-wd { font-size:.6875rem; font-weight:600; color:var(--nw-faint); }
.nw-hol-d { height:24px; display:grid; place-items:center; border-radius:6px; font-size:.75rem; font-variant-numeric:tabular-nums; }
.nw-hol-d.is-weekend { color:var(--nw-faint); }
.nw-hol-d.is-past { color:#9ca3af; }
.nw-hol-d.is-holiday { background:var(--nw-bad); color:#fff; font-weight:700; }
.nw-hol-d.is-holiday.is-past { background:var(--nw-line); color:var(--nw-muted); }
.nw-hol-d.is-today { box-shadow:inset 0 0 0 1.5px var(--nw-ink); font-weight:700; }
.nw-hol-aside { position:sticky; top:16px; display:flex; flex-direction:column; gap:14px; min-width:0; }
.nw-hol-box { overflow:hidden; }
.nw-hol-box > h3 { display:flex; align-items:center; gap:8px; padding:12px 16px; border-bottom:1px solid var(--nw-line); font-size:.9375rem; font-weight:700; }
.nw-hol-box > h3 b { margin-left:auto; font-size:.8125rem; font-weight:500; color:var(--nw-muted); }
.nw-hol-box.is-past { box-shadow:none; }
.nw-hol-box.is-past > h3 { background:#fafafa; color:var(--nw-muted); }
.nw-hol-list { list-style:none; margin:0; padding:4px 0; }
.nw-hol-li { display:grid; grid-template-columns:46px minmax(0,1fr) auto; gap:12px; align-items:center; padding:10px 10px 10px 16px; }
.nw-hol-li.is-next { background:var(--nw-brand-soft); }
.nw-hol-li .nw-tile b { font-size:1.0625rem; line-height:26px; }
.nw-hol-li .nw-tile small { font-size:.625rem; line-height:16px; padding:0; }
.nw-hol-name { min-width:0; display:flex; flex-direction:column; }
.nw-hol-name strong { font-size:.875rem; font-weight:600; overflow-wrap:anywhere; }
.nw-hol-name span { font-size:.75rem; color:var(--nw-muted); }
.nw-hol-li.is-next .nw-hol-name span { color:var(--nw-brand); font-weight:700; }
.nw-hol-past-li { display:grid; grid-template-columns:5.5rem minmax(0,1fr) auto; gap:10px; align-items:center; padding:6px 10px 6px 16px; color:var(--nw-faint); font-size:.8125rem; }
.nw-hol-past-li span:first-child { font-weight:600; }
.nw-hol-tools { display:flex; gap:2px; }
.nw-import { padding:16px; border-radius:16px; background:#fff; border:1.5px dashed #9ca3af; display:flex; flex-direction:column; gap:8px; }
.nw-import h3 { font-size:.9375rem; font-weight:700; }

/* Staff: service-status composer. */
.nw-when { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:12px; }
.nw-quick { display:flex; gap:6px; flex-wrap:wrap; align-items:center; font-size:.8125rem; color:var(--nw-muted); }
.nw-quick button { height:30px; padding:0 10px; border-radius:8px; border:1px solid var(--nw-line2); background:#fff; font:inherit; font-size:.8125rem; color:var(--nw-ink2); cursor:pointer; }
.nw-quick button:hover { border-color:var(--nw-faint); }
.nw-st-when { padding:20px 28px 24px; border-top:1px solid var(--nw-line); display:flex; flex-direction:column; gap:12px; }
.nw-title-sm textarea { font-size:1.375rem !important; }
.nw-panes.is-short { min-height:300px; }
.nw-panes.is-short .nw-pane-src textarea { min-height:300px !important; }
.nw-hint { font-size:.8125rem; color:var(--nw-muted); }
.nw-segs4 { display:grid !important; grid-template-columns:repeat(2, minmax(0,1fr)); }
.nw-pad { padding:8px 16px 14px; }
.nw-side .nw-panel-title + .nw-seg { margin-top:-4px; }

/* Holiday import and downtime tabs of the staff page (rows inside .tkl lists). */
.news-hol { grid-template-columns:200px minmax(0,1fr); }
.news-down { grid-template-columns:minmax(0,1fr) 320px 130px; }
.news-file { display:inline-block; cursor:pointer; }
.news-file input[type="file"] { position:absolute; width:1px; height:1px; opacity:0; }
.news-file:focus-within .tkl-btn { outline:2px solid var(--tk-brand); outline-offset:2px; }
.news-upload { display:flex; flex-direction:column; gap:12px; }

/* Proportions follow the space the page really has (the left menu is usually kept open), not the window: .nw is a size
   container. Wide: content caps at 1280px and centres. Medium: rails drop under the main column as a two-up grid. */
.nw { container:nw / inline-size; }
@media (min-width: 901px) { .nw { padding-inline:max(36px, calc((100% - 1280px) / 2)); } }
.nw-layout { grid-template-columns:minmax(0,1fr) clamp(280px, 29%, 340px); gap:28px; }
.nw-compose { grid-template-columns:minmax(0,1fr) clamp(280px, 27%, 330px); }
.nw-article-wrap { grid-template-columns:minmax(0,1fr) clamp(220px, 24%, 280px); gap:clamp(24px, 4%, 48px); }
.nw-editor { container:nwed / inline-size; }
@container nwed (max-width: 760px) {
  .nw-panes { grid-template-columns:minmax(0,1fr); }
  .nw-pane-src { border-right:0; border-bottom:1px solid #e5e7eb; }
}
@container nw (max-width: 860px) {
  .nw-compose { grid-template-columns:minmax(0,1fr); }
  .nw-side { position:static; display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); align-items:start; }
}
@container nw (max-width: 1080px) {
  .nw-row { grid-template-columns:28px minmax(0,1fr) 190px 90px 84px; }
  .nw-row > .nw-who { display:none; }
}
@container nw (max-width: 980px) {
  /* Narrow: the rail dissolves so service status sits above the feed and holidays fall after it. */
  .nw-rail { display:contents; }
  .nw-rail > #news-status { order:-1; }
  .nw-rail > [data-test="portal-news-holidays"] { order:2; }
  .nw-toolbar { flex-wrap:wrap; }
  .nw-tools { flex-basis:100%; }
  .nw-layout, .nw-article-wrap, .nw-st-layout { grid-template-columns:minmax(0,1fr); }
  .nw-aside, .nw-st-aside { position:static; display:grid; grid-template-columns:repeat(auto-fit, minmax(280px, 1fr)); align-items:start; }
  .nw-hol-layout { grid-template-columns:minmax(0,1fr); }
  .nw-hol-year { grid-template-columns:repeat(2, minmax(0,1fr)); }
}
@container nw (max-width: 760px) {
  .nw-tools { margin-left:0; width:100%; }
  .nw-tools .nw-search { flex:1 1 12rem; width:auto; }
  .nw-tools .nw-system { flex:1 1 10rem; width:auto; }
  .nw-seg { flex-wrap:nowrap; overflow-x:auto; max-width:100%; scrollbar-width:none; }
  .nw-pinned { grid-template-columns:minmax(0,1fr); }
  .nw-hero { padding:20px; } .nw-hero-title { font-size:1.3125rem; }
  .nw-item { padding:14px 16px; }
  .nw-article { padding:24px 20px 28px; } .nw-article-title { font-size:1.625rem; }
  .nw-pn { grid-template-columns:minmax(0,1fr); } .nw-pn a.is-next { grid-column:auto; }
  .nw-row.head { display:none; }
  .nw-row { grid-template-columns:28px minmax(0,1fr) auto; gap:6px 12px; }
  .nw-row > :is(.nw-status, .nw-reads) { grid-column:2 / -1; }
  .nw-row > .nw-acts { grid-column:3; grid-row:1; }
  .nw-plan { grid-template-columns:64px minmax(0,1fr); } .nw-plan-acts { grid-column:1 / -1; }
  .nw-hol-year { grid-template-columns:minmax(0,1fr); }
  .news-down.head { display:none; }
  .news-down, .news-hol { grid-template-columns:minmax(0,1fr); gap:6px; }
}
@media (max-width: 900px) {
  .nw { margin:-16px; padding:20px 16px 48px; gap:16px; }
  .nw-h1 { font-size:1.875rem; }
}

.nw-read { display:flex; flex-direction:column; gap:12px; }
.nw-read .nw-prose { margin-top:4px; font-size:1rem; }

/* Lift for every surface of the news pages (feed, staff desk, composers) so nothing melts into the grey page. */
.nw :is(.nw-tools, .nw-side, .nw-when, .nw-head) :is(input, select)[data-part="control"] { box-shadow:var(--nw-lift-sm); }
.nw :is(.nw-btn, .nw-cal-nav, .nw-toggle, .nw-statuschip) { box-shadow:var(--nw-lift-sm); }
.nw .nw-btn.pri { box-shadow:0 1px 2px rgba(0,0,0,.12), 0 4px 12px -4px rgba(153,27,27,.45); }
.nw :is(.nw-live, .nw-hol-month, .nw-import, .nw-tile) { box-shadow:var(--nw-lift-sm); }
.nw .nw-live { box-shadow:var(--nw-lift); }
.nw .nw-day-chip { box-shadow:0 2px 6px -1px rgba(0,0,0,.25); }
.nw .nw-hol-month { box-shadow:var(--nw-lift); }
.nw .nw-bulk { box-shadow:0 4px 12px -4px rgba(0,0,0,.3); }
.nw .nw-empty { background:#fff; box-shadow:var(--nw-lift-sm); }
.nw .nw-pn a { box-shadow:var(--nw-lift-sm); background:#fff; }
.nw .nw-chip { box-shadow:var(--nw-lift-sm); background:#fff; }

/* Customer Portal › สัญญา MA (portal-page.ts, section "ma"): one card per agreement. */
.tkp-ma-badge { display:inline-flex; align-items:center; justify-content:center; min-width:18px; height:18px; padding:0 5px; margin-left:6px; border-radius:9px; background:var(--tk-warn); color:#fff; font-size:.6875rem; font-weight:600; }
.tkp-ma-card { background:var(--tk-surface); border:1px solid var(--tk-line); border-radius:12px; padding:16px 20px; display:flex; flex-direction:column; gap:10px; box-shadow:0 1px 2px rgba(16,24,40,.05); }
.tkp-ma-head { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.tkp-ma-code { font-family:ui-monospace, SFMono-Regular, Menlo, monospace; font-size:.9375rem; color:var(--tk-text); }
.tkp-ma-range { margin-left:auto; color:var(--tk-faint); font-size:.875rem; }
.tkp-ma-title { color:var(--tk-muted); }
.tkp-ma-bar { height:8px; border-radius:4px; background:var(--tk-surface-2); overflow:hidden; }
.tkp-ma-bar > i { display:block; height:100%; border-radius:4px; background:var(--tk-ok); }
.tkp-ma-bar.warn > i { background:var(--tk-warn); }
.tkp-ma-bar.bad > i { background:var(--tk-bad); }
.tkp-ma-chips { display:flex; gap:8px; flex-wrap:wrap; }
.tkp-ma-chip { font-size:.8125rem; padding:2px 10px; border-radius:6px; background:var(--tk-surface-2); color:var(--tk-muted); }
.tkp-ma-chip.ok { background:var(--tk-ok-soft); color:var(--tk-ok); }
.tkp-ma-foot { display:flex; gap:10px; align-items:center; flex-wrap:wrap; justify-content:space-between; }
.tkp-ma-owner { color:var(--tk-faint); font-size:.8125rem; }
.tkp-ma-actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.tkp-ma-pdf { display:block; width:100%; height:75vh; min-height:420px; border:1px solid var(--tk-line, #e4e7ec); border-radius:8px; background:var(--tk-surface-2, #f2f4f7); }
/* MA email preview read back from the editable text (ma-page.ts buildMailPreview): consecutive fact rows form one table. */
.works-ma-fact { display:grid; grid-template-columns:minmax(0,2fr) minmax(0,3fr); border:1px solid #e4e7ec; border-top:0; }
.works-ma-fact.first { border-top:1px solid #e4e7ec; border-radius:8px 8px 0 0; margin-top:12px; }
.works-ma-fact.last { border-radius:0 0 8px 8px; margin-bottom:12px; }
.works-ma-fact.first.last { border-radius:8px; }
.works-ma-fact > span { padding:8px 12px; overflow-wrap:anywhere; }
.works-ma-fact > span:first-child { background:#f8fafc; color:#475467; }
.works-ma-mail .works-ma-item { margin:4px 0 4px 8px; }
.works-ma-mail .works-ma-heading { font-weight:700; margin:16px 0 6px; }

/* New ticket page (tickets-page.ts, design "A1"): one centred card, three plain sections, compact controls. */
.tkn-page { width:100%; max-width:1180px; margin-inline:auto; gap:12px; box-sizing:border-box; }
.tkn-back { align-self:flex-start; display:inline-flex; align-items:center; gap:6px; border:0; background:none; padding:0; font:inherit; font-size:.8rem; color:var(--tk-muted, #475467); cursor:pointer; }
.tkn-back:hover { color:var(--tk-brand, #b42318); }
.tkn-page .tkl-h1 { font-size:1.2rem; font-weight:700; }
.tkl .tkn-form { padding:0; gap:0; }
.tkl .tkn-form > :not(.tkn-sec):not(.tkn-actions) { margin:14px 24px 0; }
.tkl .tkn-sec { display:flex; flex-direction:column; gap:10px; padding:16px 24px; }
.tkl .tkn-sec + .tkn-sec { border-top:1px solid var(--tk-line); }
.tkl .tkn-g3 { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:10px 14px; align-items:start; }
.tkl .tkn-g3 > * { min-width:0; }
.tkl .tkn-g3 > .tkn-channel { grid-column:span 2; }
.tkl .tkn-title-row { display:grid; grid-template-columns:minmax(0,3fr) minmax(0,1fr); gap:10px 14px; align-items:start; }
.tkl .tkn-time { flex-direction:row; flex-wrap:wrap; align-items:flex-end; gap:8px 16px; }
.tkl .tkn-time .tkn-link { margin-bottom:.6rem; }
.tkl .tkn-time .tkn-inline { width:15rem; }
.tkn-link { border:0; background:none; padding:0; font:inherit; font-size:.8rem; color:var(--tk-brand, #b42318); cursor:pointer; }
.tkn-link:hover { text-decoration:underline; }
.tkl .tkn-note { margin:0; padding:0; font-size:.75rem; color:var(--tk-muted, #475467); }
.tkl .tkn-note a { margin-left:6px; }
.tkl .tkn-files { border:0; padding:0; }
.tkn-channel { display:flex; flex-direction:column; gap:4px; }
.tkn-field-label { font-size:.75rem; font-weight:600; color:var(--tk-text, #344054); }
.tkn-chips { display:flex; flex-wrap:wrap; gap:6px; min-height:2.1rem; align-items:center; }
.tkn-chip { height:26px; padding:0 10px; border:1px solid var(--tk-line-2, #d0d5dd); border-radius:999px; background:var(--tk-surface, #fff); color:var(--tk-text, #344054); font:inherit; font-size:.72rem; cursor:pointer; }
.tkn-chip:hover { border-color:var(--tk-brand, #b42318); }
.tkn-chip.on { background:var(--tk-brand, #b42318); border-color:var(--tk-brand, #b42318); color:#fff; font-weight:600; }
.tkn-dupes { display:flex; flex-direction:column; gap:4px; padding:8px 12px; border:1px solid #fedf89; background:#fffaeb; border-radius:8px; font-size:.75rem; color:#93370d; }
.tkn-dupes a { color:inherit; text-decoration:none; display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.tkn-dupes a:hover { text-decoration:underline; }
.tkn-same { font-size:.7rem; font-weight:600; padding:0 8px; border-radius:999px; background:#93370d; color:#fff; }
.tkl .tkn-actions { margin:0; padding:12px 24px; background:#fcfcfd; border-top:1px solid var(--tk-line); border-radius:0 0 12px 12px; }
.tkl .tkn-actions .tkn-missing { margin-right:auto; font-size:.8rem; }
.tkl .tkn-form label { font-size:.75rem; }
.tkl .tkn-form :is(input, select, textarea) { font-size:.8rem; }
@media (max-width:760px) { .tkl .tkn-g3, .tkl .tkn-title-row { grid-template-columns:minmax(0,1fr); } .tkl .tkn-g3 > .tkn-channel { grid-column:auto; } }
.tkl .tkn-form select:disabled { color:#98a2b3; background:#f9fafb; }
.tkl .tkn-actions .tkn-missing.tkl-note { color:#b54708; }

/* Customer portal news v3 (canvas "P2 แก้ 3–10 + 1A + ไอคอน/2A"): one column, incident card, pinned three-week strip, monthly
   feed whose rows lead with a highlight token or the category icon. Palette from the P2 draft, scoped to .nw3; the font stays the theme's. */
.nw3 { --nw-bg:#f7f6f4; --nw-ink:#2a2627; --nw-ink2:#4d4647; --nw-muted:#6f6867; --nw-line:#e7e1de; --nw-line2:#d9d1cd; --nw-card-line:#e7e1de;
  --nw-brand:#b8314a; --nw-brand-soft:#f8ecee; --nw-crit:#a8303d; --nw-crit-bg:#fcf3f3; --nw-crit-line:#ecd2d5; --nw-crit-ink:#6f2029;
  --nw-warn:#8f5714; --nw-warn-bg:#fbf5ea; --nw-ok:#2f6f4c; --nw-ok-bg:#edf6f0; --nw-info:#3b5c9c; --nw-info-bg:#eef2fa; --nw-hol:#5b4a99; --nw-hol-bg:#f2eff9;
  --nw-lift:0 1px 2px rgba(42,38,39,.05), 0 6px 18px -10px rgba(42,38,39,.18);
  gap:16px; font-variant-numeric:tabular-nums; }
@media (min-width: 901px) { .nw3 { padding-inline:max(36px, calc((100% - 1100px) / 2)); } }
.nw3 h2, .nw3 h3, .nw3 p, .nw3 dl, .nw3 dd, .nw3 ol { margin:0; }
.nw3 .nw-btn { height:40px; border-radius:10px; }
.nw3 .nw-btn.pri { background:var(--nw-crit); border-color:var(--nw-crit); }
.nw3 .nw-btn.pri:hover { background:#8f2733; }
.nw3 .nw-btn.ghost { border-color:var(--nw-crit-line); color:var(--nw-crit-ink); }
.nw3 .nw-btn .nw-ico { width:16px; height:16px; }
.nw-top { display:flex; align-items:center; justify-content:flex-end; gap:12px; flex-wrap:wrap; }
.nw-top .nw-search { width:min(100%, 340px); }
.nw-top .nw-system { width:200px; }

/* incident */
.nw-inc { background:var(--nw-crit-bg); border:1px solid var(--nw-crit-line); border-radius:14px; padding:20px 22px; box-shadow:0 2px 8px -2px rgba(111,32,41,.12); scroll-margin-top:16px; }
.nw-inc.is-major { border-color:#e2b9be; }
.nw-inc-head { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:8px; }
.nw-state { display:inline-flex; align-items:center; gap:7px; height:26px; padding:0 10px; border-radius:13px; background:#fff; border:1px solid var(--nw-crit-line);
  color:var(--nw-crit); font-size:.8125rem; font-weight:600; }
.nw-state.is-warn { border-color:#ecdcc4; color:var(--nw-warn); }
.nw-live-dot { position:relative; width:8px; height:8px; border-radius:50%; background:currentColor; flex:none; }
.nw-live-dot::after { content:""; position:absolute; inset:0; border-radius:50%; background:currentColor; animation:nw-live 2s ease-out infinite; }
.nw-inc-sev { font-size:.8125rem; color:var(--nw-crit-ink); }
.nw-inc-title { font-size:1.25rem; font-weight:700; line-height:1.4; color:var(--nw-crit-ink); }
.nw-svcs { display:flex; gap:6px; flex-wrap:wrap; margin-top:10px; }
.nw-svcs span { font-size:.8rem; font-weight:500; padding:2px 9px; border-radius:6px; background:#fff; border:1px solid var(--nw-crit-line); color:var(--nw-crit-ink); }
.nw-inc-body { margin-top:10px !important; color:#4a2a2e; max-width:70ch; overflow-wrap:anywhere; }
.nw-facts { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:1px; margin-top:16px !important; background:var(--nw-crit-line);
  border:1px solid var(--nw-crit-line); border-radius:10px; overflow:hidden; }
.nw-facts > div { background:#fff; padding:10px 14px; }
.nw-facts dt { font-size:.8rem; color:#7a4e53; }
.nw-facts dd { font-weight:600; color:var(--nw-crit-ink); margin-top:2px; }
.nw-facts dd small { font-weight:400; font-size:.8rem; color:#7a4e53; }
.nw-iacts { display:flex; gap:10px; margin-top:16px; flex-wrap:wrap; align-items:flex-start; }
.nw-follow-wrap { position:relative; }
.nw-follow.is-on { background:#fff; color:var(--nw-crit-ink); border-color:var(--nw-crit-line); }
.nw-fmenu { position:absolute; z-index:20; top:calc(100% + 6px); left:0; width:min(340px, 86vw); background:#fff; border:1px solid var(--nw-line);
  border-radius:12px; box-shadow:0 12px 32px -8px rgba(42,38,39,.28); padding:6px; display:flex; flex-direction:column; }
.nw-fmenu button { height:auto; min-height:0; line-height:1.45; display:grid; grid-template-columns:20px 1fr; gap:8px; align-items:start; text-align:left; padding:10px; border:0; background:none;
  border-radius:8px; font:inherit; color:var(--nw-ink); cursor:pointer; }
.nw-fmenu button:hover { background:var(--nw-bg); }
.nw-fmenu b { display:block; font-size:.875rem; }
.nw-fmenu small { display:block; font-size:.8rem; color:var(--nw-muted); }
.nw-fmenu-check { width:18px; height:18px; border-radius:5px; border:1.5px solid var(--nw-line2); display:inline-flex; align-items:center; justify-content:center; color:transparent; margin-top:2px; }
.nw-fmenu-check .nw-ico { width:12px; height:12px; }
.nw-fmenu button.is-on .nw-fmenu-check { background:var(--nw-crit); border-color:var(--nw-crit); color:#fff; }
.nw-tl3 { list-style:none; padding:14px 0 0; margin-top:16px !important; border-top:1px solid var(--nw-crit-line); display:grid; gap:12px; }
.nw-tl3 li { display:grid; grid-template-columns:52px 14px 1fr; gap:10px; font-size:.875rem; }
.nw-tl3 time { color:#7a4e53; font-weight:600; }
.nw-tl3 i { width:9px; height:9px; border-radius:50%; background:#fff; border:2px solid var(--nw-crit); margin-top:7px; }
.nw-tl3 b { color:var(--nw-crit-ink); font-weight:600; margin-right:6px; }
.nw-tl3 span { color:#4a2a2e; white-space:pre-line; overflow-wrap:anywhere; }
.nw-read .nw-tl3 { border-top-color:var(--nw-line); }
.nw-minor { display:flex; align-items:center; gap:12px; background:#fff; border:1px solid var(--nw-line); border-radius:12px; padding:12px 16px; box-shadow:var(--nw-lift); }
.nw-minor-t { flex:1; min-width:0; }
.nw-minor-t b { display:block; font-weight:600; }
.nw-minor-t small { color:var(--nw-muted); font-size:.8125rem; }
.nw3 .nw-link { color:var(--nw-brand); text-decoration:none; font-size:.875rem; white-space:nowrap; }
.nw-allok { display:flex; align-items:center; gap:12px; background:#fff; border:1px solid var(--nw-line); border-radius:12px; padding:12px 16px; box-shadow:var(--nw-lift); }
.nw-allok b { font-weight:600; }
.nw-allok small { margin-left:auto; color:var(--nw-muted); font-size:.8125rem; }
.nw-okdot { width:10px; height:10px; border-radius:50%; background:var(--nw-ok); box-shadow:0 0 0 4px var(--nw-ok-bg); flex:none; }

/* pinned: runway + rows */
.nw-sh { display:flex; align-items:baseline; gap:10px; margin:8px 0 12px; }
.nw-sh h2, .nw-fhead h2 { font-size:1.0625rem; font-weight:700; white-space:nowrap; }
.nw-sh span { color:var(--nw-muted); font-size:.85rem; }
.nw3 .nw-card { border-radius:14px; overflow:visible; }
.nw-runway { padding:16px 20px 8px; border-bottom:1px solid var(--nw-line); }
.nw-rw-axis { position:relative; height:96px; }
.nw-rw-line { position:absolute; left:0; right:0; top:47px; height:2px; background:var(--nw-line2); }
.nw-rw-today { position:absolute; left:0; top:60px; font-size:.75rem; font-weight:700; }
.nw-rw-today::before { content:""; position:absolute; left:0; top:-18px; width:3px; height:22px; border-radius:2px; background:var(--nw-ink); }
.nw-rw-mark { position:absolute; top:41px; width:14px; height:14px; margin-left:-7px; border-radius:50%; border:3px solid #fff; box-shadow:0 0 0 1px var(--nw-line2); background:var(--nw-muted); }
.nw-rw-lab { position:absolute; transform:translateX(-50%); text-align:center; white-space:nowrap; font-size:.75rem; line-height:1.3; }
.nw-rw-lab b { display:block; font-size:.78rem; }
.nw-rw-lab small { color:var(--nw-muted); }
.nw-rw-lab.is-up { top:0; } .nw-rw-lab.is-dn { top:62px; }
.nw-rw-scale { display:flex; justify-content:space-between; font-size:.75rem; color:var(--nw-muted); }
:is(.nw-rw-mark, .nw-pdot).is-warn { background:var(--nw-warn); } .nw-rw-lab.is-warn b { color:var(--nw-warn); }
:is(.nw-rw-mark, .nw-pdot).is-brand { background:var(--nw-brand); } .nw-rw-lab.is-brand b { color:var(--nw-brand); }
:is(.nw-rw-mark, .nw-pdot).is-hol { background:var(--nw-hol); } .nw-rw-lab.is-hol b { color:var(--nw-hol); }
:is(.nw-rw-mark, .nw-pdot).is-info { background:var(--nw-info); } .nw-rw-lab.is-info b { color:var(--nw-info); }
:is(.nw-rw-mark, .nw-pdot).is-ok { background:var(--nw-ok); } .nw-rw-lab.is-ok b { color:var(--nw-ok); }
:is(.nw-rw-mark, .nw-pdot).is-mut { background:#9a918f; }
.nw-prow-wrap + .nw-prow-wrap .nw-prow { border-top:1px solid var(--nw-line); }
.nw-prow { display:grid; grid-template-columns:10px minmax(0,1fr) auto; gap:12px; align-items:baseline; width:100%; padding:13px 20px; text-align:left;
  border:0; background:none; font:inherit; color:inherit; text-decoration:none; box-sizing:border-box; }
:is(a, button).nw-prow { cursor:pointer; } :is(a, button).nw-prow:hover { background:#fbfaf9; }
.nw-pdot { width:10px; height:10px; border-radius:50%; align-self:center; }
.nw-prow-t b { display:block; font-weight:600; overflow-wrap:anywhere; }
.nw-prow-t small { color:var(--nw-muted); font-size:.8125rem; }
.nw-pwhen { font-size:.8125rem; font-weight:600; color:var(--nw-ink2); white-space:nowrap; }
.nw-pwhen.is-soon { color:var(--nw-warn); }
.nw-more3 { display:block; width:calc(100% - 40px); margin:4px 20px 14px; height:38px; border:1px solid var(--nw-line); border-radius:9px; background:#fbfaf9;
  color:var(--nw-ink2); font:inherit; font-size:.875rem; font-weight:600; cursor:pointer; }

/* feed */
.nw-fhead { display:flex; align-items:center; gap:8px 16px; flex-wrap:wrap; margin:8px 0 12px; }
.nw-fchips { display:flex; gap:6px; flex-wrap:wrap; margin-left:auto; }
.nw-fchip { height:30px; padding:0 11px; border-radius:15px; border:1px solid var(--nw-line2); background:#fff; font:inherit; font-size:.84rem; color:var(--nw-ink2);
  display:inline-flex; align-items:center; gap:6px; cursor:pointer; }
.nw-fchip.on { background:var(--nw-ink); border-color:var(--nw-ink); color:#fff; font-weight:600; }
.nw-fchip em { font-style:normal; font-size:.75rem; font-weight:600; color:var(--nw-brand); }
.nw-fchip.on em { color:#fff; }
.nw-month { font-size:.8125rem; font-weight:600; color:var(--nw-muted); padding:14px 20px 6px; }
.nw-frow + .nw-frow .nw-item3 { border-top:1px solid var(--nw-line); }
.nw-item3 { display:grid; grid-template-columns:56px minmax(0,1fr) auto; gap:14px; align-items:center; padding:14px 20px; color:inherit; text-decoration:none; }
.nw-item3:hover { background:#fbfaf9; }
.nw-lead { width:56px; height:56px; border-radius:12px; display:flex; align-items:center; justify-content:center; text-align:center; }
.nw-lead .nw-ico { width:24px; height:24px; stroke-width:1.8; }
.nw-lead.is-info { background:#e3eaf7; color:#2c4a85; } .nw-lead.is-ok { background:#e1efe6; color:#245a3c; }
.nw-lead.is-warn { background:#f6ead6; color:#74460f; } .nw-lead.is-mut { background:#ecebea; color:#4d4647; } .nw-lead.is-brand { background:#f6e2e6; color:#8f2438; }
.nw-token { display:flex; flex-direction:column; line-height:1.05; max-width:52px; }
.nw-token b { font-size:1.0625rem; font-weight:700; letter-spacing:-.01em; overflow:hidden; text-overflow:ellipsis; }
.nw-token small { font-size:.66rem; font-weight:600; margin-top:3px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.nw-item3-main { min-width:0; }
.nw-item3-title { display:flex; gap:7px; align-items:flex-start; font-weight:600; font-size:.97rem; line-height:1.45; overflow-wrap:anywhere; }
.nw-item3.is-unread .nw-item3-title { font-weight:700; }
.nw-item3-meta { display:block; font-size:.875rem; color:var(--nw-ink2); margin-top:2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.nw-tag { font-size:.8rem; font-weight:600; }
.nw-tag.is-brand { color:var(--nw-brand); } .nw-tag.is-info { color:var(--nw-info); } .nw-tag.is-ok { color:var(--nw-ok); } .nw-tag.is-warn { color:var(--nw-warn); } .nw-tag.is-mut { color:var(--nw-muted); }
.nw-item3-date { font-size:.8125rem; color:var(--nw-muted); white-space:nowrap; }
.nw-item3-date-m { display:none; }
.nw-foot { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 20px; border-top:1px solid var(--nw-line); font-size:.85rem; color:var(--nw-muted); }
.nw3 .nw-empty { padding:32px 20px; }
@container nw (max-width: 720px) {
  .nw-top .nw-search, .nw-top .nw-system { width:100%; }
  .nw-inc { padding:16px; }
  .nw-facts { grid-template-columns:repeat(2, minmax(0,1fr)); }
  .nw-facts dd small { display:block; }
  .nw-iacts > *, .nw-iacts .nw-btn { width:100%; }
  .nw-minor { flex-wrap:wrap; row-gap:8px; }
  .nw-minor-t { order:2; flex-basis:100%; }
  .nw-minor .nw-link { margin-left:auto; }
  .nw-rw-lab b { display:none; }
  .nw-prow { grid-template-columns:10px minmax(0,1fr); padding:13px 14px; }
  .nw-prow .nw-pwhen { grid-column:2; }
  .nw-fchips { margin-left:0; flex-wrap:nowrap; overflow-x:auto; width:100%; padding-bottom:2px; }
  .nw-fchip { flex:none; }
  .nw-item3 { padding:13px 14px; align-items:start; }
  .nw-item3-ex { display:none; }
  .nw-item3-date { display:none; }
  .nw-item3-date-m { display:inline; }
  .nw-foot { flex-direction:column; }
  .nw-foot .nw-btn { width:100%; }
}
@media (prefers-reduced-motion: reduce) { .nw-live-dot::after { animation:none; opacity:0; } }
.nw-hl-pair { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.4fr); gap:10px; }
.nw-svc-list { display:flex; flex-wrap:wrap; gap:6px; }
.nw-svc-pick { height:30px; padding:0 11px; border-radius:15px; border:1px solid var(--nw-line2); background:#fff; font:inherit; font-size:.8125rem; color:var(--nw-ink2); cursor:pointer; }
.nw-svc-pick.on { background:var(--nw-ink); border-color:var(--nw-ink); color:#fff; font-weight:600; }
.nw-svc-add { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:end; }
.nw-svc-chip { display:inline-flex; align-items:center; gap:4px; padding:2px 4px 2px 10px; border-radius:6px; background:var(--nw-brand-soft); color:var(--nw-brand); font-size:.8125rem; font-weight:600; }
.nw-svc-chip button { border:0; background:none; color:inherit; font-size:1rem; line-height:1; padding:2px 6px; cursor:pointer; border-radius:4px; }
.nw-svc-chip button:hover { background:#fff; }
.nw-next { margin-top:12px; max-width:280px; }
.nw-st-updates { border-top:1px solid var(--nw-line); padding:18px 20px 20px; display:flex; flex-direction:column; gap:12px; }
.nw-st-tl { list-style:none; margin:0; padding:0; display:grid; gap:12px; }
.nw-st-tl li { border-left:2px solid var(--nw-line2); padding-left:12px; }
.nw-st-tl li b { margin-right:8px; }
.nw-st-tl li p { margin:2px 0 0; white-space:pre-line; overflow-wrap:anywhere; }
.nw-st-post { display:grid; gap:10px; background:var(--nw-soft); border-radius:12px; padding:14px; }
/* v3: the strip's marks open their item; the holiday dialog reuses the month calendar. */
button.nw-rw-mark { padding:0; cursor:pointer; transition:transform .15s ease-out; }
button.nw-rw-mark::before { content:""; position:absolute; inset:-9px; border-radius:50%; }
button.nw-rw-mark:hover, button.nw-rw-mark:focus-visible { transform:scale(1.3); }
button.nw-rw-mark:focus-visible { outline:2px solid var(--nw-ink); outline-offset:2px; }
.nw-holcal { display:flex; flex-direction:column; gap:12px; }
.nw-cal-d.is-focus { box-shadow:0 0 0 2px #fff, 0 0 0 4px var(--nw-brand); }
.nw-hols li.is-focus b, .nw-hols li.is-focus span { font-weight:700; color:var(--nw-ink); }
@media (prefers-reduced-motion: reduce) { button.nw-rw-mark { transition:none; } }
/* News pages only (staff and customer): dialogs open in the middle of the screen; long ones still scroll inside max-height. */
.nw dialog:is(.ckn-modal__modal, .ckn-confirm__modal)[open] { top:0; bottom:0; margin-block:auto; height:fit-content; }
/* v3 feed: hover turns the headline brand red instead of underlining it; the month heading reads as a heading. */
.nw3 .nw-item3:hover .nw-item3-title span:last-child { text-decoration:none; color:var(--nw-brand); }
.nw3 :is(a, button).nw-prow:hover .nw-prow-t b { color:var(--nw-brand); }
.nw3 .nw-item3-title span:last-child, .nw3 .nw-prow-t b { transition:color .15s ease-out; }
.nw3 .nw-month { font-size:.95rem; font-weight:700; color:var(--nw-ink); padding:16px 20px 8px; letter-spacing:.005em; }
/* "Load more" appends rows above the button: keep the browser from anchoring on the button (which scrolls the page along). */
.nw3 .nw-foot { overflow-anchor:none; }

/* v3 depth pass (canvas "การ์ดเหตุขัดข้อง · เพิ่มความลึก"): four levels only. 0 page · 1 cards · 2 controls · 3 menus/dialogs. */
.nw3 { --nw-e1:0 1px 2px rgba(42,38,39,.06), 0 10px 28px -14px rgba(42,38,39,.26);
  --nw-e1-crit:0 1px 2px rgba(111,32,41,.06), 0 10px 28px -14px rgba(111,32,41,.30);
  --nw-e2:0 1px 1px rgba(42,38,39,.08), 0 3px 8px -3px rgba(42,38,39,.18);
  --nw-e3:0 2px 4px rgba(42,38,39,.08), 0 18px 40px -12px rgba(42,38,39,.35);
  --nw-hi:inset 0 1px 0 rgba(255,255,255,.8); }
.nw3 .nw-card, .nw3 .nw-minor, .nw3 .nw-allok { box-shadow:var(--nw-e1); }
.nw3 .nw-inc { background:linear-gradient(#fdf5f5, #fbefef); border-color:#ead0d3; box-shadow:var(--nw-e1-crit), var(--nw-hi); }
.nw3 .nw-inc .nw-state, .nw3 .nw-svcs span { box-shadow:0 1px 1px rgba(111,32,41,.08), var(--nw-hi); }
.nw3 .nw-facts { background:#f6e6e8; border-color:#ead0d3; box-shadow:inset 0 1px 3px rgba(111,32,41,.10); }
.nw3 .nw-facts > div { background:linear-gradient(#fff, #fffbfb); }
.nw3 .nw-tl3 { border-top-color:#ead0d3; }
.nw3 .nw-tl3 i { box-shadow:0 0 0 3px #fbefef; }
.nw3 .nw-btn { box-shadow:var(--nw-e2), var(--nw-hi); transition:transform .12s ease-out, box-shadow .12s ease-out, background-color .12s ease-out; }
.nw3 .nw-btn.ghost, .nw3 .nw-follow.is-on { background:linear-gradient(#fff, #fdf8f8); }
.nw3 .nw-btn.pri { background:linear-gradient(#b83a47, #a8303d); box-shadow:0 1px 1px rgba(111,32,41,.25), 0 6px 14px -6px rgba(168,48,61,.65), inset 0 1px 0 rgba(255,255,255,.22); }
.nw3 .nw-btn:not(:disabled):hover { transform:translateY(-1px); box-shadow:0 2px 2px rgba(42,38,39,.12), 0 8px 16px -8px rgba(42,38,39,.35), var(--nw-hi); }
.nw3 .nw-btn.pri:not(:disabled):hover { background:linear-gradient(#b83a47, #a8303d); box-shadow:0 2px 2px rgba(111,32,41,.2), 0 10px 18px -8px rgba(168,48,61,.7), inset 0 1px 0 rgba(255,255,255,.22); }
.nw3 .nw-btn:not(:disabled):active { transform:translateY(0); box-shadow:inset 0 2px 4px rgba(0,0,0,.12); }
.nw3 .nw-btn.pri:not(:disabled):active { background:#9d2b37; box-shadow:inset 0 2px 4px rgba(0,0,0,.25); }
.nw3 .nw-fchip { box-shadow:0 1px 1px rgba(42,38,39,.06), var(--nw-hi); }
.nw3 .nw-fmenu { box-shadow:var(--nw-e3); }
.nw dialog:is(.ckn-modal__modal, .ckn-confirm__modal)[open] { box-shadow:0 2px 4px rgba(42,38,39,.08), 0 24px 56px -16px rgba(42,38,39,.40); border-color:var(--nw-line, #e7e1de); }
@media (prefers-reduced-motion: reduce) { .nw3 .nw-btn { transition:none; } .nw3 .nw-btn:not(:disabled):hover { transform:none; } }

/* Staff news pages (จัดการข่าวสาร, เขียนข่าว, แจ้งสถานะบริการ): the same four depth levels in the staff palette. */
.nw:not(.nw3) { --nw-e1:0 1px 2px rgba(23,23,23,.06), 0 10px 28px -14px rgba(23,23,23,.24);
  --nw-e2:0 1px 1px rgba(23,23,23,.08), 0 3px 8px -3px rgba(23,23,23,.16);
  --nw-e3:0 2px 4px rgba(23,23,23,.08), 0 18px 40px -12px rgba(23,23,23,.32);
  --nw-hi:inset 0 1px 0 rgba(255,255,255,.8); }
.nw:not(.nw3) :is(.nw-table, .nw-panel, .nw-card, .nw-editor, .nw-live-card) { box-shadow:var(--nw-e1) !important; }
.nw:not(.nw3) .nw-seg { box-shadow:var(--nw-e2), var(--nw-hi); }
.nw:not(.nw3) .nw-seg button[aria-selected="true"], .nw:not(.nw3) .nw-seg button.on { box-shadow:0 1px 2px rgba(23,23,23,.12), var(--nw-hi); }
.nw:not(.nw3) .nw-btn { box-shadow:var(--nw-e2), var(--nw-hi); background-image:linear-gradient(#fff, #fafafa);
  transition:transform .12s ease-out, box-shadow .12s ease-out, background-color .12s ease-out; }
.nw:not(.nw3) .nw-btn.pri { background-image:linear-gradient(#a72424, #991b1b); box-shadow:0 1px 1px rgba(127,29,29,.25), 0 6px 14px -6px rgba(153,27,27,.6), inset 0 1px 0 rgba(255,255,255,.2); }
.nw:not(.nw3) .nw-btn.dark { background-image:linear-gradient(#2a2a2a, #171717); }
.nw:not(.nw3) .nw-btn.danger { background-image:linear-gradient(#fff, #fffafa); }
.nw:not(.nw3) .nw-btn:not(:disabled):hover { transform:translateY(-1px); box-shadow:0 2px 2px rgba(23,23,23,.10), 0 8px 16px -8px rgba(23,23,23,.32), var(--nw-hi); }
.nw:not(.nw3) .nw-btn.pri:not(:disabled):hover { box-shadow:0 2px 2px rgba(127,29,29,.2), 0 10px 18px -8px rgba(153,27,27,.65), inset 0 1px 0 rgba(255,255,255,.2); }
.nw:not(.nw3) .nw-btn:not(:disabled):active { transform:translateY(0); box-shadow:inset 0 2px 4px rgba(0,0,0,.12); }
.nw:not(.nw3) .nw-btn.pri:not(:disabled):active { background-image:none; background-color:#7f1d1d; box-shadow:inset 0 2px 4px rgba(0,0,0,.25); }
.nw:not(.nw3) .nw-menu { box-shadow:var(--nw-e3); }
@media (prefers-reduced-motion: reduce) { .nw:not(.nw3) .nw-btn { transition:none; } .nw:not(.nw3) .nw-btn:not(:disabled):hover { transform:none; } }

/* News pages, inner elements: what you press is raised, what you type into is sunk. */
.nw { --nw-raise:0 1px 1px rgba(23,23,23,.07), 0 2px 4px -2px rgba(23,23,23,.12), inset 0 1px 0 rgba(255,255,255,.85);
  --nw-raise-hover:0 2px 2px rgba(23,23,23,.09), 0 6px 12px -6px rgba(23,23,23,.28), inset 0 1px 0 rgba(255,255,255,.85);
  --nw-sink:inset 0 1px 2px rgba(23,23,23,.08), inset 0 0 0 1px rgba(23,23,23,.02); }
.nw :is(.nw-catpick button, .nw-quick button, .nw-svc-pick, .nw-tool) { transition:transform .12s ease-out, box-shadow .12s ease-out, background-color .12s ease-out; }
.nw :is(.nw-catpick button, .nw-quick button, .nw-svc-pick) { background-image:linear-gradient(#fff, #fafafa); box-shadow:var(--nw-raise); }
.nw :is(.nw-catpick button, .nw-quick button, .nw-svc-pick, .nw-tool):not(:disabled):hover { transform:translateY(-1px); box-shadow:var(--nw-raise-hover); }
.nw :is(.nw-catpick button, .nw-quick button, .nw-svc-pick, .nw-tool):not(:disabled):active { transform:translateY(0); box-shadow:inset 0 2px 3px rgba(0,0,0,.12); }
.nw .nw-catpick button.on { background-image:none; box-shadow:0 1px 2px rgba(153,27,27,.18), 0 4px 10px -6px rgba(153,27,27,.45), inset 0 1px 0 rgba(255,255,255,.7); }
.nw .nw-svc-pick.on { background-image:linear-gradient(#2a2a2a, #171717); box-shadow:0 1px 2px rgba(23,23,23,.25), inset 0 1px 0 rgba(255,255,255,.12); }
.nw .nw-tool:hover { background:#fff; }
.nw .nw-svc-chip { box-shadow:0 1px 1px rgba(153,27,27,.12), inset 0 1px 0 rgba(255,255,255,.7); }
.nw .nw-mdbar { box-shadow:inset 0 -1px 0 #e5e7eb, inset 0 1px 2px rgba(23,23,23,.04); }
/* Fields sink into their panel; the borderless title and the Markdown source pane stay flat. */
.nw.nw :is(input, textarea, select)[data-part="control"] { box-shadow:var(--nw-sink); background-image:linear-gradient(#fcfcfc, #fff 40%); }
.nw.nw :is(input, textarea, select)[data-part="control"]:focus { box-shadow:var(--nw-sink), 0 0 0 3px rgba(153,27,27,.12); }
.nw .nw-pane-src textarea { box-shadow:none !important; background-image:none !important; }
/* Sub-panels inside a card sink a level: the timeline "add update" box and the unsaved-draft notice. */
.nw .nw-st-post { box-shadow:inset 0 1px 3px rgba(23,23,23,.08); border:1px solid #ebebeb; }
.nw .nw-restore { box-shadow:inset 0 1px 2px rgba(30,64,175,.10); border:1px solid #dbe6fb; }
.nw .nw-history { box-shadow:var(--nw-e1); }
@media (prefers-reduced-motion: reduce) { .nw :is(.nw-catpick button, .nw-quick button, .nw-svc-pick, .nw-tool) { transition:none; } .nw :is(.nw-catpick button, .nw-quick button, .nw-svc-pick, .nw-tool):not(:disabled):hover { transform:none; } }

/* Composer title: a real field with a frame (it was a bare underline), still large. */
.nw .nw-title-input textarea { border:1px solid var(--nw-line2) !important; border-radius:12px !important; padding:10px 14px !important; background:#fff !important;
  box-shadow:inset 0 1px 2px rgba(23,23,23,.08) !important; transition:border-color .15s ease-out, box-shadow .15s ease-out; }
.nw .nw-title-input textarea:hover { border-color:#b9bcc2 !important; }
.nw .nw-title-input textarea:focus { border-color:var(--nw-brand) !important; box-shadow:inset 0 1px 2px rgba(23,23,23,.08), 0 0 0 3px rgba(153,27,27,.12) !important; }
/* Staff lists: hovering a row tints it and turns the headline brand red, like the customer feed. */
.nw:not(.nw3) .nw-row:not(.head) { transition:background-color .15s ease-out; }
.nw:not(.nw3) .nw-row:not(.head):hover, .nw:not(.nw3) :is(.nw-plan, .nw-past-row):hover { background:#fafafa; }
.nw:not(.nw3) :is(.nw-row-title > span:last-child, .nw-plan-title, .nw-past-title) { transition:color .15s ease-out; text-decoration:none; }
.nw:not(.nw3) .nw-row:hover .nw-row-title > span:last-child, .nw:not(.nw3) .nw-plan:hover .nw-plan-title, .nw:not(.nw3) .nw-past-row:hover .nw-past-title { color:var(--nw-brand); }
/* Status pills: framed so they read on any background, and centred on the heading line in the composer bars. */
.nw .nw-pill { border:1px solid color-mix(in srgb, currentColor 40%, transparent); box-shadow:0 1px 1px rgba(23,23,23,.05), inset 0 1px 0 rgba(255,255,255,.7); line-height:1.5; }
.nw .nw-compose-bar .nw-pill { align-self:center; }
.nw .nw-editor-head { padding-bottom:16px; }

/* Incident card, compact footer: the times on one line beside the actions; the card itself opens the details. */
.nw3 .nw-inc { cursor:pointer; transition:box-shadow .15s ease-out, transform .15s ease-out; }
.nw3 .nw-inc:hover { box-shadow:0 2px 4px rgba(111,32,41,.08), 0 16px 34px -16px rgba(111,32,41,.38), var(--nw-hi); }
.nw3 .nw-inc-open { all:unset; cursor:pointer; color:inherit; font:inherit; border-radius:6px; }
.nw3 .nw-inc:hover .nw-inc-open, .nw3 .nw-inc-open:focus-visible { color:var(--nw-crit); }
.nw3 .nw-inc-open:focus-visible { outline:2px solid var(--nw-crit); outline-offset:3px; }
.nw3 .nw-inc-foot { display:flex; align-items:center; justify-content:space-between; gap:10px 20px; flex-wrap:wrap; margin-top:14px; padding-top:12px; border-top:1px solid #ead0d3; cursor:auto; }
.nw3 .nw-times { display:flex; flex-wrap:wrap; gap:4px 18px; margin:0; font-size:.8125rem; color:#7a4e53; }
.nw3 .nw-time small { font-size:inherit; }
.nw3 .nw-time b { color:var(--nw-crit-ink); font-weight:600; font-size:.875rem; }
.nw3 .nw-time em { font-style:normal; }
.nw3 .nw-inc-foot .nw-iacts { margin-top:0; gap:8px; }
.nw3 .nw-btn.sm { height:34px; padding:0 12px; font-size:.8125rem; border-radius:9px; }
.nw3 .nw-bell { display:inline-flex; }
.nw3 .nw-bell .nw-ico { width:15px; height:15px; }
.nw3 .nw-bell.is-on { color:var(--nw-crit); }
@container nw (max-width: 720px) { .nw3 .nw-inc-foot { flex-direction:column; align-items:stretch; } .nw3 .nw-times { flex-direction:column; gap:2px; } }
@media (prefers-reduced-motion: reduce) { .nw3 .nw-inc { transition:none; } }

/* Incident card: services sit on the impact line ("กระทบบางส่วนที่ Outlook · Teams"); the right side carries the latest progress. */
.nw3 .nw-inc-head { flex-wrap:wrap; row-gap:6px; }
.nw3 .nw-inc-head .nw-svcs { display:inline-flex; margin:0; gap:6px; flex-wrap:wrap; }
.nw3 .nw-inc-head .nw-inc-sev { font-weight:600; }
.nw3 .nw-inc-main { display:grid; grid-template-columns:minmax(0,1fr) minmax(260px, 36%); gap:20px; align-items:start; margin-top:10px; }
.nw3 .nw-inc-main .nw-inc-body { margin-top:0 !important; }
.nw3 .nw-latest { background:#fff; border:1px solid #ead0d3; border-radius:12px; padding:12px 14px; box-shadow:0 1px 2px rgba(111,32,41,.06), inset 0 1px 0 rgba(255,255,255,.8); display:flex; flex-direction:column; gap:4px; }
.nw3 .nw-latest-k { font-size:.75rem; font-weight:600; color:#7a4e53; letter-spacing:.01em; }
.nw3 .nw-latest-h { margin:0; font-size:.8125rem; color:#7a4e53; }
.nw3 .nw-latest-h b { color:var(--nw-crit); font-weight:700; margin-right:4px; }
.nw3 .nw-latest-b { margin:0; font-size:.875rem; color:#4a2a2e; line-height:1.55; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; }
.nw3 .nw-latest-b.is-empty { color:#7a4e53; }
.nw3 .nw-latest-next { margin:4px 0 0; display:inline-flex; align-items:center; gap:6px; font-size:.8125rem; font-weight:600; color:var(--nw-crit-ink); }
.nw3 .nw-latest-next .nw-ico { width:14px; height:14px; }
/* Minor incident: the whole row opens the details. */
.nw3 button.nw-minor { width:100%; text-align:left; font:inherit; color:inherit; cursor:pointer; transition:box-shadow .15s ease-out, background-color .15s ease-out; }
.nw3 button.nw-minor:hover { background:#fbfaf9; box-shadow:0 2px 4px rgba(42,38,39,.06), 0 12px 26px -14px rgba(42,38,39,.30); }
.nw3 button.nw-minor:hover .nw-minor-t b { color:var(--nw-brand); }
.nw3 button.nw-minor:focus-visible { outline:2px solid var(--nw-brand); outline-offset:2px; }
.nw3 .nw-minor-t b { transition:color .15s ease-out; }
.nw3 .nw-minor-go { display:inline-flex; color:var(--nw-muted); }
.nw3 .nw-minor-go .nw-ico { width:18px; height:18px; }
@container nw (max-width: 720px) { .nw3 .nw-inc-main { grid-template-columns:minmax(0,1fr); } }
.nw3 .nw-minor-go { margin-left:auto; }
/* Right side of the incident card = the notice's details, stretched to the height of the text beside it. */
.nw3 .nw-inc-main { align-items:stretch; }
.nw3 .nw-latest { height:100%; box-sizing:border-box; }
.nw3 .nw-detail { margin:4px 0 0; display:grid; gap:0; }
.nw3 .nw-detail > div { display:grid; grid-template-columns:auto minmax(0,1fr); gap:12px; align-items:baseline; padding:6px 0; border-top:1px dashed #ecd2d5; }
.nw3 .nw-detail > div:first-child { border-top:0; }
.nw3 .nw-detail dt { font-size:.8125rem; color:#7a4e53; white-space:nowrap; }
.nw3 .nw-detail dd { margin:0; text-align:right; font-size:.8125rem; color:#7a4e53; overflow-wrap:anywhere; }
.nw3 .nw-detail dd b { font-size:.9rem; font-weight:600; color:var(--nw-crit-ink); }
.nw3 .nw-detail dd em { font-style:normal; }
.nw3 .nw-inc-foot { justify-content:flex-end; }
@container nw (max-width: 720px) { .nw3 .nw-inc-foot > span:empty { display:none; } }
/* Two columns over the whole card: text and actions on the left, the details panel on the right from top to bottom. */
.nw3 .nw-inc { display:grid; grid-template-columns:minmax(0,1fr) minmax(280px, 34%); column-gap:24px;
  grid-template-areas:"head aside" "title aside" "body aside" "foot aside" "tl tl"; grid-template-rows:auto auto 1fr auto auto; }
.nw3 .nw-inc > .nw-inc-head { grid-area:head; }
.nw3 .nw-inc > .nw-inc-title { grid-area:title; }
.nw3 .nw-inc > .nw-inc-main { display:contents; }
.nw3 .nw-inc .nw-inc-body { grid-area:body; margin-top:10px !important; }
.nw3 .nw-inc .nw-latest { grid-area:aside; align-self:stretch; height:auto; }
.nw3 .nw-inc > .nw-inc-foot { grid-area:foot; justify-content:flex-start; border-top:0; padding-top:0; margin-top:14px; }
.nw3 .nw-inc > .nw-tl3 { grid-area:tl; }
@container nw (max-width: 720px) {
  .nw3 .nw-inc { grid-template-columns:minmax(0,1fr); grid-template-areas:"head" "title" "body" "aside" "foot" "tl"; grid-template-rows:none; }
  .nw3 .nw-inc .nw-latest { margin-top:12px; }
}
/* Incident card: the right column is the notice text itself (Markdown), from top to bottom; times sit on the left under the title. */
.nw3 .nw-inc .nw-detail { grid-area:body; margin-top:12px; align-self:start; display:grid; grid-template-columns:repeat(2, minmax(0, max-content)); gap:6px 28px; }
.nw3 .nw-inc .nw-detail > div { display:flex; flex-direction:column; gap:0; padding:0; border:0; }
.nw3 .nw-inc .nw-detail dd { text-align:left; }
.nw3 .nw-inc .nw-latest { display:flex; flex-direction:column; gap:6px; min-height:0; }
.nw3 .nw-latest-body { font-size:.9rem; line-height:1.65; color:#4a2a2e; max-height:16rem; overflow:hidden; overflow-wrap:anywhere; }
.nw3 .nw-latest-body :is(p, ul, ol) { margin:0 0 .5em; }
@container nw (max-width: 720px) { .nw3 .nw-inc .nw-detail { grid-template-columns:minmax(0,1fr) minmax(0,1fr); } }
.nw3 .nw-latest-body :is(ckn-markdown, ckn-markdown > *, :first-child) { margin-top:0 !important; padding-top:0 !important; }
.nw3 .nw-latest .nw-latest-body { margin-top:0 !important; }
/* (reverted) Notice text back under the title; the right column is the details list of times, stretched full height. */
.nw3 .nw-inc .nw-latest .nw-detail { grid-area:auto; display:grid; grid-template-columns:minmax(0,1fr); gap:0; margin:4px 0 0; align-self:auto; }
.nw3 .nw-inc .nw-latest .nw-detail > div { display:grid; grid-template-columns:auto minmax(0,1fr); gap:12px; align-items:baseline; padding:6px 0; border-top:1px dashed #ecd2d5; flex-direction:row; }
.nw3 .nw-inc .nw-latest .nw-detail > div:first-child { border-top:0; }
.nw3 .nw-inc .nw-latest .nw-detail dd { text-align:right; }
/* Left column shows the full notice text (Markdown), filling the space beside the details panel; very long text is cut and opens in the dialog. */
.nw3 .nw-inc .nw-inc-body.nw-prose { margin-top:10px !important; max-width:none; max-height:18rem; overflow:hidden; font-size:.95rem; line-height:1.7; color:#4a2a2e; }
.nw3 .nw-inc .nw-inc-body.nw-prose :is(ckn-markdown, ckn-markdown > *) { margin-top:0; }
.nw3 .nw-inc .nw-inc-body.nw-prose :is(p, ul, ol) { margin:0 0 .6em; }
.nw3 .nw-inc > .nw-inc-foot { align-self:end; }
/* Details panel as a two-column grid so the card is no taller than its text; provider spans the full width. */
.nw3 .nw-inc .nw-latest .nw-detail { grid-template-columns:repeat(2, minmax(0,1fr)); column-gap:16px; }
.nw3 .nw-inc .nw-latest .nw-detail > div { grid-template-columns:minmax(0,1fr); gap:0; padding:6px 0; border-top:1px dashed #ecd2d5; }
.nw3 .nw-inc .nw-latest .nw-detail > div:nth-child(-n+2) { border-top:0; }
.nw3 .nw-inc .nw-latest .nw-detail > div:last-child:nth-child(odd) { grid-column:1 / -1; }
.nw3 .nw-inc .nw-latest .nw-detail dd { text-align:left; }
.nw3 .nw-inc { grid-template-columns:minmax(0,1fr) minmax(300px, 38%); }
/* (user) No details panel: the notice text runs the full width of the card; times are one short line beside the buttons. */
.nw3 .nw-inc { grid-template-columns:minmax(0,1fr); grid-template-areas:"head" "title" "body" "foot" "tl"; grid-template-rows:none; }
.nw3 .nw-inc .nw-inc-body, .nw3 .nw-inc .nw-inc-body.nw-prose { max-width:none; }
.nw3 .nw-inc > .nw-inc-foot { justify-content:space-between; align-self:auto; margin-top:14px; padding-top:12px; border-top:1px solid #ead0d3; }
.nw3 .nw-inc > .nw-inc-foot .nw-times { order:2; }
.nw3 .nw-inc > .nw-inc-foot .nw-iacts { order:1; }
/* (user) Times on the left, buttons on the right. */
.nw3 .nw-inc > .nw-inc-foot .nw-times { order:1; }
.nw3 .nw-inc > .nw-inc-foot .nw-iacts { order:2; margin-left:auto; }
.nw3 .nw-clear { border:0; background:none; padding:0; font:inherit; font-size:.8125rem; font-weight:600; color:var(--nw-brand); cursor:pointer; text-decoration:underline; text-underline-offset:3px; }
/* MA page status filter tiles (its own copy: the home page's .tkh-tile it used to borrow was removed in the home restyle). Uses the .tkl tokens. */
.works-ma-tiles { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:12px; }
.works-ma-tile { background:var(--tk-surface); border:1px solid var(--tk-line); border-radius:12px; padding:14px 16px; box-shadow:0 1px 2px rgba(16,24,40,.05);
  color:inherit; display:flex; flex-direction:column; gap:2px; font:inherit; }
.works-ma-tile:hover { border-color:var(--tk-line-2); }
.works-ma-tile:focus-visible { outline:2px solid var(--tk-brand); outline-offset:2px; }
.works-ma-tile .works-ma-n { font-size:1.75rem; font-weight:600; font-family:var(--tk-mono); line-height:1.2; }
.works-ma-tile .works-ma-l { font-size:.8125rem; color:var(--tk-muted); }
.works-ma-tile.bad .works-ma-n { color:var(--tk-bad); }

/* MA email template: the To addresses as removable chips, with a box to add more. */
.works-ma-to { list-style:none; padding:0; margin:0; display:flex; flex-wrap:wrap; gap:6px; max-height:10rem; overflow:auto; }
.works-ma-to-chip { display:inline-flex; align-items:center; gap:4px; padding:2px 4px 2px 10px; border:1px solid #d0d5dd; border-radius:999px; background:#f9fafb; font-size:.8125rem; }
.works-ma-to-remove { border:0; background:transparent; cursor:pointer; color:#667085; font-size:1rem; line-height:1; width:22px; height:22px; border-radius:999px; }
.works-ma-to-remove:hover { background:#fee4e2; color:#b42318; }
.works-ma-to-remove:focus-visible { outline:2px solid #a61d16; outline-offset:1px; }
.works-ma-to-add { display:flex; gap:8px; align-items:center; margin-top:8px; }
.works-ma-to-error { color:#b42318; font-size:.8125rem; margin:4px 0 0; }

/* Org admin › สมาชิก → ลูกค้า: one row per member (or customer); the other side as chips, the picked one opens below */
.care-table td { vertical-align:top; }
.care-who b { font-weight:500; }
.care-chips { display:flex; flex-wrap:wrap; gap:6px; }
.care-chip { display:inline-flex; align-items:center; gap:6px; border:1px solid #d0d5dd; background:#fff; color:#101828; border-radius:999px; padding:3px 10px; font:inherit; font-size:.8125rem; cursor:pointer; white-space:nowrap; }
.care-chip i { font-style:normal; font-size:.75rem; color:#98a2b3; }
.care-chip:hover { border-color:#98a2b3; }
.care-chip.cross { background:#fffaeb; border-color:#f2c94c; }
.care-chip.on { border-color:#b42318; background:#fef3f2; }
.care-chip:focus-visible { outline:2px solid #b42318; outline-offset:2px; }
.care-det { display:flex; gap:12px; align-items:flex-start; flex-wrap:wrap; margin-top:8px; padding:10px 12px; border:1px solid #e4e7ec; border-radius:10px; background:#fcfcfd; }
.care-det-main { flex:1; min-width:220px; }

/* Ticket view, one urgency signal (2026-11-26): the header sits on the page without a card, the stepper keeps one row and a
   neutral "you are here" (red is kept for lateness), the banner heads the next-step card, and the facts rail drops its cards. */
.tkv-head { padding:4px 2px 0; min-width:0; }
.tkv-head-links { gap:14px; }
.tkv-head-links .tkp-link { display:inline-flex; align-items:center; gap:6px; font-size:.8125rem; color:var(--tk-muted); text-decoration:none; }
.tkv-head-links .tkp-link:hover { color:var(--tk-text); text-decoration:underline; }
.tkv-head-links .tkp-link:focus-visible { outline:2px solid var(--tk-brand); outline-offset:2px; border-radius:4px; }
.tkv-head-links svg { width:15px; height:15px; flex:none; }
ol.flow-steps { list-style:none; margin-left:0; margin-right:0; padding:0; }
.tkv-steps { grid-template-columns:none; grid-auto-flow:column; grid-auto-columns:minmax(84px, 1fr); overflow-x:auto; padding-bottom:2px; }
@media (max-width: 640px) { .tkv-steps { grid-template-columns:none; } }
.tkv-sr { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.tkv-banner.solo { margin-top:0; }
.tkv-tick svg { display:none; width:12px; height:12px; }
.tkv-task.done .tkv-tick svg { display:block; }
.tkv-composer { position:sticky; bottom:0; z-index:2; background:var(--tk-surface); padding-bottom:4px; box-shadow:0 -10px 12px -12px rgba(16,24,40,.18); }
.tkv-composer > .tk-quick { margin:0 0 10px; padding:0 0 10px; border-top:0; border-bottom:1px dashed var(--tk-line); }

/* Ticket view, design 8 (2026-11-26): a status rail on the left, then the page reads in order of importance —
   the brief (what is late and the one thing to do), the case facts in three columns, the chat kept smaller, files, history. */
.tkv8 { display:flex; flex-direction:row; flex-wrap:wrap; align-items:flex-start; gap:24px; }
.tkv8-rail { flex:1 1 210px; max-width:230px; box-sizing:border-box; padding:16px 18px 20px; background:#f9fafb; border:1px solid var(--tk-line); border-radius:12px;
  position:sticky; top:16px; font-size:.8125rem; color:var(--tk-muted); }
.tkv8-back { display:inline-flex; align-items:center; gap:4px; margin-bottom:12px; color:var(--tk-muted); text-decoration:none; }
.tkv8-back:hover { color:var(--tk-text); }
.tkv8-back svg { width:14px; height:14px; }
.tkv8-cap { margin:0 0 10px; font-size:.75rem; font-weight:600; color:var(--tk-muted); }
.tkv8-steps { list-style:none; margin:0; padding:0 0 0 10px; border-left:2px solid var(--tk-line); display:flex; flex-direction:column; gap:12px; }
.tkv8-steps .flow-step { display:flex; align-items:center; gap:8px; margin-left:-16px; color:#667085; }
.tkv8-steps .flow-step > i { width:10px; height:10px; border-radius:50%; background:#fff; border:2px solid var(--tk-line-2); box-sizing:border-box; flex:none; }
.tkv8-steps .flow-step > span { margin:0; font-size:.8125rem; color:inherit; }
.tkv8-steps .flow-done > i { background:var(--tk-ok); border-color:var(--tk-ok); }
.tkv8-steps .flow-done { color:var(--tk-muted); }
.tkv8-steps .flow-cur { margin-left:-17px; }
.tkv8-steps .flow-cur > i { width:12px; height:12px; background:#344054; border:0; }
.tkv8-steps .flow-cur > span { color:var(--tk-text); font-weight:600; }
.tkv8-manage { margin-top:16px; }
.tkv8-manage .tkv-manage { border-top:0; padding-top:0; }
.tkv8-facts { margin-top:18px; padding-top:14px; border-top:1px solid var(--tk-line); display:flex; flex-direction:column; align-items:flex-start; gap:8px; }
.tkv8-facts b { color:var(--tk-text); font-weight:500; }
.tkv8-facts a, .tkv8-facts .tkp-link { color:var(--tk-muted); }
.tkv8-facts a:hover, .tkv8-facts .tkp-link:hover { color:var(--tk-text); }
.tkv8-main { flex:999 1 560px; min-width:0; display:flex; flex-direction:column; gap:16px; }
.tkv8-body { display:flex; flex-direction:column; gap:24px; padding-top:4px; }
.tkv8-brief { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px 28px; align-items:center; padding:18px 0; border-top:1px solid var(--tk-line); border-bottom:1px solid var(--tk-line); }
.tkv8-wide { grid-column:1 / -1; }
.tkv8-say { min-width:0; }
.tkv8-sent { margin:0; font-size:1.25rem; line-height:1.5; }
.tkv8-sent b { font-weight:600; }
.tkv8-note { font-size:1rem; color:var(--tk-muted); }
.tkv8-next { margin:2px 0 0; font-size:1.25rem; line-height:1.5; color:var(--tk-text); }
.tkv8-lead { font-size:.8125rem; font-weight:600; color:var(--tk-muted); margin-right:10px; vertical-align:2px; }
.tkv8-do { display:flex; flex-direction:column; align-items:flex-start; gap:6px; }
.tkv8-do .tkl-btn { height:44px; padding:0 20px; border-radius:10px; font-size:.9375rem; font-weight:600; }
.tkv8-more > summary { cursor:pointer; color:var(--tk-muted); font-size:.8125rem; }
.tkv8-more[open] > summary { margin-bottom:10px; }
.tkv8-extras { margin-top:10px; }
.tkv8-facts3 { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) minmax(0,1fr); gap:20px 32px; }
.tkv8-col { min-width:0; }
.tkv8-col .tkv-h2 + .tkv-kv { border-top:0; }
.tkv8 .tk-chat-list { max-height:300px; }
.tkv8-sec { min-width:0; padding-top:16px; border-top:1px solid var(--tk-line); }
.tkv8-sec .ticket-audit { border:0; padding:0; background:none; }
.tkv8-sec .ticket-audit summary { font-size:.8125rem; color:var(--tk-muted); font-weight:500; }
@media (max-width: 1100px) { .tkv8-facts3 { grid-template-columns:repeat(auto-fit, minmax(240px, 1fr)); } }
@media (max-width: 900px) { .tkv8-rail { max-width:none; position:static; } }
@media (max-width: 720px) { .tkv8-brief { grid-template-columns:minmax(0,1fr); } }
/* Design 8 spacing: room between the parts, but the app's own type scale (its rem is already large). */
.tkv8 { gap:28px; }
.tkv8-rail { padding:18px 18px 20px; }
.tkv8-main { gap:14px; }
.tkv8 .tkv-head { padding:0; }
.tkv8 .tkv-title { font-size:1.25rem; line-height:1.35; margin:4px 0 2px; }
.tkv8 .tkv-head .tkl-sub { font-size:.78rem; }
.tkv8-body { gap:24px; padding-top:2px; }
.tkv8-brief { padding:14px 0; gap:10px 28px; }
.tkv8-sent, .tkv8-next { font-size:.9375rem; line-height:1.55; }
.tkv8-note { font-size:.8125rem; }
.tkv8-lead { font-size:.7rem; margin-right:8px; }
.tkv8-do .tkl-btn { height:32px; padding:0 14px; border-radius:8px; font-size:.8125rem; }
.tkv8-facts3 { gap:16px 32px; }
.tkv8-col .tkv-h2 { font-size:.8125rem; margin-bottom:4px; }
.tkv8-col .tkv-kv { padding:6px 0; font-size:.78rem; }
.tkv8-col .tkv-kv.wide > span:last-child { font-size:.8125rem; line-height:1.6; color:var(--tk-text); }
.tkv8-rail, .tkv8-steps .flow-step > span { font-size:.78rem; }
.tkv8-steps { gap:10px; }
.tkv8 .tkv-pic { margin-top:10px; padding-top:12px; gap:8px; }
.tkv8-sec { padding-top:20px; }
/* Design 8 fact columns, as the mock draws them: three equal columns of label | value rows on hairlines. */
.tkv8-col .tkl-num { font-family:inherit; font-size:inherit; font-variant-numeric:tabular-nums; }
.tkv8-col .tkv-kv a { color:var(--tk-info); text-decoration:none; }
.tkv8-col .tkv-kv a:hover { text-decoration:underline; }
.tkv8-pic { margin-top:10px; padding-top:10px; border-top:1px solid var(--tk-line); }
.tkv8-pic > summary { cursor:pointer; font-size:.78rem; color:var(--tk-muted); }
.tkv8-pic[open] > summary { margin-bottom:8px; }
.tkv8-pic .tkv-pic { margin-top:0; padding-top:0; border-top:0; }
.tkv8-facts3 { grid-template-columns:repeat(3, minmax(0, 1fr)); gap:20px 40px; }
.tkv8-col .tkv-h2 { font-size:.8125rem; font-weight:600; margin:0 0 6px; padding:0; border:0; }
.tkv8-col .tkv-kv { display:flex; justify-content:space-between; align-items:baseline; gap:12px; padding:7px 0; border-top:1px solid var(--tk-line); font-size:.78rem; }
.tkv8-col .tkv-kv > span:first-child { color:var(--tk-muted); flex:none; }
.tkv8-col .tkv-kv > span:last-child { text-align:right; min-width:0; }
.tkv8-col .tkv-kv.wide { flex-direction:column; gap:2px; }
.tkv8-col .tkv-kv.wide > span:last-child { text-align:left; font-size:.78rem; }
.tkv8-col .tkv-right { justify-content:flex-end; }
.tkv8-col .tkv-kv .tkl-note { font-size:.72rem; }
.tkv8-desc { margin:0; font-size:.875rem; line-height:1.7; color:var(--tk-text); white-space:pre-line; overflow-wrap:anywhere; }
.tkv8-fold { margin-top:8px; }
.tkv8-fold > summary { cursor:pointer; font-size:.75rem; color:var(--tk-muted); padding:4px 0; }
.tkv8-fold[open] > summary { margin-bottom:2px; }
.tkv8-col .tkv-h2 + .tkv-kv { border-top:1px solid var(--tk-line); }
/* Design 8 status rail: each dot in its status colour (the same tone as the status pills), and a line that joins the
   steps already passed down to the current one, each stretch in the colour of the step it reaches; ahead stays grey. */
.tkv8-steps .st-err { --st-dot:#e15759; } .tkv8-steps .st-warn { --st-dot:#f28e2b; } .tkv8-steps .st-warn-lt { --st-dot:#f9b26e; }
.tkv8-steps .st-pend { --st-dot:#edc948; } .tkv8-steps .st-pend-lt { --st-dot:#f2da8a; } .tkv8-steps .st-ok { --st-dot:#59a14f; }
.tkv8-steps .st-ok-lt { --st-dot:#8cd17d; } .tkv8-steps .st-neutral, .tkv8-steps .st-past { --st-dot:#bab0ac; } .tkv8-steps .st-cur { --st-dot:#4e79a7; }
.tkv8-steps { border-left:0; padding:0; gap:0; }
.tkv8-steps .flow-step, .tkv8-steps .flow-cur { position:relative; margin-left:0; padding:5px 0 5px 22px; }
.tkv8-steps .flow-step > i, .tkv8-steps .flow-cur > i { position:absolute; left:1px; top:50%; transform:translateY(-50%); width:10px; height:10px; z-index:1;
  border-radius:50%; background:#fff; border:2px solid var(--tk-line-2); box-sizing:border-box; }
.tkv8-steps .flow-done > i { background:var(--st-dot, var(--tk-ok)); border-color:var(--st-dot, var(--tk-ok)); }
.tkv8-steps .flow-cur > i { left:-1px; width:14px; height:14px; background:var(--st-dot, #344054); border:0; box-shadow:0 0 0 3px #f9fafb; }
.tkv8-steps .flow-step + .flow-step::before { content:""; position:absolute; left:5px; top:-50%; height:100%; width:2px; border-radius:1px; background:var(--tk-line); }
.tkv8-steps .flow-step.flow-done + .flow-step.flow-done::before,
.tkv8-steps .flow-step.flow-done + .flow-step.flow-cur::before { background:var(--st-dot, #344054); width:3px; left:4.5px; }
/* The coloured stretch leaves a passed step in that step's colour (เปิด red → down to the next), drawn over the grey line. */
.tkv8-steps .flow-step.flow-done + .flow-step.flow-done::before,
.tkv8-steps .flow-step.flow-done + .flow-step.flow-cur::before { background:var(--tk-line); width:2px; left:5px; }
.tkv8-steps .flow-step.flow-done::after { content:""; position:absolute; left:4.5px; top:50%; height:100%; width:3px; border-radius:1px; background:var(--st-dot, #344054); }
/* Solid connector: no grey line under a coloured stretch, whole pixels, centred on the 6px dot axis. */
.tkv8-steps .flow-step.flow-done + .flow-step::before { background:transparent; }
.tkv8-steps .flow-step.flow-done::after { left:4px; width:4px; border-radius:2px; z-index:0; }
/* Same specificity as the grey rule above and later, so the grey stretch under a coloured one really goes. */
.tkv8-steps .flow-step.flow-done + .flow-step.flow-done::before,
.tkv8-steps .flow-step.flow-done + .flow-step.flow-cur::before { background:transparent; }
/* No halo round the current dot: it covered the ends of the lines meeting it. */
.tkv8-steps .flow-cur > i { box-shadow:none; }
/* The composer sits in the card again (no sticky bar or shadow): with the shorter chat it only looked like it floated. */
.tkv8 .tkv-composer { position:static; box-shadow:none; padding-bottom:0; }
.tkv8 .tkp-composer-files:empty, .tkv8 .tkp-composer-files attachment-box:empty { display:none; }
/* Chat: a teammate's messages (not yours) on the left, in team colours, corners mirrored like the customer side. */
.tk-chat.team.other { align-self:flex-start; align-items:flex-start; }
.tk-chat-who.team.other { align-self:flex-start; }
.tk-chat.team.other .tk-chat-bubble { border-radius:20px; }
.tk-chat.team.other.first .tk-chat-bubble { border-bottom-left-radius:6px; }
.tk-chat.team.other.mid .tk-chat-bubble { border-top-left-radius:6px; border-bottom-left-radius:6px; }
.tk-chat.team.other.last .tk-chat-bubble { border-top-left-radius:6px; }
.tk-chat.team.other .tk-chat-del { right:auto; left:calc(100% + 6px); }
.tk-chat.team.other .tk-chat-bubble [data-test=attach] > div { justify-content:flex-start; }
/* Portal: the "team sent an email" notice, a system line in the info tint so it reads apart from status changes. */
.tkp-msg.sys.mail .tkp-bubble { background:var(--tk-info-soft); color:var(--tk-info); }

/* Repository pages ("Repository" canvas, 2026-11-26): register, code with README, commits with per-file diff, branches. Own tokens on .rp. */
.rp { --rp-ink:#171717; --rp-ink2:#374151; --rp-muted:#5b6170; --rp-faint:#6b7280; --rp-line:#e5e7eb; --rp-line2:#d1d5db; --rp-soft:#f3f4f6; --rp-row:#fafafa;
  --rp-brand:#991b1b; --rp-brand-soft:#fef2f2; --rp-brand-line:#fecaca; --rp-ok:#157f47; --rp-ok-soft:#ecfdf3; --rp-ok-line:#b7e4c7;
  --rp-info:#1d4ed8; --rp-info-soft:#eff6ff; --rp-warn:#b45309; --rp-warn-soft:#fff7ed;
  --rp-e1:0 1px 2px rgba(23,23,23,.06), 0 10px 28px -14px rgba(23,23,23,.22); --rp-e2:0 1px 1px rgba(23,23,23,.08), 0 3px 8px -3px rgba(23,23,23,.16);
  --rp-mono:"IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color:var(--rp-ink); font-size:.9rem; line-height:1.55; font-variant-numeric:tabular-nums; }
.rp :is(h1,h2,h3,p) { margin:0; }
.rp a { color:inherit; text-decoration:none; }
.rp-ico { width:16px; height:16px; flex:none; stroke:currentColor; fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.rp-ico.fill { fill:currentColor; fill-opacity:.18; }
.rp-mono, .rp pre, .rp .sha, .rp .code { font-family:var(--rp-mono); }
.rp-card { background:#fff; border:1px solid var(--rp-line); border-radius:14px; box-shadow:var(--rp-e1); }
.rp-btn { display:inline-flex; align-items:center; gap:7px; height:36px; padding:0 14px; border-radius:9px; border:1px solid var(--rp-line2); background:linear-gradient(#fff,#fafafa);
  font:inherit; font-size:.84rem; font-weight:600; color:var(--rp-ink2); box-shadow:var(--rp-e2); white-space:nowrap; cursor:pointer; transition:border-color .15s, color .15s; }
.rp-btn:hover { border-color:var(--rp-brand-line); color:var(--rp-brand); }
.rp-btn:focus-visible, .rp-seg button:focus-visible, .rp a:focus-visible, .rp-df .dh:focus-visible { outline:2px solid var(--rp-brand); outline-offset:2px; }
.rp-btn.pri { background:linear-gradient(#a72424,#991b1b); border-color:#991b1b; color:#fff; box-shadow:0 1px 1px rgba(127,29,29,.25), 0 6px 14px -6px rgba(153,27,27,.6); }
.rp-btn.pri:hover { color:#fff; background:linear-gradient(#b32a2a,#a11f1f); }
.rp-btn.sm { height:30px; padding:0 10px; font-size:.78rem; }
.rp-pill { display:inline-flex; align-items:center; gap:5px; height:22px; padding:0 9px; border-radius:11px; font-size:.75rem; font-weight:600; border:1px solid transparent; white-space:nowrap; }
.rp-pill.ok { background:var(--rp-ok-soft); color:var(--rp-ok); border-color:var(--rp-ok-line); }
.rp-pill.info { background:var(--rp-info-soft); color:var(--rp-info); border-color:#c7d7fb; }
.rp-pill.mut { background:var(--rp-soft); color:var(--rp-muted); border-color:var(--rp-line); }
.rp-pill .rp-ico { width:12px; height:12px; }
.rp-chip { display:inline-block; max-width:100%; padding:2px 8px; border-radius:6px; background:var(--rp-soft); font-size:.75rem; color:var(--rp-ink2); font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; vertical-align:middle; }
.rp-av { width:22px; height:22px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; font-size:.62rem; font-weight:700; color:#fff; flex:none; letter-spacing:0; }
.rp-av.t0 { background:#9a3412; } .rp-av.t1 { background:#1d4ed8; } .rp-av.t2 { background:#047857; } .rp-av.t3 { background:#7c3aed; } .rp-av.t4 { background:#be123c; } .rp-av.t5 { background:#0f766e; }
.rp-push { margin-left:auto; display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.rp-seg { display:inline-flex; gap:3px; padding:3px; border-radius:10px; background:#fff; border:1px solid var(--rp-line); box-shadow:var(--rp-e2); }
.rp-seg button { height:30px; padding:0 12px; border:0; border-radius:7px; background:none; display:inline-flex; align-items:center; gap:6px; font:inherit; font-size:.8rem; color:var(--rp-ink2); cursor:pointer; }
.rp-seg button:hover { background:var(--rp-soft); }
.rp-seg button.on { background:var(--rp-ink); color:#fff; font-weight:600; }
.rp-seg em { font-style:normal; font-size:.72rem; opacity:.75; }
.rp-seg.sm button { height:26px; padding:0 10px; }
.rp-skel { padding:18px; display:flex; flex-direction:column; gap:12px; }
.rp-skel div { height:18px; border-radius:6px; background:linear-gradient(90deg,var(--rp-soft),#e9eaee,var(--rp-soft)); background-size:200% 100%; animation:rp-shimmer 1.4s ease-in-out infinite; }
.rp-skel div:nth-child(2n) { width:72%; }
@keyframes rp-shimmer { from { background-position:100% 0; } to { background-position:-100% 0; } }
@media (prefers-reduced-motion: reduce) { .rp-skel div { animation:none; } }
.rp-empty { padding:36px 24px; text-align:center; display:flex; flex-direction:column; align-items:center; gap:6px; color:var(--rp-muted); }
.rp-empty .t { font-weight:700; color:var(--rp-ink); font-size:1rem; }
.rp-empty .rp-btn { margin-top:10px; }
.rp-none { padding:14px 16px; color:var(--rp-muted); font-size:.84rem; }
.rp-hint { font-size:.75rem; color:var(--rp-muted); margin-top:8px !important; }
.rp-hint a, .rp-lnk { color:var(--rp-brand) !important; font-weight:600; }
.rp-lnk { display:inline-block; margin-top:6px; font-size:.8rem; }
.rp-warn { margin:0 0 12px !important; padding:10px 14px; border-radius:10px; background:var(--rp-warn-soft); color:var(--rp-warn); font-size:.84rem; }

/* register */
.rp-h1row { display:flex; align-items:flex-end; gap:16px; flex-wrap:wrap; margin-bottom:18px; }
.rp-h1row h1 { font-size:1.5rem; font-weight:700; letter-spacing:-.01em; }
.rp-sub { color:var(--rp-muted); font-size:.875rem; margin-top:2px !important; }
.rp-tools { display:flex; gap:10px; align-items:flex-end; margin-bottom:14px; flex-wrap:wrap; }
.rp-search { flex:1 1 280px; max-width:380px; } .rp-company { flex:0 1 240px; min-width:180px; } .rp-sort { flex:0 0 170px; margin-left:auto; }
.rp-list { overflow:hidden; }
.rp-lrow { display:grid; grid-template-columns:minmax(0,2.4fr) minmax(0,1.1fr) 90px 130px minmax(0,1.3fr); gap:16px; align-items:center; padding:14px 20px; border-top:1px solid var(--rp-line); transition:background .15s; }
.rp-lrow.head { font-size:.78rem; color:var(--rp-muted); font-weight:600; padding:10px 20px; background:var(--rp-row); border-top:0; }
.rp-lrow.head .r { text-align:right; }
a.rp-lrow:hover { background:var(--rp-row); }
a.rp-lrow:hover .nm { color:var(--rp-brand); }
.rp-lname { min-width:0; display:flex; flex-direction:column; }
.rp-lname .l1 { display:flex; align-items:center; gap:8px; min-width:0; }
.rp-lname .nm { font-weight:600; font-size:.95rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; transition:color .15s; }
.rp-lname .code { color:var(--rp-muted); font-size:.76rem; }
.rp-lname .desc { color:var(--rp-ink2); font-size:.8rem; margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rp-lrow .num { text-align:right; color:var(--rp-ink2); }
.rp-lrow .who, .rp-bt .who { display:flex; gap:8px; align-items:center; font-size:.8rem; color:var(--rp-ink2); min-width:0; }
.rp-lrow .who small, .rp-bt .who small { display:block; color:var(--rp-muted); font-size:.74rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
@media (max-width: 860px) {
  .rp-lrow.head { display:none; }
  .rp-lrow { grid-template-columns:minmax(0,1fr) auto; gap:6px 12px; padding:14px 16px; }
  .rp-lrow > :nth-child(1) { grid-column:1 / -1; }
  .rp-lrow > :nth-child(3), .rp-lrow > :nth-child(4) { display:none; }
  .rp-lrow .who { justify-content:flex-end; text-align:right; }
  .rp-search, .rp-company { flex:1 1 100%; max-width:none; } .rp-sort { margin-left:0; flex:1 1 140px; }
}

/* repository header, tabs and layout */
.rp-rh { display:flex; align-items:flex-start; gap:16px; margin-bottom:14px; flex-wrap:wrap; }
.rp-rh h1 { font-size:1.4rem; font-weight:700; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.rp-rh .path { color:var(--rp-muted); font-weight:500; }
.rp-desc { color:var(--rp-ink2); margin-top:4px !important; }
.rp-meta { display:flex; gap:6px 16px; flex-wrap:wrap; margin-top:8px; font-size:.8rem; color:var(--rp-muted); }
.rp-meta span { display:inline-flex; align-items:center; gap:5px; }
.rp-cols { display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:24px; align-items:start; }
.rp-colmain { min-width:0; }
@media (max-width: 1100px) { .rp-cols { grid-template-columns:minmax(0,1fr); } }
.rp-bar { display:flex; align-items:center; gap:12px; margin-bottom:12px; flex-wrap:wrap; }
.rp-ref { width:220px; max-width:100%; }
.rp-path { display:flex; flex-wrap:wrap; align-items:center; gap:2px; font-size:.9rem; padding-bottom:8px; min-width:0; }
.rp-path a { color:var(--rp-brand); font-weight:600; }
.rp-path a:hover { text-decoration:underline; }
.rp-path .sep { color:var(--rp-faint); margin:0 4px; }
.rp-path b { font-weight:700; }

/* tree */
.rp-tree { overflow:hidden; }
.rp-last { display:flex; align-items:center; gap:10px; padding:10px 16px; background:var(--rp-row); border-bottom:1px solid var(--rp-line); font-size:.84rem; flex-wrap:wrap; }
.rp-last .msg { flex:1; min-width:120px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:var(--rp-ink2); }
.rp-last .msg:hover, .rp-ft .c:hover, .rp-bt .sub:hover { color:var(--rp-brand); text-decoration:underline; }
.rp-last .sha { color:var(--rp-muted); font-size:.78rem; }
.rp-last .when { color:var(--rp-muted); font-size:.78rem; }
.rp-ft { display:grid; grid-template-columns:20px minmax(0,240px) minmax(0,1fr) 120px; gap:10px; align-items:center; padding:8px 16px; border-top:1px solid var(--rp-line); font-size:.86rem; transition:background .12s; }
.rp-last + .rp-ft { border-top:0; }
.rp-ft:hover { background:var(--rp-row); }
.rp-ft .ic { display:inline-flex; }
.rp-ft .ic.dir { color:#3b6fd8; } .rp-ft .ic.file { color:var(--rp-faint); }
.rp-ft .n { font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rp-ft .n:hover { color:var(--rp-brand); text-decoration:underline; }
.rp-ft .c { color:var(--rp-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rp-ft .t { color:var(--rp-muted); text-align:right; font-size:.78rem; white-space:nowrap; }
@media (max-width: 640px) { .rp-ft { grid-template-columns:20px minmax(0,1fr) auto; } .rp-ft .c { display:none; } }

/* readme and file */
.rp-readme { margin-top:18px; overflow:hidden; }
.rp-readme .rhd, .rp-file .fhd { display:flex; align-items:center; gap:8px; padding:11px 16px; border-bottom:1px solid var(--rp-line); font-weight:600; font-size:.875rem; flex-wrap:wrap; }
.rp-readme .rb, .rp-file .rb { padding:18px 24px 22px; font-size:.92rem; line-height:1.7; color:var(--rp-ink2); overflow-wrap:anywhere; }
.rp .rb :is(h1,h2) { font-size:1.25rem; color:var(--rp-ink); margin:18px 0 8px; padding-bottom:6px; border-bottom:1px solid var(--rp-line); }
.rp .rb :is(h1,h2):first-child { margin-top:0; }
.rp .rb h3 { font-size:1rem; color:var(--rp-ink); margin:16px 0 6px; }
.rp .rb p { margin:0 0 10px; }
.rp .rb a { color:var(--rp-brand); text-decoration:underline; }
.rp .rb pre { background:#0f172a; color:#e2e8f0; border-radius:10px; padding:12px 14px; font-size:.8rem; line-height:1.6; overflow:auto; margin:8px 0 12px; }
.rp .rb :not(pre) > code { background:var(--rp-soft); border-radius:5px; padding:1px 5px; font-size:.85em; }
.rp .rb table { border-collapse:collapse; margin:8px 0 12px; } .rp .rb :is(th,td) { border:1px solid var(--rp-line); padding:5px 10px; }
.rp-plain { white-space:pre-wrap; font-size:.8rem; margin:0; }
.rp-file { overflow:hidden; }
.rp-file .fhd b { font-family:var(--rp-mono); font-size:.82rem; overflow-wrap:anywhere; }
.rp-file .sz { color:var(--rp-muted); font-weight:400; font-size:.78rem; }
.rp-file ckn-code-block { display:block; }

/* aside */
.rp-aside { display:flex; flex-direction:column; gap:14px; }
.rp-aside .rp-card { padding:16px; }
.rp-aside h3 { font-size:.84rem; font-weight:700; margin-bottom:10px; }
.rp-clonebox { display:flex; gap:6px; margin-top:10px; }
.rp-clonebox input { flex:1; min-width:0; height:32px; border:1px solid var(--rp-line2); border-radius:8px; padding:0 8px; font-size:.74rem; color:var(--rp-ink2); background:var(--rp-row); }
.rp-side .kv { display:flex; justify-content:space-between; align-items:center; gap:10px; font-size:.8rem; padding:5px 0; color:var(--rp-muted); }
.rp-side .kv b { color:var(--rp-ink); font-weight:600; }
.rp-side .kv > span:first-child { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* states */
.rp-state { display:flex; gap:16px; padding:22px 24px; align-items:flex-start; }
.rp-state .ic { width:40px; height:40px; border-radius:12px; display:inline-flex; align-items:center; justify-content:center; background:var(--rp-soft); color:var(--rp-muted); flex:none; }
.rp-state .ic.warn { background:var(--rp-warn-soft); color:var(--rp-warn); }
.rp-state .ic .rp-ico { width:20px; height:20px; }
.rp-state .t { font-weight:700; font-size:1rem; margin-bottom:4px !important; }
.rp-state p { color:var(--rp-ink2); max-width:640px; }
.rp-state > div { min-width:0; }
.rp-pre { background:#0f172a; color:#e2e8f0; border-radius:10px; padding:12px 14px; font-size:.78rem; line-height:1.65; margin:12px 0 0; overflow:auto; }
.rp-row-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:14px; }

/* commits */
.rp-day { margin-bottom:18px; }
.rp-day h3 { display:flex; align-items:center; gap:8px; font-size:.8rem; font-weight:600; color:var(--rp-muted); margin:0 0 8px 4px; }
.rp-day .rp-card { overflow:hidden; }
.rp-commit { display:flex; align-items:center; gap:14px; padding:11px 16px; border-top:1px solid var(--rp-line); }
.rp-commit:first-child { border-top:0; }
.rp-commit:hover { background:var(--rp-row); }
.rp-commit .m { flex:1; min-width:0; }
.rp-commit .s { display:block; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rp-commit .s:hover { color:var(--rp-brand); }
.rp-commit .by { display:flex; align-items:center; gap:6px; font-size:.78rem; color:var(--rp-muted); margin-top:3px; }
.rp-commit .by .rp-av { width:18px; height:18px; font-size:.55rem; }
.rp-commit .sha, .rp-shabtn { font-size:.76rem; color:var(--rp-ink2); border:1px solid var(--rp-line); border-radius:7px; padding:3px 8px; background:#fff; }
.rp-commit .sha:hover, .rp-shabtn:hover { border-color:var(--rp-brand-line); color:var(--rp-brand); }
.rp-more { display:flex; justify-content:center; }
.rp-back { display:inline-flex; align-items:center; gap:4px; font-size:.84rem; color:var(--rp-brand) !important; font-weight:600; margin-bottom:12px; }
.rp-cmh { padding:16px 18px; margin-bottom:14px; }
.rp-cmh h2 { font-size:1.1rem; font-weight:700; overflow-wrap:anywhere; }
.rp-cmh .body { white-space:pre-wrap; font-size:.82rem; color:var(--rp-ink2); margin:8px 0 0; }
.rp-cmh .l2 { display:flex; gap:8px 10px; align-items:center; margin-top:12px; font-size:.82rem; color:var(--rp-muted); flex-wrap:wrap; }
.rp-cmh .l2 b { color:var(--rp-ink); }
.rp-cmh .parent { color:var(--rp-muted); }
.rp-cmh .parent a { color:var(--rp-ink2); }
.rp-files { display:flex; gap:10px; font-size:.84rem; color:var(--rp-muted); margin-bottom:12px; align-items:center; flex-wrap:wrap; }
.rp .add { color:var(--rp-ok); font-weight:600; } .rp .del { color:var(--rp-brand); font-weight:600; }
.rp-df { margin-bottom:12px; overflow:hidden; }
.rp-df .dh { display:flex; width:100%; align-items:center; gap:10px; padding:9px 14px; background:var(--rp-row); border:0; font:inherit; font-size:.8rem; cursor:pointer; text-align:left; color:var(--rp-ink); }
.rp-df .dh[aria-expanded="true"] { border-bottom:1px solid var(--rp-line); }
.rp-df .chev { display:inline-flex; color:var(--rp-muted); transition:transform .15s ease-out; }
.rp-df .chev.open { transform:rotate(90deg); }
.rp-df .p { font-family:var(--rp-mono); font-weight:600; font-size:.78rem; flex:1; min-width:0; overflow-wrap:anywhere; }
.rp-df .blocks { display:inline-flex; gap:2px; }
.rp-df .blocks i { width:8px; height:8px; border-radius:2px; background:var(--rp-line); }
.rp-df .blocks i.a { background:#2ea05c; } .rp-df .blocks i.d { background:#d0454c; }
.rp-df .dlines { overflow-x:auto; }
.rp-df .dl { display:grid; grid-template-columns:44px 44px 16px minmax(0,1fr); font-family:var(--rp-mono); font-size:.8125rem; line-height:1.6; min-width:max-content; }
.rp-df .dl .tx { white-space:pre; padding-right:16px; }
.rp-df .dl .ln { color:var(--rp-faint); text-align:right; padding-right:8px; user-select:none; }
.rp-df .dl .sg { user-select:none; text-align:center; }
.rp-df .dl.hunk { background:#eef4ff; color:#4b5b85; }
.rp-df .dl.hunk .tx { grid-column:3 / -1; }
.rp-df .dl.add { background:#ecfdf3; font-weight:400; color:inherit; } .rp-df .dl.add .sg { color:var(--rp-ok); }
.rp-df .dl.del { background:#fef2f2; font-weight:400; color:inherit; } .rp-df .dl.del .sg { color:var(--rp-brand); }
.rp-df .dl.meta { color:var(--rp-muted); }
@media (prefers-reduced-motion: reduce) { .rp-df .chev { transition:none; } }

/* branches */
.rp-bt { overflow:hidden; }
.rp-bt .row { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(0,1.3fr) 150px 140px 110px; gap:14px; align-items:center; padding:12px 18px; border-top:1px solid var(--rp-line); font-size:.86rem; }
.rp-bt .row.head { background:var(--rp-row); font-size:.78rem; font-weight:600; color:var(--rp-muted); border-top:0; }
.rp-bt .row.head .c { text-align:center; }
.rp-bt .nm { display:flex; align-items:center; gap:8px; min-width:0; }
.rp-br { font-family:var(--rp-mono); font-size:.78rem; background:var(--rp-info-soft); color:var(--rp-info) !important; border-radius:6px; padding:2px 7px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rp-br:hover { text-decoration:underline; }
.rp-bt .sub { color:var(--rp-ink2); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rp-ab { display:grid; grid-template-columns:1fr 1fr; font-size:.74rem; color:var(--rp-muted); }
.rp-ab .a { display:flex; align-items:center; justify-content:flex-end; gap:4px; border-right:1px solid var(--rp-line2); padding-right:6px; }
.rp-ab .b { display:flex; align-items:center; gap:4px; padding-left:6px; }
.rp-ab i { display:inline-block; height:6px; border-radius:3px; background:#c7ccd4; }
.rp-ab .b i { background:#7aa2e8; }

/* repository pull requests */
.rp-pill.purple { background:#f5f3ff; color:#6d28d9; border-color:#ddd6fe; }
.rp-pill.bad { background:var(--rp-brand-soft); color:var(--rp-brand); border-color:var(--rp-brand-line); }
.rp-btn.ok { background:linear-gradient(#1a8f50,#157f47); border-color:#157f47; color:#fff; }
.rp-btn.ok:hover { color:#fff; background:linear-gradient(#1c9a56,#16864b); }
.rp-btn.okline { color:var(--rp-ok); border-color:var(--rp-ok-line); }
.rp-btn.okline:hover { color:#fff; background:var(--rp-ok); border-color:var(--rp-ok); }
.rp-btn[disabled] { opacity:.55; cursor:not-allowed; }
.rp .push-r { margin-left:auto; }
.rp-lnk.sm { font-size:.76rem; margin-top:0; }
.rp-bt .nm .rp-lnk.sm { white-space:nowrap; }
.rp-hint.pad { padding:0 16px 14px; }
.rp-h2 { font-size:1.15rem; font-weight:700; }
.rp-h3 { font-size:.9rem; font-weight:700; margin:18px 0 8px !important; }
.rp-pulls .rp-sub { margin-bottom:12px !important; }
.rp-prlist, .rp-day1 { overflow:hidden; }
.rp-day1 { margin-bottom:16px; }
.rp-pr { display:grid; grid-template-columns:22px minmax(0,1fr) auto; gap:12px; padding:14px 18px; border-top:1px solid var(--rp-line); align-items:start; transition:background .12s; }
.rp-pr:first-child { border-top:0; }
.rp-pr:hover { background:var(--rp-row); }
.rp-pr:hover .t { color:var(--rp-brand); }
.rp-pr .st { display:inline-flex; margin-top:2px; } .rp-pr .st.open { color:var(--rp-ok); } .rp-pr .st.merged { color:#6d28d9; } .rp-pr .st.closed { color:var(--rp-brand); }
.rp-pr .main { min-width:0; display:flex; flex-direction:column; }
.rp-pr .t { font-weight:600; font-size:.95rem; transition:color .12s; }
.rp-pr .m { font-size:.78rem; color:var(--rp-muted); margin-top:4px; display:flex; gap:6px 10px; flex-wrap:wrap; align-items:center; }
.rp-pr .r { display:flex; align-items:center; gap:12px; font-size:.78rem; color:var(--rp-muted); }
.rp-pr .cm { display:inline-flex; align-items:center; gap:4px; }
.rp .ck.ok, .rp-ck .dot.ok { color:var(--rp-ok); } .rp .ck.bad, .rp-ck .dot.bad { color:var(--rp-brand); } .rp .ck.run, .rp-ck .dot.run { color:var(--rp-warn); }
.rp-cmp { display:flex; align-items:flex-end; gap:12px; flex-wrap:wrap; padding:14px 16px; margin-bottom:16px; }

.rp-cmpstate { display:flex; align-items:center; gap:10px; padding-bottom:8px; flex-wrap:wrap; }
.rp-cmpstate .rp-sub { margin:0 !important; }
.rp-form { padding:16px 18px; margin:16px 0; }
.rp-form h3 { font-size:.9rem; font-weight:700; margin-bottom:10px; }
.rp-form .rp-row-actions { align-items:center; }
.rp-prt { margin-bottom:14px; }
.rp-prt h2 { font-size:1.3rem; font-weight:700; overflow-wrap:anywhere; }
.rp-prt .num { color:var(--rp-faint); font-weight:500; }
.rp-prt .l2 { display:flex; align-items:center; gap:8px; margin-top:8px; font-size:.84rem; color:var(--rp-muted); flex-wrap:wrap; }
.rp-stpill { display:inline-flex; align-items:center; gap:6px; height:28px; padding:0 12px; border-radius:14px; font-weight:600; font-size:.8rem; color:#fff; background:var(--rp-ok); }
.rp-stpill.merged { background:#6d28d9; } .rp-stpill.closed { background:var(--rp-brand); }
.rp-subtabs { display:flex; gap:4px; border-bottom:1px solid var(--rp-line); margin-bottom:18px; overflow-x:auto; }
.rp-subtabs a { display:inline-flex; align-items:center; gap:6px; padding:9px 12px; font-size:.86rem; color:var(--rp-muted); border-bottom:2px solid transparent; margin-bottom:-1px; white-space:nowrap; }
.rp-subtabs a:hover { color:var(--rp-ink); }
.rp-subtabs a.on { color:var(--rp-ink); font-weight:700; border-bottom-color:var(--rp-brand); }
.rp-subtabs em { font-style:normal; font-size:.72rem; font-weight:600; background:var(--rp-soft); color:var(--rp-ink2); border-radius:9px; padding:1px 7px; }
.rp-tl { display:flex; flex-direction:column; gap:14px; position:relative; }
.rp-cm { display:grid; grid-template-columns:32px minmax(0,1fr); gap:12px; }
.rp-av.lg { width:32px; height:32px; font-size:.72rem; }
.rp-cm .box { border:1px solid var(--rp-line); border-radius:12px; background:#fff; overflow:hidden; box-shadow:var(--rp-e2); }
.rp-cm .bh { padding:8px 14px; background:var(--rp-row); border-bottom:1px solid var(--rp-line); font-size:.8rem; color:var(--rp-muted); display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.rp-cm .bh b { color:var(--rp-ink); }
.rp-cm .where { font-size:.74rem; color:var(--rp-info); }
.rp-cm .bb { padding:12px 14px; font-size:.88rem; color:var(--rp-ink2); overflow-wrap:anywhere; }
.rp-cm .bb p { margin:0 0 8px; } .rp-cm .bb > :last-child, .rp-cm .bb p:last-child { margin-bottom:0; }
.rp-cm .bb pre { background:#0f172a; color:#e2e8f0; border-radius:8px; padding:10px 12px; font-size:.78rem; overflow:auto; }
.rp-ev { display:flex; align-items:center; gap:8px; font-size:.8rem; color:var(--rp-muted); padding-left:44px; flex-wrap:wrap; }
.rp-ev b { color:var(--rp-ink); }
.rp-ev i { width:24px; height:24px; border-radius:50%; background:var(--rp-soft); display:inline-flex; align-items:center; justify-content:center; flex:none; }
.rp-ev i.merged { background:#ede9fe; color:#6d28d9; } .rp-ev i.closed { background:var(--rp-brand-soft); color:var(--rp-brand); }
.rp-ev i .rp-ico { width:13px; height:13px; }
.rp-merge { margin-top:18px; border:1px solid var(--rp-line); border-radius:14px; background:#fff; box-shadow:var(--rp-e1); overflow:hidden; }
.rp-merge.ready { border-color:var(--rp-ok-line); } .rp-merge.merged { border-color:#ddd6fe; } .rp-merge.blocked { border-color:var(--rp-brand-line); }
.rp-ck { display:flex; align-items:center; gap:10px; padding:11px 16px; border-top:1px solid var(--rp-line); font-size:.86rem; flex-wrap:wrap; }
.rp-merge > .rp-ck:first-child, .rp-merge > div > .rp-ck:first-child { border-top:0; }
.rp-ck b { font-weight:600; }
.rp-ck.sub { padding:7px 16px 7px 50px; font-size:.8rem; background:var(--rp-row); }
.rp-ck.sub .desc { color:var(--rp-muted); flex:1; min-width:120px; }
.rp-ck small { margin-left:auto; color:var(--rp-muted); font-size:.75rem; white-space:nowrap; }
.rp-ck .dot { width:24px; height:24px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; background:var(--rp-soft); color:var(--rp-muted); flex:none; }
.rp-ck .dot.ok { background:var(--rp-ok-soft); } .rp-ck .dot.bad { background:var(--rp-brand-soft); } .rp-ck .dot.run { background:var(--rp-warn-soft); } .rp-ck .dot.merged { background:#ede9fe; color:#6d28d9; }
.rp-ck .dot .rp-ico { width:14px; height:14px; }
.rp-ck.sub .dot { width:18px; height:18px; background:none; }
.rp-conflicts { margin:0; padding:4px 16px 12px 50px; list-style:none; font-size:.78rem; color:var(--rp-brand); }
.rp-merge .go { display:flex; flex-direction:column; align-items:stretch; gap:10px; padding:14px 16px; background:var(--rp-ok-soft); border-top:1px solid var(--rp-ok-line); }
.rp-merge .go .grow { flex:1 1 240px; }
@media (max-width: 640px) { .rp-pr { grid-template-columns:22px minmax(0,1fr); } .rp-pr .r { grid-column:2; } .rp-ev { padding-left:0; } }
/* pull request: comments on a line of the diff */
.rp-df .dl { position:relative; }
.rp-df .dl .addc { position:absolute; left:4px; top:50%; transform:translateY(-50%); width:20px; height:20px; border-radius:6px; border:0; background:var(--rp-info); color:#fff;
  font:600 .9rem/1 var(--rp-mono); display:inline-flex; align-items:center; justify-content:center; cursor:pointer; opacity:0; transition:opacity .12s; }
.rp-df .dl:not(.can) .addc { display:none; }
.rp-df .dl.can:hover .addc, .rp-df .dl .addc:focus-visible { opacity:1; }
@media (hover: none) { .rp-df .dl.can .addc { opacity:.6; } }
.rp-lc { display:grid; grid-template-columns:22px minmax(0,1fr); gap:10px; margin:6px 12px 6px 104px; padding:10px 12px; border:1px solid var(--rp-line); border-radius:10px; background:#fff;
  box-shadow:var(--rp-e2); font-family:inherit; font-size:.84rem; max-width:720px; white-space:normal; }
.rp-lc .h { font-size:.76rem; color:var(--rp-muted); margin-bottom:2px; } .rp-lc .h b { color:var(--rp-ink); }
.rp-lc.form { display:block; }
.rp-lc.form .rp-row-actions { margin-top:4px; }
@media (max-width: 640px) { .rp-lc { margin-left:12px; } }

/* repository settings and rulesets (design 0082) */
.rp-set { display:grid; grid-template-columns:220px minmax(0,1fr); gap:24px; align-items:start; }
@media (max-width: 860px) { .rp-set { grid-template-columns:minmax(0,1fr); } }
.rp-setnav { display:flex; flex-direction:column; gap:2px; position:sticky; top:12px; }
@media (max-width: 860px) { .rp-setnav { flex-direction:row; overflow-x:auto; position:static; } }
.rp-setnav a { padding:8px 12px; border-radius:8px; font-size:.875rem; color:var(--rp-ink2); white-space:nowrap; }
.rp-setnav a:hover { background:#fff; color:var(--rp-ink); }
.rp-setnav a.on { background:#fff; box-shadow:var(--rp-e2); font-weight:700; color:var(--rp-ink); }
.rp-setmain { min-width:0; display:flex; flex-direction:column; gap:16px; }
.rp-sec { padding:0; overflow:visible; }
.rp-sec > header { padding:14px 18px; border-bottom:1px solid var(--rp-line); display:flex; flex-direction:column; gap:2px; }
.rp-sec > header.row { flex-direction:row; align-items:center; gap:12px; flex-wrap:wrap; }
.rp-sec > header h2 { font-size:1rem; font-weight:700; }
.rp-sec > header p { font-size:.8rem; color:var(--rp-muted); }
.rp-sec > footer { display:flex; justify-content:flex-end; align-items:center; gap:8px; padding:12px 18px 16px; border-top:1px solid var(--rp-line); }
.rp-sec > .rp-grid2 { margin:14px 18px 0; }
.rp-sec > ckn-input, .rp-sec > .rp-hint, .rp-sec > .rp-pad { display:block; margin:14px 18px 0; }
.rp-sec > .rp-hint { margin-bottom:12px; }
.rp-sec.danger { border-color:var(--rp-brand-line); }
.rp-grid2 { display:grid; grid-template-columns:1fr 1fr; gap:14px 18px; align-items:start; }
@media (max-width: 640px) { .rp-grid2 { grid-template-columns:1fr; } }
.rp-lab { display:block; font-size:.78rem; font-weight:600; color:var(--rp-muted); margin-bottom:6px; }
.rp-opt { display:flex; gap:14px; align-items:flex-start; padding:14px 18px; border-top:1px solid var(--rp-line); }
.rp-sec > header + .rp-opt, h3 + .rp-opt { border-top:0; }
.rp-opt > div { flex:1; min-width:0; }
.rp-opt b { font-size:.9rem; }
.rp-opt p { font-size:.8rem; color:var(--rp-muted); margin-top:2px !important; }
.rp-swgap { width:38px; flex:none; }
.rp-sw { width:38px; height:22px; border-radius:11px; border:0; background:var(--rp-line2); position:relative; flex:none; cursor:pointer; margin-top:1px; transition:background .15s; }
.rp-sw:after { content:""; position:absolute; top:3px; left:3px; width:16px; height:16px; border-radius:50%; background:#fff; box-shadow:0 1px 2px rgba(0,0,0,.25); transition:left .15s ease-out; }
.rp-sw[aria-checked="true"] { background:var(--rp-ink); }
.rp-sw[aria-checked="true"]:after { left:19px; }
.rp-sw:focus-visible, .rp-radio button:focus-visible, .rp-chipbtn:focus-visible, .rp-setnav a:focus-visible { outline:2px solid var(--rp-brand); outline-offset:2px; }
@media (prefers-reduced-motion: reduce) { .rp-sw, .rp-sw:after { transition:none; } }
.rp-radio { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:10px; max-width:640px; }
.rp-radio button { text-align:left; border:1px solid var(--rp-line2); border-radius:10px; padding:10px 12px 10px 36px; background:#fff; font:inherit; font-size:.8rem; color:var(--rp-muted); cursor:pointer; position:relative; }
.rp-radio button:before { content:""; position:absolute; left:12px; top:12px; width:14px; height:14px; border-radius:50%; border:1.5px solid var(--rp-line2); }
.rp-radio button b { display:block; color:var(--rp-ink); font-size:.86rem; }
.rp-radio button[aria-checked="true"] { border-color:var(--rp-ink); box-shadow:0 0 0 1px var(--rp-ink); }
.rp-radio button[aria-checked="true"]:before { border:5px solid var(--rp-ink); }
.rp-radio button[disabled] { opacity:.45; cursor:not-allowed; }
.rp-rules > h3 { font-size:.74rem; font-weight:700; color:var(--rp-faint); letter-spacing:.04em; padding:16px 18px 4px; margin:0; border-top:1px solid var(--rp-line); text-transform:uppercase; }
.rp-rules > header + h3 { border-top:0; }
.rp-subopts { margin-top:10px; padding:12px 14px; background:var(--rp-row); border:1px solid var(--rp-line); border-radius:10px; display:flex; flex-direction:column; gap:10px; max-width:720px; }
.rp-numrow { display:flex; align-items:center; gap:12px; flex-wrap:wrap; font-size:.86rem; }
.rp-numrow > span:first-child { min-width:220px; }
.rp-inline { width:120px; }
.rp-inline.wide { width:260px; max-width:100%; }
.rp-check { display:flex; gap:8px; align-items:center; font-size:.86rem; cursor:pointer; }
.rp-check input { width:16px; height:16px; accent-color:var(--rp-ink); }
.rp-chips { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.rp-pat { display:inline-flex; align-items:center; gap:4px; height:26px; padding:0 4px 0 9px; border-radius:6px; background:var(--rp-info-soft); color:var(--rp-info); font-family:var(--rp-mono); font-size:.76rem; }
.rp-pat:not(:has(.x)) { padding-right:9px; }
.rp-pat.ex { background:var(--rp-brand-soft); color:var(--rp-brand); }
.rp-pat .x, .rp-chipbtn .x { border:0; background:none; color:inherit; opacity:.6; display:inline-flex; padding:2px; cursor:pointer; border-radius:4px; }
.rp-pat .x:hover, .rp-chipbtn .x:hover { opacity:1; background:rgba(0,0,0,.06); }
.rp-pat .rp-ico, .rp-chipbtn .rp-ico { width:12px; height:12px; }
.rp-chipbtn { display:inline-flex; align-items:center; gap:6px; height:28px; padding:0 10px; border-radius:14px; border:1px dashed var(--rp-line2); background:#fff; font:inherit; font-size:.8rem; font-weight:600; color:var(--rp-muted); cursor:pointer; }
.rp-chipbtn.on { border:1px solid var(--rp-ink); color:var(--rp-ink); background:var(--rp-soft); }
.rp-patterns { margin:16px 18px 18px; display:flex; flex-direction:column; gap:6px; }
.rp-patterns .rp-lab { margin:8px 0 2px; }
.rp-preview { margin-top:8px; padding:10px 12px; background:var(--rp-row); border:1px solid var(--rp-line); border-radius:10px; font-size:.8rem; color:var(--rp-muted); }
.rp-preview > div { display:flex; flex-wrap:wrap; gap:4px 14px; margin-top:6px; color:var(--rp-ink2); }
.rp-test { font-size:.8rem; font-weight:600; }
.rp-test.ok { color:var(--rp-ok); } .rp-test.bad { color:var(--rp-brand); }
.rp-import { padding:12px 18px; border-bottom:1px solid var(--rp-line); display:flex; flex-direction:column; gap:8px; align-items:flex-start; }
.rp-import ckn-textarea { width:100%; }
.rp-rs { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px 16px; padding:14px 18px; border-top:1px solid var(--rp-line); }
.rp-sec > header + .rp-rs, .rp-import + .rp-rs { border-top:0; }
.rp-rs .nm { font-weight:700; font-size:.95rem; }
.rp-rs .nm:hover { color:var(--rp-brand); text-decoration:underline; }
.rp-rs .meta { display:flex; flex-wrap:wrap; gap:6px 10px; align-items:center; font-size:.78rem; color:var(--rp-muted); margin-top:6px; }
.rp-rs .rules { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.rp-rs .side { display:flex; flex-direction:column; align-items:flex-end; gap:6px; }
.rp-pill.warn { background:var(--rp-warn-soft); color:var(--rp-warn); border-color:#fed7aa; }
.rp-ins { display:grid; grid-template-columns:110px 60px minmax(0,1fr) 160px 90px; gap:12px; align-items:center; padding:10px 18px; border-top:1px solid var(--rp-line); font-size:.82rem; }
.rp-ins .when, .rp-ins .src { color:var(--rp-muted); }
.rp-ins .what { min-width:0; overflow-wrap:anywhere; }
.rp-ins .who { display:flex; align-items:center; gap:6px; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
@media (max-width: 860px) { .rp-ins { grid-template-columns:minmax(0,1fr) auto; } .rp-ins .src, .rp-ins .who { display:none; } }
.rp-sec .rp-tools { padding:12px 18px 0; }
.rp-btn.danger { border-color:var(--rp-brand); color:var(--rp-brand); }
.rp-btn.danger:not([disabled]):hover { background:var(--rp-brand); color:#fff; }
.rp-dz { display:flex; flex-direction:column; gap:16px; }
/* pull request merge box: ruleset results */
.rp-ck.rule small { margin-left:0; display:block; }
.rp-ck.rule .rs-name { margin-left:auto; }
.rp-bypass { display:flex; align-items:center; gap:8px; font-size:.84rem; }
/* repository access and webhooks (design 0083) */
.rp-vis { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; padding:16px 18px 4px; }
@media (max-width: 640px) { .rp-vis { grid-template-columns:1fr; } }
.rp-vis button { text-align:left; border:1px solid var(--rp-line2); border-radius:12px; padding:12px 14px 12px 40px; background:#fff; font:inherit; font-size:.8rem; color:var(--rp-muted); cursor:pointer; position:relative; }
.rp-vis button:before { content:""; position:absolute; left:14px; top:15px; width:14px; height:14px; border-radius:50%; border:1.5px solid var(--rp-line2); }
.rp-vis button b { display:block; color:var(--rp-ink); font-size:.9rem; margin-bottom:2px; }
.rp-vis button[aria-checked="true"] { border-color:var(--rp-ink); box-shadow:0 0 0 1px var(--rp-ink); }
.rp-vis button[aria-checked="true"]:before { border:5px solid var(--rp-ink); }
.rp-vis button[disabled] { cursor:default; }
.rp-vis button[disabled][aria-checked="false"] { opacity:.6; }
.rp-vis button:focus-visible, .rp-evs button:focus-visible, .rp-icobtn:focus-visible, .rp-pop button:focus-visible, .rp-dl:focus-visible { outline:2px solid var(--rp-brand); outline-offset:2px; }
.rp-levels { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px 18px; padding:10px 18px 16px; font-size:.78rem; color:var(--rp-muted); }
.rp-levels b { display:block; color:var(--rp-ink2); font-size:.8rem; }
@media (max-width: 640px) { .rp-levels { grid-template-columns:1fr; } }
.rp-addm { display:flex; gap:10px; align-items:flex-start; padding:14px 18px; border-bottom:1px solid var(--rp-line); background:var(--rp-row); flex-wrap:wrap; }
.rp-addm-q { position:relative; flex:1; min-width:220px; max-width:420px; }
.rp-pop { position:absolute; z-index:20; left:0; right:0; top:calc(100% + 4px); background:#fff; border:1px solid var(--rp-line2); border-radius:10px; box-shadow:var(--rp-e1); padding:4px; display:flex; flex-direction:column; max-height:280px; overflow:auto; }
.rp-pop button { display:flex; gap:10px; align-items:center; text-align:left; border:0; background:none; font:inherit; padding:8px 10px; border-radius:7px; cursor:pointer; }
.rp-pop button:hover { background:var(--rp-soft); }
.rp-pop b, .rp-mem .nm b, .rp-inh .nm b { display:block; font-size:.86rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rp-pop small, .rp-mem .nm small, .rp-inh .nm small { display:block; font-size:.74rem; color:var(--rp-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rp-mem { display:flex; gap:12px; align-items:center; padding:10px 18px; border-top:1px solid var(--rp-line); }
.rp-sec > header + .rp-mem, .rp-addm + .rp-none + .rp-mem, .rp-addm + .rp-mem { border-top:0; }
.rp-mem .rp-av, .rp-inh .rp-av, .rp-pop .rp-av { width:30px; height:30px; font-size:.7rem; }
.rp-mem .nm, .rp-inh .nm { flex:1; min-width:0; }
.rp-mem .lv { font-size:.82rem; font-weight:600; color:var(--rp-ink2); }
.rp-mem .ed { display:flex; gap:6px; align-items:center; }
.rp-mem .hide { display:none; }
.rp-icobtn { width:32px; height:32px; display:inline-flex; align-items:center; justify-content:center; border:1px solid transparent; border-radius:8px; background:none; color:var(--rp-muted); cursor:pointer; }
.rp-icobtn:hover { border-color:var(--rp-brand-line); color:var(--rp-brand); background:var(--rp-brand-soft); }
.rp-icobtn .rp-ico { width:14px; height:14px; }
.rp-inh { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:0 18px; padding:6px 18px 10px; }
.rp-inh .it { display:flex; gap:10px; align-items:center; padding:8px 0; border-bottom:1px solid var(--rp-line); min-width:0; }
.rp-sec > .rp-more { padding:0 18px 14px; }
.rp-dot { width:9px; height:9px; border-radius:50%; flex:none; background:var(--rp-line2); }
.rp-dot.ok { background:var(--rp-ok); } .rp-dot.bad { background:var(--rp-brand); } .rp-dot.warn { background:var(--rp-warn); }
.rp-hk { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:6px 14px; padding:14px 18px; border-top:1px solid var(--rp-line); align-items:start; }
.rp-sec > header + .rp-none + .rp-hk, .rp-sec > header + .rp-hk { border-top:0; }
.rp-hk .rp-dot { margin-top:7px; }
.rp-hk .nm { font-weight:700; font-size:.95rem; }
.rp-hk .nm:hover { color:var(--rp-brand); text-decoration:underline; }
.rp-hk .url { font-size:.78rem; color:var(--rp-ink2); overflow-wrap:anywhere; margin-top:2px; }
.rp-hk .meta { display:flex; flex-wrap:wrap; gap:4px 10px; font-size:.78rem; color:var(--rp-muted); margin-top:6px; }
.rp-hk .meta .st { font-weight:600; color:var(--rp-ink2); }
.rp-hk .rules { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.rp-hk .side { display:flex; gap:6px; }
@media (max-width: 640px) { .rp-hk { grid-template-columns:auto minmax(0,1fr); } .rp-hk .side { grid-column:2; } }
.rp-secret { margin:14px 18px 16px; }
.rp-secret .row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.rp-secret .grow { flex:1; min-width:220px; max-width:440px; }
.rp-secret .rp-check { margin-top:8px; }
.rp-evs { display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:10px; padding:16px 18px 4px; }
.rp-evs button { text-align:left; border:1px solid var(--rp-line2); border-radius:10px; padding:10px 12px 10px 38px; background:#fff; font:inherit; font-size:.78rem; color:var(--rp-muted); cursor:pointer; position:relative; display:flex; flex-direction:column; gap:2px; }
.rp-evs button:before { content:""; position:absolute; left:12px; top:12px; width:15px; height:15px; border-radius:4px; border:1.5px solid var(--rp-line2); background:#fff; }
.rp-evs button b { color:var(--rp-ink); font-size:.86rem; }
.rp-evs button small { color:var(--rp-faint); font-size:.7rem; }
.rp-evs button[aria-checked="true"] { border-color:var(--rp-ink); box-shadow:0 0 0 1px var(--rp-ink); }
.rp-evs button[aria-checked="true"]:before { background:var(--rp-ink); border-color:var(--rp-ink); }
.rp-evs button[aria-checked="true"]:after { content:""; position:absolute; left:17px; top:14px; width:5px; height:9px; border:solid #fff; border-width:0 2px 2px 0; transform:rotate(45deg); }
.rp-dlv { display:grid; grid-template-columns:minmax(0,5fr) minmax(0,7fr); min-height:260px; }
.rp-dlv .det { border-left:1px solid var(--rp-line); padding:14px 18px; min-width:0; }
.rp-dlv .list { border-right:0; min-width:0; }
@media (max-width: 980px) { .rp-dlv { grid-template-columns:1fr; } .rp-dlv .det { border-left:0; border-top:1px solid var(--rp-line); } }
.rp-dl { display:grid; grid-template-columns:auto minmax(0,1fr) 54px 92px; grid-template-rows:auto auto; gap:0 10px; align-items:center; padding:9px 18px; border-top:1px solid var(--rp-line); font-size:.8rem; color:var(--rp-ink2); }
.rp-dlv .list > .rp-dl:first-of-type { border-top:0; }
.rp-dl:hover { background:var(--rp-row); }
.rp-dl.on { background:var(--rp-soft); box-shadow:inset 3px 0 0 var(--rp-ink); }
.rp-dl .ev { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; }
.rp-dl .cd { text-align:right; }
.rp-dl .wh { text-align:right; color:var(--rp-muted); font-size:.75rem; }
.rp-dl .g { grid-column:2 / -1; font-size:.7rem; color:var(--rp-faint); }
.rp-dlv .det .hd { display:flex; flex-wrap:wrap; gap:6px 12px; align-items:center; font-size:.8rem; color:var(--rp-muted); }
.rp-dlv .det .hd b { color:var(--rp-ink); }
.rp-dlv .det .g { font-size:.72rem; color:var(--rp-faint); margin:4px 0 10px !important; }
.rp-dlv .det .rp-seg { margin-bottom:4px; }
.rp-dlv .det .rp-lab { margin:12px 0 0; overflow-wrap:anywhere; }
.rp-dlv .rp-pre { white-space:pre-wrap; overflow-wrap:anywhere; max-height:420px; }
.rp-dlv .rp-pre.body { margin-top:8px; }
/* repository pages aligned with the design canvas (boards 2–7) */
.rp .hide { display:none !important; }
.rp-rh-main { flex:1; min-width:0; }
.rp-rh h1 a.path:hover { color:var(--rp-brand); text-decoration:underline; }
.rp-rh-act { position:relative; display:flex; gap:8px; }
.rp-btn.off { opacity:.5; pointer-events:none; }
.rp-clonepop { position:absolute; right:0; top:calc(100% + 6px); z-index:30; width:380px; max-width:calc(100vw - 32px); background:#fff; border:1px solid var(--rp-line2); border-radius:12px; box-shadow:var(--rp-e1); padding:14px; display:flex; flex-direction:column; gap:8px; }
.rp-clonepop .rp-clonebox { margin-top:0; }
.rp-icobtn.line { border-color:var(--rp-line2); background:#fff; }
.rp-tabnav { display:flex; gap:2px; border-bottom:1px solid var(--rp-line); margin-bottom:18px; overflow-x:auto; scrollbar-width:none; }
.rp-tabnav a { display:inline-flex; align-items:center; gap:7px; padding:10px 12px 11px; font-size:.875rem; color:var(--rp-ink2); white-space:nowrap; border-bottom:2px solid transparent; margin-bottom:-1px; }
.rp-tabnav a:hover { color:var(--rp-ink); background:var(--rp-row); border-radius:8px 8px 0 0; }
.rp-tabnav a.on { color:var(--rp-ink); font-weight:700; border-bottom-color:var(--rp-brand); }
.rp-tabnav a .rp-ico { width:15px; height:15px; color:var(--rp-muted); }
.rp-tabnav em { font-style:normal; font-size:.72rem; font-weight:600; background:var(--rp-soft); color:var(--rp-ink2); border-radius:9px; padding:1px 7px; }
.rp-refbtn { position:relative; display:inline-flex; align-items:center; gap:6px; height:36px; padding:0 10px; border:1px solid var(--rp-line2); border-radius:9px; background:linear-gradient(#fff,#fafafa); box-shadow:var(--rp-e2); font-size:.84rem; font-weight:600; color:var(--rp-ink); cursor:pointer; max-width:280px; }
.rp-refbtn select { appearance:none; border:0; background:none; font:inherit; color:inherit; padding:0 2px; min-width:40px; max-width:220px; cursor:pointer; text-overflow:ellipsis; }
.rp-refbtn select:focus { outline:none; }
.rp-refbtn:focus-within { outline:2px solid var(--rp-brand); outline-offset:2px; }
.rp-refbtn .rp-ico { width:14px; height:14px; flex:none; color:var(--rp-muted); pointer-events:none; }
.rp-bar .rp-path { padding-bottom:0; }
.rp-count { display:inline-flex; align-items:center; gap:4px; height:22px; padding:0 8px; border-radius:11px; background:var(--rp-soft); font-size:.75rem; font-weight:600; color:var(--rp-ink2); }
.rp-count:hover { color:var(--rp-brand); }
.rp-count .rp-ico { width:13px; height:13px; }
.rp-side .kv .t { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--rp-ink); font-weight:600; }
.rp-side .kv .t:hover { color:var(--rp-brand); }
.rp-side .rp-lnk { display:inline-block; margin-top:6px; font-size:.82rem; }
.rp-cmh .l2 .rp-mono { font-size:.78rem; }
.rp-df .dhw { display:flex; align-items:center; background:var(--rp-row); }
.rp-df .dhw .dh { flex:1; min-width:0; }
.rp-df .dhw > .rp-btn { margin-right:12px; }
.rp-df .dhw:has(.dh[aria-expanded="true"]) { border-bottom:1px solid var(--rp-line); }
.rp-df .dhw .dh[aria-expanded="true"] { border-bottom:0; }
.rp-df .fold { margin-left:auto; font-size:.75rem; color:var(--rp-muted); font-weight:400; }
.rp-df .dsplit { overflow-x:auto; font-family:var(--rp-mono); font-size:.74rem; line-height:1.7; }
.rp-df .sr { display:grid; grid-template-columns:44px minmax(0,1fr) 44px minmax(0,1fr); }
.rp-df .sr .ln { color:var(--rp-faint); text-align:right; padding-right:8px; user-select:none; }
.rp-df .sr .tx { white-space:pre-wrap; overflow-wrap:anywhere; padding-right:12px; }
.rp-df .sr .tx.ctx + .ln, .rp-df .sr > .ln:nth-child(3) { border-left:1px solid var(--rp-line); }
.rp-df .sr .del { background:#fef2f2; } .rp-df .sr .add { background:#ecfdf3; } .rp-df .sr .nil { background:var(--rp-row); }
.rp-df .sr.hunk, .rp-df .sr.meta { background:#eef4ff; color:#4b5b85; }
.rp-df .sr.hunk .tx, .rp-df .sr.meta .tx { grid-column:1 / -1; padding-left:12px; background:none; }
.rp-df .sr.hunk .ln, .rp-df .sr.meta .ln { display:none; }
.rp-cmpbar { display:flex; align-items:center; gap:10px; padding:14px 18px; margin-bottom:16px; flex-wrap:wrap; }
.rp-cmpbar > b { font-size:.9rem; }
.rp-cmpbar .arr .rp-ico { width:16px; height:16px; color:var(--rp-muted); }
.rp-hint0 { font-size:.8rem; color:var(--rp-muted); }
div.rp-search { position:relative; }
.rp-search > input { width:100%; height:38px; border:1px solid var(--rp-line2); border-radius:9px; padding:0 12px 0 34px; font:inherit; font-size:.86rem; background:#fff; box-shadow:inset 0 1px 2px rgba(23,23,23,.05); }
.rp-search > input:focus { outline:2px solid var(--rp-brand); outline-offset:1px; }
.rp-search > ckn-icon, .rp-search > .ckn-icon__root { position:absolute; left:11px; top:11px; display:inline-flex; color:var(--rp-muted); pointer-events:none; }
.rp-search > ckn-icon .rp-ico, .rp-search > .ckn-icon__root .rp-ico { width:15px; height:15px; }
.rp-bt .row .who .sub { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--rp-ink2); }
.rp-bt .row .act { text-align:right; }
.rp-bt .rp-ab .na { grid-column:1 / -1; text-align:center; }
@media (max-width: 860px) { .rp-bt .row.head { display:none; } .rp-bt .row { grid-template-columns:minmax(0,1fr) auto; } .rp-bt .row > :nth-child(2), .rp-bt .row > :nth-child(3), .rp-bt .row > :nth-child(5) { display:none; } }
.rp-merge .go .gorow { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.rp-merge.blocked .go { background:var(--rp-row); border-top-color:var(--rp-line); }
.rp-prhead { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:11px 18px; background:var(--rp-row); border-bottom:1px solid var(--rp-line); font-size:.82rem; color:var(--rp-muted); }
.rp-prhead b { color:var(--rp-ink); }
.rp-pr .r .ap, .rp-pr .r .cm { display:inline-flex; align-items:center; gap:4px; font-size:.78rem; color:var(--rp-muted); }
.rp-pr .r .cm.zero { opacity:.45; }
.rp-side .kv.rv .who { display:flex; align-items:center; gap:8px; color:var(--rp-ink); }
.rp-side .kv.rv .ok { color:var(--rp-ok); display:inline-flex; }
.rp-side .kv.rv .bad { color:var(--rp-brand); font-weight:600; }
.rp-checks { overflow:hidden; }
.rp-checks .rp-ck { padding:12px 18px; }

/* review round: flash, navigation bar, PR status strip, file history */
.rp-flash:empty { display:none; }
.rp-flash { scroll-margin:80px; }
.rp-navbar { height:2px; margin:-18px 0 16px; background:transparent; overflow:hidden; position:relative; }
.rp-navbar.on:after { content:""; position:absolute; inset:0; width:30%; background:var(--rp-brand); animation:rp-nav 1s ease-in-out infinite; }
@keyframes rp-nav { from { left:-30%; } to { left:100%; } }
@media (prefers-reduced-motion: reduce) { .rp-navbar.on:after { animation:none; width:100%; opacity:.4; } }
.rp-strip { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:12px 0 2px; padding:10px 14px; border:1px solid var(--rp-line); border-radius:12px; background:#fff; box-shadow:var(--rp-e2); font-size:.82rem; }
.rp-strip > b { margin-right:4px; }
.rp-strip.ready { border-color:var(--rp-ok-line); background:var(--rp-ok-soft); }
.rp-histhead { display:flex; align-items:center; gap:10px; margin-bottom:12px; font-size:.86rem; flex-wrap:wrap; }
.rp-histhead .rp-ico { width:16px; height:16px; color:var(--rp-muted); }
.rp-bypass { padding:8px 10px; border:1px solid var(--rp-brand-line); border-radius:8px; background:#fff; }
.rp-ck .dot.none { background:var(--rp-soft); }
/* my work (design 0084) */
.rp-work { max-width:1180px; }
.rp-workcounts { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:18px; }
@media (max-width: 860px) { .rp-workcounts { grid-template-columns:repeat(2,minmax(0,1fr)); } }
.rp-workcounts a { display:flex; flex-direction:column; gap:2px; padding:12px 14px; background:#fff; border:1px solid var(--rp-line); border-radius:12px; box-shadow:var(--rp-e2); color:var(--rp-ink2); font-size:.8rem; }
.rp-workcounts a b { font-size:1.4rem; color:var(--rp-ink); }
.rp-workcounts a:hover { border-color:var(--rp-brand-line); }
.rp-worksec { margin-bottom:16px; scroll-margin:70px; }
.rp-worksec > header.row h2 { flex:1; }
.rp-workrow { display:flex; gap:12px; align-items:flex-start; padding:12px 18px; border-top:1px solid var(--rp-line); }
.rp-worksec > header + .rp-none + .rp-workrow { border-top:0; }
.rp-workrow:hover { background:var(--rp-row); }
.rp-workrow .rp-av { width:28px; height:28px; margin-top:2px; }
.rp-workrow .m { flex:1; min-width:0; display:flex; flex-direction:column; gap:4px; }
.rp-workrow .t b { font-weight:700; }
.rp-workrow:hover .t b { color:var(--rp-brand); }
.rp-workrow .num { color:var(--rp-muted); font-size:.8rem; }
.rp-workrow .s { font-size:.78rem; color:var(--rp-muted); display:flex; gap:4px; align-items:center; flex-wrap:wrap; }
.rp-workrow .f { display:flex; gap:6px; flex-wrap:wrap; }
/* pull request threads, reviewers (design 0084) */
.rp-lnkbtn { border:0; background:none; padding:0 2px; font:inherit; font-size:.76rem; font-weight:600; color:var(--rp-ink2); cursor:pointer; border-radius:4px; }
.rp-lnkbtn:hover { color:var(--rp-brand); text-decoration:underline; }
.rp-lnkbtn.bad { color:var(--rp-brand); }
.rp-lnkbtn:focus-visible { outline:2px solid var(--rp-brand); outline-offset:2px; }
.rp-cm .bh { display:flex; flex-wrap:wrap; align-items:center; gap:4px 6px; }
.rp-cm .bh .acts { margin-left:auto; display:inline-flex; gap:8px; }
.rp-cm .bh .ed, .rp-reply .ed { color:var(--rp-muted); font-size:.75rem; }
.rp-cm.resolved .box > .bb { opacity:.7; }
.rp-cm .bb.form, .rp-reply .form { padding:12px 14px; }
.rp-reply { display:flex; gap:10px; padding:10px 14px; border-top:1px solid var(--rp-line); background:var(--rp-row); }
.rp-reply .rb2 { flex:1; min-width:0; font-size:.86rem; }
.rp-reply .bh { display:flex; flex-wrap:wrap; gap:4px 6px; align-items:center; font-size:.8rem; color:var(--rp-muted); margin-bottom:2px; }
.rp-reply .bh b { color:var(--rp-ink); }
.rp-reply .bh .acts { margin-left:auto; display:inline-flex; gap:8px; }
.rp-replybar { padding:8px 14px; border-top:1px solid var(--rp-line); }
.rp-replyform { padding:12px 14px; border-top:1px solid var(--rp-line); background:var(--rp-row); }
.rp-side .kv.rv .st { display:inline-flex; align-items:center; gap:4px; }
.rp-side .rp-icobtn { width:26px; height:26px; }
.rp-addrev { position:relative; margin-top:8px; }
.rp-addrev input { width:100%; height:32px; border:1px dashed var(--rp-line2); border-radius:8px; padding:0 10px; font:inherit; font-size:.8rem; background:#fff; }
.rp-addrev input:focus { outline:2px solid var(--rp-brand); outline-offset:1px; border-style:solid; }
.rp-prt h2 { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
/* browsing: CI badges, blame, tags, downloads (design 0084) */
.rp-ci { width:9px; height:9px; border-radius:50%; display:inline-block; flex:none; margin:0 6px; background:var(--rp-line2); }
.rp-ci.ok { background:var(--rp-ok); } .rp-ci.bad { background:var(--rp-brand); } .rp-ci.run { background:var(--rp-warn); }
.rp-dlrow { display:flex; align-items:center; gap:10px; padding-top:8px; border-top:1px solid var(--rp-line); font-size:.82rem; }
.rp-dlrow a { color:var(--rp-brand); font-weight:600; }
.rp-dlrow .rp-ico { width:15px; height:15px; color:var(--rp-muted); }
.rp-blame { font-family:var(--rp-mono); font-size:.8125rem; line-height:1.6; overflow-x:auto; }
.rp-blame .bl { display:grid; grid-template-columns:260px 48px minmax(0,1fr); min-width:max-content; }
.rp-blame .bl.start { border-top:1px solid var(--rp-line); }
.rp-blame .who { padding:0 10px; background:var(--rp-row); color:var(--rp-ink2); font-size:.74rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-family:inherit; }
.rp-blame .who a { color:var(--rp-brand); }
.rp-blame .who small { color:var(--rp-muted); }
.rp-blame .ln { color:var(--rp-faint); text-align:right; padding-right:10px; user-select:none; }
.rp-blame .tx { white-space:pre; padding-right:16px; }
.rp-tags { overflow:hidden; }
.rp-tagrow { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,2fr) auto; gap:14px; align-items:center; padding:12px 18px; border-top:1px solid var(--rp-line); font-size:.86rem; }
.rp-tags > .rp-tagrow:first-of-type, .rp-tags > .rp-none + .rp-tagrow { border-top:0; }
.rp-tagrow .nm { display:flex; align-items:center; gap:6px; min-width:0; }
.rp-tagrow .nm .rp-ico { width:14px; height:14px; color:var(--rp-muted); }
.rp-tagrow .m { display:flex; flex-direction:column; min-width:0; }
.rp-tagrow .m .s { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rp-tagrow .m small { color:var(--rp-muted); font-size:.75rem; }
.rp-tagrow .act { display:flex; gap:6px; align-items:center; }
@media (max-width: 760px) { .rp-tagrow { grid-template-columns:minmax(0,1fr) auto; } .rp-tagrow .m { display:none; } }
.rp-inlineform { display:flex; align-items:flex-end; gap:10px; flex-wrap:wrap; padding:14px 18px; margin-bottom:12px; }
.rp-inlineform ckn-input { flex:1 1 220px; }
.rp-bt .row .act { display:flex; justify-content:flex-end; align-items:center; gap:4px; }
/* on-demand confirm dialog (repository-ui.ts) */
.rp-dialog { border:0; border-radius:14px; padding:0; width:min(440px, calc(100vw - 32px)); box-shadow:0 24px 60px -20px rgba(23,23,23,.45); color:#171717; font-family:inherit; }
.rp-dialog::backdrop { background:rgba(23,23,23,.4); }
.rp-dialog form { padding:20px 22px 18px; display:flex; flex-direction:column; gap:10px; }
.rp-dialog h2 { font-size:1.05rem; font-weight:700; margin:0; }
.rp-dialog p { font-size:.88rem; color:#374151; margin:0; line-height:1.6; overflow-wrap:anywhere; }
.rp-dialog .acts { display:flex; justify-content:flex-end; gap:8px; margin-top:8px; }
.rp-dialog .rp-btn { display:inline-flex; align-items:center; height:36px; padding:0 14px; border-radius:9px; border:1px solid #d1d5db; background:#fff; font:inherit; font-size:.84rem; font-weight:600; cursor:pointer; }
.rp-dialog .rp-btn.pri { background:#991b1b; border-color:#991b1b; color:#fff; }
.rp-dialog .rp-btn.danger { background:#fff; border-color:#991b1b; color:#991b1b; }
.rp-dialog .rp-btn.danger:hover { background:#991b1b; color:#fff; }
.rp-dialog .rp-btn:focus-visible { outline:2px solid #991b1b; outline-offset:2px; }
/* Icons inside buttons and links never take the click: the ckn-icon element swallows it, so icon-only buttons did nothing. */
.rp button .ckn-icon__root, .rp a .ckn-icon__root, .rp button ckn-icon, .rp a ckn-icon, .rp button svg, .rp a svg { pointer-events:none; }
