/* File: /shared/assets/site.css */

:root{
  --font-family: Consolas, "Courier New", monospace;
  --font-size: 10px;
  --font-size-status: 10px;
  --control-w: 90px;
  --pad: 2px;
  --bar-h: 30px;

  --color-background: #0f1115;
  --color-surface: #151922;
  --color-surface-alt: #1b2230;
  --color-hover: #20283a;
  --color-text: #d7dde6;
  --color-text-muted: #9aa7b5;
  --color-status: #9aa7b5;
  --color-link: #7aa2f7;
  --color-border: #2a3446;
  --color-accent: #7aa2f7;
  --color-error: #ff6b6b;
  --color-warning: #ffd166;
  --color-success: #2ee59d;
  --color-selection-bg: #2b3a55;
  --color-selection-text: #ffffff;

  --bg: var(--color-background);
  --panel: var(--color-surface);
  --fg: var(--color-text);
  --muted: var(--color-text-muted);
  --border: var(--color-border);


  --term-output-pad: 6px;
  --term-part-pad-y: 0px;
  --term-part-pad-x: var(--term-output-pad);
  --term-part-align: left;
  --term-part-gap: 2px;
  --term-table-border-w: 1px;

  --table-cell-pad-y: 0px;
  --table-cell-pad-x: 6px;

  --table-pager-btn-pad-y: 2px;
  --table-pager-btn-pad-x: 8px;
  --table-pager-btn-min-w: 28px;
  --table-pager-field-w: 70px;
  --table-pager-field-pad-x: 6px;
  --table-setting-gap: 4px;
  --table-setting-pad-x: 6px;
  --table-settings-menu-min-w: 260px;
  --table-settings-menu-pad: 6px;

  --control-icon-box: 1.8em;
  --control-icon-glyph-size: calc(var(--control-icon-box) * 0.80);

  --surface-radius: 0px;
  --control-radius: 0px;
  --surface-shadow: none;
}

*{ box-sizing:border-box; }

html{
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}

/* ============================================================
   Theme presentation tokens
   ============================================================ */

.rich-card,
.rich-callout,
.content-islands .rich-prose,
.content-islands .rich-widget,
.overlay{
  border-radius:var(--surface-radius);
  box-shadow:var(--surface-shadow);
}

.btn,
.widget-control,
.menu-h-item,
.link-block,
.form-field input,
.form-field select,
.overlay-body input,
.overlay-body select{
  border-radius:var(--control-radius);
}

html, body{
  height:100%;
  margin:0;
  overflow:hidden;
  font-family:var(--font-family);
  font-size:var(--font-size);
  background:var(--bg);
  color:var(--fg);
}

::selection{
  background:var(--color-selection-bg);
  color:var(--color-selection-text);
}
::-moz-selection{
  background:var(--color-selection-bg);
  color:var(--color-selection-text);
}

a{
  color:var(--color-link);
  text-decoration:none;
}
a:hover{ text-decoration:underline; }

#appRoot.app{
  position:fixed;
  inset:0;
  min-height:0;
}

.app-shell{
  position:absolute;
  inset:0;
  min-height:0;
  min-width:0;
  display:flex;
  flex-direction:column;
}

.app-shell > *{
  min-width:0;
  min-height:0;
}

.layout-row,
.layout-column,
.layout-grid{
  min-width:0;
  min-height:0;
}

.layout-row{
  display:flex;
  flex-direction:row;
}

.layout-column{
  display:flex;
  flex-direction:column;
}

.layout-grid{
  display:grid;
}

.layout-row > *,
.layout-column > *,
.layout-grid > *{
  min-width:0;
  min-height:0;
}

.layout-row > *,
.layout-column > *{
  flex:0 0 auto;
}


.pane{
  min-width:0;
  min-height:0;
}

.widget-host{
  min-width:0;
  min-height:0;
  width:100%;
}


.pane-fill{
  flex:1 1 auto;
  min-width:0;
  min-height:0;
}

.pane-type-panel,
.pane-type-inset,
.pane-type-info,
.pane-type-warning,
.pane-type-error,
.pane-type-success{
  background:var(--panel);
  border:1px solid var(--border);
  padding:6px var(--pad);
}

.pane-type-info,
.pane-type-warning,
.pane-type-error,
.pane-type-success{ border-left-width:4px; }

.pane-type-plain{
  background:transparent;
  border:0;
  padding:0;
}

.pane-type-inset{ background:var(--color-surface-alt); }

.pane-type-banner{
  background:var(--panel);
  border:0;
  border-bottom:1px solid var(--border);
  padding:6px var(--pad);
  font-weight:700;
}

.pane-type-toolbar{
  background:transparent;
  border:0;
  padding:4px var(--pad);
}

.pane-type-toolbar.widget-host{
  display:flex;
  align-items:center;
}

.pane-type-toolbar.widget-host > .pane-links,
.pane-type-toolbar.widget-host > .widget-controls{
  margin-left:auto;
}

.pane-type-status{
  --term-font-size:var(--font-size-status);

  background:transparent;
  border:0;
  padding:0;
  color:var(--color-status);
  font-size:var(--font-size-status);
}

.pane-type-status .term-output{
  color:var(--color-status);
}

.pane-type-status .status-value{
  color: var(--color-status);
  font-weight: 600;
}

.pane-type-status.news-warning .term-output{
  color:var(--color-warning);
}

.pane-type-status.news-warning .term-empty-message{
  color:var(--color-warning);
}

.pane-type-status.news-warning .status-value{
  color:var(--color-warning);
  font-weight:600;
}

.pane-type-info{ border-left-color:var(--color-accent); }
.pane-type-warning{ border-left-color:var(--color-warning); }
.pane-type-error{ border-left-color:var(--color-error); }
.pane-type-success{ border-left-color:var(--color-success); }

.pane-surface-cut-left{ border-left:0 !important; }
.pane-surface-cut-right{ border-right:0 !important; }
.pane-surface-cut-top{ border-top:0 !important; }
.pane-surface-cut-bottom{ border-bottom:0 !important; }

.pane-surface-cut-left > .term{ border-left:0 !important; }
.pane-surface-cut-right > .term{ border-right:0 !important; }
.pane-surface-cut-top > .term{ border-top:0 !important; }
.pane-surface-cut-bottom > .term{ border-bottom:0 !important; }

.pane-surface-cut-bottom > .term > .term-output{
  border-bottom:0 !important;
}

.pane-flag-align-left{ text-align:left; justify-content:flex-start; }
.pane-flag-align-center{ text-align:center; justify-content:center; }
.pane-flag-align-right{ text-align:right; justify-content:flex-end; }
.pane-flag-align-between{ justify-content:space-between; }

.pane-flag-text-nowrap{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.pane-flag-text-wrap{ white-space:normal; }

.pane-flag-size-xs{
  padding-top:0;
  padding-bottom:0;
  line-height:1;
}
.pane-flag-size-compact{
  padding-top:2px;
  padding-bottom:2px;
}
.pane-flag-size-roomy{
  padding-top:10px;
  padding-bottom:10px;
}

.pane-flag-beh-scroll-y{ overflow-y:auto; }
.pane-flag-beh-scroll-x{ overflow-x:auto; }

.pane-flag-place-center{
  display:flex;
  align-items:center;
  justify-content:center;
}

.pane-links{ min-width:0; }

.pane-links a,
.pane-links button.pane-link-action{
  color:var(--color-text);
  text-decoration:none;
}

.pane-links button.pane-link-action{
  border:0;
  background:transparent;
  padding:0;
  margin:0;
  font:inherit;
  cursor:pointer;
  appearance:none;
  -webkit-appearance:none;
}

.pane-links a:hover,
.pane-links button.pane-link-action:hover{ text-decoration:underline; }

.menu,
.widget-menu-stack,
.widget-menu-horizontal{
  font-family:var(--font-family);
  font-size:var(--font-size);
  line-height:1.2;
}

.widget-menu-stack,
.widget-menu-horizontal{
  min-width:0;
}

.compact-menu-normal{
	width:100%;
	min-width:0;
	min-height:0;
}

.compact-menu-normal > .widget-controls,
.compact-menu-normal > .pane-links{
	width:100%;
}

.compact-menu-trigger{
	width:100%;
	min-width:0;
	min-height:0;
}

.compact-menu-trigger.widget-menu-horizontal{
	display:none;
}
.widget-menu-stack{
  min-height:0;
  overflow:auto;
}

.menu{
  padding:2px;
  overflow:auto;
}

.menu > * + *{
  margin-top:var(--menu-stack-item-gap, 0px);
}

.widget-menu-horizontal{
  display:flex;
  align-items:center;
  gap:var(--menu-horizontal-gap, 12px);
  white-space:nowrap;
  overflow:hidden;
}

.widget-menu-horizontal .menu-h-item,
.menu .item{
  color:var(--color-text);
  text-decoration:none;
  font:inherit;
  appearance:none;
  -webkit-appearance:none;
}

.widget-menu-horizontal .menu-h-item{
  display:inline-block;
  padding:var(--menu-horizontal-item-pad-y, 2px) var(--menu-horizontal-item-pad-x, 4px);
  border:1px solid var(--border);
  background:transparent;
  cursor:pointer;
}

.widget-menu-horizontal .menu-h-item:hover{
  border-color:var(--border);
  background:var(--color-hover);
  text-decoration:none;
}

.menu .item{
  display:block;
  width:100%;
  padding:var(--menu-stack-item-pad-y, 3px) var(--menu-stack-item-pad-right, 2px);
  padding-left:calc(var(--menu-stack-item-pad-left, 4px) + var(--depth-pad, 0px));
  line-height:inherit;
  border:1px solid transparent;
  position:relative;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  background:transparent;
  text-align:left;
  cursor:pointer;
}

.menu a.item,
.menu a.item:visited,
.menu a.item:hover,
.menu a.item:active{
  color:var(--color-text);
  text-decoration:none;
}

.menu .item.leaf-child .menu-label[data-leaf-prefix],
.menu .item.leaf-child .menu-label[data-leaf-suffix]{
  display:flex;
  align-items:center;
  width:100%;
  min-width:0;
}

.menu .item.leaf-child .menu-label[data-leaf-prefix]::before{
  content:attr(data-leaf-prefix);
  color:var(--muted);
  flex:0 0 auto;
}

.menu .item.leaf-child .menu-label[data-leaf-suffix]::after{
  content:attr(data-leaf-suffix);
  margin-left:auto;
  color:var(--muted);
  flex:0 0 auto;
}

.menu .item:hover{
  border-color:var(--border);
  background:var(--color-hover);
}

.menu .nav-folder.is-open,
.menu .item.is-active,
.menu a.item.is-active,
.menu a.item.is-active:visited,
.menu a.item.is-active:hover,
.menu a.item.is-active:active{
  border-color:var(--color-accent);
  background:var(--color-selection-bg);
  color:var(--color-selection-text);
  text-decoration:none;
}

.menu .nav-folder.is-open::after{
  border-right-color:var(--color-selection-text);
  border-bottom-color:var(--color-selection-text);
  opacity:1;
}

.menu .item.is-active .menu-label[data-leaf-prefix]::before,
.menu .item.is-active .menu-label[data-leaf-suffix]::after{
  color:var(--color-selection-text);
}

.menu .nav-folder::after{
  content:"";
  position:absolute;
  right:var(--menu-stack-item-pad-right, 2px);
  top:50%;
  width:6px;
  height:6px;
  border-right:1px solid var(--muted);
  border-bottom:1px solid var(--muted);
  transform:translateY(-50%) rotate(45deg);
  opacity:.7;
  pointer-events:none;
}

.menu .menu-form-host{
  position:relative;
  padding-left:var(--depth-pad, 0px);
  padding-right:0;
}

.menu-divider{
  border:0;
  margin:0;
  flex:0 0 auto;
}

.menu-divider-horizontal{
  width:100%;
  margin:6px 0;
  border-top:1px solid var(--border);
}

.menu-divider-vertical{
  align-self:stretch;
  width:0;
  min-height:1.2em;
  margin:0 2px;
  border-left:1px solid var(--border);
}

.menu-heading{
  color:var(--fg);
  font-weight:700;
  padding:4px 2px;
}

.menu-text{
  color:var(--muted);
  padding:3px 2px;
  white-space:normal;
}

.menu-spacer{
  height:8px;
}

.menu-form{
  width:100%;
  min-width:0;
  border:0;
  padding:0;
  margin:0;
  background:transparent;

  --form-gap-x: 8px;
  --form-gap-y: 6px;
  --form-pad-x: 0px;
  --form-pad-y: 0px;
  --form-indent: 0px;
  --form-control-w: var(--control-w);
  --form-label-w: auto;
}

.form-flow{
  min-width:0;
  max-width:calc(100% - var(--form-indent));
  padding:var(--form-pad-y) var(--form-pad-x);
  margin-left:var(--form-indent);
}

.form-flow-stack{
  display:flex;
  flex-direction:column;
  gap:var(--form-gap-y);
}

.form-flow-inline{
  display:flex;
  flex-direction:row;
  flex-wrap:wrap;
  align-items:center;
  column-gap:var(--form-gap-x);
  row-gap:var(--form-gap-y);
}

.form-align-left{
  justify-content:flex-start;
  text-align:left;
}

.form-align-center{
  justify-content:center;
  text-align:center;
}

.form-align-right{
  justify-content:flex-end;
  text-align:right;
}

.form-align-between{
  justify-content:space-between;
  text-align:left;
}

.form-flow-stack.form-align-left{ align-items:stretch; }
.form-flow-stack.form-align-center{ align-items:center; }
.form-flow-stack.form-align-right{ align-items:flex-end; }
.form-flow-stack.form-align-between{ align-items:stretch; }

.form-group{
  width:100%;
}

.form-heading{
  width:100%;
  font-weight:700;
  color:var(--fg);
  line-height:1.2;
}

.form-text{
  width:100%;
  color:var(--muted);
  line-height:1.25;
  white-space:normal;
}

.form-divider{
  width:100%;
  margin:6px 0;
  border:0;
  border-top:1px solid var(--border);
}

.form-spacer{
  width:100%;
  height:8px;
}

.form-field{
  min-width:0;
  line-height:1;
}

.form-field-label-left{
  display:inline-flex;
  align-items:center;
  gap:4px;
}

.form-field-label-top{
  display:inline-flex;
  flex-direction:column;
  align-items:flex-start;
  gap:3px;
}

.form-field label{
  color:var(--muted);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.form-field-label-left label{
  width:var(--form-label-w, auto);
  flex:0 0 var(--form-label-w, auto);
}

.form-field-label-top label{
  width:var(--form-label-w, auto);
  flex:0 0 auto;
}


.form-field input[type="text"],
.form-field input[type="number"],
.form-field input[type="date"],
.form-field input[type="password"],
.form-field select{
  width:var(--form-control-w, var(--control-w));
  border:1px solid var(--border);
  background:var(--panel);
  color:var(--fg);
  font-family:inherit;
  font-size:inherit;
  padding:2px 4px;
  outline:none;
}

.form-field input[type="checkbox"]{
  margin:0;
}

.form-field input[type="number"]::-webkit-outer-spin-button,
.form-field input[type="number"]::-webkit-inner-spin-button{
  -webkit-appearance:none;
  margin:0;
}

.form-field input[type="number"]{
  -moz-appearance:textfield;
}

.form-button,
.form-submit{
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.widget-controls{
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:var(--menu-toolbar-gap, 8px);
}

.widget-control{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--border);
  background:transparent;
  color:var(--fg);
  font:inherit;
  padding:var(--menu-toolbar-item-pad-y, 2px) var(--menu-toolbar-item-pad-x, 8px);
  cursor:pointer;
  text-decoration:none;
}

.widget-control:hover{
  background:var(--color-hover);
  text-decoration:none;
}

.widget-control.is-active,
.menu-h-item.is-active,
.pane-link-action.is-active,
.link-block.is-active{
  border-color:var(--color-accent);
  background:var(--color-selection-bg);
  color:var(--color-selection-text);
  text-decoration:none;
}

.link-plain.is-active{
  color:var(--color-selection-text);
  background:var(--color-selection-bg);
  outline:1px solid var(--color-accent);
  outline-offset:2px;
}

.action-links{
  min-width:0;
}

.action-links-layout-inline,
.action-links-layout-toolbar{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
}

.action-links-layout-stack{
  display:grid;
  gap:4px;
  justify-items:start;
}

.action-links-align-left{
  justify-content:flex-start;
  text-align:left;
}

.action-links-align-center{
  justify-content:center;
  text-align:center;
}

.action-links-align-right{
  justify-content:flex-end;
  text-align:right;
}

.action-links-layout-stack.action-links-align-center{
  justify-items:center;
}

.action-links-layout-stack.action-links-align-right{
  justify-items:end;
}

.term-part-links-before{
  margin-bottom:var(--term-part-gap);
}

.term-part-links-after{
  margin-top:var(--term-part-gap);
  padding-bottom:var(--term-part-gap);
}

.link-plain,
button.link-plain{
  color:var(--color-link);
  text-decoration:underline;
  border:0;
  background:transparent;
  padding:0;
  margin:0;
  font:inherit;
  cursor:pointer;
  appearance:none;
  -webkit-appearance:none;
}

.link-plain:hover,
button.link-plain:hover{
  text-decoration:underline;
}

.link-subtle,
button.link-subtle{
  color:var(--muted);
}

.link-block,
button.link-block{
  display:block;
  border:1px solid var(--border);
  background:transparent;
  color:var(--fg);
  padding:4px 6px;
  text-decoration:none;
  font:inherit;
  cursor:pointer;
  appearance:none;
  -webkit-appearance:none;
}

.link-block:hover,
button.link-block:hover{
  background:var(--color-hover);
  text-decoration:none;
}

.menu-label{
  display:inline-block;
  line-height:1;
}

.widget-control.control-icon{
  inline-size:var(--control-icon-box);
  block-size:var(--control-icon-box);
  padding:0;
  aspect-ratio:1 / 1;
}

.widget-control.control-icon > .menu-label{
  display:flex;
  align-items:center;
  justify-content:center;
  inline-size:100%;
  block-size:100%;
  font-size:var(--control-icon-glyph-size);
  line-height:1;
}

.widget-choice-segmented{
	display:inline-flex;
	align-items:stretch;
	min-width:0;
	border:1px solid var(--border);
	border-radius:var(--control-radius);
	overflow:hidden;
}

.widget-choice-option{
	display:inline-flex;
	align-items:center;
	justify-content:center;
	margin:0;
	padding:4px 8px;
	border:0;
	border-right:1px solid var(--border);
	background:transparent;
	color:var(--fg);
	font:inherit;
	white-space:nowrap;
	cursor:pointer;
	appearance:none;
	-webkit-appearance:none;
}

.widget-choice-option:last-child{
	border-right:0;
}

.widget-choice-option:hover{
	background:var(--color-hover);
}

.widget-choice-option.is-active,
.widget-choice-option[aria-checked="true"]{
	background:var(--color-selection-bg);
	color:var(--color-selection-text);
}

.widget-choice-select{
	display:none;
	min-width:0;
	border:1px solid var(--border);
	border-radius:var(--control-radius);
	background:var(--color-surface-alt);
	color:var(--fg);
	font:inherit;
	padding:4px 6px;
}

/* ============================================================
   Rotator
   ============================================================ */

.widget-rotator{
  position:relative;
  width:100%;
  min-width:0;
  min-height:0;
  overflow:hidden;
}

.widget-rotator-stage{
  display:grid;
  width:100%;
  height:100%;
  min-width:0;
  min-height:0;
  overflow:hidden;
}

.widget-rotator-item{
  grid-area:1 / 1;
  width:100%;
  height:100%;
  min-width:0;
  min-height:0;
  opacity:0;
  pointer-events:none;
}

.widget-rotator-item > *{
  width:100%;
  height:100%;
  min-width:0;
  min-height:0;
}

.widget-rotator-item.is-active{
  opacity:1;
  pointer-events:auto;
}

/* Fade */

.widget-rotator-transition-fade .widget-rotator-item{
  transition:opacity 300ms ease;
}

.widget-rotator-transition-fade .widget-rotator-item.is-entering,
.widget-rotator-transition-fade .widget-rotator-item.is-leaving{
  opacity:0;
}

/* Vertical */

.widget-rotator-transition-vertical .widget-rotator-item{
  transform:translateY(100%);
  transition:
    transform 300ms ease,
    opacity 300ms ease;
}

.widget-rotator-transition-vertical .widget-rotator-item.is-entering{
  transform:translateY(100%);
  opacity:0;
}

.widget-rotator-transition-vertical .widget-rotator-item.is-active{
  transform:translateY(0);
  opacity:1;
}

.widget-rotator-transition-vertical .widget-rotator-item.is-leaving{
  transform:translateY(-100%);
  opacity:0;
}

.widget-status{
  min-height:var(--bar-h);
  height:var(--bar-h);
  padding:0 6px;
  font-size:var(--font-size-status);
  color:var(--muted);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  white-space:nowrap;
  line-height:1;
}


.term-downloads-page{
  padding-left:var(--term-output-pad);
  padding-right:var(--term-output-pad);
  display:grid;
  gap:10px;
}

.term-downloads-section{
  display:grid;
  gap:6px;
  min-width:0;
}

.term-downloads-title{
  line-height:1.1;
}

.term-downloads-description{
  color:var(--muted);
}

.term-downloads-list{
  display:grid;
  gap:4px;
  min-width:0;
}

a.term-download-item,
a.term-download-item:visited,
a.term-download-item:hover,
a.term-download-item:active,
a.term-download-item:focus{
  display:block;
  border:1px solid var(--border);
  background:transparent;
  color:var(--fg);
  text-decoration:none !important;
  padding:6px 8px;
}

a.term-download-item:hover,
a.term-download-item:focus{
  background:var(--color-hover);
  text-decoration:none !important;
}
.term-download-name{
  font-weight:700;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.term-download-desc{
  color:var(--muted);
  min-width:0;
  margin-top:3px;
}

.overlay-root{
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:200;
}

.overlay{
  display:none;
  position:absolute;
  min-width:0;
  max-width:calc(100vw - (var(--pad) * 2));
  background:var(--color-surface-alt);
  border:1px solid var(--border);
  pointer-events:auto;
  font-size:var(--font-size);
}

.overlay.open{ display:block; }

.overlay-inner{
  display:grid;
  grid-template-rows:auto 1fr;
  gap:6px;
  padding:6px;
}

.overlay-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  border-bottom:1px solid var(--border);
  padding-bottom:6px;
}

.overlay-title{ font-weight:700; }

.overlay-body{
  min-height:0;
  max-height:calc(100vh - 80px);
  overflow:auto;
}

.overlay-body > *{
  width:100%;
  min-width:0;
  min-height:0;
}

.overlay-stack{
  display:grid;
  gap:6px;
}

.overlay[data-overlay-variant="menu"] .overlay-stack{
  gap:0;
  justify-items:start;
}

.overlay[data-overlay-variant="menu"] .overlay-stack > .btn{
  width:auto;
  margin:0;
  padding:4px 2px;
  border:0;
  background:transparent;
  color:var(--color-link);
  text-align:left;
}

.overlay[data-overlay-variant="menu"] .overlay-stack > .btn:hover,
.overlay[data-overlay-variant="menu"] .overlay-stack > .btn:focus{
  background:transparent;
  text-decoration:underline;
}

.overlay[data-overlay-variant="action-list"] .overlay-stack{
  gap:0;
}

.overlay[data-overlay-variant="action-list"] .overlay-stack > .btn{
  width:100%;
  margin:0;
  padding:5px 7px;
  border-radius:0;
  text-align:left;
}

.overlay[data-overlay-variant="action-list"] .overlay-stack > .btn + .btn{
  border-top:0;
}

.overlay[data-overlay-variant="action-list"] .overlay-stack > .btn:first-child{
  border-top-left-radius:var(--control-radius);
  border-top-right-radius:var(--control-radius);
}

.overlay[data-overlay-variant="action-list"] .overlay-stack > .btn:last-child{
  border-bottom-left-radius:var(--control-radius);
  border-bottom-right-radius:var(--control-radius);
}

.overlay-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) 120px;
  align-items:center;
  column-gap:10px;
}

.overlay-row > *{ min-width:0; }

.overlay-row label{
  color:var(--muted);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.overlay-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
}

.overlay-body input[type="text"],
.overlay-body input[type="number"],
.overlay-body input[type="password"],
.overlay-body select{
  width:100%;
  min-width:0;
  border:1px solid var(--border);
  background:var(--panel);
  color:var(--fg);
  font-family:inherit;
  font-size:inherit;
  padding:2px 4px;
  outline:none;
}
.overlay-body input[type="number"]{
  padding-right:0;
}

.overlay-body .form-field input[type="text"],
.overlay-body .form-field input[type="number"],
.overlay-body .form-field input[type="date"],
.overlay-body .form-field input[type="password"],
.overlay-body .form-field select{
  width:var(--form-control-w, var(--control-w));
}

.overlay-body input[type="checkbox"],
.setting-check input[type="checkbox"]{
  margin:0;
  justify-self:end;
  appearance:none;
  -webkit-appearance:none;
  width:12px;
  height:12px;
  border:1px solid var(--border);
  background:var(--panel);
  cursor:pointer;
  position:relative;
}

.overlay-body input[type="checkbox"]:checked,
.setting-check input[type="checkbox"]:checked{
  background:var(--color-accent);
  border-color:var(--color-accent);
}

.overlay-body input[type="checkbox"]:checked::after,
.setting-check input[type="checkbox"]:checked::after{
  content:"";
  position:absolute;
  left:3px;
  top:0px;
  width:3px;
  height:7px;
  border:solid var(--color-selection-text);
  border-width:0 1px 1px 0;
  transform:rotate(45deg);
}

.setting-range{
  width:100%;
  min-width:0;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  column-gap:2px;
}

.setting-range input[type="range"]{
  width:100%;
  min-width:0;
  margin:0;
  padding:0;
  background:transparent;
  appearance:none;
  -webkit-appearance:none;
  height:16px;
  cursor:pointer;
}

.setting-range input[type="range"]::-webkit-slider-runnable-track{
  height:4px;
  border:1px solid var(--border);
  border-radius:999px;
  background:var(--color-surface-alt);
}

.setting-range input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance:none;
  appearance:none;
  width:10px;
  height:10px;
  margin-top:-4px;
  border:1px solid var(--border);
  border-radius:50%;
  background:var(--color-accent);
}

.setting-range input[type="range"]::-moz-range-track{
  height:4px;
  border:1px solid var(--border);
  border-radius:999px;
  background:var(--color-surface-alt);
}

.setting-range input[type="range"]::-moz-range-thumb{
  width:10px;
  height:10px;
  border:1px solid var(--border);
  border-radius:50%;
  background:var(--color-accent);
}

.setting-range input[type="range"]::-moz-focus-outer{
  border:0;
}

.setting-range input[type="range"]:focus{
  outline:none;
}

.setting-range-value{
  min-width:3ch;
  text-align:right;
  color:var(--muted);
  font-variant-numeric:tabular-nums;
}

.form-field .setting-range{
  width:var(--form-control-w, var(--control-w));
  flex:0 0 var(--form-control-w, var(--control-w));
}

.setting-range.setting-control-compact{
  width:auto;
  display:inline-flex;
  align-items:center;
  column-gap:0;
  gap:4px;
}

.setting-range.setting-control-compact input[type="range"]{
  flex:0 0 90px;
  width:90px;
}

.setting-range.setting-control-compact .setting-range-value{
  flex:0 0 4ch;
  min-width:4ch;
  width:4ch;
  text-align:right;
  font-variant-numeric:tabular-nums;
}

.setting-checks{
  width:100%;
  min-width:0;
  display:grid;
  gap:4px;
}

.setting-checks-list{
  width:100%;
  min-width:0;
  display:grid;
  gap:2px;
}

.setting-check{
  width:100%;
  min-width:0;
  display:flex;
  align-items:center;
  gap:6px;
  color:var(--fg);
  white-space:nowrap;
}

.setting-check span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
}

.setting-checks-align-right .setting-check{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  column-gap:8px;
}

.setting-checks-align-right .setting-check span{
  grid-column:1;
  grid-row:1;
}

.setting-checks-align-right .setting-check input[type="checkbox"]{
  grid-column:2;
  grid-row:1;
  justify-self:end;
}

.setting-check.is-disabled{
  opacity:.45;
  cursor:not-allowed;
}

.setting-checks-empty{
  color:var(--muted);
  font-style:italic;
}

.setting-checks-frame{
  width:100%;
  min-width:0;
}

.setting-checks-frame-summary{
  width:100%;
  cursor:pointer;
  color:var(--muted);
  user-select:none;
  list-style:none;
  display:flex;
  align-items:center;
}

.setting-checks-frame-summary::-webkit-details-marker{
  display:none;
}

.setting-checks-frame-summary::after{
  content:"";
  width:0;
  height:0;
  margin-left:6px;
  border-left:4px solid transparent;
  border-right:4px solid transparent;
  border-top:5px solid var(--muted);
}

.setting-checks-frame[open] .setting-checks-frame-summary::after{
  border-top:0;
  border-bottom:5px solid var(--muted);
}

.setting-checks-frame.setting-checks-align-right .setting-checks-frame-summary{
  justify-content:flex-end;
  text-align:right;
}

.setting-checks-frame-body{
  margin-top:4px;
}

.setting-checks-dropdown{
  position:relative;
  width:100%;
  min-width:0;
}

.setting-checks-dropdown-summary{
  width:100%;
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  color:var(--fg);
  user-select:none;
}

.setting-checks-dropdown-summary::-webkit-details-marker{
  display:none;
}

.setting-checks-dropdown-summary::after{
  content:"";
  width:0;
  height:0;
  margin-left:6px;
  border-left:4px solid transparent;
  border-right:4px solid transparent;
  border-top:5px solid var(--muted);
}

.setting-checks-dropdown.setting-checks-align-right .setting-checks-dropdown-summary{
  justify-content:flex-end;
  text-align:right;
}

.setting-checks-dropdown[open]{
  z-index:70;
}

.setting-checks-dropdown[open] .setting-checks-dropdown-summary{
  background:var(--color-hover);
}

.setting-checks-dropdown-body{
  position:absolute;
  left:0;
  top:calc(100% + 1px);
  z-index:80;
  min-width:220px;
  display:grid;
  gap:4px;
  padding:6px;
  border:1px solid var(--border);
  background:var(--color-surface-alt);
}

.btn{
  border:1px solid var(--border);
  background:transparent;
  color:var(--fg);
  font-family:inherit;
  font-size:inherit;
  padding:4px 8px;
  cursor:pointer;
}

.btn:active{ transform:translateY(1px); }

.content{
  min-width:0;
  min-height:0;
  background:transparent;
}

.content > .term{
  height:100%;
  min-height:0;
}

.pane-content-link-root{
  display:flex;
  width:100%;
  height:100%;
  min-width:0;
  color:inherit;
  text-decoration:none;
}

.pane-content-link-root:hover{ text-decoration:none; }

.pane-content-body{ min-width:0; }

.pane-divider{
  width:100%;
  margin:0;
  border:0;
  border-top:1px solid var(--border);
}

.pane-spacer{
  width:100%;
  height:100%;
  min-width:0;
  min-height:0;
}

.pane-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
}

a.pane-button:hover{ text-decoration:none; }

.pane-image-root,
.pane-image-link{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  min-width:0;
  min-height:0;
  width:100%;
  height:100%;
  overflow:hidden;
}

.pane-image-link:hover{ text-decoration:none; }

.pane-image{
  display:block;
  width:100%;
  height:100%;
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  object-position:center center;
}

.pane-image-rounded{
  border-radius:8px;
}

.pane-image-rounded > .pane-image{
  border-radius:inherit;
}

.pane-image-bordered{
  border:1px solid var(--border);
}

.term{
  height:100%;
  display:grid;
  grid-template-rows:1fr auto;
  min-height:0;
  border:1px solid var(--border);
  background:var(--panel);
  font-size:var(--term-font-size,var(--font-size));
}


.term-output{
  border-bottom:1px solid var(--border);
  padding:0;
  overflow-y:auto;
  overflow-x:auto;
  scrollbar-gutter:stable;
  white-space:pre;
  background:var(--panel);
}

/* ============================================================
   Text overflow
   ============================================================ */

.text-overflow-viewport{
  min-width:0;
  overflow:hidden !important;
  scrollbar-gutter:auto;
}

.text-overflow-track{
  min-width:100%;
  width:max-content;
  white-space:nowrap;
  will-change:transform;
}

.text-overflow-track > *{
  white-space:nowrap !important;
}

.text-overflow-clip .text-overflow-track{
  width:max-content;
  max-width:none;
  overflow:hidden;
}

.text-overflow-ellipsis .text-overflow-track{
  width:100%;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
}

.text-overflow-ellipsis .text-overflow-track *{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.text-overflow-marquee .text-overflow-track{
  width:max-content;
  max-width:none;
  overflow:visible;
}

.term-output.text-overflow-viewport{
  display:block;
}

.term-output-track{
  min-height:100%;
}

.term-output.term-valign-center > .term-output-track{
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.term-output.term-valign-bottom > .term-output-track{
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
}

.pane-content-overflow-viewport{
  min-width:0;
  width:100%;
  overflow:hidden;
}

.pane-content-overflow-track{
  min-width:0;
}

.term-output.term-valign-center{
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.term-output.term-valign-bottom{
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
}

.term.term-noinput > .term-output{
  border-bottom:0;
}

.term-output > .term-line,
.term-output > .sys-title,
.term-output > .term-empty-message{
  padding-left:var(--term-output-pad);
  padding-right:var(--term-output-pad);
}

.term-line{
  white-space:pre;
}

.term-empty-message{
  color:var(--muted);
  white-space:normal;
}

.pane-type-status .term-empty-message{
  color:var(--color-status);
}

.sys-title.sys-ok{ color:var(--color-success); }
.sys-title.sys-warn{ color:var(--color-warning); }
.sys-title.sys-error{ color:var(--color-error); }

.term-inputbar{
	min-height:var(--bar-h);
	height:auto;
	padding:3px 6px;
	display:flex;
	gap:8px;
	align-items:center;
	line-height:1;
}

.term-inputbar > .cmd{
	flex:1 1 0;
	width:0;
	min-width:0;
}

.term-inputbar > .prompt-actions{
	flex:0 0 auto;
	width:auto;
	min-width:0;
}

.term-inputbar > .btn{
	flex:0 0 auto;
}

.prompt{
  color:var(--muted);
  white-space:nowrap;
}

.cmd{
	width:100%;
	height:100%;
	min-width:0;
	padding:4px 6px;
	border:1px solid var(--border);
	border-radius:var(--control-radius);
	outline:none;
	background:var(--color-surface-alt);
	color:var(--fg);
	font-family:inherit;
	font-size:inherit;
}

.cmd::placeholder{
	color:var(--color-text-muted);
	opacity:.65;
}

.cmd:focus{
	border-color:var(--color-accent);
}

.cmd-multiline{
	display:block;
	height:auto;
	min-height:1.4em;
	margin:0;
	resize:none;
	overflow-x:hidden;
	overflow-y:hidden;
	line-height:1.35;
}

.cmd-multiline.cmd-resizable{
	resize:vertical;
	overflow-y:auto;
}

.term-tablewrap.grid-outer-none .term-table{ border:0; }
.term-tablewrap.grid-outer-box .term-table{ border:var(--term-table-border-w) solid var(--border); }

.term-tablewrap.grid-outer-top .term-table{
  border:0;
  border-top:var(--term-table-border-w) solid var(--border);
}
.term-tablewrap.grid-outer-bottom .term-table{
  border:0;
  border-bottom:var(--term-table-border-w) solid var(--border);
}
.term-tablewrap.grid-outer-left .term-table{
  border:0;
  border-left:var(--term-table-border-w) solid var(--border);
}
.term-tablewrap.grid-outer-right .term-table{
  border:0;
  border-right:var(--term-table-border-w) solid var(--border);
}
.term-tablewrap.grid-outer-x .term-table{
  border:0;
  border-left:var(--term-table-border-w) solid var(--border);
  border-right:var(--term-table-border-w) solid var(--border);
}
.term-tablewrap.grid-outer-y .term-table{
  border:0;
  border-top:var(--term-table-border-w) solid var(--border);
  border-bottom:var(--term-table-border-w) solid var(--border);
}

.term-tablewrap.grid-inner-none .term-table th,
.term-tablewrap.grid-inner-none .term-table td{
  border-right:0;
}

.term-tablewrap.grid-inner-none .term-table th:first-child,
.term-tablewrap.grid-inner-none .term-table td:first-child{
  border-left:0;
}

.term-tablewrap.grid-inner-row .term-table th,
.term-tablewrap.grid-inner-row .term-table td{
  border-right:0;
}

.term-tablewrap.grid-inner-row .term-table tbody td{
  border-top:1px solid var(--border);
}

.term-tablewrap.grid-inner-both .term-table tbody td{
  border-top:1px solid var(--border);
}

.term-tablewrap{
  white-space:normal;
  margin:0;
  --table-sticky-h: 0px;
  --table-sticky-top: 0px;
}

.term-table-track{
  min-width:100%;
  width:max-content;
}

.term-table-track > .term-table-sticky,
.term-table-track .term-table-frame-top{
  width:100%;
}


.term-table-sticky{
  position:sticky;
  top:var(--table-sticky-top);
  z-index:30;
  background:var(--panel);
  padding-bottom:0;
  margin-bottom:0;
  box-shadow: 0 calc(-1 * var(--table-sticky-top)) 0 0 var(--panel);
}


.term-table-frame-top{
  background:var(--panel);
  border:var(--term-table-border-w) solid var(--border);
  border-bottom:var(--term-table-border-w) solid var(--border);
  padding:0;
}


.term-tablepager{
  display:flex;
  align-items:stretch;
  gap:0;
  margin:0;
}

.term-tablepager-controls{
  display:flex;
  align-items:stretch;
}

.term-tablepager .pager-btn{
  border:0;
  border-right:1px solid var(--border);
  border-radius:0;
  padding:var(--table-pager-btn-pad-y) var(--table-pager-btn-pad-x);
  min-width:var(--table-pager-btn-min-w);
  line-height:1;
}

.term-tablepager .pager-btn:active{ transform:none; }

.term-tablepager-info{
  flex:1 1 auto;
  min-width:0;
  border-left:1px solid var(--border);
  border-right:0;
  padding:0 8px;
  display:flex;
  align-items:center;
  color:var(--muted);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.term-tablepager .pager-field{
  border:0;
  outline:none;
  background:transparent;
  color:var(--fg);
  font-family:inherit;
  font-size:inherit;
  padding:0 var(--table-pager-field-pad-x);
  margin:0;
  width:var(--table-pager-field-w);
  line-height:1;
}

.term-tablepager .pager-field::placeholder{
  color:var(--muted);
  opacity:.55;
  font-style:italic;
  text-align:center;
}

.term-tablepager .pager-filter{ border-right:1px solid var(--border); }

.term-tablepager-extra-first{
  border-left:1px solid var(--border);
}

.term-tablepager-extra-last{
  border-right:0 !important;
}

.term-table-settings-inline{
  display:flex;
  align-items:stretch;
  border-right:1px solid var(--border);
}

.term-table-setting{
  display:flex;
  align-items:center;
  gap:var(--table-setting-gap);
  padding:0 var(--table-setting-pad-x);
  border-right:1px solid var(--border);
  white-space:nowrap;
}

.term-table-setting:last-child{
  border-right:0;
}

.term-table-setting-title{
  color:var(--muted);
}

.term-table-setting select,
.term-table-setting input[type="text"],
.term-table-setting input[type="number"]{
  width:auto;
  max-width:90px;
  min-width:50px;
  border:1px solid var(--border);
  background:var(--panel);
  color:var(--fg);
  font-family:inherit;
  font-size:inherit;
  padding:0 3px;
  outline:none;
}

.term-table-settings-inline .term-table-setting select,
.term-table-settings-inline .term-table-setting input[type="text"],
.term-table-settings-inline .term-table-setting input[type="number"]{
  border:0;
  background:transparent;
}

.term-table-setting > .setting-checks-dropdown{
  min-width:90px;
}

.term-table-settings-menu{
  position:relative;
  border-right:1px solid var(--border);
}

.term-table-settings-summary{
  list-style:none;
  cursor:pointer;
  padding:0 8px;
  height:100%;
  display:flex;
  align-items:center;
  color:var(--fg);
  user-select:none;
}

.term-table-settings-summary::-webkit-details-marker{
  display:none;
}

.term-table-settings-summary::after{
  content:"";
  width:0;
  height:0;
  margin-left:6px;
  border-left:4px solid transparent;
  border-right:4px solid transparent;
  border-top:5px solid var(--muted);
}

.term-table-settings-menu[open] .term-table-settings-summary{
  background:var(--color-hover);
}

.term-table-settings-body{
  position:absolute;
  right:0;
  top:100%;
  z-index:50;
  min-width:var(--table-settings-menu-min-w);
  display:grid;
  gap:var(--table-setting-gap);
  padding:var(--table-settings-menu-pad);
  border:1px solid var(--border);
  background:var(--color-surface-alt);
}

.term-table-settings-body .term-table-setting{
  justify-content:space-between;
  border-right:0;
  padding:2px 0;
}

.table-refresh-btn.is-stale{
  color:var(--color-warning);
}

.term-tablefilterline{
  display:none;
  border-top:1px solid var(--border);
  padding:2px 6px;
  background:var(--panel);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.term-tablefilterline .filter-term{
  color:var(--fg);
  text-decoration:none;
}

.term-tablefilterline .filter-term:hover{ text-decoration:underline; }

.term-tablefilterline .filter-term-exclude{
  color:var(--color-warning);
}

.term-table{
  width:max-content;
  min-width:100%;
  border-collapse:collapse;
  border:0;
  background:var(--panel);
  color:var(--fg);
  font-size:inherit;
  table-layout:auto;
}

.term-tablewrap.has-pager.grid-outer-box .term-table{ border-top:0; }

.term-table.is-frozen{ table-layout:fixed; }

.term-table th,
.term-table td{
  border:none;
  border-right:1px solid var(--border);
  padding:var(--table-cell-pad-y) var(--table-cell-pad-x);
  text-align:left;
  vertical-align:top;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.term-tablewrap.grid-inner-col .term-table th:first-child,
.term-tablewrap.grid-inner-col .term-table td:first-child,
.term-tablewrap.grid-inner-both .term-table th:first-child,
.term-tablewrap.grid-inner-both .term-table td:first-child{
  border-left:1px solid var(--border);
}

.term-table th{ position:relative; }

.term-table thead th{
  background:var(--color-surface-alt);
  position:sticky;
  top:calc(var(--table-sticky-top) + var(--table-sticky-h) - 1px);
  z-index:25;
}

.term-table thead th.sortable{
  cursor:pointer;
  padding-right:16px;
}

.term-table thead th.sort-asc::after{
  content:"\25B2";
  position:absolute;
  right:6px;
  top:50%;
  transform:translateY(-50%);
  color:var(--muted);
  font-size:var(--font-size);
}

.term-table thead th.sort-desc::after{
  content:"\25BC";
  position:absolute;
  right:6px;
  top:50%;
  transform:translateY(-50%);
  color:var(--muted);
  font-size:var(--font-size);
}

.term-table td.is-num{ font-variant-numeric:tabular-nums; }

.term-table td.center,
.term-table th.center{ text-align:center; }

.term-table td.align-left,
.term-table th.align-left{ text-align:left; }

.term-table td.align-center,
.term-table th.align-center{ text-align:center; }

.term-table td.align-right,
.term-table th.align-right{ text-align:right; }

.term-table td.is-num .num-field{
  display:inline-block;
  line-height:inherit;
  vertical-align:top;
  text-align:right;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:100%;
}

.term-table a.cell-link,
.term-table button.link-plain{
  line-height:inherit;
}

.term-table th.is-hidden,
.term-table td.is-hidden{ display:none; }

.term-table a.cell-link{
  color:inherit;
  text-decoration:none;
  font-weight:400;
}

.term-table a.cell-link:hover{
  text-decoration:none;
  font-weight:600;
  outline:1px solid var(--border);
  outline-offset:-1px;
}

.term-table tr.is-hit td{
  background:var(--color-selection-bg);
  color:var(--color-selection-text);
}

.col-resize-handle{
  position:absolute;
  top:0;
  right:-2px;
  width:6px;
  height:100%;
  cursor:col-resize;
  user-select:none;
  touch-action:none;
}

.col-resize-handle:hover{ background:rgba(255,255,255,0.12); }

.term-part-main{
  min-width:0;
}

.term-part{
  white-space:normal;
  padding:var(--term-part-pad-y) var(--term-part-pad-x);
  text-align:var(--term-part-align);
}

.content > .term:not(.term-noinput) > .term-output > .term-part:first-child{
  margin-top:var(--term-part-gap);
}

.term-part + .term-part{
  margin-top:var(--term-part-gap);
}

.term-part + .term-part.term-part-divider-line{
  border-top:1px solid var(--border);
}

.term-part-body{
  min-width:0;
}

.term-part-collapsible{
  display:grid;
  align-items:start;
}

.term-part-collapsible-layout-inline{
  grid-template-columns:auto 1fr;
  column-gap:4px;
}

.term-part-collapsible-layout-block{
  grid-template-columns:1fr;
  row-gap:4px;
}

.term-part-collapsible-layout-block .term-part-toggle{
  justify-self:start;
}

.term-part-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:flex-start;
  gap:4px;
  min-width:12px;
  border:0;
  padding:0;
  background:transparent;
  line-height:1;
}


.term-part-toggle-label{
  color:var(--muted);
  white-space:nowrap;
}
.term-part-toggle:hover{
  background:transparent;
}

.term-part-toggle::before{
  content:"\25B6";
  color:var(--muted);
  font-size:0.9em;
}

.term-part-toggle.is-expanded::before{
  content:"\25BC";
}

.term-part-body-collapsible{
  min-width:0;
}

.term-part-expand{
  margin-top:4px;
  padding:0 6px;
  line-height:1.1;
}

.term-details{
	display:grid;
	grid-template-columns:max-content minmax(0, 1fr);
	gap:3px 12px;
	margin:2px 0;
	white-space:normal;
}

.term-details-label,
.term-details-value{
	margin:0;
	min-width:0;
}

.term-details-label{
	color:var(--muted);
}

.term-details-value{
	color:var(--fg);
	overflow-wrap:anywhere;
	font-variant-numeric:tabular-nums;
}

.rich-cards{
  --rich-card-gap:12px;
  --rich-card-padding:16px;

  display:grid;
  gap:var(--rich-card-gap);
  margin:1.5em 0;
  white-space:normal;
}

.rich-cards-spacing-compact{
  --rich-card-gap:6px;
  --rich-card-padding:8px;
}

.rich-cards-spacing-flush{
  --rich-card-gap:4px;
  --rich-card-padding:0px;
}

.rich-cards-responsive-stack,
.rich-cards-responsive-fixed{
  grid-template-columns:repeat(
    var(--rich-card-columns, 3),
    minmax(0, 1fr)
  );
}

.rich-cards-responsive-fit{
  grid-template-columns:repeat(
    auto-fit,
    minmax(min(180px, 100%), 1fr)
  );
}

.rich-card{
  position:relative;
  min-width:0;
  display:flex;
  flex-direction:column;
  padding:var(--rich-card-padding);
  border:1px solid var(--color-border);
  background:var(--color-surface-alt);
  color:var(--color-text);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease;
}

.rich-card:hover{
  transform:translateY(-2px);
  border-color:var(--color-accent);
  background:var(--color-hover);
}

.rich-card > :first-child{
  margin-top:0;
}

.rich-card > :last-child{
  margin-bottom:0;
}

.rich-card h2,
.rich-card h3,
.rich-card h4{
  color:var(--color-text);
  line-height:1.15;
}

.rich-card p{
  color:var(--color-text-muted);
}

.rich-card p:has(> img:only-child){
  margin:0;
}

.rich-card img{
  display:block;
  width:100%;
  height:auto;
  border:1px solid var(--color-border);
  border-radius:var(--surface-radius);
}

.rich-card > p:last-child:has(a:only-child){
  margin-top:auto;
  padding-top:1em;
}

.rich-card > p:last-child > a:only-child{
  display:inline-flex;
  align-items:center;
  width:fit-content;
  padding:7px 10px;
  border:1px solid var(--color-border);
  background:transparent;
  color:var(--color-link);
  font-weight:700;
  text-decoration:none;
}

.rich-card > p:last-child > a:only-child:hover{
  border-color:var(--color-accent);
  background:var(--color-hover);
  text-decoration:none;
}

/* ============================================================
   Optional content-island presentation
   Activate with class: content-islands
   ============================================================ */

.content-islands .rich-prose{
  margin:1.5em 0;
  padding:16px;
  border:1px solid var(--color-border);
  background:var(--color-surface);
  color:var(--color-text);
  white-space:normal;
}

.content-islands .rich-prose > :first-child{
  margin-top:0;
}

.content-islands .rich-prose > :last-child{
  margin-bottom:0;
}

.content-islands .rich-widget{
  margin:1.5em 0;
  padding:16px;
  border:1px solid var(--color-border);
  background:var(--color-surface-alt);
  color:var(--color-text);
  white-space:normal;
}

.content-islands .rich-widget > h3{
  margin:0;
  color:var(--color-text);
}

.content-islands .rich-widget > p{
  color:var(--color-text-muted);
}

/* ============================================================
   Rich inline tooltip and popup controls
   ============================================================ */

.rich-tooltip,
.rich-popup-link{
  display:inline;
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  color:var(--color-link);
  font:inherit;
  line-height:inherit;
  cursor:pointer;
}

.rich-tooltip{
  border-bottom:1px dotted currentColor;
  cursor:help;
}

.rich-tooltip-popup{
  display:none;
  position:fixed;
  z-index:1000;
  width:max-content;
  max-width:min(280px, calc(100vw - 16px));
  padding:7px 9px;
  border:1px solid var(--color-border);
  border-radius:var(--control-radius);
  background:var(--color-surface-alt);
  color:var(--color-text);
  box-shadow:var(--surface-shadow);
  font-family:var(--font-family);
  font-size:var(--font-size);
  font-weight:400;
  line-height:1.35;
  text-align:left;
  white-space:normal;
  pointer-events:none;
}

.rich-tooltip-popup.is-open{
  display:block;
}

.rich-popup-link{
  text-decoration:underline;
  text-decoration-style:dotted;
  text-underline-offset:.15em;
}

.rich-popup-link:hover,
.rich-popup-link:focus{
  color:var(--color-accent);
}



.rich-callout{
  --rich-callout-color:var(--color-border);

  position:relative;
  margin:1.25em 0;
  padding:1em 1.1em;
  border:1px solid var(--color-border);
  border-left:4px solid var(--rich-callout-color);
  background:var(--color-surface-alt);
  white-space:normal;
}

.rich-callout-neutral{
  --rich-callout-color:var(--color-border);
}

.rich-callout-accent{
  --rich-callout-color:var(--color-accent);
}

.rich-callout-warning{
  --rich-callout-color:var(--color-warning);
}

.rich-callout-danger{
  --rich-callout-color:var(--color-error);
}

.rich-callout-success{
  --rich-callout-color:var(--color-success);
}

.rich-callout-title{
  margin:0 0 .55em;
  color:var(--rich-callout-color);
  font-weight:800;
  line-height:1.2;
}

.rich-callout-body{
  color:var(--color-text);
  line-height:1.5;
}

.rich-callout-body > :first-child{
  margin-top:0;
}

.rich-callout-body > :last-child{
  margin-bottom:0;
}

.markup-raw-source{
  white-space:pre-wrap !important;
  overflow-wrap:anywhere;
}

.term-md{
  white-space:normal;
  line-height:1.45;
  max-width:100%;
}

.term-md p{ margin:6px 0; }

.term-md h1{
  font-size:1.3em;
  font-weight:800;
  margin:2px 0 3px;
}
.term-md h2{
  font-size:1.2em;
  font-weight:800;
  margin:2px 0 3px;
}
.term-md h3,
.term-md h4{
  font-size:1em;
  font-weight:700;
  margin:3px 0;
}

.term-md h1,
.term-md h2,
.term-md h3,
.term-md h4{ line-height:1.2; }

.term-md a{
  color:var(--color-link);
  text-decoration:underline;
}

.term-md a:hover{ opacity:.9; }

.term-md ul,
.term-md ol{
  margin:6px 0 8px 1.25em;
  padding:0;
}

.term-md li{ margin:3px 0; }

.term-md li > ul,
.term-md li > ol{ margin-top:4px; }

.term-md hr{
  border:0;
  border-top:1px solid var(--color-border);
  margin:12px 0;
}

.term-md blockquote{
  margin:8px 0;
  padding:6px 10px;
  border-left:3px solid var(--color-border);
  background:var(--color-surface-alt);
}

.term-md blockquote p{ margin:4px 0; }

.term-md code{
  padding:0 5px;
  border:1px solid var(--color-border);
  border-radius:4px;
  background:var(--color-surface-alt);
}

.term-md pre{
  margin:8px 0;
  padding:10px 12px;
  border:1px solid var(--color-border);
  border-radius:6px;
  overflow:auto;
  background:var(--color-surface);
}

.term-md pre code{
  padding:0;
  border:0;
  background:transparent;
  display:block;
  white-space:pre;
}

.term-md table{
  border-collapse:collapse;
  margin:10px 0;
  width:100%;
}

.term-md th,
.term-md td{
  border:1px solid var(--color-border);
  padding:6px 8px;
  text-align:left;
}

.term-md th{
  background:var(--color-surface-alt);
  font-weight:700;
}

.term-output,
.menu,
.widget-menu-stack,
.overlay-body{
  scrollbar-width:thin;
  scrollbar-color:var(--border) var(--panel);
}

.term-output::-webkit-scrollbar,
.menu::-webkit-scrollbar,
.widget-menu-stack::-webkit-scrollbar,
.overlay-body::-webkit-scrollbar{
  width:12px;
  height:12px;
}

.term-output::-webkit-scrollbar-track,
.menu::-webkit-scrollbar-track,
.widget-menu-stack::-webkit-scrollbar-track,
.overlay-body::-webkit-scrollbar-track{
  background:var(--panel);
}

.term-output::-webkit-scrollbar-thumb,
.menu::-webkit-scrollbar-thumb,
.widget-menu-stack::-webkit-scrollbar-thumb,
.overlay-body::-webkit-scrollbar-thumb{
  background:var(--border);
  border-radius:8px;
  border:2px solid var(--panel);
}


/* ============================================================
   Automatic layout fitting
   ============================================================ */

.widget-host.is-fit-compact > .compact-menu-normal{
  display:none;
}

.widget-host.is-fit-compact > .compact-menu-trigger.widget-menu-horizontal{
  display:flex;
  flex:1 1 auto;
  width:100%;
  min-width:0;
  overflow:visible;
}

.widget-host.is-fit-compact > .compact-menu-trigger .menu-h-item{
  display:block;
  width:100%;
  text-align:center;
}

.widget-host.is-fit-compact > .widget-choice-segmented{
  display:none;
}

.widget-host.is-fit-compact > .widget-choice-select{
  display:block;
  width:100%;
}

.layout-fit-can-hide.is-fit-hidden{
  display:none !important;
}

.layout-row.layout-fit-can-stack.is-fit-stacked{
  flex-direction:column !important;
}

.layout-row.layout-fit-can-stack.is-fit-stacked > *{
  flex-basis:auto !important;
  min-width:0 !important;
  max-width:none !important;
  width:auto !important;
}

/* ============================================================
   Responsive: compact layout
   ============================================================ */

@media (max-width:900px){
  .rich-cards-responsive-stack{
    grid-template-columns:repeat(
      min(2, var(--rich-card-columns, 3)),
      minmax(0, 1fr)
    );
  }
}

/* ============================================================
   Compact viewport
   - Vertical phones
   - Horizontal phones with limited height
   ============================================================ */

@media (max-width:700px),
       (max-height:500px) and (max-width:1000px){


  .overlay{
    left:var(--pad) !important;
    right:var(--pad) !important;
    width:auto !important;
    max-width:none;
  }

}

/* ============================================================
   Responsive: narrow layout
   ============================================================ */

@media (max-width:560px){
  .rich-cards-responsive-stack{
    grid-template-columns:1fr;
  }

  .rich-card:hover{
    transform:none;
  }
}

/* ============================================================
   Accessibility: reduced motion
   ============================================================ */

@media (prefers-reduced-motion:reduce){
  .rich-card{
    transition:none;
  }

  .rich-card:hover{
    transform:none;
  }
 
  .widget-rotator-item{
    transition:none !important;
    transform:none !important;
  } 
}