/* Hallmark · Tooldesk work surface · midnight blue / copper · working focus dial */
html:has(body[data-site="dashboard"]), body[data-site="dashboard"] { overflow-x: clip; }
body[data-site="dashboard"] {
  --td-bg: #101525;
  --td-rail: #0c1020;
  --td-surface: #161d31;
  --td-panel: #1a2238;
  --td-high: #26314b;
  --td-line: #303b56;
  --td-edge: #465473;
  --td-ink: #f5ece1;
  --td-secondary: #d6cabc;
  --td-muted: #afa99f;
  --td-accent: #f4a65f;
  --td-accent-ink: #2a170b;
  --td-accent-fill: #38291f;
  --td-focus: #ffca91;
  --td-warning: #f6b4a6;
  --td-shade: #060919be;
  --td-sans: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  --td-mono: "IBM Plex Mono", Consolas, "Liberation Mono", monospace;
  margin: 0;
  background: var(--td-bg);
  color-scheme: dark;
}
.td-shell { --td-side: 216px; min-height:100dvh; background:var(--td-bg); color:var(--td-ink); font:400 15px/1.45 var(--td-sans); }
.td-shell *, .td-shell *::before, .td-shell *::after { box-sizing:border-box; }
.td-shell h1, .td-shell h2, .td-shell h3, .td-shell p { margin:0; }
.td-shell a { color:inherit; text-decoration:none; }
.td-shell button, .td-shell input, .td-shell select { margin:0; color:inherit; font:inherit; }
.td-shell button { cursor:pointer; }
.td-shell button:disabled { cursor:default; opacity:.42; }
.td-shell :focus-visible { outline:2px solid var(--td-focus); outline-offset:3px; }
.td-shell .td-icon { display:block; flex:0 0 auto; width:18px; height:18px; }
.td-shell .td-sr { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
.td-shell .td-skip { position:fixed; z-index:10; top:8px; left:8px; padding:7px 12px; transform:translateY(-180%); border:1px solid var(--td-edge); border-radius:4px; background:var(--td-panel); }
.td-shell .td-skip:focus { transform:translateY(0); }

.td-shell .td-side { position:fixed; z-index:4; inset:0 auto 0 0; display:flex; flex-direction:column; width:var(--td-side); border-right:1px solid var(--td-line); background:var(--td-rail); }
.td-shell .td-identity { display:flex; align-items:center; justify-content:space-between; min-height:78px; padding:0 21px; }
.td-shell .td-brand { display:inline-flex; align-items:center; gap:10px; width:fit-content; color:var(--td-ink); font:620 22px/1 var(--td-sans); letter-spacing:-1px; }
.td-shell .td-brand-mark { display:grid; flex:0 0 27px; grid-template-columns:7px 1fr; grid-template-rows:6px 1fr; gap:3px; width:27px; height:26px; padding:3px; border:1px solid var(--td-accent); border-radius:4px; color:var(--td-accent); }
.td-shell .td-brand-mark i { display:block; min-width:0; border-radius:1px; background:currentColor; }
.td-shell .td-brand-mark i:first-child { grid-row:span 2; opacity:.72; }
.td-shell .td-brand-mark i:nth-child(2) { opacity:.45; }
.td-shell .td-nav { flex:1; min-height:0; overflow:auto; padding:12px 12px 24px; scrollbar-width:thin; }
.td-shell .td-nav-heading { padding:0 10px; color:var(--td-muted); font:500 12px/1.3 var(--td-sans); }
.td-shell .td-nav > .td-nav-heading { margin:0 0 8px; }
.td-shell .td-nav-link { display:flex; align-items:center; gap:10px; width:100%; min-height:36px; margin:2px 0; padding:7px 10px; border:1px solid transparent; border-radius:5px; background:transparent; color:var(--td-secondary); text-align:left; font:500 13px/1.35 var(--td-sans); }
.td-shell .td-nav-link > span:last-child { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.td-shell .td-nav-link:hover, .td-shell .td-icon-btn:hover { background:var(--td-panel); color:var(--td-ink); }
.td-shell .td-nav-link.td-current { color:var(--td-accent); background:var(--td-accent-fill); box-shadow:inset 2px 0 var(--td-accent); }
.td-shell .td-nav-tools { margin-top:28px; }
.td-shell .td-nav-heading-row { display:flex; align-items:center; justify-content:space-between; min-height:24px; margin-bottom:4px; padding-right:3px; }
.td-shell .td-nav-empty { padding:8px 10px; color:var(--td-muted); font-size:12px; }
.td-shell .td-tool-icon { display:grid; flex:0 0 18px; place-items:center; width:18px; height:18px; }
.td-shell .td-tool-icon .td-icon { width:17px; height:17px; }
.td-shell .td-side-bottom { padding:12px 12px 0; border-top:1px solid var(--td-line); }
.td-shell .td-side-bottom .td-nav-link { min-height:34px; }
.td-shell .td-account { display:flex; align-items:center; gap:9px; min-width:0; margin:12px -12px 0; padding:15px 18px; border-top:1px solid var(--td-line); }
.td-shell .td-avatar { display:grid; place-items:center; flex:0 0 32px; width:32px; height:32px; color:var(--td-accent); border:1px solid var(--td-edge); border-radius:5px; background:var(--td-panel); font:600 15px var(--td-mono); }
.td-shell .td-account-copy { display:grid; gap:0; flex:1; min-width:0; }
.td-shell .td-account-copy strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font:600 13px var(--td-sans); }
.td-shell .td-account-copy span { color:var(--td-muted); font-size:11px; }
.td-shell .td-icon-btn { display:inline-grid; place-items:center; flex:0 0 auto; width:32px; height:32px; padding:0; border:0; border-radius:4px; background:transparent; }
.td-shell .td-mobile-header, .td-shell .td-mobile-close, .td-shell .td-nav-backdrop { display:none; }

.td-shell .td-main { width:calc(100% - var(--td-side)); max-width:1580px; margin-left:var(--td-side); padding:0 clamp(20px,3.2vw,54px) 36px; }
.td-shell .td-main-head { display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:90px; }
.td-shell h1 { min-width:0; font:620 30px/1.16 var(--td-sans); letter-spacing:-1.2px; overflow-wrap:break-word; }
.td-shell .td-main h1[tabindex="-1"]:focus { outline:none; }
.td-shell .td-top-actions { display:flex; align-items:center; gap:12px; }
.td-shell .td-date { color:var(--td-muted); font:400 12px/1.5 var(--td-sans); }
.td-shell .td-date::first-letter { text-transform:uppercase; }
.td-shell .td-btn { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:34px; padding:6px 11px; border:1px solid var(--td-edge); border-radius:5px; background:var(--td-panel); color:var(--td-ink); font:530 13px/1.25 var(--td-sans); white-space:nowrap; }
.td-shell .td-btn:hover { background:var(--td-high); border-color:var(--td-muted); }
.td-shell .td-btn .td-icon { width:15px; height:15px; }
.td-shell .td-placement-btn { color:var(--td-accent-ink); border-color:var(--td-accent); background:var(--td-accent); font-weight:620; }
.td-shell .td-placement-btn:hover { color:var(--td-accent-ink); border-color:var(--td-focus); background:var(--td-focus); }
.td-shell .td-placement-btn .td-icon { filter:brightness(.19); }
.td-shell .td-generator-host { width:min(100%,920px); margin:0 0 32px; }


.td-shell .td-section { margin-top:4px; }
.td-shell .td-edit-btn { min-height:30px; padding:3px 6px; border-color:transparent; background:transparent; color:var(--td-secondary); font-size:12px; }
.td-shell .td-edit-btn:hover { border-color:transparent; background:var(--td-high); }
.td-shell .td-edit-btn[aria-pressed="true"] { color:var(--td-accent); background:var(--td-accent-fill); }
.td-shell .td-widget-grid { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); gap:14px; }
.td-shell .td-widget-grid.td-single { grid-template-columns:minmax(0,1fr); }
.td-shell .td-widget { position:relative; min-width:0; border:1px solid var(--td-line); border-radius:7px; background:var(--td-surface); }
.td-shell .td-widget-head { display:flex; align-items:center; justify-content:space-between; min-height:46px; padding:6px 10px 6px 16px; border-bottom:1px solid var(--td-line); border-radius:7px 7px 0 0; background:var(--td-panel); }
.td-shell .td-card-label, .td-shell .td-widget-controls { display:flex; align-items:center; }
.td-shell .td-card-label { min-width:0; gap:9px; }
.td-shell .td-card-label h3 { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font:600 14px/1.3 var(--td-sans); }
.td-shell .td-widget-controls { position:relative; flex:0 0 auto; }
.td-shell .td-widget-frame { height:clamp(336px,calc(100dvh - 273px),558px); min-width:0; overflow:hidden; border-radius:0 0 7px 7px; background:var(--td-surface); }
.td-shell .td-widget-grid:has(>.td-widget:nth-child(3)) .td-widget-frame { height:clamp(310px,37vh,400px); }
.td-shell .td-earlier, .td-shell .td-later { display:none; }
.td-editing .td-earlier, .td-editing .td-later { display:inline-grid; }
.td-editing .td-widget { border-style:dashed; border-color:var(--td-muted); cursor:grab; }
.td-editing .td-widget.td-dragging { opacity:.48; }
.td-editing .td-widget.td-drop { outline:2px solid var(--td-accent); outline-offset:2px; }
.td-editing .td-widget-frame { pointer-events:none; opacity:.76; }
.td-shell .td-popup { position:absolute; z-index:3; top:calc(100% + 2px); right:0; min-width:186px; padding:4px; border:1px solid var(--td-edge); border-radius:5px; background:var(--td-panel); box-shadow:0 8px 24px var(--td-shade); }
.td-shell .td-popup-item { display:flex; align-items:center; gap:8px; width:100%; min-height:33px; padding:6px 8px; border:0; border-radius:3px; background:transparent; color:var(--td-ink); text-align:left; white-space:nowrap; font-size:13px; }
.td-shell .td-popup-item:hover, .td-shell .td-popup-item:focus-visible { background:var(--td-high); }
.td-shell .td-popup-item .td-icon { width:15px; height:15px; }
.td-shell .td-empty { display:grid; justify-items:start; gap:13px; padding:25px; border:1px dashed var(--td-edge); border-radius:6px; }
.td-shell .td-empty h3 { font:560 18px var(--td-sans); }
.td-shell .td-available { display:flex; align-items:center; flex-wrap:wrap; gap:8px; min-height:56px; margin-top:16px; padding:10px 0; border-top:1px solid var(--td-line); }
.td-shell .td-available > .td-icon { width:16px; height:16px; }
.td-shell .td-available h2 { margin-right:7px; font:500 13px var(--td-sans); color:var(--td-muted); }
.td-shell .td-library-add { display:inline-flex; align-items:center; gap:5px; min-height:29px; padding:4px 8px; border:1px solid var(--td-line); border-radius:4px; background:var(--td-surface); color:var(--td-secondary); font:500 12px var(--td-sans); }
.td-shell .td-library-add .td-icon { width:13px; height:13px; }
.td-shell .td-library-add:hover { background:var(--td-high); border-color:var(--td-edge); color:var(--td-ink); }

.td-shell .td-back { display:inline-flex; align-items:center; gap:6px; margin-top:24px; color:var(--td-secondary); font:500 13px var(--td-sans); }
.td-shell .td-back:hover { color:var(--td-ink); text-decoration:underline; }
.td-shell .td-back .td-icon { width:15px; height:15px; }
.td-shell .td-tool-head { min-height:66px; }
.td-shell .td-page-description { margin:0 0 20px; color:var(--td-muted); font-size:14px; }
.td-shell .td-page-frame { height:clamp(520px,calc(100dvh - 205px),820px); min-width:0; overflow:hidden; border:1px solid var(--td-line); border-radius:7px; background:var(--td-surface); }
.td-shell .td-frame-error { margin:16px; color:var(--td-warning); }
.td-shell .td-frame-error + button { margin-left:16px; }
.td-shell .td-mobile-close, .td-shell .td-nav-backdrop { display:none; }

@media (min-width:1796px) { .td-shell .td-main { margin-left:calc(var(--td-side) + (100% - var(--td-side) - 1580px)/2); } }
@media (max-width:1100px) {
  .td-shell { --td-side:190px; }
  .td-shell .td-main { padding-left:23px; padding-right:23px; }
  .td-shell .td-top-actions { gap:12px; }
}
@media (min-width:701px) and (max-width:900px) {
  .td-shell { --td-side:162px; }
  .td-shell .td-main { padding-left:16px; padding-right:16px; }
  .td-shell .td-identity { padding:0 14px; }
  .td-shell .td-nav { padding-left:7px; padding-right:7px; }
  .td-shell .td-nav-link { padding-left:7px; }
  .td-shell .td-account { padding:12px; }
  .td-shell .td-date { display:none; }
  .td-shell .td-widget-grid { gap:10px; grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:700px) {
  .td-shell { --td-side:239px; }
  .td-shell .td-mobile-header { display:flex; align-items:center; justify-content:space-between; min-height:56px; padding:0 16px; border-bottom:1px solid var(--td-line); background:var(--td-rail); }
  .td-shell .td-brand { font-size:20px; }
  .td-shell .td-mobile-menu { width:38px; height:38px; }
  .td-shell .td-side { visibility:hidden; transform:translateX(-101%); transition:transform .18s ease; }
  .td-shell.td-nav-open .td-side { visibility:visible; transform:translateX(0); }
  .td-shell .td-mobile-close { display:grid; }
  .td-shell .td-identity { min-height:66px; padding:0 14px 0 18px; }
  .td-shell.td-nav-open .td-nav-backdrop { display:block; position:fixed; z-index:3; inset:0; width:100%; height:100%; padding:0; border:0; border-radius:0; background:var(--td-shade); }
  .td-shell .td-main { width:100%; margin:0; padding:0 16px 26px; }
  .td-shell .td-main-head { min-height:66px; }
  .td-shell h1 { font-size:25px; letter-spacing:-.7px; }
  .td-shell .td-date { display:none; }
  .td-shell .td-top-actions { gap:6px; }
  .td-shell .td-section { margin-top:2px; }
  .td-shell .td-available { margin-top:12px; }
  .td-shell .td-back { margin-top:18px; }
  .td-shell .td-tool-head { min-height:56px; }
  .td-shell .td-page-frame { height:max(510px,66dvh); }
}
@media (max-width:600px) {
  .td-shell .td-main-head:has(.td-top-actions) { display:grid; grid-template-columns:minmax(0,1fr); align-items:start; gap:8px; min-height:0; padding:15px 0 12px; }
  .td-shell .td-main-head:has(.td-top-actions) h1 { white-space:nowrap; }
  .td-shell .td-top-actions { width:100%; justify-content:space-between; }
  .td-shell .td-widget-grid { grid-template-columns:minmax(0,1fr); }
  .td-shell .td-widget-frame, .td-shell .td-widget-grid:has(>.td-widget:nth-child(3)) .td-widget-frame { height:336px; }
  .td-shell .td-widget-head { min-height:43px; }
  .td-shell .td-available h2 { margin-right:2px; }
}
@media (max-width:460px) {
  .td-shell .td-top-actions .td-edit-btn { gap:3px; padding:4px; font-size:11px; }
  .td-shell .td-top-actions .td-placement-btn { padding:6px 8px; gap:4px; font-size:12px; }
}
@media (max-width:354px) {
  .td-shell .td-main { padding-left:10px; padding-right:10px; }
  .td-shell .td-main-head { flex-wrap:wrap; gap:6px; padding:10px 0; }
}
@media (prefers-reduced-motion:reduce) {
  .td-shell *, .td-shell *::before, .td-shell *::after { scroll-behavior:auto!important; transition-duration:0s!important; }
}
