/* Code-rendered TanCool workbench, mirroring desktop/ui (Obsidian v2.0).
   Everything is scoped under .aw so it never collides with landing styles. */

.aw { --aw-side: 232px; --aw-insp: 288px; font-family: var(--font-ui); color: var(--text-1); text-align: left; }
.aw *, .aw *::before, .aw *::after { box-sizing: border-box; }
.aw button { font: inherit; color: inherit; }
.aw .od-icon { --od-icon-size: 16px; }

/* Window */
.aw-window {
  display: grid; grid-template-rows: 52px minmax(0, 1fr);
  border-radius: 20px; overflow: hidden; background: var(--bg-2);
  border: 1px solid var(--line-2); box-shadow: var(--shadow-3);
  height: clamp(560px, 64vw, 700px);
}

/* Titlebar */
.aw-titlebar { display: flex; align-items: center; gap: 8px; padding: 0 12px 0 16px; background: var(--bg-1); border-bottom: 1px solid var(--line-1); min-width: 0; }
.aw-lights { display: flex; gap: 8px; padding-right: 12px; flex: none; }
.aw-lights span { width: 12px; height: 12px; border-radius: 50%; display: block; }
.aw-lights span:nth-child(1) { background: #FF5F57; } .aw-lights span:nth-child(2) { background: #FEBC2E; } .aw-lights span:nth-child(3) { background: #28C840; }
.aw-ib {
  width: 32px; height: 32px; border-radius: 10px; border: 0; background: transparent; color: var(--text-2);
  display: inline-grid; place-items: center; flex: none; position: relative; cursor: default;
  transition: background-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
}
button.aw-ib { cursor: pointer; }
@media (hover: hover) { button.aw-ib:hover { background: var(--bg-4); color: var(--text-1); } }
.aw-ib[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-text); }
.aw-ib .od-icon { --od-icon-size: 18px; }
.aw-ib.sm { width: 26px; height: 26px; border-radius: 8px; }
.aw-ib.sm .od-icon { --od-icon-size: 15px; }
.aw-dot { position: absolute; top: 5px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-bar, #8B5CF6); box-shadow: 0 0 0 2px var(--bg-1); }
.aw-search { position: relative; flex: 0 1 420px; margin: 0 auto; min-width: 140px; height: 34px; border-radius: 999px; background: var(--bg-3); border: 1px solid var(--line-2); display: flex; align-items: center; gap: 8px; padding: 0 8px 0 14px; color: var(--text-3); font-size: 13px; }
.aw-search .od-icon { --od-icon-size: 15px; flex: none; }
.aw-kbd { height: 20px; min-width: 20px; padding: 0 6px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--bg-4); font: 500 11px/18px var(--font-mono); color: var(--text-2); flex: none; }
.aw-tools { display: flex; align-items: center; gap: 2px; flex: none; }
.aw-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--bg-3); border: 1px solid var(--line-2); box-shadow: var(--panel-hi); }
.aw-seg > span, .aw-seg > button { width: 30px; height: 26px; border-radius: 999px; display: grid; place-items: center; color: var(--text-3); border: 0; background: transparent; }
.aw-seg .od-icon { --od-icon-size: 15px; }
.aw-seg .is-on, .aw-seg [aria-pressed="true"] { background: var(--bg-5); color: var(--text-1); box-shadow: inset 0 1px 0 rgba(255,255,255,.07), var(--shadow-1); }
.aw-sep { width: 1px; height: 20px; background: var(--line-2); margin: 0 4px; flex: none; }

/* Body columns */
.aw-body { display: flex; min-height: 0; min-width: 0; }
.aw-side { flex: none; width: var(--aw-side); display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; background: var(--bg-1); border-right: 1px solid var(--line-1); min-height: 0; }
.aw-main { flex: 1 1 auto; min-width: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; background: var(--bg-2); min-height: 0; }
.aw-panel { flex: none; width: var(--aw-insp); display: grid; grid-template-rows: auto minmax(0, 1fr); background: var(--bg-1); border-left: 1px solid var(--line-1); min-height: 0; }
.aw-panel.is-agent { grid-template-rows: auto auto minmax(0, 1fr) auto; }
.aw-side[hidden], .aw-panel[hidden] { display: none !important; }
@media (max-width: 1080px) { .aw-panel { display: none !important; } }
@media (max-width: 760px) { .aw-side { display: none !important; } .aw-tools .aw-hide-sm, .aw-lights { display: none !important; } }

/* Sidebar */
.aw-lib { display: flex; align-items: center; gap: 12px; margin: 12px 12px 8px; padding: 8px 10px 8px 8px; border-radius: 12px; min-width: 0; }
.aw-lib img { width: 34px; height: 34px; border-radius: 22.5%; display: block; flex: none; }
.aw-lib-text { flex: 1 1 0; min-width: 0; display: grid; gap: 1px; }
.aw-lib-text > * { display: block; min-width: 0; }
.aw-lib-name { display: flex !important; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.aw-lib-name .od-icon { --od-icon-size: 14px; color: var(--ok); flex: none; }
.aw-lib-path { font-size: 12px; color: var(--text-3); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; direction: rtl; text-align: left; }
.aw-lib > .od-icon { color: var(--text-3); --od-icon-size: 15px; }
.aw-sidesearch { display: flex; align-items: center; gap: 8px; margin: 0 12px 8px; height: 34px; padding: 0 6px 0 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg-3); color: var(--text-3); font-size: 13px; }
.aw-sidesearch .od-icon { --od-icon-size: 15px; }
.aw-sidescroll { overflow-y: auto; scrollbar-width: none; padding: 0 12px 16px; min-height: 0; }
.aw-sidescroll::-webkit-scrollbar { display: none; }
.aw-group { margin-top: 18px; }
.aw-group:first-child { margin-top: 6px; }
.aw-ghead { display: flex; align-items: center; gap: 4px; height: 28px; padding: 0 4px 0 6px; width: 100%; border: 0; background: transparent; border-radius: 8px; cursor: pointer; text-align: left; }
.aw-ghead .twist { color: var(--text-3); --od-icon-size: 13px; transition: transform var(--dur-3) var(--ease-out); }
.aw-ghead[aria-expanded="false"] .twist { transform: rotate(-90deg); }
.aw-ghead h4 { flex: 1; margin: 0; font-size: 11px; font-weight: 600; color: var(--text-3); letter-spacing: .1em; text-transform: uppercase; }
.aw-ghead .plus { color: var(--text-3); --od-icon-size: 14px; }
.aw-items { display: grid; gap: 1px; margin-top: 2px; }
.aw-items[hidden] { display: none; }
.aw-nav { position: relative; display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 8px 0 10px; border-radius: 12px; color: var(--text-2); font-size: 13.5px; min-width: 0; }
.aw-nav .od-icon { --od-icon-size: 16px; flex: none; }
.aw-nav .name { flex: 1 1 0; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.aw-nav .cnt { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 20px; padding: 0 7px; border-radius: 999px; background: var(--bg-4); color: var(--text-2); font-size: 11px; font-weight: 600; flex: none; }
.aw-nav.is-cur { background: var(--bg-4); color: var(--text-1); box-shadow: inset 0 1px 0 rgba(255,255,255,.04), inset 0 0 0 1px var(--line-1); }
.aw-nav.is-cur .cnt { background: var(--bg-5); color: var(--text-1); }
.aw-nav.is-cur::after { content: ""; position: absolute; top: 9px; bottom: 9px; right: -12px; width: 3px; border-radius: 3px 0 0 3px; background: var(--text-1); }
.aw-nav.folder { height: 30px; font-size: 13px; padding-left: 4px; gap: 6px; }
.aw-nav.folder .cnt { background: transparent; min-width: 0; padding: 0; color: var(--text-3); font: 500 11px/1 var(--font-mono); }
.aw-nav.folder .tw { width: 16px; color: var(--text-3); --od-icon-size: 12px; display: grid; place-items: center; flex: none; }
.aw-nav.folder .cloud { --od-icon-size: 14px; color: var(--text-3); }
.aw-nav.folder .cloud.ok { color: var(--ok); }
.aw-nav.folder .cloud.sync { color: var(--accent-text); animation: aw-breathe 1.4s ease-in-out infinite; }
.aw-nav.depth-1 { padding-left: 28px; }
.aw-nav.depth-1::before { content: ""; position: absolute; left: 11px; top: 0; bottom: 0; width: 1px; background: var(--line-2); }
@keyframes aw-breathe { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .aw-nav.folder .cloud.sync { animation: none; } }
.c-violet { color: #A78BFA; } .c-yellow { color: #FBBF24; } .c-blue { color: #3B82F6; } .c-green { color: #34D399; } .c-red { color: #EF4444; }
.aw-sidefoot { display: grid; gap: 8px; padding: 12px; border-top: 1px solid var(--line-1); }
.aw-syncpill { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: 12px; font-size: 12px; }
.aw-syncpill > .od-icon:first-child { color: var(--ok); }
.aw-syncpill .txt { flex: 1; min-width: 0; display: grid; }
.aw-syncpill .txt > * { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.aw-syncpill small { color: var(--text-3); font-size: 11px; }
.aw-syncpill .trail { --od-icon-size: 14px; color: var(--text-4); }
.aw-user { display: flex; align-items: center; gap: 10px; padding: 8px 6px 8px 8px; border-radius: 16px; background: var(--panel-sheen), var(--bg-3); border: 1px solid var(--line-1); box-shadow: var(--panel-hi); min-width: 0; }
.aw-av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 600 12px/1 var(--font-ui); background: linear-gradient(135deg, #F0ABFC, #A855F7); color: #2E1065; flex: none; }
.aw-user .txt { flex: 1; min-width: 0; display: grid; }
.aw-user .txt > * { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.aw-user strong { font-size: 13px; font-weight: 600; line-height: 1.3; }
.aw-user small { font-size: 11px; color: var(--text-3); line-height: 1.3; }

/* Scope header */
.aw-scope { display: grid; gap: 6px; padding: 18px 24px 10px; min-width: 0; }
.aw-crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); min-width: 0; white-space: nowrap; overflow: hidden; }
.aw-crumbs .od-icon { --od-icon-size: 12px; color: var(--text-4); flex: none; }
.aw-crumbs .cur { color: var(--text-1); }
.aw-scoperow { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; min-width: 0; }
.aw-scoperow h3 { margin: 0; font: 700 26px/1.2 var(--font-display); letter-spacing: -0.025em; }
.aw-count { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); white-space: nowrap; }
.aw-live { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.aw-filter { display: flex; align-items: center; gap: 6px; padding: 0 24px 14px; flex-wrap: wrap; min-width: 0; }
.aw-chip { height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-3); color: var(--text-2); font-size: 12px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.aw-chip .od-icon { --od-icon-size: 13px; }
.aw-chip.is-on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-text); }
.aw-swatches { display: inline-flex; gap: 5px; padding: 0 6px; }
.aw-swatches i { width: 14px; height: 14px; border-radius: 50%; display: block; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.aw-filter .spacer { flex: 1; }

/* Asset grid */
.aw-content { overflow-y: auto; padding: 4px 24px 24px; min-height: 0; scrollbar-width: thin; }
.aw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 14px; }
.aw-tile { display: grid; gap: 8px; border: 0; padding: 0; background: transparent; text-align: left; cursor: pointer; border-radius: 12px; min-width: 0; transition: transform 160ms var(--ease-out); }
.aw-tile:active { transform: scale(.985); }
.aw-thumb { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--thumb-bg); box-shadow: 0 0 0 1px var(--line-1); transition: box-shadow var(--dur-1) var(--ease-out); }
.aw-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.aw-tile[aria-pressed="true"] .aw-thumb { box-shadow: 0 0 0 2px var(--accent-text); }
.aw-badge { position: absolute; height: 20px; padding: 0 7px; border-radius: 999px; background: rgba(0,0,0,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: #F4F4F6; font: 500 10.5px/20px var(--font-mono); }
.aw-badge.tl { top: 8px; left: 8px; } .aw-badge.br { bottom: 8px; right: 8px; }
.aw-sync { position: absolute; top: 7px; right: 7px; color: var(--ok); filter: drop-shadow(0 1px 2px #0009); --od-icon-size: 14px; display: flex; }
.aw-tile-text { display: grid; gap: 1px; min-width: 0; }
.aw-tile-text > * { display: block; min-width: 0; }
.aw-tile-name { justify-self: start; max-width: 100%; padding: 0 6px; margin-left: -6px; border-radius: 6px; font-size: 12.5px; font-weight: 500; line-height: 20px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.aw-tile[aria-pressed="true"] .aw-tile-name { background: var(--accent); color: #fff; }
.aw-tile-meta { font: 400 11px/16px var(--font-mono); color: var(--text-3); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* Status bar */
.aw-status { display: flex; align-items: center; gap: 16px; height: 32px; padding: 0 12px 0 24px; border-top: 1px solid var(--line-1); background: var(--bg-2); font-size: 12px; color: var(--text-3); white-space: nowrap; min-width: 0; }
.aw-status .od-icon { --od-icon-size: 14px; }
.aw-status .ok { color: var(--ok); }
.aw-status .grow { flex: 1; }
.aw-zoom { display: flex; align-items: center; gap: 6px; }
.aw-zoom .track { width: 84px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--accent-bar, #8B5CF6) 40%, var(--line-3) 40%); position: relative; display: block; }
.aw-zoom .track::after { content: ""; position: absolute; left: 40%; top: -4.5px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--text-1); }
@media (max-width: 600px) { .aw-status .hide-sm { display: none; } }

/* Inspector */
.aw-phead { display: flex; align-items: center; gap: 6px; height: 48px; padding: 0 8px 0 18px; border-bottom: 1px solid var(--line-1); min-width: 0; }
.aw-phead h4 { flex: 1; min-width: 0; margin: 0; font-size: 14px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.aw-pscroll { overflow-y: auto; min-height: 0; scrollbar-width: thin; }
.aw-preview { padding: 16px 18px 12px; }
.aw-frame { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-1); background: var(--thumb-bg); aspect-ratio: 16 / 10; }
.aw-frame img { display: block; width: 100%; height: 100%; object-fit: contain; }
.aw-play { position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: rgba(0,0,0,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.2); color: #fff; display: grid; place-items: center; }
.aw-play .od-icon { --od-icon-size: 18px; }
.aw-iname { margin-top: 12px; font-size: 15px; font-weight: 600; letter-spacing: -.01em; overflow-wrap: anywhere; line-height: 1.35; }
.aw-stars { display: flex; gap: 3px; margin-top: 8px; color: var(--warn); }
.aw-stars .od-icon { --od-icon-size: 14px; }
.aw-stars .off { color: var(--text-4); }
.aw-isec { padding: 12px 18px 16px; border-top: 1px solid var(--line-1); }
.aw-isec h5 { margin: 0 0 10px; font-size: 11px; font-weight: 600; color: var(--text-3); letter-spacing: .1em; text-transform: uppercase; }
.aw-kv { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 6px 10px; margin: 0; font-size: 12.5px; }
.aw-kv dt { color: var(--text-3); }
.aw-kv dd { margin: 0; color: var(--text-1); min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.aw-kv dd.mono { font: 400 12px/1.5 var(--font-mono); }
.aw-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.aw-tag { height: 24px; padding: 0 9px; border-radius: 999px; background: var(--bg-4); border: 1px solid var(--line-1); font-size: 12px; color: var(--text-1); display: inline-flex; align-items: center; white-space: nowrap; }
.aw-tag.add { background: transparent; border-style: dashed; color: var(--text-3); }
.aw-note { margin: 0; font-size: 13px; color: var(--text-2); line-height: 1.5; }
.aw-tline { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; padding: 6px 0; font-size: 12.5px; color: var(--text-2); line-height: 1.45; }
.aw-tline .tc { font: 500 11px/1.6 var(--font-mono); color: var(--accent-text); }
.aw-tline mark { background: none; color: var(--accent-text); font-weight: 600; }
.aw-path { font: 400 11.5px/1.5 var(--font-mono); color: var(--text-2); overflow-wrap: anywhere; padding: 8px 12px; border-radius: 12px; background: var(--bg-3); border: 1px solid var(--line-1); }
.aw-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.aw-btn { height: 30px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-3); color: var(--text-1); font-size: 12px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.aw-btn .od-icon { --od-icon-size: 14px; }

/* Assistant panel */
.aw-runtime { height: 26px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-3); color: var(--text-2); font-size: 11.5px; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; flex: none; }
.aw-runtime .od-icon { --od-icon-size: 12px; }
.aw-scopebar { display: flex; align-items: center; gap: 8px; padding: 10px 18px; border-bottom: 1px solid var(--line-1); font-size: 12px; color: var(--text-3); }
.aw-scopebar .aw-seg > span { width: auto; padding: 0 9px; font-size: 11.5px; }
.aw-log { overflow-y: auto; min-height: 0; padding: 14px 18px; display: grid; gap: 14px; align-content: start; }
.aw-ubub { justify-self: end; max-width: 90%; padding: 9px 12px; border-radius: 16px 16px 6px 16px; background: var(--bg-4); border: 1px solid var(--line-1); font-size: 13px; line-height: 1.45; }
.aw-amsg { display: grid; gap: 10px; font-size: 13px; color: var(--text-2); line-height: 1.5; }
.aw-amsg p { margin: 0; }
.aw-steps { border-radius: 12px; background: var(--bg-3); border: 1px solid var(--line-1); padding: 8px 10px; display: grid; gap: 6px; font-size: 12px; }
.aw-steps span { display: flex; align-items: center; gap: 8px; }
.aw-steps .od-icon { --od-icon-size: 13px; color: var(--ok); flex: none; }
.aw-evi { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; padding: 6px; border-radius: 12px; background: var(--bg-3); border: 1px solid var(--line-1); align-items: center; }
.aw-evi .im { aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: var(--thumb-bg); display: block; }
.aw-evi .im img { display: block; width: 100%; height: 100%; object-fit: contain; }
.aw-evi .tx { display: grid; gap: 2px; min-width: 0; }
.aw-evi .tx > * { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.aw-evi b { font-size: 12px; font-weight: 500; color: var(--text-1); }
.aw-evi small { font: 400 11px/1.4 var(--font-mono); color: var(--accent-text); }
.aw-composer { padding: 12px 14px 14px; }
.aw-cbox { border-radius: 16px; background: var(--bg-3); border: 1px solid var(--line-2); padding: 12px; display: grid; gap: 10px; }
.aw-cbox .ph { font-size: 13px; color: var(--text-3); }
.aw-crow { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-3); }
.aw-crow .grow { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.aw-send { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.aw-send .od-icon { --od-icon-size: 14px; }

/* Small fragments used inside carousel cards */
.aw-frag { display: grid; gap: 6px; }
.aw-frag .aw-nav { height: 30px; font-size: 12.5px; }
.aw-frag .aw-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 8px; }
.aw-frag .aw-tile { cursor: default; }
.aw-frag .aw-tile-name { font-size: 11.5px; line-height: 18px; }
.aw-frag .aw-tile-meta { font-size: 10px; }
.aw-frag .aw-thumb { border-radius: 8px; }
.aw-frag .aw-search { margin: 0; flex: none; height: 32px; }
.aw-member { display: flex; align-items: center; gap: 10px; padding: 6px 4px; font-size: 12.5px; }
.aw-member + .aw-member { border-top: 1px solid var(--line-1); }
.aw-member .av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 600 10.5px/1 var(--font-ui); color: #fff; flex: none; }
.aw-member .nm { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.aw-member .rl { height: 24px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg-3); color: var(--text-2); font-size: 11px; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.aw-member .rl .od-icon { --od-icon-size: 11px; }
.aw-frag .aw-nav.is-cur::after { display: none; }
.aw-frag .aw-evi .tx > b { font-size: 11.5px; }
