:root {
  color-scheme: light;
  --ink: #142b3d;
  --muted: #5e696b;
  --sage: #66765b;
  --sage-dark: #46583e;
  --line: #dce1d7;
  --paper: #fff;
  --background: #f6f7f3;
  --soft: #edf1e8;
  --amber: #79501f;
  --amber-bg: #faf1e3;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--background);
  font-size: 15px;
}
.retention-settings {
  margin-top: 28px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.retention-heading {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: start;
}
.retention-heading h2 {
  font:
    23px Georgia,
    serif;
  margin-bottom: 10px;
}
.retention-heading p,
.retention-help,
.retention-impact {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}
.retention-status {
  flex-shrink: 0;
  font-size: 12px;
  background: var(--soft);
  color: var(--sage-dark);
  border-radius: 20px;
  padding: 7px 12px;
}
.retention-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  margin: 8px 0 20px;
  cursor: pointer;
}
.retention-toggle input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--sage-dark);
}
.retention-fields {
  display: flex;
  gap: 16px;
  align-items: start;
  flex-wrap: wrap;
}
.retention-fields label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
}
.retention-fields select,
.retention-fields input {
  padding: 10px 12px;
  border: 1px solid #b8c2ac;
  color: var(--ink);
  background: white;
  min-height: 40px;
}
.retention-fields select {
  min-width: 250px;
}
.retention-fields input {
  width: 150px;
}
.retention-fields :disabled {
  background: #f1f2ef;
  color: #646b62;
  cursor: default;
}
.retention-impact {
  margin: 17px 0 8px;
  color: var(--ink);
}
.retention-help {
  max-width: 790px;
  margin-bottom: 20px;
}
.dialog-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
button.danger {
  background: #863e30;
  color: white;
  border-color: #863e30;
}
button.danger:hover:not(:disabled) {
  background: #6f3024;
}
@media (max-width: 700px) {
  .retention-settings {
    padding: 20px 18px;
  }
  .retention-heading {
    flex-direction: column;
    gap: 0;
  }
  .retention-status {
    margin-bottom: 16px;
  }
  .retention-fields,
  .retention-fields label,
  .retention-fields select {
    width: 100%;
    min-width: 0;
  }
  .retention-toggle {
    align-items: start;
    line-height: 1.5;
  }
  .retention-toggle input {
    flex-shrink: 0;
    margin-top: 1px;
  }
  .dialog-actions button {
    width: 100%;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
  border-radius: 5px;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  padding: 10px 15px;
}
button:disabled {
  cursor: default;
  opacity: 0.55;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #427698;
  outline-offset: 3px;
}
button:hover:not(:disabled) {
  background: var(--soft);
}
button.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}
button.primary:hover:not(:disabled) {
  background: #24465c;
}
a {
  color: inherit;
}
.preview-bar {
  background: #e6ebdf;
  color: #394c32;
  font-size: 12px;
  letter-spacing: 0.03em;
  padding: 11px 24px;
  text-align: center;
  line-height: 1.5;
}
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1256px;
  margin: auto;
  padding: 27px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.practice {
  font:
    22px/1.25 Georgia,
    "Times New Roman",
    serif;
}
.practice small {
  display: block;
  font:
    11px/1.5 Arial,
    sans-serif;
  color: var(--muted);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  margin-top: 7px;
}
.quiet {
  background: transparent;
  border-color: transparent;
  font-size: 13px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.staff-label {
  font-size: 13px;
  color: var(--muted);
}
main {
  max-width: 1256px;
  padding: 44px 28px 30px;
  margin: auto;
}
.eyebrow {
  color: var(--sage-dark);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 10px;
  font-weight: bold;
  margin: 0 0 10px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font:
    38px/1.15 Georgia,
    "Times New Roman",
    serif;
  margin-bottom: 12px;
  letter-spacing: -0.015em;
}
.intro {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0;
  max-width: 740px;
}
.title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}
.last-refresh {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  padding-top: 21px;
  white-space: nowrap;
}
.last-refresh button {
  margin-top: 8px;
  display: block;
  margin-left: auto;
  padding: 5px 10px;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 29px;
}
.summary {
  padding: 21px 23px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.summary-number {
  font:
    36px/1 Georgia,
    serif;
  min-width: 33px;
}
.summary strong {
  font-size: 13px;
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}
.summary small {
  color: var(--muted);
  font-size: 12px;
}
.summary-progress {
  border-top: 3px solid #b28a51;
}
.summary-complete {
  border-top: 3px solid var(--sage);
}
.summary-total {
  border-top: 3px solid #bcc4c8;
}
.workspace {
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  overflow: hidden;
}
.toolbar {
  padding: 22px 23px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}
.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tab {
  font-size: 13px;
  padding: 8px 12px;
  border-color: transparent;
  color: var(--muted);
}
.tab[aria-pressed="true"] {
  background: var(--soft);
  color: var(--sage-dark);
  font-weight: bold;
}
.search-label {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}
.search-label input {
  padding: 10px 12px;
  border: 1px solid #c4ccc3;
  width: 230px;
  color: var(--ink);
  background: #fff;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
thead {
  background: #fafbf8;
}
th {
  padding: 14px 20px;
  font-weight: normal;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #59645a;
  text-transform: uppercase;
  line-height: 1.5;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 22px 20px;
  border-bottom: 1px solid #e9ece5;
  font-size: 13px;
  vertical-align: middle;
}
tbody:last-child tr:last-child td {
  border-bottom: 0;
}
th:first-child,
td:first-child {
  padding-left: 24px;
}
th:nth-child(4) {
  max-width: 165px;
}
.child-button {
  padding: 0;
  background: none;
  border: 0;
  text-align: left;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}
.child-button:hover:not(:disabled) {
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.child-subtitle {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 6px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  white-space: nowrap;
  border-radius: 30px;
  padding: 6px 10px;
  background: #edf2e8;
  color: #3e5833;
}
.badge.missing {
  background: #f1f2ef;
  color: #5f655e;
}
.badge.card-missing {
  background: var(--amber-bg);
  color: var(--amber);
}
.badge-symbol {
  font-size: 12px;
  line-height: 1;
}
.updated {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.row-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-items: center;
}
.delete-entry {
  font-size: 12px;
  padding: 6px 9px;
  color: #863e30;
  background: transparent;
  border-color: #dfcbc6;
}
.delete-entry:hover:not(:disabled) {
  background: #fff3ef;
}
.mobile-label {
  display: none;
}
.table-note {
  padding: 16px 24px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
  background: #fcfcfa;
  border-top: 1px solid var(--line);
}
.table-note strong {
  font-weight: normal;
  color: var(--ink);
}
.empty {
  padding: 44px 24px;
  text-align: center;
  color: var(--muted);
  line-height: 1.7;
}
.history td {
  background: #f7f9f4;
  padding: 22px 24px 24px;
}
.history h3 {
  font:
    19px Georgia,
    serif;
  margin-bottom: 18px;
}
.history-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.history-grid strong {
  display: block;
  font-size: 12px;
  margin-bottom: 7px;
  font-weight: 600;
}
.history-grid span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.history p {
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
  margin: 18px 0 0;
}
.demo-lab {
  margin-top: 30px;
  padding: 22px 24px;
  border: 1px dashed #b8c2ac;
  border-radius: 7px;
  background: #f0f3eb;
}
.demo-lab h2 {
  font:
    21px Georgia,
    serif;
  margin-bottom: 9px;
}
.demo-lab p {
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 800px;
  margin-bottom: 18px;
}
.demo-controls {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}
.demo-controls label {
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.demo-controls select {
  padding: 10px 32px 10px 12px;
  border: 1px solid #b8c2ac;
  background: white;
  color: var(--ink);
  min-width: 180px;
}
.demo-controls button {
  font-size: 13px;
  min-height: 39px;
}
footer {
  max-width: 1256px;
  margin: auto;
  padding: 0 28px 32px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}
.notice {
  padding: 13px 16px;
  border: 1px solid var(--line);
  background: var(--soft);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 20px;
  border-radius: 5px;
}
.notice:empty {
  display: none;
}
.notice.error {
  background: #fff2ec;
  color: #813420;
  border-color: #d8b5a8;
}
.login-wrap {
  max-width: 460px;
  margin: 70px auto;
  padding: 34px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.login-wrap h1 {
  font-size: 30px;
}
.login-wrap p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}
.login-wrap label {
  display: block;
  font-size: 13px;
  margin: 20px 0 8px;
}
.login-wrap input {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px solid #b9c3b5;
}
.login-wrap button.primary {
  margin-top: 24px;
  width: 100%;
}
.login-wrap .quiet {
  margin-top: 12px;
  width: 100%;
}
.login-wrap .notice {
  margin-top: 15px;
}
.loading {
  padding: 60px;
  text-align: center;
}
dialog {
  max-width: 500px;
  width: calc(100% - 36px);
  border: 1px solid var(--line);
  padding: 30px;
  border-radius: 8px;
  color: var(--ink);
  box-shadow: 0 15px 70px #142b3d20;
}
dialog::backdrop {
  background: #142b3d65;
}
dialog h2 {
  font:
    26px Georgia,
    serif;
}
dialog p,
dialog li {
  font-size: 14px;
  line-height: 1.7;
}
dialog li + li {
  margin-top: 12px;
}
dialog .primary {
  margin-top: 10px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
[hidden] {
  display: none !important;
}
@media (max-width: 1000px) {
  th,
  td {
    padding-left: 12px;
    padding-right: 12px;
  }
  .toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .search-label {
    width: 100%;
  }
  .search-label input {
    flex: 1;
    max-width: 360px;
  }
  .summary {
    padding: 18px 16px;
    gap: 12px;
  }
}
@media (max-width: 700px) {
  .header-inner {
    padding: 20px;
  }
  .practice {
    font-size: 18px;
  }
  .practice small {
    font-size: 9px;
  }
  .header-actions {
    gap: 0;
  }
  .staff-label {
    display: none;
  }
  .header-actions .quiet {
    padding: 8px;
    font-size: 12px;
  }
  main {
    padding: 28px 18px;
  }
  .title-row {
    gap: 15px;
    margin-bottom: 24px;
  }
  h1 {
    font-size: 31px;
  }
  .intro {
    font-size: 13px;
  }
  .last-refresh {
    padding-top: 4px;
    font-size: 10px;
  }
  .last-refresh button {
    font-size: 12px;
  }
  .summary-grid {
    gap: 8px;
    margin-bottom: 22px;
  }
  .summary {
    padding: 14px 11px;
    display: block;
  }
  .summary-number {
    font-size: 30px;
    display: block;
    margin-bottom: 10px;
  }
  .summary strong {
    font-size: 11px;
  }
  .summary small {
    font-size: 10px;
    line-height: 1.5;
    display: block;
  }
  .toolbar {
    padding: 15px;
    gap: 16px;
  }
  .tab {
    padding: 8px;
    font-size: 12px;
  }
  .search-label {
    display: block;
  }
  .search-label input {
    margin-top: 7px;
    width: 100%;
    max-width: none;
    display: block;
  }
  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  table,
  tbody,
  tr,
  td {
    display: block;
  }
  tr.data-row {
    padding: 18px;
    border-bottom: 1px solid var(--line);
  }
  td,
  th:first-child,
  td:first-child {
    padding: 7px 0;
    border: 0;
  }
  td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
  }
  td:first-child {
    display: block;
    padding: 0 0 14px;
  }
  .mobile-label {
    display: block;
    font-size: 12px;
    color: var(--muted);
  }
  td:last-child {
    padding-bottom: 0;
  }
  .badge {
    font-size: 11px;
  }
  .history td {
    padding: 20px;
    display: block;
  }
  .history-grid {
    grid-template-columns: 1fr;
    gap: 17px;
  }
  .table-note {
    padding: 15px 18px;
  }
  .demo-lab {
    padding: 20px 18px;
    margin-top: 24px;
  }
  .demo-controls {
    gap: 10px;
  }
  .demo-controls label,
  .demo-controls select {
    width: 100%;
  }
  .demo-controls .primary {
    width: 100%;
    flex: 1 0 100%;
  }
  .demo-controls button {
    flex: 1;
  }
  footer {
    padding: 0 18px 24px;
    display: block;
  }
  footer span {
    display: block;
    margin-bottom: 6px;
  }
  .login-wrap {
    margin: 35px 18px;
    padding: 25px;
  }
  .preview-bar {
    font-size: 11px;
    padding: 9px 18px;
  }
}

.duplicate-warning {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #80501c;
  background: #fff5e6;
  padding: 4px 7px;
  border-radius: 4px;
}
.parent-choices {
  display: grid;
  gap: 14px;
  margin: 24px 0;
}
#parent-app .quiet {
  display: block;
  margin-top: 20px;
  text-align: left;
}
#link-area p {
  font-size: 13px;
}

.combine-entry {
  font-size: 12px;
  padding: 6px 9px;
}
#combine-dialog {
  max-width: 780px;
  width: min(780px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}
#combine-dialog select {
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid #c4ccc3;
  border-radius: 5px;
  width: 100%;
  margin: 8px 0 16px;
}
.combine-sources {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.combine-source {
  border: 1px solid #d5dcd3;
  border-radius: 7px;
  padding: 14px;
  background: #f8faf7;
  min-width: 0;
}
.combine-source h3 {
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}
.combine-source dl {
  margin: 0;
  font-size: 13px;
}
.combine-source dt {
  font-weight: 600;
  margin-top: 10px;
}
.combine-source dd {
  margin: 3px 0 0;
}
.combine-name {
  border: 1px solid #d5dcd3;
  border-radius: 7px;
  margin: 16px 0;
  padding: 12px;
}
.combine-name label,
.combine-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 10px 0;
}
.combine-name input,
.combine-consent input {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin: 2px 0 0;
}
@media (max-width: 600px) {
  .combine-sources {
    grid-template-columns: 1fr;
  }
}
