/* Sidebar Proyek, lampiran gambar persegi, Skills & Catatan skill, Konektor. Dimuat terakhir agar menang dari gaya lama. */

/* ── Sidebar: bagian Proyek ── */
.app .sidebar .sb-projects { display: flex; flex-direction: column; flex-shrink: 0; margin-bottom: 4px; }
.app .sidebar .sb-proj-heading .ic.sb-rot { transform: rotate(-90deg); }
.app .sidebar .sb-proj-heading .ic { transition: transform .15s var(--ease, ease); }
.sb-proj-list { display: flex; flex-direction: column; gap: 1px; padding: 0 5px; }
.app .sidebar .sb-proj-row { gap: 0; }
.sb-proj-caret { position: relative; flex: none; display: grid; place-items: center; width: 30px; height: 30px; margin-left: 2px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-2); cursor: pointer; }
.sb-proj-caret .sb-proj-ic, .sb-proj-caret .sb-proj-chev { grid-area: 1 / 1; transition: opacity .12s, transform .15s var(--ease, ease); }
.sb-proj-caret .sb-proj-chev { opacity: 0; color: var(--ink-3); }
.sb-proj-caret .sb-proj-chev.open { transform: rotate(90deg); }
.sb-proj-row:hover .sb-proj-ic, .sb-proj-caret:focus-visible .sb-proj-ic, .sb-proj-caret[aria-expanded="true"] .sb-proj-ic { opacity: 0; }
.sb-proj-row:hover .sb-proj-chev, .sb-proj-caret:focus-visible .sb-proj-chev, .sb-proj-caret[aria-expanded="true"] .sb-proj-chev { opacity: 1; }
.sb-proj-caret:hover { background: var(--surface-2); color: var(--ink); }
.sb-proj-caret:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.app .sidebar .sb-proj-row > a { padding-left: 4px; gap: 8px; }
.sb-proj-count { flex: none; min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--surface-2); color: var(--ink-3); font-size: 11px; line-height: 17px; text-align: center; font-variant-numeric: tabular-nums; }
.sb-proj-row:hover .sb-proj-count { opacity: 0; }
.sb-proj-chats { position: relative; display: flex; flex-direction: column; margin: 0 0 4px 17px; padding-left: 10px; }
.sb-proj-chats::before { content: ""; position: absolute; left: 0; top: 2px; bottom: 6px; width: 1px; background: var(--line); }
.app .sidebar .sb-proj-chats .conv-item > a { height: 30px; min-height: 30px; font-size: 13px; color: var(--ink-2); }
.app .sidebar .sb-proj-chats .conv-item .conversation-dot { margin-right: 10px; }
.sb-proj-chats .sb-empty-note { padding: 6px 8px; }
.sb-proj-new, .sb-proj-more { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-3); font: 500 12.5px/1 var(--font); text-decoration: none; cursor: pointer; text-align: left; }
.sb-proj-new:hover, .sb-proj-more:hover { background: var(--surface-2); color: var(--ink); }
.sb-proj-more { padding-left: 12px; }
.sb-proj-empty { display: flex; align-items: center; gap: 10px; margin: 2px 0 6px; padding: 10px; border: 1px dashed var(--line); border-radius: 10px; background: transparent; color: var(--ink-2); text-align: left; cursor: pointer; font: inherit; }
.sb-proj-empty:hover { border-color: var(--accent-line, var(--line)); background: var(--surface); color: var(--ink); }
.sb-proj-empty strong { display: block; font-size: 13px; }
.sb-proj-empty small { display: block; font-size: 11.5px; color: var(--ink-3); }
@media (max-width: 900px) {
  .app .sidebar .sb-projects { order: 3; padding: 0 3px; }
  .app .sidebar .sb-projects .sb-proj-heading { order: 0; margin-top: 10px; min-height: 44px; }
  .sb-proj-caret { width: 40px; height: 44px; }
  .sb-proj-caret .sb-proj-chev { opacity: 1; }
  .sb-proj-caret .sb-proj-ic { opacity: 0; }
  .app .sidebar .sb-proj-chats .conv-item > a { height: 42px; min-height: 42px; font-size: 14px; }
  .sb-proj-new, .sb-proj-more { height: 40px; font-size: 13.5px; }
  .sb-proj-count { display: none; }
}

/* ── Lampiran gambar: ubin persegi seperti Claude ── */
.att.att-image { width: 76px; height: 76px; flex: 0 0 76px; padding: 0; gap: 0; border-radius: 12px; background: var(--surface-3); overflow: visible; }
.att.att-image .att-ic { width: 100%; height: 100%; border-radius: inherit; background: transparent; }
.att.att-image .att-ic img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.att.att-image .att-meta { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.att.att-image::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--ink) 10%, transparent); pointer-events: none; }
.att.att-image.busy .att-ic img { filter: brightness(.7) saturate(.8); }
.att.att-image .att-progress { left: 8px; right: 8px; bottom: 8px; height: 3px; background: rgba(255, 255, 255, .35); z-index: 1; }
.att.att-image .att-x { top: 5px; right: 5px; width: 22px; height: 22px; background: rgba(15, 12, 24, .72); color: #fff; box-shadow: none; opacity: 0; transition: opacity .15s; z-index: 2; }
.att.att-image:hover .att-x, .att.att-image:focus-within .att-x { opacity: 1; }
@media (hover: none) { .att.att-image .att-x { opacity: 1; } }
.composer .attachments { align-items: flex-end; padding-top: .85rem; }
.att.att-sent { width: 120px; height: 120px; flex-basis: 120px; border-radius: 14px; transition: transform .15s var(--ease, ease); }
.att.att-sent:hover { transform: translateY(-1px); }
@media (max-width: 600px) { .att.att-sent { width: 96px; height: 96px; flex-basis: 96px; } }

/* ── Skills, Catatan skill, Konektor (berbagi token dengan halaman Kemampuan) ── */
.sn-page, .sk-page { --ul-gold: #d4af6a; --ul-line: color-mix(in oklab, var(--ink, #222) 11%, transparent); --ul-soft: color-mix(in oklab, var(--ink, #222) 6%, transparent); display: flex; flex-direction: column; gap: 22px; }
.sn-hero { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 24px; border: 1px solid var(--ul-line); border-radius: 20px;
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in oklab, var(--ul-gold) 16%, transparent), transparent 60%), var(--surface, transparent); }
.sn-hero h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.01em; }
.sn-hero p { margin: 0; color: var(--ink-3); font-size: 14px; line-height: 1.55; max-width: 62ch; }
.sn-hero .btn { flex: none; }
.sn-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.sn-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--ul-line); border-radius: 18px; background: var(--surface, transparent); min-width: 0; transition: border-color .18s, box-shadow .18s; }
.sn-card:hover { border-color: color-mix(in oklab, var(--ul-gold) 40%, var(--ul-line)); box-shadow: 0 14px 30px -22px rgba(30, 20, 60, .45); }
.sn-card.off { background: transparent; }
.sn-card.off .sn-body, .sn-card.off h4 { color: var(--ink-3); }
.sn-card.off .cap-ic { color: var(--ink-3); background: var(--ul-soft); box-shadow: none; }
.sn-head { display: flex; align-items: center; gap: 12px; }
.sn-txt { flex: 1; min-width: 0; }
.sn-txt h4 { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.sn-txt small { display: block; margin-top: 2px; color: var(--ink-3); font-size: 12.5px; line-height: 1.4; overflow-wrap: anywhere; }
.sn-body { margin: 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.55; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.sn-actions { margin-top: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sn-actions .spacer { flex: 1; }
.sn-page .switch input:checked + .track, .sk-page .switch input:checked + .track { background: var(--ul-gold) !important; border-color: transparent !important; }
.sn-page .switch input:checked + .track::after, .sk-page .switch input:checked + .track::after { background: #fff !important; }
@media (min-width: 901px) { .sb-proj-list { max-height: 42vh; overflow-y: auto; scrollbar-width: thin; } }
.sn-empty { display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px dashed var(--ul-line); border-radius: 18px; }
.sn-empty strong { display: block; font-size: 14.5px; }
.sn-empty p { margin: 2px 0 0; color: var(--ink-3); font-size: 13px; }
.sn-tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 10px; }
.sn-tpl { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--ul-line); border-radius: 14px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.sn-tpl:hover:not(:disabled) { border-color: color-mix(in oklab, var(--ul-gold) 50%, var(--ul-line)); background: color-mix(in oklab, var(--ul-gold) 6%, transparent); }
.sn-tpl:disabled { opacity: .5; cursor: not-allowed; }
.sn-tpl .cap-ic { width: 34px; height: 34px; border-radius: 10px; }
.sn-tpl-txt { flex: 1; min-width: 0; }
.sn-tpl-txt strong { display: block; font-size: 13.5px; }
.sn-tpl-txt small { display: block; color: var(--ink-3); font-size: 12px; line-height: 1.4; }
.sn-tpl > .ic:last-child { flex: none; color: var(--ink-3); }
.sn-editor .sn-count { align-self: flex-end; margin-top: -.6rem; color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.sk-list, .cn-list { display: flex; flex-direction: column; border: 1px solid var(--ul-line, var(--line)); border-radius: 18px; overflow: hidden; background: var(--surface, transparent); }
.sk-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.sk-row + .sk-row { border-top: 1px solid var(--ul-line); }
.sk-row.off .cap-ic { color: var(--ink-3); background: var(--ul-soft); box-shadow: none; }
.sk-txt { flex: 1; min-width: 0; }
.sk-txt strong { display: block; font-size: 14.5px; }
.sk-txt small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink-3); font-size: 12.5px; line-height: 1.45; }
.sn-link-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--ul-line); border-radius: 16px; color: inherit; text-decoration: none; transition: border-color .15s, background .15s; }
.sn-link-card:hover { border-color: color-mix(in oklab, var(--ul-gold) 50%, var(--ul-line)); background: color-mix(in oklab, var(--ul-gold) 5%, transparent); }
.sn-link-card > span:nth-child(2) { flex: 1; min-width: 0; }
.sn-link-card strong { display: block; font-size: 14.5px; }
.sn-link-card small { display: block; color: var(--ink-3); font-size: 12.5px; }
.sn-link-card > .ic:last-child { color: var(--ink-3); }
.cn-card + .cn-card { border-top: 1px solid var(--ul-line); }
.cn-card summary { display: flex; align-items: center; gap: 14px; padding: 14px 16px; cursor: pointer; list-style: none; }
.cn-card summary::-webkit-details-marker { display: none; }
.cn-card summary::before, .cn-card summary::after { content: none !important; display: none !important; }
.cn-card summary:hover { background: color-mix(in oklab, var(--ul-gold) 4%, transparent); }
.cn-txt { flex: 1; min-width: 0; }
.cn-txt strong { display: block; font-size: 14.5px; }
.cn-txt small { display: block; color: var(--ink-3); font-size: 12.5px; }
.cn-card .cn-chev { flex: none; color: var(--ink-3); transition: transform .15s; }
.cn-card[open] .cn-chev { transform: rotate(180deg); }
.cn-tools { margin: 0; padding: 0 16px 14px 68px; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.cn-tools li { display: flex; flex-direction: column; gap: 1px; font-size: 13px; }
.cn-tools b { font-weight: 600; }
.cn-tools span { color: var(--ink-3); font-size: 12.5px; line-height: 1.45; }
@media (max-width: 640px) {
  .sn-hero { flex-direction: column; align-items: flex-start; padding: 18px; }
  .cn-tools { padding-left: 16px; }
  .cn-card summary .cap-state { display: none; }
}

/* ── Proyek ala Claude: halaman Buat proyek, detail proyek dua kolom, dialog detail & instruksi ── */
.pj-back { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; color: var(--ink-3); font-size: 13.5px; text-decoration: none; }
.pj-back:hover { color: var(--ink); }
.pj-create { display: flex; flex-direction: column; gap: 22px; width: 100%; max-width: 640px; margin: clamp(28px, 8vh, 88px) auto 56px; padding: 0 20px; box-sizing: border-box; }
.pj-create h1 { margin: 0; font: 400 clamp(28px, 3vw, 38px)/1.2 Georgia, "Times New Roman", serif; letter-spacing: -.8px; color: var(--ink); }
.pj-field { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.pj-field > span { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.pj-field .input, .pj-field .textarea { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 15px; line-height: 1.5; box-shadow: none; }
.pj-field .textarea { resize: vertical; min-height: 112px; }
.pj-field .input:focus, .pj-field .textarea:focus, .pj-instr-input:focus { border-color: var(--ink-3); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ink) 7%, transparent); outline: none; }
.pj-privacy { display: flex; align-items: center; gap: 8px; margin: -4px 0 0; color: var(--ink-3); font-size: 13px; }
.pj-privacy .ic { flex: none; }
.pj-actions { display: flex; justify-content: flex-end; gap: 10px; }
.pj-actions .btn { min-width: 96px; }
.pj-dialog-note { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.pj-instr-input { width: 100%; box-sizing: border-box; background: var(--surface); border: 1px solid var(--line); min-height: 280px; padding: 14px; border-radius: 12px; font-size: 14.5px; line-height: 1.6; resize: vertical; }
.pj-count { align-self: flex-end; color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }

.pj-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; width: 100%; max-width: 1140px; margin: 0 auto; padding: 26px 32px 72px; box-sizing: border-box; }
.pj-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.pj-head { display: flex; align-items: flex-start; gap: 12px; }
.pj-title { flex: 1; min-width: 0; }
.pj-title h1 { margin: 0; font: 400 clamp(26px, 2.6vw, 34px)/1.2 Georgia, "Times New Roman", serif; letter-spacing: -.6px; color: var(--ink); }
.pj-desc { margin: -8px 0 0; max-width: 72ch; color: var(--ink-2); font-size: 15px; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.pj-add-desc { align-self: flex-start; margin-top: -8px; padding: 0; border: 0; background: none; color: var(--ink-3); font: inherit; font-size: 14px; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.pj-add-desc:hover { color: var(--ink); }
.pj-head-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.pj-start { display: flex; flex-direction: column; gap: 22px; padding: 16px 14px 12px 18px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); color: var(--ink-3); text-decoration: none;
  box-shadow: 0 1px 2px rgba(20, 14, 40, .04), 0 10px 28px -20px rgba(20, 14, 40, .35); transition: border-color .15s, box-shadow .15s; }
.pj-start:hover { border-color: var(--ink-3); color: var(--ink-2); }
.pj-start-text { font-size: 16px; }
.pj-start-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pj-start-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 70%; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: 12.5px; }
.pj-start-chip .ic { flex: none; }
.pj-start-send { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: var(--ink-on-accent, #1d1508); }
.pj-cowork { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin-top: -6px; color: var(--ink-3); font-size: 13px; text-decoration: none; }
.pj-cowork:hover { color: var(--ink); }
.pj-chats, .pj-results { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.pj-chats h2, .pj-results h2 { display: flex; align-items: baseline; gap: 8px; margin: 0 0 4px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.pj-chats h2 span { color: var(--ink-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.pj-chat-list { display: flex; flex-direction: column; }
.pj-chat { display: flex; flex-direction: column; gap: 3px; margin: 0 -12px; padding: 13px 12px; border-top: 1px solid var(--line-soft, var(--line)); color: var(--ink); text-decoration: none; transition: background .12s; }
.pj-chat:first-child { border-top-color: transparent; }
.pj-chat:hover { background: var(--surface-2); border-radius: 12px; border-top-color: transparent; }
.pj-chat:hover + .pj-chat { border-top-color: transparent; }
.pj-chat-title { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.pj-chat-meta { color: var(--ink-3); font-size: 12.5px; }
.pj-empty { display: flex; align-items: center; gap: 12px; padding: 18px; border: 1px dashed var(--line); border-radius: 16px; color: var(--ink-3); }
.pj-empty p { margin: 0; font-size: 14px; line-height: 1.5; }
.pj-empty .ic { flex: none; }
.pj-side { position: sticky; top: 20px; align-self: start; min-width: 0; }
.pj-side-card { display: flex; flex-direction: column; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.pj-side-card h2 { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink); }
.pj-instr { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: background .12s, border-color .12s; }
.pj-instr:hover:not(:disabled) { background: var(--surface-2); border-color: var(--ink-3); }
.pj-instr:disabled { cursor: default; opacity: 1; }
.pj-instr-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pj-instr-txt strong { font-size: 14px; }
.pj-instr-txt small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink-3); font-size: 12.5px; line-height: 1.45; }
.pj-instr.set .pj-instr-txt small { -webkit-line-clamp: 3; white-space: pre-line; color: var(--ink-2); }
.pj-instr > .ic { flex: none; color: var(--ink-3); }
.pj-opt { flex: none; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-3); font-size: 11.5px; }
.pj-files-head { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.pj-files-head h3 { margin: 0; font-size: 14px; font-weight: 600; }
.pj-files-head h3 span { color: var(--ink-3); font-weight: 500; }
.pj-side .list { gap: 2px; }
.pj-side .list-row { padding: 8px 6px; border-radius: 10px; }
.pj-side .list-row .lr-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-side .meter { max-width: 100%; }
.pj-drop { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; padding: 22px 16px; border: 1.5px dashed var(--line); border-radius: 14px; background: transparent; color: var(--ink-3); font: inherit; font-size: 13px; line-height: 1.5; text-align: center; cursor: pointer; transition: border-color .15s, color .15s; }
.pj-drop:hover:not(:disabled) { border-color: var(--accent-line, var(--ink-3)); color: var(--ink-2); }
.pj-drop:disabled { cursor: default; }
@media (max-width: 960px) {
  .pj-wrap { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 16px 16px 56px; }
  .pj-side { position: static; }
  .pj-head { flex-wrap: wrap; }
}

/* ── Kartu sampul karya ilmiah di pratinjau dokumen (front matter "format: skripsi") ── */
.acad-cover { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0 0 22px; padding: 22px 20px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); text-align: center; }
.acad-kind { padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-3); font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.acad-cover h1 { margin: 6px 0 2px; max-width: 46ch; font: 600 18px/1.4 Georgia, "Times New Roman", serif; color: var(--ink); text-transform: uppercase; letter-spacing: .01em; overflow-wrap: anywhere; }
.acad-cover p { margin: 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
.acad-cover p.muted { color: var(--ink-3); font-size: 12.5px; }
.acad-cover .acad-hint { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--line); color: var(--ink-3); font-size: 12px; }
.acad-hint .ic { flex: none; }

/* ── Centang pilihan klarifikasi: lingkaran bulat sempurna (dulu 16×22px karena dua aturan bertabrakan) ── */
.app .chat .msg.ai .clarification-option .clarification-check { flex: 0 0 22px; width: 22px; height: 22px; display: grid; place-items: center; padding: 0; border-radius: 50%; line-height: 0; }
.app .chat .msg.ai .clarification-option .clarification-check .ic { width: 13px; height: 13px; stroke-width: 2.6; }

/* ── File siap unduh di bawah kartu hasil (format yang diminta: PDF, DOCX, PPTX, XLSX…) ── */
.art-files { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 6px; max-width: 100%; }
.art-file-chip { display: inline-flex; align-items: center; gap: 10px; min-width: 0; max-width: 100%; padding: 7px 12px 7px 7px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: background .12s, border-color .12s; }
.art-file-chip:hover:not(:disabled) { background: var(--surface-2); border-color: var(--ink-3); }
.art-file-chip:disabled { opacity: .6; cursor: progress; }
.art-file-chip > .ic { flex: none; color: var(--ink-3); }
.art-file-ext { display: grid; place-items: center; flex: none; min-width: 40px; height: 32px; padding: 0 6px; border-radius: 8px; background: #b3261e; color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; }
.art-file-chip[data-f="docx"] .art-file-ext { background: #2b579a; }
.art-file-chip[data-f="pptx"] .art-file-ext { background: #c43e1c; }
.art-file-chip[data-f="xlsx"] .art-file-ext, .art-file-chip[data-f="csv"] .art-file-ext { background: #1d6f42; }
.art-file-chip[data-f="zip"] .art-file-ext { background: #5f5e5a; }
.art-file-copy { display: flex; flex-direction: column; min-width: 0; }
.art-file-name { max-width: 210px; overflow: hidden; font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.art-file-copy small { color: var(--ink-3); font-size: 11.5px; }

/* ── Panel Sumber: kartu tidak melebar keluar layar di HP ── */
.sources-panel { overflow-x: hidden; }
.sources-list { grid-template-columns: minmax(0, 1fr); }
.sources-list .reference-card { min-width: 0; max-width: 100%; box-sizing: border-box; }
.reference-copy strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Rumus matematika (KaTeX) dan chip sitasi [1] di jawaban ── */
.prose .math-block { margin: .7em 0; padding: 4px 2px; overflow-x: auto; overflow-y: hidden; }
.prose .math-block .katex-display { margin: 0; }
.prose .katex { font-size: 1.06em; }
.prose .math-pending { color: var(--ink-2); font-family: var(--mono, ui-monospace, monospace); font-size: .92em; }
.prose .math-error { color: var(--danger, #b3261e); }
.prose a.cite { display: inline-flex; align-items: center; justify-content: center; min-width: 1.45em; height: 1.45em; margin: 0 .12em; padding: 0 .35em; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: .7em; font-weight: 600; line-height: 1; text-decoration: none; vertical-align: .32em; transition: background .12s, color .12s, border-color .12s; }
.prose a.cite:hover, .prose a.cite:focus-visible { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* ── Verifikasi dua langkah (Akun → Keamanan) dan kolom kode di halaman masuk ── */
.tf-status { display: flex; align-items: center; gap: 10px; max-width: 480px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.tf-status .ic { flex: none; color: var(--ink-3); }
.tf-status.on { border-color: color-mix(in oklab, var(--ok, #2f7d4f) 45%, var(--line)); }
.tf-status.on .ic { color: var(--ok, #2f7d4f); }
.tf-status div { display: flex; flex-direction: column; gap: 2px; }
.tf-status small { color: var(--ink-3); font-size: 12.5px; }
.tf-setup { display: flex; flex-direction: column; gap: 14px; max-width: 560px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.tf-steps { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 14px; line-height: 1.6; }
.tf-qr-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.tf-qr { flex: none; width: 168px; height: 168px; padding: 8px; border-radius: 12px; background: #fff; }
.tf-qr svg { display: block; width: 100%; height: 100%; }
.tf-secret { display: block; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); font-size: 13px; letter-spacing: .06em; overflow-wrap: anywhere; }
.tf-open { align-self: flex-start; }
.tf-form { gap: 10px; max-width: 360px; }
.tf-input, .otp-input { font-variant-numeric: tabular-nums; letter-spacing: .18em; font-size: 18px; }
.tf-codes { display: flex; flex-direction: column; gap: 10px; max-width: 560px; padding: 16px; border: 1px solid color-mix(in oklab, var(--accent, #b8954f) 55%, var(--line)); border-radius: 14px; background: color-mix(in oklab, var(--accent, #b8954f) 7%, var(--surface)); }
.tf-codes-head { display: flex; align-items: center; gap: 8px; }
.tf-codes p { margin: 0; color: var(--ink-2); font-size: 13.5px; }
.tf-codes ol { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px 14px; margin: 0; padding-left: 22px; }
.tf-codes code { font-size: 14px; letter-spacing: .05em; }
.btn.danger-text { color: var(--danger, #b3261e); }

/* ── Konektor pribadi (Akun → Konektor) ── */
.pc-sub { margin: 6px 0 -4px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.pc { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line-soft, var(--line)); }
.pc-head h3 { margin: 0 0 4px; font-size: 16px; }
.pc-head p { margin: 0; max-width: 64ch; color: var(--ink-2); font-size: 13.5px; line-height: 1.55; }
.pc-list { display: grid; gap: 10px; }
.pc-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.pc-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pc-ic { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); color: var(--ink); font-weight: 700; }
.pc-main { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.pc-main small, .pc-dir-item small { overflow: hidden; color: var(--ink-3); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.pc-state { flex: none; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.pc-state.ok { background: color-mix(in oklab, var(--ok, #2f7d4f) 14%, transparent); color: var(--ok, #2f7d4f); }
.pc-state.wait { background: color-mix(in oklab, var(--accent, #b8954f) 18%, transparent); color: var(--ink-2); }
.pc-state.err { background: color-mix(in oklab, var(--danger, #b3261e) 14%, transparent); color: var(--danger, #b3261e); }
.pc-detail { margin: 0; color: var(--ink-3); font-size: 12.5px; overflow-wrap: anywhere; }
.pc-tools summary { color: var(--ink-2); font-size: 13px; cursor: pointer; }
.pc-tools ul { display: grid; gap: 6px; margin: 8px 0 0; padding-left: 18px; font-size: 12.5px; }
.pc-tools li span { display: block; color: var(--ink-3); }
.pc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pc-auto { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-size: 12.5px; color: var(--ink-2); }
.pc-dir { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.pc-dir-item { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px; border: 1px dashed var(--line); border-radius: 12px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .12s, background .12s; }
.pc-dir-item:hover:not(:disabled) { border-style: solid; border-color: var(--ink-3); background: var(--surface-2); }
.pc-dir-item > span:nth-child(2) { display: flex; flex: 1; flex-direction: column; min-width: 0; font-size: 13.5px; }
.pc-dir-item > .ic { flex: none; color: var(--ink-3); }
.pc-custom summary { color: var(--ink-2); font-size: 13.5px; font-weight: 500; cursor: pointer; }
.pc-custom form { margin-top: 12px; }
.pc-note { display: flex; align-items: flex-start; gap: 6px; margin: 0; color: var(--ink-3); font-size: 12.5px; }
.pc-note .ic { flex: none; margin-top: 2px; }

/* ── API developer (Pengaturan → API developer) ── */
.api-page { display: flex; flex-direction: column; gap: 16px; }
.api-fresh { display: flex; flex-direction: column; gap: 10px; max-width: 640px; padding: 16px; border: 1px solid color-mix(in oklab, var(--accent, #b8954f) 55%, var(--line)); border-radius: 14px; background: color-mix(in oklab, var(--accent, #b8954f) 7%, var(--surface)); }
.api-fresh p { margin: 0; color: var(--ink-2); font-size: 13.5px; }
.api-key-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.api-key-row code { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 8px; background: var(--surface); font-size: 12.5px; overflow-wrap: anywhere; }
.api-fresh > .btn { align-self: flex-start; }
.api-keys { display: grid; gap: 8px; max-width: 640px; }
.api-key { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.api-new { align-items: flex-end; gap: 10px; flex-wrap: wrap; max-width: 640px; }
.api-new .field, .api-new > label { flex: 1; min-width: 200px; }
.api-docs { display: flex; flex-direction: column; gap: 10px; max-width: 760px; margin-top: 6px; padding-top: 16px; border-top: 1px solid var(--line-soft, var(--line)); }
.api-docs h3 { margin: 0; font-size: 15px; }
.api-docs p { margin: 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.6; }
.api-lang { display: inline-flex; gap: 4px; align-self: flex-start; padding: 3px; border-radius: 10px; background: var(--surface-2); }
.api-lang button { padding: 5px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); font: inherit; font-size: 13px; cursor: pointer; }
.api-lang button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.api-code { position: relative; }
.api-code pre { margin: 0; padding: 14px 16px; overflow-x: auto; border-radius: 12px; background: #1d1c1a; color: #f2efe8; font-size: 12.5px; line-height: 1.6; }
.api-code > .btn { position: absolute; top: 8px; right: 8px; color: #f2efe8; }
/* Pengaturan → Ajak teman */
.ref-page { display: flex; flex-direction: column; gap: 16px; }
.ref-card { display: flex; flex-direction: column; gap: 12px; max-width: 640px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.ref-rewards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ref-rewards > div { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 10px; background: color-mix(in oklab, var(--accent, #b8954f) 10%, var(--surface)); }
.ref-rewards strong { font-size: 22px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.ref-rewards span { color: var(--ink-2); font-size: 13px; }
.ref-label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.ref-actions { align-items: center; gap: 12px; flex-wrap: wrap; }
.ref-steps { display: grid; gap: 8px; max-width: 640px; margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 13.5px; line-height: 1.55; }
.ref-steps strong { color: var(--ink); }
.ref-list { display: grid; gap: 8px; max-width: 640px; }
.ref-list h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 6px 0 2px; font-size: 15px; }
.ref-list h3 .muted { font-size: 12.5px; font-weight: 400; }
.ref-note { margin: 0; font-size: 12.5px; }
.ref-invite { margin-top: -4px; }
/* Perangkat saya: aplikasi desktop (unduh) dan "Komputer ini" di dalam aplikasi */
.device-app, .device-this { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 22px 0 14px; padding: 18px; border: 1px solid var(--line-soft, var(--line)); border-radius: 12px; overflow-wrap: anywhere; }
.device-app p, .device-this p { margin: 6px 0 0; }
.device-app-cta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.device-app-cta small, .device-this small { color: var(--ink-3); font-size: 11.5px; }
.device-this-setup { flex-direction: column; align-items: stretch; gap: 10px; }
.device-this-setup > .btn { align-self: flex-start; }
.device-folder { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.device-folder code { padding: 4px 8px; border-radius: 6px; background: var(--surface-2); font-size: 12px; overflow-wrap: anywhere; }
.device-caps { display: grid; gap: 6px; }
.device-cap { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.device-cap input { margin-top: 3px; }
.device-manual { margin: 0 0 8px; }
.device-manual > summary { cursor: pointer; font-size: 13px; color: var(--ink-2); padding: 6px 0; }
.device-manual[open] > summary { margin-bottom: 4px; }
.device-manual .device-setup { margin-top: 10px; }
@media (max-width: 650px) { .device-app { flex-direction: column; align-items: stretch; } .device-app-cta { align-items: flex-start; } }
/* Ekstensi lokal (server MCP) di aplikasi desktop */
.device-ext { display: grid; gap: 12px; margin: 0 0 14px; padding: 18px; border: 1px solid var(--line-soft, var(--line)); border-radius: 12px; overflow-wrap: anywhere; }
.device-ext-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.device-ext-head p { margin: 6px 0 0; max-width: 560px; }
.device-ext-head .row { gap: 8px; flex-wrap: wrap; }
.device-ext-warn { margin: 0; color: var(--warn, #9a6a00); font-size: 12.5px; }
.device-ext-form { display: grid; gap: 10px; padding: 14px; border-radius: 10px; background: var(--surface-2); }
.device-ext-form label { display: grid; gap: 5px; font-size: 12.5px; }
.device-ext-form .row { gap: 8px; }
.device-ext-item { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft, var(--line)); }
.device-ext-item p { margin: 4px 0; }
.device-ext-item code { font-size: 11.5px; }
.device-ext-item small { display: block; }
.device-ext-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 650px) { .device-ext-item { flex-direction: column; align-items: stretch; } .device-ext-actions { justify-content: flex-start; } }
/* Pengaturan → Umum → Gaya jawaban */
.style-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin: 4px 0 12px; }
.style-option { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; min-width: 0; }
.style-option.active { border-color: color-mix(in oklab, var(--accent, #b8954f) 65%, var(--line)); box-shadow: 0 0 0 1px color-mix(in oklab, var(--accent, #b8954f) 40%, transparent); }
.style-option input { margin-top: 3px; }
.style-option > span:first-of-type { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.style-option small { color: var(--ink-2); font-size: 12px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.style-actions { display: flex; flex-direction: column; gap: 2px; }
.style-form { display: grid; gap: 10px; max-width: 640px; margin: 4px 0 16px; padding: 14px; border-radius: 12px; background: var(--surface-2); }
.style-form label { display: grid; gap: 5px; font-size: 13px; }
.style-form details { display: grid; gap: 8px; font-size: 13px; }
.style-form details > summary { cursor: pointer; color: var(--ink-2); }
.style-form details[open] > .btn { justify-self: start; margin-top: 8px; }
.style-form .row { gap: 8px; }
.style-new { margin-bottom: 16px; }
/* API developer: pemakaian 30 hari */
.api-usage { display: grid; gap: 12px; max-width: 760px; padding-top: 14px; border-top: 1px solid var(--line-soft, var(--line)); }
.api-usage h3 { margin: 0; font-size: 15px; }
.api-usage-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.api-usage-stats > div { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.api-usage-stats strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.api-usage-stats span { color: var(--ink-2); font-size: 12.5px; }
.api-usage-bars { display: flex; align-items: flex-end; gap: 3px; height: 72px; padding: 8px; border-radius: 10px; background: var(--surface-2); }
.api-usage-bars span { flex: 1; min-width: 4px; max-width: 22px; border-radius: 3px 3px 0 0; background: color-mix(in oklab, var(--accent, #b8954f) 70%, var(--surface)); }
.api-usage-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.api-usage-table th, .api-usage-table td { padding: 7px 8px; text-align: left; border-bottom: 1px solid var(--line-soft, var(--line)); }
.api-usage-table th { color: var(--ink-2); font-weight: 600; font-size: 12px; }
.api-usage-table td:not(:first-child), .api-usage-table th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 650px) { .api-usage-stats { grid-template-columns: 1fr; } }
/* API developer: alat developer (CLI, VS Code, GitHub) */
.api-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; max-width: 760px; padding-top: 14px; border-top: 1px solid var(--line-soft, var(--line)); }
.api-tools h3 { grid-column: 1 / -1; margin: 0; font-size: 15px; }
.api-tool { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.api-tool p { margin: 0; color: var(--ink-2); font-size: 13px; line-height: 1.55; }
.api-tool > .btn { align-self: flex-start; margin-top: auto; }
.api-tool .api-key-row code { font-size: 11.5px; }
/* WhatsApp connector (Koneksi & izin) */
.wa-card { margin-top: 18px; }
.wa-card .wa-links { margin: 14px 0 6px; }
.wa-card > .btn { margin-top: 10px; }
.wa-code { margin-top: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.wa-code p { margin: 0; }
.wa-code code { align-self: flex-start; font-size: 22px; font-weight: 700; letter-spacing: .08em; padding: 8px 14px; border-radius: 10px; background: var(--surface-2, var(--bg)); user-select: all; }
.wa-code .row { display: flex; gap: 8px; flex-wrap: wrap; }
.wa-card .device-item .btn { flex-shrink: 0; white-space: nowrap; }
/* Kartu batas paket di chat: tenang (bukan galat) */
.msg-error.msg-limit, .app .chat .msg.ai .msg-error.msg-limit { border-left-color: var(--sig-accent, var(--accent, #c9a45c)); background: color-mix(in oklab, var(--sig-accent, var(--accent, #c9a45c)) 8%, transparent); padding: .65rem .9rem; border-radius: 0 10px 10px 0; }
/* Pengaturan: kelompok tab lanjutan */
.settings-nav .settings-adv { margin-top: .6rem; }
.settings-nav .settings-adv > summary { cursor: pointer; font-size: 12px; color: var(--ink-3); padding: .35rem .5rem; list-style-position: inside; }

/* Katalog konektor: pencarian + kategori (39 konektor resmi) */
.pc-dir-head { display: flex; flex-direction: column; gap: 10px; }
.pc-dir-search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--ink-3); }
.pc-dir-search:focus-within { border-color: var(--accent-line, var(--accent)); box-shadow: 0 0 0 3px var(--accent-soft); color: var(--ink-2); }
.pc-dir-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--ink); font: inherit; font-size: 14.5px; }
.pc-dir-search input::-webkit-search-cancel-button { display: none; }
.pc-cats { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.pc-cats::-webkit-scrollbar { display: none; }
.pc-cat { flex: none; height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink-2); font: inherit; font-size: 12.5px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background var(--t-fast, 120ms) ease, color var(--t-fast, 120ms) ease, border-color var(--t-fast, 120ms) ease; }
.pc-cat:hover { color: var(--ink); background: var(--surface-2); }
.pc-cat.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.pc-dir-empty { margin: 0; padding: 12px; border: 1px dashed var(--line); border-radius: 12px; color: var(--ink-3); font-size: 13px; }
.pc-dir-search input, .pc-dir-search input:focus, .pc-dir-search input:focus-visible { -webkit-appearance: none; appearance: none; border: 0 !important; outline: none !important; box-shadow: none !important; background: transparent !important; padding: 0 !important; border-radius: 0 !important; min-height: 0; }
