.flexible-record-body {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  max-height: 72vh;
  overflow: auto;
}
.record-guide {
  padding: 24px;
  background: #f7f9f8;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.record-guide select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: white;
}
.record-guide .planned-box {
  padding: 15px;
  margin-top: 8px;
}
.record-guide h3 {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0;
}
.record-guide p {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.record-fields {
  min-width: 0;
}
.editor-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 26px 0 10px;
}
.editor-section-heading h3 {
  font-size: 15px;
}
.custom-field-row,
.custom-field-head {
  display: grid;
  grid-template-columns: 80px minmax(100px, 1.2fr) minmax(80px, 1fr) 75px 32px;
  gap: 6px;
}
.custom-field-head {
  font-size: 11px;
  color: var(--muted);
  margin: 13px 0 7px;
}
.custom-field-row {
  margin-bottom: 7px;
}
.custom-field-row input,
.custom-field-row select {
  min-width: 0;
  width: 100%;
  padding: 9px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
  font-size: 12px;
}
.custom-empty {
  margin-top: 12px;
  padding: 22px;
  border: 1px dashed #d4ded7;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.legacy-fields,
.reference-picker {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 18px;
}
.legacy-fields summary,
.reference-picker summary {
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  margin-bottom: 14px;
}
.reference-choice {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.55;
  padding: 10px 0;
  border-bottom: 1px solid #edf0ee;
}
.reference-choice > span {
  flex: 1;
}
.reference-choice small {
  display: block;
  color: var(--muted);
}
.reference-choice input {
  margin-top: 3px;
}
.reference-choice a {
  white-space: nowrap;
  color: var(--blue);
}
.reference-manual {
  display: grid;
  gap: 7px;
  margin: 16px 0;
  font-size: 12px;
}
.reference-manual input {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.reference-manual button {
  justify-self: start;
}
.selected-reference {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  margin: 5px 0;
}
.selected-reference a {
  color: var(--blue);
  overflow-wrap: anywhere;
}
.result-editor {
  width: min(1160px, 96vw);
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 16px 50px #14241c33;
}
.result-editor .dialog-body {
  max-height: 70vh;
  overflow: auto;
}
.result-tools {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}
.editable-results {
  border-collapse: collapse;
  min-width: 100%;
  font-size: 12px;
}
.editable-results th,
.editable-results td {
  padding: 7px;
  border: 1px solid var(--line);
  vertical-align: middle;
  min-width: 175px;
}
.editable-results th:first-child,
.editable-results td:last-child {
  min-width: 42px;
  text-align: center;
}
.editable-results thead {
  background: #f5f8f6;
}
.editable-results input,
.editable-results select {
  border: 1px solid #d8e0db;
  padding: 8px;
  border-radius: 3px;
  width: 100%;
  min-width: 0;
  background: white;
  font-size: 12px;
}
.column-settings {
  display: grid;
  grid-template-columns: 1fr 70px 28px;
  gap: 4px;
  margin-top: 6px;
}
.column-settings .icon-button {
  width: 28px;
  height: 30px;
}
.custom-results {
  border-collapse: collapse;
  min-width: 100%;
  font-size: 12px;
}
.custom-results th,
.custom-results td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: pre-wrap;
  min-width: 100px;
}
.custom-results thead {
  background: #f5f8f6;
}
.custom-results small {
  color: var(--muted);
  font-weight: 400;
}
.method-templates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.method-template {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.method-template h3 {
  font-size: 17px;
}
.method-template p,
.method-template dd {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  white-space: pre-line;
}
.method-template dt {
  font-weight: 650;
  font-size: 12px;
  margin: 12px 0 5px;
}
.method-template dd {
  margin: 0;
}
.method-template > .btn {
  margin-top: auto;
}
.reference-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.reference-links a {
  font-size: 11px;
  color: var(--blue);
}
.source-list article {
  padding: 24px;
  border-bottom: 1px solid var(--line);
}
.source-list article:last-child {
  border: 0;
}
.source-list h3 {
  font-size: 14px;
  margin: 9px 0;
}
.source-list a {
  color: #167542;
}
.source-list p {
  font-size: 12px;
  line-height: 1.7;
  margin-top: 8px;
  color: var(--muted);
}
.source-code {
  font-size: 10px;
  color: #5c7163;
  background: #f0f5f1;
  padding: 4px 6px;
  border-radius: 3px;
}
.ai-records {
  max-height: 420px;
  overflow: auto;
}
.ai-record-choice {
  display: flex;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.ai-record-choice small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}
.ai-record-choice input {
  margin-top: 3px;
}
.planned-feature-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.planned-feature-row > div {
  padding: 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.planned-feature-row strong {
  font-size: 14px;
  margin-right: 9px;
}
.planned-feature-row p {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  margin-top: 12px;
}
.preserve-lines {
  white-space: pre-wrap;
  line-height: 1.8;
}
.item-summary {
  max-width: 300px;
  white-space: normal;
  font-size: 12px;
  line-height: 1.8;
  color: #526458;
}
.nav-divider {
  font-size: 10px;
  letter-spacing: 0.06em;
  color: #929f97;
  margin: 16px 14px 7px;
}
.sidebar {
  overflow-y: auto;
}
.sidebar-bottom {
  margin-top: auto;
  position: relative;
}
.reference-list-detail {
  font-size: 12px;
  line-height: 1.8;
  padding-left: 18px;
}
.reference-list-detail a {
  color: var(--blue);
  overflow-wrap: anywhere;
}
.detail-section p {
  white-space: pre-wrap;
}
.process-tag {
  font-size: 11px;
  color: #687d6e;
  background: #f0f5f1;
  padding: 3px 6px;
  display: inline-block;
  margin-top: 4px;
}
.app-footer {
  gap: 15px;
}
.record-kind {
  margin-right: 6px;
}
.type-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 14px;
}
.type-tabs button {
  background: transparent;
  border: 0;
  border-radius: 5px;
  padding: 7px 15px;
  color: #718076;
  cursor: pointer;
  font-size: 12px;
}
.type-tabs button.active {
  background: #e5f3e9;
  color: #00883e;
  font-weight: 650;
}
.comparison-table .changed {
  background: #eff9f2;
  color: #127738;
}
.method-template dl {
  margin: 0;
}
.ai-record-choice strong {
  font-weight: 500;
}
.note,
.record-meta,
.page-head p,
.scene-info p,
.scene-info .eyebrow,
.metric span,
.table-foot,
.today,
.app-footer,
.nav-label,
.nav-divider,
.sidebar-bottom p,
.record-guide p,
.planned-box p,
.range-limits,
.scene-bottom {
  color: #607267;
}
.btn.primary {
  background: #00833b;
  border-color: #00833b;
}
.btn.primary:hover {
  background: #006e32;
}
.nav-link.active {
  color: #007334;
}
.planned-tag {
  color: #805b12;
}
.demo-badge {
  color: #795a1e;
}
.project-tag strong {
  font-size: 12px;
}
input::placeholder,
textarea::placeholder {
  color: #738177;
  opacity: 1;
}
@media (max-width: 1000px) {
  .flexible-record-body {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .record-guide {
    padding: 16px;
  }
  .custom-field-row,
  .custom-field-head {
    grid-template-columns: 70px minmax(80px, 1fr) minmax(70px, 1fr) 60px 28px;
  }
  .method-templates {
    grid-template-columns: 1fr;
  }
  .planned-feature-row {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .flexible-record-body {
    display: flex;
    flex-direction: column;
    max-height: 70vh;
  }
  .record-guide {
    border: 0;
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .record-guide > strong,
  .record-guide > p {
    grid-column: 1/-1;
  }
  .record-guide > .planned-box {
    display: none;
  }
  .custom-field-row {
    grid-template-columns: 70px minmax(80px, 1fr) 28px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
  }
  .custom-field-row [data-prop="value"] {
    grid-column: 1/2;
    grid-row: 2;
  }
  .custom-field-row [data-prop="unit"] {
    grid-column: 2/3;
    grid-row: 2;
  }
  .custom-field-row > button {
    grid-column: 3;
    grid-row: 1/3;
  }
  .custom-field-head {
    display: none;
  }
  .record-fields {
    padding: 20px 16px;
  }
  .method-template {
    padding: 19px;
  }
  .result-tools {
    flex-wrap: wrap;
  }
  .result-editor .dialog-body {
    padding: 16px;
  }
  .app-footer {
    display: block;
  }
  .app-footer > span {
    display: block;
    margin: 5px 0;
  }
  .topbar-right .today {
    display: none;
  }
  .sidebar-bottom {
    padding-bottom: 18px;
  }
}

button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
dialog,
.sidebar {
  overscroll-behavior: contain;
}
.custom-results,
.editable-results,
.comparison-table {
  font-variant-numeric: tabular-nums;
}
.detail-grid dd,
.item-summary,
.comparison-table td {
  overflow-wrap: anywhere;
}
.source-list article {
  scroll-margin-top: 85px;
}
.table-wrap {
  position: relative;
}
.source-list p {
  overflow-wrap: anywhere;
}
.reference-template-section > summary {
  cursor: pointer;
  display: list-item;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid var(--border, #e1e6e3);
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
}
.reference-template-section > summary span {
  float: right;
  color: var(--muted, #66736d);
  font-size: 12px;
  font-weight: 400;
}
.reference-template-section[open] > .method-templates {
  margin-top: 16px;
}
.source-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 14px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border, #e1e6e3);
}
.source-heading {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.source-category {
  color: #66736d;
  font-size: 11px;
}
.source-application {
  color: #35483d !important;
}
.reference-search {
  margin: 16px 0;
}
.reference-choice[hidden] {
  display: none;
}
@media (max-width: 640px) {
  .source-tools {
    grid-template-columns: 1fr;
    padding: 16px;
  }
  .reference-template-section > summary {
    padding: 16px;
  }
  .reference-template-section > summary span {
    float: none;
    display: block;
    margin-top: 5px;
  }
}
@media (max-width: 700px) {
  .breadcrumb {
    min-width: 0;
  }
  .breadcrumb #crumb {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mobile-menu {
    flex-shrink: 0;
  }
  .topbar-right {
    flex-shrink: 0;
  }
}
@media (max-width: 360px) {
  .topbar-right > .demo-badge {
    display: none;
  }
}
