.td-workspace {
  --td-ink: #182e35;
  --td-muted: #506568;
  --td-accent: #145e59;
  --td-border: #c9d4ce;
  --td-paper: #fffefa;
  --td-bg: #f6f5ee;
  margin: 0; min-height: 100vh; color: var(--td-ink); background: var(--td-bg);
  font-family: "Instrument Sans","PingFang SC","Microsoft YaHei",system-ui,sans-serif;
  font-size: 15px; line-height: 1.55;
}
.td-workspace [hidden] { display: none !important; }
.td-workspace :where(section) { padding: 0; }
.td-workspace :where(h1,h2,h3,h4,p,dl,dd) { margin: 0; }
.td-workspace h2 { font-size: 21px; line-height: 1.35; margin: 0; }
.td-workspace button,.td-workspace input,.td-workspace select,.td-workspace textarea { font: inherit; }
.td-workspace button,.td-workspace a { -webkit-tap-highlight-color: transparent; }
.td-workspace button { cursor: pointer; }
.td-workspace :focus-visible { outline: 3px solid #b54e14; outline-offset: 3px; }
.td-workspace .envbar { background: #e9e5d9; color: #625c50; font-size: 11px; line-height: 20px; padding: 0; text-align: center; }
.td-skip { position: absolute; top: -6rem; z-index: 9; padding: 10px 16px; background: white; }
.td-skip:focus { top: 8px; }
.td-top { background: var(--td-paper); border-bottom: 1px solid var(--td-border); }
.td-top-inner,.td-main { width: min(100% - 72px, 1216px); margin-inline: auto; }
.td-top-inner { min-height: 70px; display: flex; align-items: center; gap: 18px; }
.td-brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.td-brand b { font-size: 17px; letter-spacing: .025em; }
.td-brand img { width: 30px; height: 30px; }
.td-divider { width: 1px; height: 22px; background: var(--td-border); }
.td-brand-tool { font-size: 14px; font-weight: 600; color: var(--td-muted); }
.td-tabs { display: flex; align-self: stretch; align-items: stretch; gap: 26px; margin-left: auto; }
.td-tabs a { display: grid; align-items: center; border-bottom: 2px solid transparent; padding-inline: 2px; color: var(--td-muted); }
.td-tabs a[aria-current] { color: var(--td-accent); border-color: var(--td-accent); font-weight: 700; }
.td-site-link { color: var(--td-muted); border-left: 1px solid var(--td-border); padding-left: 20px; margin-left: 8px; font-size: 13px; white-space: nowrap; }
.td-main { padding: clamp(30px,4.6vw,66px) 0 64px; }
.td-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 32px; }
.td-heading h1 { font-size: clamp(31px,4vw,53px); letter-spacing: -.055em; line-height: 1.15; font-weight: 720; color: var(--td-ink); }
.td-heading h1:focus { outline: none; }
.td-heading p { margin-top: 13px; color: var(--td-muted); }
.td-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.td-primary,.td-secondary,.td-text-btn,.td-close {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 42px; padding: 9px 17px; border: 1px solid var(--td-border); border-radius: 5px;
  background: var(--td-paper); color: var(--td-ink); font-weight: 600; text-decoration: none; line-height: 1.3;
}
.td-primary { background: var(--td-accent); border-color: var(--td-accent); color: white; }
.td-primary:hover { background: #0c4946; }
.td-secondary:hover,.td-close:hover { border-color: var(--td-accent); color: var(--td-accent); }
.td-primary:disabled,.td-secondary:disabled { cursor: not-allowed; opacity: .5; }
.td-text-btn { border: 0; padding: 7px 0; min-height: 34px; justify-content: start; background: transparent; color: var(--td-accent); font-weight: 650; }
.td-text-btn:hover { text-decoration: underline; }
.td-gallery { display: grid; grid-template-columns: minmax(296px,.9fr) minmax(0,1.55fr); gap: clamp(20px,3.1vw,45px); align-items: start; }
.td-catalog { padding-block: 4px; }
.td-section-heading { padding-bottom: 16px; border-bottom: 1px solid #99aaa0; }
.td-template-group { margin-top: 16px; }
.td-template-group h3 { margin-bottom: 6px; color: var(--td-muted); font-size: 12px; letter-spacing: .08em; font-weight: 650; }
.td-template { width: 100%; display: flex; align-items: center; text-align: left; gap: 15px;
  background: transparent; color: var(--td-ink); border: 1px solid transparent; border-bottom-color: #d8dfd8; padding: 13px 14px 13px 9px; border-radius: 0; min-height: 66px; }
.td-template[aria-pressed=true] { background: #e6eee6; border-color: #b4c9b9; border-left: 3px solid var(--td-accent); border-radius: 4px; padding-left: 7px; }
.td-template:hover:not([aria-pressed=true]) { background: #efefe6; }
.td-template-text { display: grid; gap: 1px; }
.td-template-text strong { font-size: 17px; line-height: 1.5; }
.td-template-text>span { color: var(--td-muted); font-size: 12px; letter-spacing: .01em; }
.td-chevron { margin-left: auto; color: var(--td-accent); font-size: 24px; font-weight: 400; }
.td-symbol { position: relative; display: inline-flex; justify-content: center; align-items: flex-end; width: 34px; height: 40px; flex: 0 0 auto;
  color: #3e675e; background: #eff2e9; border: 1px solid currentColor; border-radius: 2px; padding-bottom: 5px; }
.td-symbol::before { content:""; width:8px; height:8px; position:absolute; right:-1px; top:-1px;
  background:linear-gradient(45deg,transparent 47%,currentColor 49% 54%,var(--td-bg) 56%); border-left:1px solid; border-bottom:1px solid; }
.td-symbol b { font: 700 11px/1.1 "IBM Plex Mono",ui-monospace,monospace; }
.td-symbol-pi,.td-symbol-pl { color:#69613d; background:#f1efdf; }
.td-symbol-customs { color:#875641; background:#f4eae1; }
.td-sample { border:1px solid #aabbb1; border-radius:7px; overflow:hidden; background:var(--td-paper); }
.td-sample-head,.td-sample-action { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:12px 18px; }
.td-sample-head { border-bottom:1px solid #bdc8be; font-size:13px; font-weight:650; }
.td-sample-head span:last-child { color:var(--td-muted); font-size:12px; font-weight:500; }
.td-board { padding:clamp(19px,2vw,30px) clamp(26px,5.3vw,84px); background-color:#214b49;
  background-image:linear-gradient(#b9cec412 1px,transparent 1px),linear-gradient(90deg,#b9cec412 1px,transparent 1px); background-size:20px 20px; }
.td-sample-paper { background:#fffef7; color:#273535; padding:19px clamp(16px,2vw,31px) 19px; min-height:262px; box-shadow:4px 6px 0 #153a3766, 0 9px 20px #122e2b30; }
.td-paper-line { width:36px; height:3px; background:#ab5b37; margin-bottom:10px; }
.td-specimen-brand { color:#586460; font-size:10px; margin-bottom:3px; }
.td-paper-title { font-family:"STIX Two Text","Songti SC",Georgia,serif; letter-spacing:-.025em; font-weight:600; font-size:clamp(22px,2.3vw,35px); line-height:1.1; text-transform:uppercase; }
.td-paper-sub { font-size:11px; margin-top:2px; font-weight:600; }
.td-sample-metadata,.td-sample-parties { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.td-sample-metadata { margin-top:13px; padding-top:7px; border-top:1px solid #5c7067; }
.td-sample-metadata span,.td-sample-parties b,.td-sample-footer span,.td-sample-table b { font:560 10px/1.35 "Instrument Sans","PingFang SC",system-ui,sans-serif; }
.td-sample-paper i { display:block; height:1px; background:#bfc8bd; }
.td-sample-metadata i { margin-top:5px; width:70%; }
.td-sample-parties { margin:13px 0 11px; }
.td-sample-parties i { margin:5px 0 0; width:70%; background:#d9dfd5; }
.td-sample-parties i:last-child { width:49%; }
.td-sample-table { border-top:1px solid #59736b; border-bottom:1px solid #7d8c7f; }
.td-sample-table>div { display:grid; grid-template-columns:1.5fr 1fr 1fr 1fr; min-height:13px; border-bottom:1px solid #d6dcd1; }
.td-sample-table>div:first-child { background:#e8eee4; padding:5px 4px; gap:2px; }
.td-sample-footer { display:flex; gap:10px; align-items:end; justify-content:flex-end; margin-top:11px; }
.td-sample-footer i { width:17%; }
.td-sample-action { min-height:70px; border-top:1px solid var(--td-border); }
.td-sample-action>span { font:12px/1.5 "IBM Plex Mono",ui-monospace,monospace; color:var(--td-muted); }
.td-sample-action i { font-style:normal; color:#879590; }
.td-empty,.td-order-list,.td-rail,.td-form-area { border:1px solid var(--td-border); background:var(--td-paper); border-radius:6px; }
.td-empty { padding:58px 24px; text-align:center; }
.td-empty-folder { display:block; width:42px; height:32px; background:#e1ece3; border:1px solid #5a8176; border-radius:3px; margin:0 auto 18px; position:relative; }
.td-empty-folder::before { content:""; position:absolute; top:-6px; left:0; width:17px; height:5px; background:#e1ece3; border:1px solid #5a8176; border-bottom:0; border-radius:3px 3px 0 0; }
.td-empty p,.td-list-none,.td-loading { color:var(--td-muted); margin:10px 0 20px; }
.td-search { display:flex; align-items:center; gap:14px; margin-bottom:15px; color:var(--td-muted); font-size:14px; }
.td-search input,.td-batch-label select { padding:8px 10px; border:1px solid var(--td-border); border-radius:4px; background:white; color:var(--td-ink); }
.td-order-row { display:flex; align-items:center; gap:18px; padding:18px 20px; }
.td-order-row+.td-order-row { border-top:1px solid var(--td-border); }
.td-order-row h2 { font-size:17px; overflow-wrap:anywhere; }
.td-order-row p,.td-date,.td-save-status { color:var(--td-muted); font-size:13px; }
.td-order-row p { margin-top:3px; overflow-wrap:anywhere; }
.td-order-row p span { margin:0 4px; }
.td-date { margin-left:auto; white-space:nowrap; }
.td-order-row button { flex-shrink:0; }
.td-edit-grid { display:grid; grid-template-columns:235px minmax(0,1fr); gap:22px; align-items:start; }
.td-rail { padding:4px 17px; min-width:0; }
.td-rail-toggle { display:none; }
.td-rail-group,.td-archive { padding:16px 0; }
.td-rail-group+.td-rail-group,.td-archive { border-top:1px solid var(--td-border); }
.td-rail-group h2 { font-size:13px; color:var(--td-muted); margin:0 0 8px; }
.td-nav-doc { display:flex; align-items:center; gap:10px; background:transparent; color:var(--td-ink); width:100%; border:0; border-radius:4px; padding:7px; text-align:left; }
.td-nav-doc[aria-pressed=true] { background:#e3eee5; color:var(--td-accent); font-weight:700; }
.td-nav-doc .td-symbol { width:24px; height:27px; padding-bottom:3px; }
.td-nav-doc .td-symbol b { font-size:8px; }
.td-nav-doc:hover { background:#f0f3ea; }
.td-batch-label { display:grid; gap:4px; color:var(--td-muted); font-size:12px; margin:9px 0; }
.td-batch-label select { width:100%; min-height:38px; font-size:14px; }
.td-personal { display:grid; gap:4px; font-size:13px; }
.td-personal label { display:flex; align-items:center; gap:6px; }
.td-personal input { accent-color:var(--td-accent); }
.td-archive summary { cursor:pointer; color:var(--td-muted); font-size:13px; }
.td-archive button { display:grid; width:100%; border:0; border-top:1px solid #dce1dc; background:transparent; text-align:left; padding:8px 0; color:var(--td-accent); }
.td-archive small,.td-archive p { font-size:12px; color:var(--td-muted); }
.td-form-area { min-width:0; padding:clamp(15px,2.6vw,34px); }
.td-notice { position:fixed; bottom:22px; left:50%; transform:translateX(-50%); z-index:9; background:#183c3a; color:white; border-radius:5px; padding:11px 19px; width:max-content; max-width:calc(100% - 28px); box-shadow:0 5px 18px #193e4033; }
#td-dialog { position:fixed; inset:0; margin:auto; padding:0; border:1px solid #657c70; border-radius:8px; width:min(1000px, 94vw); max-height:92vh; max-height:92dvh; background:var(--td-bg); color:var(--td-ink); }
#td-dialog[open] { display:flex; flex-direction:column; }
#td-dialog::backdrop { background:rgb(15 35 36 / .58); }
.td-dialog-head,.td-dialog-foot { padding:13px 20px; flex:none; display:flex; align-items:center; justify-content:space-between; gap:12px; background:var(--td-paper); border-bottom:1px solid var(--td-border); }
.td-dialog-head h2 { font-size:20px; }
.td-dialog-head p,#td-dialog-status { color:var(--td-muted); font-size:13px; }
.td-close { min-width:38px; min-height:38px; padding:2px 9px; font-size:24px!important; }
.td-dialog-foot { justify-content:flex-end; border-top:1px solid var(--td-border); border-bottom:0; }
#td-dialog-status { margin-right:auto; }
.td-errors { flex:none; max-height:20vh; overflow:auto; font-size:13px; background:#fff0df; color:#76421b; padding:9px 20px; }
.td-errors ul { padding-left:20px; }
.td-preview-scroll { padding:24px; overflow:auto; min-height:0; }
.td-sheet { min-width:0; max-width:740px; margin:0 auto; padding:clamp(18px,3.1vw,43px); background:#fff; border:1px solid var(--td-border); font-size:13px; line-height:1.5; }
.td-sheet-wide { max-width:930px; }
.td-sheet-title { display:flex; gap:14px; align-items:center; border-bottom:2px solid #253c3d; padding-bottom:9px; }
.td-sheet-title h3 { font:600 clamp(20px,3vw,31px)/1.15 "STIX Two Text","Songti SC",Georgia,serif; }
.td-sheet-title p { margin-top:3px; }
.td-sheet-logo { max-width:96px; max-height:54px; object-fit:contain; }
.td-sheet-refs { display:flex; flex-wrap:wrap; gap:18px; margin:7px 0 12px; color:var(--td-muted); }
.td-sheet-parties,.td-sheet-fields { display:grid; grid-template-columns:1fr 1fr; gap:8px 18px; }
.td-sheet-parties h4,.td-sheet dt { font-size:12px; color:var(--td-muted); font-weight:650; }
.td-sheet-parties p,.td-sheet dd { white-space:pre-line; overflow-wrap:anywhere; }
.td-sheet-parties>div { border-top:1px solid var(--td-border); padding-top:7px; }
.td-sheet-fields { margin:14px 0; }
.td-sheet-table-wrap { overflow-x:auto; }
.td-sheet table { width:100%; border-collapse:collapse; margin:3px 0 8px; font-size:12px; }
.td-sheet th,.td-sheet td { text-align:left; padding:5px 7px; border:1px solid #c5d0ca; vertical-align:top; overflow-wrap:anywhere; }
.td-sheet th { background:#e6ece6; }
.td-sheet .td-number { text-align:right; white-space:nowrap; }
.td-sheet-totals { margin:6px 0 14px; display:flex; flex-wrap:wrap; gap:6px 20px; justify-content:flex-end; }
.td-sheet-totals dd { font-weight:700; }
.td-sheet-notes>div { margin:6px 0; }
.td-signatures { display:flex; gap:20px; margin-top:38px; }
.td-signatures>div { flex:1; border-top:1px solid #788b80; padding-top:4px; }
@media (max-width:850px) {
  .td-top-inner,.td-main { width:calc(100% - 40px); }
  .td-gallery { grid-template-columns:minmax(235px,.9fr) minmax(0,1.35fr); gap:18px; }
  .td-board { padding:17px; }
  .td-template { gap:10px; padding-right:8px; }
  .td-template-text strong { font-size:15px; }
  .td-edit-grid { grid-template-columns:188px minmax(0,1fr); gap:12px; }
  .td-top-inner { gap:12px; }
}
@media (max-width:650px) {
  .td-top-inner,.td-main { width:calc(100% - 28px); }
  .td-top-inner { min-height:56px; gap:9px; }
  .td-brand { gap:6px; }
  .td-brand img { width:26px;height:26px; }
  .td-brand b { font-size:14px; }
  .td-brand-tool,.td-divider,.td-site-link { display:none; }
  .td-tabs { gap:13px; font-size:14px; }
  .td-main { padding:24px 0 45px; }
  .td-heading { display:block; margin-bottom:19px; }
  .td-heading h1 { font-size:32px; }
  .td-heading p { margin-top:8px; font-size:14px; }
  .td-actions { justify-content:start; margin-top:12px; }
  .td-actions:empty { display:none; }
  .td-gallery,.td-edit-grid { display:flex; flex-direction:column; gap:16px; }
  .td-catalog,.td-sample,.td-rail,.td-form-area { width:100%; }
  .td-section-heading { padding-bottom:7px; }
  .td-catalog h2 { font-size:17px; }
  .td-template-group { margin-top:8px; display:flex; flex-wrap:wrap; gap:5px; }
  .td-template-group h3 { width:100%; margin:0; }
  .td-template { width:auto; flex:1 1 max-content; min-height:40px; padding:5px 8px; gap:5px; background:var(--td-paper); border:1px solid var(--td-border); border-radius:4px; }
  .td-template[aria-pressed=true] { padding-left:6px; }
  .td-template .td-symbol,.td-template-text>span,.td-chevron { display:none; }
  .td-template-text strong { font-size:13px; }
  .td-sample-head,.td-sample-action { padding:9px 12px; }
  .td-sample-action { min-height:55px; }
  .td-board { padding:14px 20px; }
  .td-sample-paper { min-height:0; padding:13px 18px; }
  .td-sample-parties { margin:7px 0; }
  .td-rail { padding:5px 11px; }
  .td-rail-toggle { width:100%; display:flex; justify-content:space-between; align-items:center; gap:8px; min-height:38px; border:0; background:transparent; color:var(--td-accent); font-weight:650; }
  .td-rail-toggle span { font-size:19px; }
  .td-rail-toggle[aria-expanded=true] span { transform:rotate(180deg); }
  #td-rail-content { display:none; }
  .td-rail-open #td-rail-content { display:flex; flex-wrap:wrap; justify-content:space-between; gap:4px 8px; padding-bottom:8px; }
  .td-main[data-screen=order] { padding-bottom:95px; }
  .td-main[data-screen=order] .td-actions { position:fixed; z-index:4; left:0; right:0; bottom:0; margin:0; padding:8px 14px max(8px,env(safe-area-inset-bottom)); background:var(--td-paper); border-top:1px solid var(--td-border); justify-content:flex-end; }
  .td-main[data-screen=order] .td-save-status { margin-right:auto; font-size:11px; }
  .td-notice { bottom:72px; }
  .td-rail-group { padding:2px 0; flex:1 1 44%; }
  .td-rail-group+.td-rail-group,.td-archive { border-top:none; }
  .td-rail-group h2 { margin-bottom:3px; font-size:12px; }
  .td-nav-doc { padding:3px 4px; font-size:12px; gap:5px; min-height:30px; }
  .td-nav-doc .td-symbol { width:20px; height:22px; }
  .td-batch-label { margin:2px 0; }
  .td-personal,.td-archive { flex:1 1 100%; font-size:12px; }
  .td-personal { display:flex; align-items:center; justify-content:space-between; }
  .td-archive { padding:2px 0; }
  .td-order-row { flex-wrap:wrap; gap:8px; padding:14px; }
  .td-order-row>div { width:100%; }
  .td-date { margin-left:0; margin-right:auto; }
  .td-search { flex-wrap:wrap; }
  .td-search input { min-width:0; flex:1; }
  .td-empty { padding:35px 15px; }
  #td-dialog { width:97vw; max-height:95dvh; }
  .td-dialog-head,.td-dialog-foot { gap:6px; padding:8px 10px; }
  .td-dialog-foot .td-primary,.td-dialog-foot .td-secondary { padding:8px 10px; white-space:nowrap; }
  .td-preview-scroll { padding:8px; }
  .td-sheet { padding:13px; }
  .td-sheet th,.td-sheet td { padding:3px; min-width:46px; }
}
@media print {
  .td-workspace .td-top,.td-workspace .td-main,.td-notice,.envbar,.td-dialog-head,.td-dialog-foot,.td-errors { display:none!important; }
  #td-dialog[open],.td-preview-scroll,.td-sheet { display:block; position:static; width:auto; max-width:none; height:auto; max-height:none; border:0; margin:0; padding:0; overflow:visible; }
}
