/* ============================================================================
   ui-gaps-temp.css — 纯机制层(零视觉主张)
   本文件只包含静态设计稿无法表达的"开关/结构机制":
   显示与隐藏、盒模型基线、Gitea 标记自带的工具类、弹层锚定。
   不含任何颜色、圆角、字号、间距的样式决策。
   所有视觉规则只存在于 ui-design-copy.css(设计稿转写)。
   设计稿未覆盖而"裸奔"的页面/控件,见 ui/待UI补充清单.md,由 UI 补稿后转写。
   ============================================================================ */

/* [机制] 字体资源自托管(设计稿引用 Google Fonts 同款字体,线上离线加载) */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/manrope-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/noto-sans-sc-latin.woff2") format("woff2");
}

/* [机制] 盒模型与边距基线:设计稿元素全部行内定义、无 UA 默认边距,
   真实 DOM 需要统一到同一基线,转写值才能与设计稿一致 */
*, *::before, *::after { box-sizing: border-box; }
h1, h2, h3, h4, h5, p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
img { max-width: 100%; }
button { font-family: inherit; }
input, textarea, select { font-family: inherit; }
svg { vertical-align: middle; fill: currentColor; }

/* [机制] Gitea 标记依赖的工具类(其 HTML 结构契约,index.css 停用后由此提供) */
.tw-hidden, .hidden:not(.menu) { display: none !important; }
.tw-flex { display: flex !important; }
.tw-inline-flex { display: inline-flex !important; }
.tw-flex-col { flex-direction: column !important; }
.tw-flex-wrap { flex-wrap: wrap !important; }
.tw-flex-1 { flex: 1 1 0%; min-width: 0; }
.tw-items-center { align-items: center !important; }
.tw-justify-center { justify-content: center !important; }
.tw-justify-between { justify-content: space-between !important; }
.tw-justify-end { justify-content: flex-end !important; }
.tw-text-center { text-align: center !important; }
.tw-w-full { width: 100% !important; }
.tw-m-0 { margin: 0 !important; }
.tw-ml-auto { margin-left: auto !important; }
.tw-m-auto { margin: auto !important; }
.tw-gap-1 { gap: 4px !important; } .tw-gap-2 { gap: 8px !important; }
.tw-gap-3 { gap: 12px !important; } .tw-gap-4 { gap: 16px !important; }
.tw-mt-1 { margin-top: 4px !important; } .tw-mt-2 { margin-top: 8px !important; }
.tw-mb-1 { margin-bottom: 4px !important; } .tw-mb-2 { margin-bottom: 8px !important; }
.tw-ml-1 { margin-left: 4px !important; } .tw-ml-2 { margin-left: 8px !important; }
.tw-mr-1 { margin-right: 4px !important; } .tw-mr-2 { margin-right: 8px !important; }
.tw-break-anywhere { overflow-wrap: anywhere; }
.tw-overflow-x-auto { overflow-x: auto; }
.flex-text-block { display: flex; align-items: center; gap: 6px; min-width: 0; }
.flex-text-inline { display: inline-flex; align-items: center; gap: 6px; }
.flex-left-right { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.only-mobile { display: none !important; }
@media (max-width: 767.98px) {
  .only-mobile { display: flex !important; }
  .not-mobile { display: none !important; }
}
.muted { color: inherit; }

/* [机制] 弹层锚定与显示开关(视觉全部在转写层的 .ui-menu / .ui-dialog / .ui-overlay 映射) */
.ui.dropdown { position: relative; cursor: pointer; }
.ui.dropdown > .menu { display: none; top: calc(100% + 8px); left: 0; }
.ui.dropdown.active > .menu, .ui.dropdown.visible > .menu, .ui.dropdown > .menu.visible { display: block; }
.menu.transition.hidden { display: none !important; }
.menu.transition.visible { display: block !important; }
.ui.dropdown > .menu.left, .ui.dropdown > .menu[class*="right"] { right: 0; left: auto; }
.ui.upward.dropdown > .menu { top: auto; bottom: calc(100% + 8px); }
#navbar .navbar-right > .ui.dropdown > .menu { right: 0; left: auto; }
.ui.dimmer { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; }
.ui.dimmer.active, .ui.dimmer.visible { display: flex; }
.ui.modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 1001; display: none; width: min(480px, calc(100vw - 40px)); }
.ui.modal.active, .ui.modal.visible { display: block; }

/* [机制] 映射清理:隐藏设计稿中不存在的真实元素(只有 display:none,无样式值) */
#navbar #navbar-logo img { display: none; }                      /* 设计稿 logo 为 G 圆形(L28) */
#navbar .navbar-right .octicon-triangle-down { display: none; }  /* 设计稿按钮无下拉箭头 */
#navbar .navbar-right .navbar-admin-badge { display: none; }
#navbar-expand-toggle { display: none; }
#repo-files-table > :not(.repo-file-line):not(.repo-file-item):not(.parent-link) { display: none; } /* 文件图标 SVG 池 */
.repository .secondary-nav .overflow-menu-items > .item svg { display: none; }  /* 设计稿页签仅「代码」有图标(L208) */
.repository .secondary-nav .overflow-menu-items > .item:first-child svg { display: inline-block; }
.repository .secondary-nav .item-flex-space { display: none; }   /* 设计稿设置紧随活动(L208-212) */
.repository .secondary-nav .ui.tabs.divider { display: none; }
.overflow-menu-button { display: none; }
.repository .secondary-nav { background: transparent; }
.repo-home-sidebar-bottom > .divider:first-child { display: none; }
.repository .latest-commit .commit-body { display: none; }
.repo-view-content-data { display: none; }
/* 页脚版本/主题/kbd 芯片:规范补充 L1461-1482 / L1371 已定义,不再隐藏 */
.hm-inline-repository-summary { display: flex; align-items: center; gap: 16px; } /* JS 移动后的容器结构 */
