/* Track Mishnah UI 2.17.7
 * High-density refinement. Desktop and tablet layouts place substantially more
 * working content above the fold while phone controls keep comfortable targets.
 */

/* Compact application chrome and page rhythm. */
body.app-theme-jewel { --app-shell: 1780px; }
body.app-theme-jewel .shell { padding-inline: clamp(14px, 1.45vw, 26px); }
body.app-theme-jewel .header-inner { min-height: 64px; gap: clamp(14px, 2vw, 34px); }
body.app-theme-jewel .brand { gap: 9px; }
body.app-theme-jewel .brand-mark { width: 39px; height: 39px; flex-basis: 39px; }
body.app-theme-jewel .brand-mark img { width: 35px; height: 35px; }
body.app-theme-jewel .brand strong { font-size: 1.16rem; }
body.app-theme-jewel .main-nav { gap: 10px; font-size: .82rem; }
body.app-theme-jewel .nav-primary { gap: clamp(2px, .45vw, 8px); }
body.app-theme-jewel .nav-primary > a { min-height: 64px; gap: 7px; padding-inline: clamp(8px, .75vw, 12px); }
body.app-theme-jewel .nav-primary > a::after { right: 8px; left: 8px; height: 3px; }
body.app-theme-jewel .nav-utilities { gap: 6px; }
body.app-theme-jewel .project-switcher { width: clamp(144px, 12vw, 195px); }
body.app-theme-jewel .project-switcher select,
body.app-theme-jewel .nav-feedback-cta,
body.app-theme-jewel .nav-feedback-cta[aria-current="page"] { min-height: 34px; }
body.app-theme-jewel .notification-toggle,
body.app-theme-jewel .theme-toggle { width: 34px; height: 34px; min-height: 34px; flex-basis: 34px; }
body.app-theme-jewel .account-menu > summary { min-height: 40px; gap: 7px; }
body.app-theme-jewel .account-avatar { width: 34px; height: 34px; flex-basis: 34px; }
body.app-theme-jewel .service-notice-inner { min-height: 34px; }
body.app-theme-jewel .service-notice-inner > img { width: 14px; height: 14px; }
body.app-theme-jewel .page-banner-inner,
body.app-theme-jewel .page-banner-small .page-banner-inner { padding-block: 10px 0; }
body.app-theme-jewel .page-banner h1 { font-size: clamp(1.35rem, 1.7vw, 1.72rem); }
body.app-theme-jewel .page-shell,
body.app-theme-jewel .dashboard-shell { padding-block: 10px 18px; }
body.app-theme-jewel .narrow-shell { margin-block: 9px 18px; }
body.app-theme-jewel .dashboard-shell,
body.app-theme-jewel .projects-shell,
body.app-theme-jewel .management-content,
body.app-theme-jewel .focused-management-shell,
body.app-theme-jewel .owner-directory-shell { gap: 8px; }
body.app-theme-jewel .content-card,
body.app-theme-jewel .progress-panel,
body.app-theme-jewel .owner-tool-card,
body.app-theme-jewel .security-card,
body.app-theme-jewel .settings-card { padding: 10px 12px; }
body.app-theme-jewel .card-heading,
body.app-theme-jewel .section-heading { gap: 8px; margin-bottom: 7px; padding-bottom: 6px; }
body.app-theme-jewel .eyebrow { margin-bottom: 3px; font-size: .61rem; }
body.app-theme-jewel h2 { font-size: clamp(1.04rem, 1.15vw, 1.25rem); }
body.app-theme-jewel .stack-form { gap: 8px; }
body.app-theme-jewel .stack-form label:not(.check-row) { gap: 3px; }
body.app-theme-jewel input:not([type="checkbox"]):not([type="radio"]),
body.app-theme-jewel select,
body.app-theme-jewel .copy-row input,
body.app-theme-jewel .filter-multiselect > summary { min-height: 34px; }
body.app-theme-jewel textarea { padding-block: 7px; }
body.app-theme-jewel .button { min-height: 34px; padding: 6px 10px; border-radius: 8px; }
body.app-theme-jewel .button-small { min-height: 31px; padding: 5px 9px; }
body.app-theme-jewel .button-tiny { min-height: 28px; padding: 4px 8px; }
body.app-theme-jewel th,
body.app-theme-jewel td { padding-block: 6px; }
body.app-theme-jewel .site-footer { padding-block: 5px; }
body.app-theme-jewel .footer-inner { min-height: 28px; }

/* The project identity and its summaries form one compact dashboard band. */
body.app-theme-jewel .project-overview { padding: 10px 12px; border-radius: 13px; }
body.app-theme-jewel .project-overview-heading { gap: 10px; padding-bottom: 7px; }
body.app-theme-jewel .project-overview-identity { gap: 10px; }
body.app-theme-jewel .project-overview-photo { width: 46px; height: 46px; }
body.app-theme-jewel .project-overview h1 { margin-bottom: 1px; font-size: clamp(1.28rem, 1.65vw, 1.65rem); }
body.app-theme-jewel .project-context-row { gap: 7px; }
body.app-theme-jewel .project-memorial-name { margin-block: 1px 2px; }
body.app-theme-jewel .overview-start-date { margin-top: 1px; }
body.app-theme-jewel .overview-deadline { gap: 5px; margin-top: 3px; }
body.app-theme-jewel .dashboard-command-grid { gap: 8px; }
body.app-theme-jewel .dashboard-command-card { gap: 5px; padding: 8px 10px; }
body.app-theme-jewel .dashboard-card-heading { padding-bottom: 5px; }
body.app-theme-jewel .dashboard-card-heading h2 { font-size: .88rem; }
body.app-theme-jewel .continue-learning-main { gap: 8px; }
body.app-theme-jewel .continue-progress-number,
body.app-theme-jewel .personal-progress-percent { font-size: 1.34rem; }
body.app-theme-jewel .continue-learning-copy p { margin-bottom: 5px; }
body.app-theme-jewel .continue-learning-stats div,
body.app-theme-jewel .personal-goal-stats div { padding: 4px 6px; }
body.app-theme-jewel .project-progress-primary strong { font-size: 1.2rem; }
body.app-theme-jewel .project-progress-primary p { padding-block: 0 4px; }
body.app-theme-jewel .project-progress-card .progress-metrics { gap: 4px; }
body.app-theme-jewel .project-progress-card .progress-metrics article { padding: 4px 6px; }
body.app-theme-jewel .project-progress-card .progress-legend { gap: 4px 8px; }

/* Collapse tall detail-card chrome into scan-friendly rows. */
body.app-theme-jewel .my-portions-list-toolbar { margin-bottom: 5px; }
body.app-theme-jewel .claim-group-list,
body.app-theme-jewel .claim-group-list.is-masonry { gap: 5px; }
body.app-theme-jewel .compact-settings-details > summary { padding: 9px 11px; }
body.app-theme-jewel .compact-settings-details > summary strong { font-size: .84rem; }
body.app-theme-jewel .claim-group-summary {
  min-height: 46px;
  grid-template-columns: minmax(110px, .7fr) minmax(210px, 1.25fr) minmax(210px, 1.1fr) minmax(120px, .72fr) auto;
  grid-template-areas: "identity portion progress-copy remaining disclosure";
  gap: 5px 12px;
  padding: 7px 10px;
}
body.app-theme-jewel .claim-group-progress { width: 66px; margin-top: 3px; }
body.app-theme-jewel .claim-group-quick-actions { gap: 5px; padding: 4px 7px; }
body.app-theme-jewel .shared-assignment-list { gap: 4px; }
body.app-theme-jewel .shared-assignment-group-heading { min-height: 36px; padding: 6px 9px; }
body.app-theme-jewel .shared-assignment-row {
  min-height: 48px;
  gap: 8px;
  padding: 6px 9px;
}
body.app-theme-jewel .assignment-person .avatar-small { width: 28px; height: 28px; }
body.app-theme-jewel .assignment-progress .mini-progress { margin-top: 3px; }
body.app-theme-jewel .assignment-status-badge { margin-top: 3px; padding: 2px 6px; }
body.app-theme-jewel .assignment-row-quick-action .button { min-height: 29px; }
body.app-theme-jewel .assignment-detail-panel { padding: 9px; }
body.app-theme-jewel .people-list { border-radius: 8px; }
body.app-theme-jewel .people-section-card .people-list { grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); }
body.app-theme-jewel .person-row,
body.app-theme-jewel .people-section-card .person-row { padding: 6px 8px; }

/* Compact secondary screens, management surfaces, and settings. */
body.app-theme-jewel .project-card-grid { gap: 6px; }
body.app-theme-jewel .project-card { padding: 10px 12px; }
body.app-theme-jewel .project-card-heading { gap: 8px; }
body.app-theme-jewel .project-card-heading h3 { margin-top: 2px; }
body.app-theme-jewel .project-card-progress > span { padding: 6px 8px; }
body.app-theme-jewel .project-card-actions { gap: 5px; }
body.app-theme-jewel .management-layout { gap: 8px; }
body.app-theme-jewel .management-sidebar { padding: 5px; }
body.app-theme-jewel .management-sidebar-heading { padding: 5px 6px 7px; }
body.app-theme-jewel .management-sidebar a,
body.app-theme-jewel .management-sidebar-advanced summary { min-height: 32px; padding: 5px 7px; }
body.app-theme-jewel .directory-metrics article { padding: 7px 9px; }
body.app-theme-jewel .feedback-request-table-head,
body.app-theme-jewel .feedback-request-summary { padding-block: 5px; }
body.app-theme-jewel .feedback-request-body { padding: 9px 11px; }
body.app-theme-jewel .notification-contact-settings { margin-top: 9px; }
body.app-theme-jewel .notification-contact-settings > summary { padding: 9px 11px; }
body.app-theme-jewel .notification-contact-settings-body { gap: 9px; padding: 10px; }
body.app-theme-jewel .notification-contact-row { padding: 6px 8px; }
body.app-theme-jewel .account-security-entry { margin-top: 8px; padding-top: 8px; }
body.app-theme-jewel .reminder-builder { gap: 7px; padding: 8px 9px; }
body.app-theme-jewel .schedule-grid { gap: 6px 8px; }
body.app-theme-jewel .auth-shell { padding-block: clamp(22px, 4vh, 36px); }
body.app-theme-jewel .auth-card { padding: clamp(18px, 2.5vw, 25px); }

@media (min-width: 1181px) {
  body.app-theme-jewel .project-overview {
    display: grid;
    grid-template-columns: minmax(470px, .92fr) minmax(680px, 1.65fr);
    align-items: stretch;
    gap: 8px 12px;
  }
  body.app-theme-jewel .project-overview-heading {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    padding: 5px 8px 5px 2px;
  }
  body.app-theme-jewel .project-overview-heading > .button { align-self: flex-start; }
  body.app-theme-jewel .dashboard-command-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.app-theme-jewel .claim-group-card-shell:not(:has(.claim-group-card[open])) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
  }
  body.app-theme-jewel .claim-group-card-shell:not(:has(.claim-group-card[open])) .claim-group-quick-actions {
    min-width: max-content;
    align-content: center;
    border-top: 0;
    border-left: 1px solid var(--app-border);
    border-radius: 0 10px 10px 0;
  }
  body.app-theme-jewel .claim-group-card-shell:not(:has(.claim-group-card[open])) .claim-group-card { min-width: 0; }
  body.app-theme-jewel .account-settings-shell .settings-card > .stack-form { column-gap: 10px; }
}

@media (max-width: 1180px) {
  body.app-theme-jewel .header-inner { min-height: 0; }
  body.app-theme-jewel .nav-primary > a { min-height: 48px; }
  body.app-theme-jewel .claim-group-summary {
    min-height: 0;
    grid-template-columns: minmax(130px, .8fr) minmax(180px, 1fr) minmax(190px, 1.1fr) auto;
    grid-template-areas:
      "identity portion progress-copy disclosure"
      "remaining remaining remaining remaining"
      "progress progress progress progress";
    padding: 8px 10px;
  }
  body.app-theme-jewel .claim-group-progress { width: auto; }
}

@media (max-width: 760px) {
  body.app-theme-jewel .shell { padding-inline: 13px; }
  body.app-theme-jewel .page-shell,
  body.app-theme-jewel .dashboard-shell { padding-block: 12px 22px; }
  body.app-theme-jewel .page-banner-inner,
  body.app-theme-jewel .page-banner-small .page-banner-inner { padding-block: 13px 2px; }
  body.app-theme-jewel .project-overview { padding: 12px; }
  body.app-theme-jewel .project-overview-heading { padding-bottom: 9px; }
  body.app-theme-jewel .content-card,
  body.app-theme-jewel .progress-panel,
  body.app-theme-jewel .settings-card { padding: 12px; }
  body.app-theme-jewel .claim-group-summary,
  body.app-theme-jewel .shared-assignment-row { padding: 10px; }
  body.app-theme-jewel .claim-group-summary {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "identity disclosure"
      "portion portion"
      "progress-copy progress-copy"
      "remaining remaining"
      "progress progress";
  }
  body.app-theme-jewel .button { min-height: 40px; padding: 7px 11px; }
  body.app-theme-jewel .button-small,
  body.app-theme-jewel .button-tiny { min-height: 38px; }
  body.app-theme-jewel input:not([type="checkbox"]):not([type="radio"]),
  body.app-theme-jewel select,
  body.app-theme-jewel .filter-multiselect > summary { min-height: 42px; }
}

@media (max-width: 520px) {
  body.app-theme-jewel .brand-mark { width: 36px; height: 36px; flex-basis: 36px; }
  body.app-theme-jewel .brand-mark img { width: 32px; height: 32px; }
  body.app-theme-jewel .dashboard-command-card { padding: 10px; }
  body.app-theme-jewel .project-card { padding: 11px; }
  body.app-theme-jewel .site-footer { padding-block: 9px; }
}
