.ssdcap-shared-plan,
.ssdcap-plan-card,
.ssdcap-message,
.ssdcap-source-banner {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ssdcap-source-banner {
  width: 100%;
  margin: 0 0 18px;
  padding: 0;
  color: #555;
  font-size: 0.92em;
  line-height: 1.5;
}

.ssdcap-source-static {
  padding: 16px 20px;
}

.ssdcap-source-origin {
  display: block;
  color: #555;
}

.ssdcap-source-byline {
  display: block;
  margin-top: 2px;
  color: #71717a;
}

.ssdcap-restriction-none {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  color: #4f6f52;
  font-size: 0.95em;
  font-weight: 500;
}

.ssdcap-restriction-none::before {
  content: "✓";
  font-weight: 700;
}

.ssdcap-shared-plan {
  max-width: 900px;
  margin: 24px auto 32px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* Shared-plan card: match DCASIM User Settings visual language. */
.ssdcap-shared-plan-card {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 18px;
  background: #ffffff;
  border: 1px solid #e4e4e7;
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.ssdcap-share-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 0;
  color: #333333;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: color 0.2s ease;
}

.ssdcap-share-card-header::-webkit-details-marker {
  display: none;
}

.ssdcap-share-card-header::marker {
  content: "";
}

.ssdcap-share-card-header:hover {
  color: #0073aa;
}

.ssdcap-share-card-heading {
  min-width: 0;
  flex: 1 1 auto;
}

.ssdcap-title {
  margin: 0 0 5px;
  color: inherit;
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  font-weight: 700;
  line-height: 1.25;
}

.ssdcap-meta,
.ssdcap-muted {
  color: #71717a;
  font-size: 0.92rem;
}

.ssdcap-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ssdcap-share-toggle-icon {
  display: inline-block;
  flex: 0 0 auto;
  color: #888888;
  font-size: 0.8em;
  transition: transform 0.3s ease, color 0.2s ease;
}

.ssdcap-shared-plan-card[open] .ssdcap-share-toggle-icon {
  color: #2196f3;
  transform: rotate(180deg);
}

.ssdcap-share-card-body {
  padding-top: 15px;
}

.ssdcap-share-saved-count {
  margin: 0 0 10px;
  color: #71717a;
  font-size: 0.9rem;
}

.ssdcap-summary-text {
  margin: 0;
  line-height: 1.7;
}

.ssdcap-author-note {
  margin: 18px 0 0;
  padding: 14px 0 0;
  color: #3f3f46;
  border-top: 1px solid #e4e4e7;
}

.ssdcap-author-note strong {
  display: block;
  margin: 0 0 4px;
  color: #71717a;
  font-size: 0.9rem;
  font-weight: 600;
}

.ssdcap-author-note p {
  margin: 0;
  line-height: 1.65;
}

.ssdcap-share-discuss-link {
  margin-top: 12px;
  overflow-wrap: anywhere;
}

/* Match the quiet Author note heading style. */
.ssdcap-share-discuss-link strong {
  display: block;
  margin: 0 0 4px;
  color: #71717a;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Discussion URLs stay visually quiet, but underline them so they still read as links. */
.ssdcap-share-discuss-link a,
.ssdcap-plan-detail-discuss a {
  color: #52525b;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  overflow-wrap: anywhere;
}

.ssdcap-share-discuss-link a:hover,
.ssdcap-share-discuss-link a:focus,
.ssdcap-plan-detail-discuss a:hover,
.ssdcap-plan-detail-discuss a:focus {
  color: #334155;
  text-decoration: underline;
  text-underline-offset: 2px;
}





.ssdcap-actions,
.ssdcap-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.ssdcap-primary {
  background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
  color: #fff !important;
  border: 0 !important;
}

.ssdcap-danger {
  color: #b91c1c !important;
  border-color: #fecaca !important;
  background: #fff !important;
}

.ssdcap-message {
  max-width: 900px;
  margin: 24px auto;
  padding: 18px 20px;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  background: #fff;
}

.ssdcap-deleted,
.ssdcap-not-found,
.ssdcap-error {
  text-align: center;
}

.ssdcap-modal[hidden] {
  display: none !important;
}

.ssdcap-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.55);
}

.ssdcap-modal-card {
  position: relative;
  width: min(560px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 24px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.ssdcap-modal-card label {
  display: block;
  margin: 14px 0;
  font-weight: 600;
}

.ssdcap-modal-card input[type="text"],
.ssdcap-modal-card input[type="url"],
.ssdcap-modal-card textarea {
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
}

.ssdcap-checkbox {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-weight: 400 !important;
}

.ssdcap-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  font-size: 26px;
  cursor: pointer;
}

.ssdcap-modal-message,
.ssdcap-save-status {
  display: inline-block;
  margin-top: 10px;
  color: #52525b;
}

.ssdcap-plan-table-section {
  max-width: 1000px;
  margin: 0 auto 36px;
  /* The filter form adapts to the width it actually gets (themes often use a
     content column much narrower than the screen), not to the screen width. */
  container-type: inline-size;
}

.ssdcap-plan-table-section > h2 {
  margin-bottom: 14px;
}

.ssdcap-plan-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
  margin: 0 0 14px;
  padding: 10px;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  background: #fafafa;
}

.ssdcap-plan-filters label {
  display: grid;
  gap: 4px;
  min-width: 112px;
  margin: 0;
  font-size: 12px;
  color: #52525b;
}

.ssdcap-plan-filters input,
.ssdcap-plan-filters select {
  box-sizing: border-box;
  min-height: 34px;
  margin: 0;
  font-size: 13px;
}

.ssdcap-plan-filters input[type="text"] {
  width: 118px;
  text-transform: uppercase;
}

/* 4 columns x 2 rows, label in front of its control:
   Sort (spans 2 columns)       | Asset     | S.T. + %Div + Inflation
   Success      | Budget/m      | Start age | Apply + Reset */
.ssdcap-plan-filters label {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.ssdcap-plan-filters label > span {
  flex: 0 0 auto;
  white-space: nowrap;
}

.ssdcap-plan-filters label > input[type="text"],
.ssdcap-plan-filters label > select {
  flex: 1 1 auto;
  min-width: 0;
}

.ssdcap-plan-filters input[type="text"],
.ssdcap-plan-filters select {
  width: 100%;
}

.ssdcap-filter-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ssdcap-filter-checks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
}

.ssdcap-plan-filters .ssdcap-filter-sort {
  grid-column: span 2;
}

/* Every text box and dropdown has the same width: all labels share one
   fixed width (text right aligned against its box) and every column is
   equal, so each box gets the same remaining width. Dividend/Inflation take
   that same width, right aligned. Sort spans two columns. */
.ssdcap-plan-filters {
  --ssdcap-filter-label: 44px; /* fits Succ. / Deposit / Asset / Start / Sort */
}

.ssdcap-plan-filters label:not(.ssdcap-filter-check) > span {
  flex: 0 0 var(--ssdcap-filter-label);
  width: var(--ssdcap-filter-label);
  text-align: right;
}

.ssdcap-plan-filters label:not(.ssdcap-filter-check) > input[type="text"],
.ssdcap-plan-filters label:not(.ssdcap-filter-check) > select {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
}

/* S.T., %Div and Inflation spread across column 4, above Apply and Reset:
   first starts at Apply's left edge, last ends at Reset's right edge. */
.ssdcap-plan-filters .ssdcap-filter-checks {
  display: flex;
  flex-wrap: wrap; /* only wraps when the column is too narrow (small phones) */
  justify-content: space-between;
  gap: 0 6px;
  width: 100%;
  white-space: nowrap;
}

.ssdcap-plan-filters .ssdcap-filter-checks .ssdcap-filter-check {
  flex: 0 0 auto;
  min-height: 24px;
}

.ssdcap-plan-filters .ssdcap-filter-checks {
  align-content: center;
  min-height: 34px;
}

/* Narrower forms (slim column 4): compact checkboxes so %S.T., %Div and
   %Inflation fit on one line where possible. */
@container (min-width: 560px) and (max-width: 960px) {
  .ssdcap-plan-filters .ssdcap-filter-checks {
    gap: 0 2px;
  }

  .ssdcap-plan-filters .ssdcap-filter-checks .ssdcap-filter-check {
    gap: 3px;
    font-size: 11px;
  }

  .ssdcap-plan-filters .ssdcap-filter-checks .ssdcap-filter-check input {
    width: 13px;
    height: 13px;
  }
}

/* Narrow forms (2 columns): Asset and the %S.T. / %Div / %Inflation row each
   take the full width; the checkboxes line up with the boxes above. */
@container (max-width: 559px) {
  .ssdcap-plan-filters .ssdcap-filter-asset,
  .ssdcap-plan-filters .ssdcap-filter-checks {
    grid-column: 1 / -1;
  }

  .ssdcap-plan-filters .ssdcap-filter-checks {
    box-sizing: border-box;
    justify-content: flex-start;
    column-gap: 20px;
    padding-left: calc(var(--ssdcap-filter-label) + 4px);
  }
}

.ssdcap-plan-filters .ssdcap-filter-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  min-height: 34px;
  font-size: 12px;
  color: #3f3f46;
  cursor: pointer;
}

.ssdcap-plan-filters .ssdcap-filter-check input {
  min-height: 0;
  width: 16px;
  height: 16px;
  margin: 0;
}

.ssdcap-plan-filters .button {
  min-height: 34px;
  margin: 0;
}

.ssdcap-filter-reset {
  display: inline-flex !important;
  align-items: center;
}

.ssdcap-plan-table-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}

.ssdcap-plan-table {
  width: 100%;
  min-width: 610px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 13px;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

.ssdcap-plan-table th,
.ssdcap-plan-table td {
  box-sizing: border-box;
  padding: 8px 6px;
  border-bottom: 1px solid #eeeeef;
  vertical-align: middle;
  white-space: nowrap;
}

.ssdcap-plan-table thead th {
  background: #f8fafc;
  color: #3f3f46;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
  line-height: 1.15;
}

.ssdcap-plan-table thead th a {
  color: inherit;
  text-decoration: none;
}

.ssdcap-plan-table thead th a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ssdcap-plan-table tbody tr.ssdcap-plan-row:hover td {
  background: #fafafa;
}

.ssdcap-plan-table .ssdcap-num {
  text-align: right;
}

.ssdcap-plan-table .ssdcap-success-cell,
.ssdcap-plan-table th:nth-child(1),
.ssdcap-plan-table td:nth-child(2),
.ssdcap-plan-table th:nth-child(2) {
  padding-left: 4px;
  padding-right: 4px;
}

/* Compact comparison widths.
   Pair rules are intentional and kept together here:
   1 Success = 2 *Retire, sharing the remaining width equally;
   3 P50X = 4 S.T. = 7 %Div;
   5 Deposit/m = 8 *Withdraw/m;
   6 yrs = 9 yrs.
   Fixed columns: 3 x 58px + 2 x 42px + 2 x 94px = 446px.
   Table min-width 610px = 446px + 2 x 82px (Success/*Retire minimum). */
.ssdcap-col-success,
.ssdcap-col-retire {
  width: calc((100% - 446px) / 2);
}
.ssdcap-col-p50x,
.ssdcap-col-stress,
.ssdcap-col-dividend {
  width: 58px; /* fits "%S.T. ▼" when sorted */
}
.ssdcap-col-years,
.ssdcap-col-withdraw-years {
  width: 42px;
}
.ssdcap-col-deposit,
.ssdcap-col-withdraw {
  width: 94px;
}

/* Cols 1-2: equal flexible width. */
.ssdcap-plan-table th:nth-child(1),
.ssdcap-plan-table td:nth-child(1),
.ssdcap-plan-table th:nth-child(2),
.ssdcap-plan-table td:nth-child(2) {
  min-width: 82px;
  white-space: nowrap;
}

/* Cols 3, 4 & 7: P50X, S.T. and %Div, same compact width. */
.ssdcap-plan-table th:nth-child(3),
.ssdcap-plan-table td:nth-child(3),
.ssdcap-plan-table th:nth-child(4),
.ssdcap-plan-table td:nth-child(4),
.ssdcap-plan-table th:nth-child(7),
.ssdcap-plan-table td:nth-child(7) {
  width: 58px;
  min-width: 58px;
  padding-left: 3px;
  padding-right: 3px;
  white-space: nowrap;
}

/* Cols 5 & 8: Deposit/m and *Withdraw/m, same width. */
.ssdcap-plan-table th:nth-child(5),
.ssdcap-plan-table td:nth-child(5),
.ssdcap-plan-table th:nth-child(8),
.ssdcap-plan-table td:nth-child(8) {
  width: 94px;
  min-width: 94px;
  padding-left: 4px;
  padding-right: 4px;
  white-space: nowrap;
}

/* Cols 6 & 9: both years columns, same compact width and left aligned. */
.ssdcap-plan-table th:nth-child(6),
.ssdcap-plan-table td:nth-child(6),
.ssdcap-plan-table th:nth-child(9),
.ssdcap-plan-table td:nth-child(9) {
  width: 42px;
  min-width: 42px;
  padding-left: 4px;
  padding-right: 4px;
  text-align: left;
  white-space: nowrap;
}

/* Visual grouping separators:
   Success *Retire | P50X | S.T. | Deposit/m years | %Div | *Withdraw/m years */
.ssdcap-plan-table th:nth-child(2),
.ssdcap-plan-table td:nth-child(2),
.ssdcap-plan-table th:nth-child(3),
.ssdcap-plan-table td:nth-child(3),
.ssdcap-plan-table th:nth-child(4),
.ssdcap-plan-table td:nth-child(4),
.ssdcap-plan-table th:nth-child(6),
.ssdcap-plan-table td:nth-child(6),
.ssdcap-plan-table th:nth-child(7),
.ssdcap-plan-table td:nth-child(7) {
  border-right: 1px solid #d9dde3;
}

.ssdcap-plan-table .ssdcap-success-cell,
.ssdcap-plan-table thead th:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
  box-shadow: 1px 0 0 #e4e4e7;
}

.ssdcap-plan-table thead th:nth-child(1) {
  z-index: 4;
  background: #f8fafc;
}

.ssdcap-plan-table tbody tr.ssdcap-plan-row:hover .ssdcap-success-cell {
  background: #fafafa;
}

.ssdcap-plan-row {
  cursor: pointer;
}

/* Main rows are keyboard-focusable, but the browser/theme must not draw a
   heavy focus rectangle around the whole <tr>. Expanded state is shown by
   the light-blue cell background instead. */
.ssdcap-plan-row:focus,
.ssdcap-plan-row:focus-visible,
.ssdcap-plan-row[aria-expanded="true"] {
  outline: none !important;
  box-shadow: none !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
}

.ssdcap-plan-row:focus td,
.ssdcap-plan-row:focus-visible td {
  outline: none !important;
}

.ssdcap-plan-table tbody tr.ssdcap-plan-row[aria-expanded="true"] > td,
.ssdcap-plan-table tbody tr.ssdcap-plan-row[aria-expanded="true"]:hover > td,
.ssdcap-plan-table tbody tr.ssdcap-plan-row[aria-expanded="true"] .ssdcap-success-cell,
.ssdcap-plan-table tbody tr.ssdcap-plan-row[aria-expanded="true"]:hover .ssdcap-success-cell {
  background: #dbeafe !important;
}

.ssdcap-plan-detail-row > td {
  padding: 0 !important;
  white-space: normal !important;
  background: #eaf4ff;
}

.ssdcap-plan-detail {
  position: sticky;
  left: 0;
  box-sizing: border-box;
  width: calc(100vw - 32px); /* fallback for very old browsers */
  /* Exactly the visible table width (section width minus the 2px scroll
     border), so buttons never run past the right edge on small screens. */
  width: calc(100cqw - 2px);
  max-width: 100%;
  padding: 12px 14px 14px;
  border-left: 3px solid #d4d4d8;
}

.ssdcap-plan-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px 18px;
  color: #52525b;
  font-size: 13px;
  line-height: 1.5;
}

.ssdcap-plan-detail-title {
  grid-column: 1 / -1;
}

.ssdcap-plan-note {
  margin-top: 10px;
  color: #52525b;
  line-height: 1.5;
}

.ssdcap-plan-note,
.ssdcap-plan-detail-grid > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Action buttons always take one quarter of the row (one half on phones),
   whether a row has 2 buttons (View + Bookmark) or 4 (My Plans), so every
   button has the same width everywhere. Save/Cancel use the same grid. */
.ssdcap-plan-detail .ssdcap-card-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
  margin-top: 12px;
}

.ssdcap-plan-detail .ssdcap-card-actions .button {
  display: inline-flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ssdcap-plan-detail .ssdcap-card-actions [hidden] {
  display: none;
}



/* Logged-out Community: controls stay visible but are intentionally disabled. */
.ssdcap-plan-filters.is-disabled {
  opacity: 0.58;
}

.ssdcap-plan-filters.is-disabled .button.is-disabled {
  cursor: not-allowed;
  pointer-events: none;
}

.ssdcap-community-guest-note {
  margin: 8px 0 12px;
  color: #71717a;
  font-size: 0.9rem;
}

.ssdcap-plan-table thead th[aria-disabled="true"] > span {
  color: inherit;
  cursor: default;
}

/* Center only the first four cells of the MAIN plan rows.
   Do not affect the single colspan cell used by expanded detail rows. */
.ssdcap-plan-table thead th:nth-child(1),
.ssdcap-plan-table thead th:nth-child(2),
.ssdcap-plan-table thead th:nth-child(3),
.ssdcap-plan-table thead th:nth-child(4),
.ssdcap-plan-table tbody tr.ssdcap-plan-row > td:nth-child(1),
.ssdcap-plan-table tbody tr.ssdcap-plan-row > td:nth-child(2),
.ssdcap-plan-table tbody tr.ssdcap-plan-row > td:nth-child(3),
.ssdcap-plan-table tbody tr.ssdcap-plan-row > td:nth-child(4) {
  text-align: center;
}

/* Expanded plan content must keep its own left-aligned 2-column layout. */
.ssdcap-plan-table tbody tr.ssdcap-plan-detail-row > td,
.ssdcap-plan-detail,
.ssdcap-plan-detail-grid {
  text-align: left;
}

/* View is a native form-submit button so navigation does not depend on JS. */
.ssdcap-plan-detail .ssdcap-card-actions .ssdcap-view-form {
  display: flex;
  min-width: 0;
  margin: 0;
}

.ssdcap-plan-detail .ssdcap-card-actions .ssdcap-view-form .button {
  width: 100%;
  flex: 1 1 auto;
}

.ssdcap-table-note {
  margin: 7px 0 0;
  color: #71717a;
  font-size: 12px;
}

.ssdcap-table-note-eye {
  margin-top: 2px;
}

.ssdcap-note-eye {
  display: inline-flex;
  vertical-align: -1px;
  color: #a1a1aa;
}

.ssdcap-pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 14px 0 0;
}

.ssdcap-page-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.ssdcap-page-numbers {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 6px;
}

.ssdcap-pagination .ssdcap-page-btn,
.ssdcap-pagination .ssdcap-page-number {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 32px;
  height: 32px;
  padding: 0 9px;
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  background: #ffffff;
  color: #52525b;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ssdcap-pagination a.ssdcap-page-btn:hover,
.ssdcap-pagination a.ssdcap-page-number:hover {
  border-color: #a1a1aa;
  background: #fafafa;
  color: #27272a;
}

.ssdcap-pagination a.ssdcap-page-btn:focus-visible,
.ssdcap-pagination a.ssdcap-page-number:focus-visible {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
}

.ssdcap-pagination .ssdcap-page-number.is-current {
  border-color: #4f46e5;
  background: #4f46e5;
  color: #ffffff;
  font-weight: 600;
}

.ssdcap-pagination .ssdcap-page-btn.is-disabled {
  border-color: #ececee;
  color: #c4c4c8;
  cursor: default;
}

.ssdcap-page-gap {
  min-width: 16px;
  color: #a1a1aa;
  text-align: center;
}

.ssdcap-page-compact {
  display: none;
  min-width: 64px;
  color: #52525b;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.ssdcap-pagination .ssdcap-page-status {
  color: #71717a;
  font-size: 12px;
}

/* Phones: « ‹ 6 / 20 › » */
@media (max-width: 600px) {
  .ssdcap-page-numbers,
  .ssdcap-pagination .ssdcap-page-label,
  .ssdcap-pagination .ssdcap-page-status {
    display: none;
  }

  .ssdcap-page-compact {
    display: inline-block;
  }

  .ssdcap-page-controls {
    gap: 8px;
  }
}

@media (max-width: 760px) {
  .ssdcap-plan-table-scroll {
    border-radius: 8px;
  }

  .ssdcap-plan-table {
    min-width: 610px;
    font-size: 12.5px;
  }

  .ssdcap-plan-filters {
    gap: 8px;
  }

  .ssdcap-plan-filters label {
    flex: 1 1 125px;
  }

  .ssdcap-plan-filters input[type="text"],
  .ssdcap-plan-filters select {
    width: 100%;
  }

  .ssdcap-plan-detail {
    padding: 12px;
  }

  .ssdcap-plan-detail-grid {
    grid-template-columns: 1fr;
  }

  .ssdcap-plan-detail-title {
    grid-column: 1;
  }

  .ssdcap-plan-detail .ssdcap-card-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}




.ssdcap-source-link {
  color: #333;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ssdcap-source-link:hover {
  color: #2196f3;
}

.ssdcap-restriction-header .ssdcap-source-link {
  font-weight: 600;
}

/* Small status shown while account capabilities are loading. */
.ssdcap-restriction-checking {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 0;
  color: #777;
  font-size: 0.95em;
  line-height: 1.4;
}

.ssdcap-restriction-spinner {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  box-sizing: border-box;
  border: 2px solid #e4e4e7;
  border-top-color: #71717a;
  border-radius: 50%;
  animation: ssdcap-restriction-spin 0.75s linear infinite;
}

@keyframes ssdcap-restriction-spin {
  to {
    transform: rotate(360deg);
  }
}

/* =======================================================
   Restriction notice — match DCASIM collapsible cards
   ======================================================= */
.ssdcap-restriction-card {
  transition: all 0.2s ease-in-out;
  padding: 16px 20px !important;
  margin: 0;
}

.ssdcap-restriction-summary-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ssdcap-restriction-status-text {
  display: block;
  margin-top: 10px;
  color: #444;
  font-weight: 600;
}

.ssdcap-restriction-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  font-size: 0.95em;
  font-weight: 600;
  color: #444;
  cursor: pointer;
  list-style: none;
  user-select: none;
  outline: none;
}

.ssdcap-restriction-header::-webkit-details-marker {
  display: none;
}

.ssdcap-restriction-header::marker {
  content: "";
}

.ssdcap-restriction-header:focus-visible {
  outline: 2px solid #2196F3;
  outline-offset: 4px;
}

.ssdcap-restriction-toggle-icon {
  flex: 0 0 auto;
  font-size: 0.8em;
  color: #888;
  transition: transform 0.25s ease, color 0.25s ease;
}

.ssdcap-restriction-card[open] .ssdcap-restriction-toggle-icon {
  transform: rotate(180deg);
  color: #2196F3;
}

.ssdcap-restriction-card[open] {
  padding-bottom: 20px !important;
}

.ssdcap-restriction-body {
  margin-top: 15px;
}

.ssdcap-unavailable-heading {
  display: block;
  margin: 12px 0 8px;
  color: #444;
  font-size: 0.95em;
}

.ssdcap-unavailable-heading[hidden] {
  display: none !important;
}

.ssdcap-unavailable-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.ssdcap-unavailable-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 4px 0;
}

.ssdcap-lock-icon {
  display: inline-flex;
  flex: 0 0 16px;
  margin-top: 2px; /* centred on the first line of the label */
  color: #888;
}

/* 16px: the same size as the lock on the DCASIM form's locked rows. */
.ssdcap-lock-icon svg {
  display: block;
  width: 16px;
  height: 16px;
}

.ssdcap-unavailable-group,
.ssdcap-unavailable-note {
  color: #777;
  font-size: 0.92em;
}

.ssdcap-compatible-text {
  color: #777;
}


.ssdcap-bookmark-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.ssdcap-bookmark-note {
  max-width: 520px;
  font-size: 0.82em;
  line-height: 1.4;
  color: #6b7280;
}

/* A Share Page is a read-only snapshot. DCASIM now owns visibility of its
   own navigation buttons; SSDCAP only suppresses its Save & Share control. */
.ssdcap-share-page .ssdcap-save-share {
  display: none !important;
}

/* =======================================================
   SSDCAP Action Transition Overlay
   ======================================================= */

#ssdcap-action-overlay {
    position: fixed;
    top: 0;
    left: 0;

    width: 100vw;
    height: 100vh;

    background-color:
        rgba(0, 0, 0, 0.75);

    backdrop-filter:
        blur(6px);

    -webkit-backdrop-filter:
        blur(6px);

    z-index: 999999;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    color: white;
}


.ssdcap-action-spinner {
    width: 50px;
    height: 50px;

    border:
        5px solid
        rgba(255, 255, 255, 0.2);

    border-radius: 50%;

    border-top-color:
        #ffffff;

    animation:
        ssdcap-action-spin
        1s
        cubic-bezier(
            0.55,
            0.15,
            0.45,
            0.85
        )
        infinite;

    margin-bottom: 20px;
}


.ssdcap-action-text {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.5px;

    animation:
        ssdcap-action-pulse
        1.5s
        ease-in-out
        infinite;
}


@keyframes ssdcap-action-spin {
    to {
        transform:
            rotate(360deg);
    }
}


@keyframes ssdcap-action-pulse {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}
/* =======================================================
   Primary action buttons - match DCASIM RUN SIMULATION
   ======================================================= */
.ssdcap-open-save,
.ssdcap-try {
    background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    font-family: inherit;
    transition: transform 0.2s ease,
                box-shadow 0.2s ease,
                background 0.2s ease !important;
    cursor: pointer;
    min-width: 200px;
    width: 50%;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.ssdcap-open-save:hover:not(:disabled),
.ssdcap-try:hover:not(:disabled) {
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.45);
    transform: translateY(-2px);
}

.ssdcap-open-save:active:not(:disabled),
.ssdcap-try:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.2);
}

.ssdcap-open-save:disabled,
.ssdcap-try:disabled {
    opacity: 0.6;
    transform: none !important;
    box-shadow: none !important;
}

/* Center the Result-page Save & Share button. */
.ssdcap-save-share > .ssdcap-open-save {
    display: flex !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* =======================================================
   Shared-page three-button row
   Bookmark | Try It Yourself | Copy link

   The center column is always exactly 50% of the action row.
   The two quiet secondary buttons use the same visual behavior
   as DCASIM's Reset button: transparent at rest, subtle gray
   border/text, and a light-gray hover state.
   ======================================================= */
.ssdcap-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 50% minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    width: 100%;
    margin-top: 16px;
}

.ssdcap-action-left {
    justify-self: start;
    min-width: 0;
}

.ssdcap-action-right {
    justify-self: end;
    min-width: 0;
}

/* The middle action fills the 50% center column exactly. */
.ssdcap-actions > .ssdcap-try {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
}

/* Quiet secondary actions: Reset-button visual language. */
.ssdcap-actions .ssdcap-bookmark,
.ssdcap-actions .ssdcap-copy-link {
    background: transparent !important;
    border: 1px solid #e4e4e7 !important;
    color: #a1a1aa !important;
    box-shadow: none !important;
    border-radius: 8px !important;
    padding: 10px 8px !important;
    min-width: 0 !important;
    width: auto !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    font-weight: 500 !important;
    font-family: inherit;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease !important;
}

.ssdcap-actions .ssdcap-bookmark:hover:not(:disabled),
.ssdcap-actions .ssdcap-copy-link:hover:not(:disabled) {
    border-color: #a1a1aa !important;
    color: #71717a !important;
    background: #fafafa !important;
}

.ssdcap-actions .ssdcap-bookmark:focus-visible,
.ssdcap-actions .ssdcap-copy-link:focus-visible {
    outline: 2px solid #a1a1aa;
    outline-offset: 2px;
}

.ssdcap-actions .ssdcap-bookmark:disabled {
    opacity: 0.6;
    cursor: default;
}

/* Bookmark explanation belongs below the row, not inside the left grid cell. */
.ssdcap-actions-note {
    margin-top: 7px;
}


/* =======================================================
   Modal Save & Share button
   Match DCASIM RUN SIMULATION
   ======================================================= */

.ssdcap-save-share .ssdcap-confirm-save {
    display: block !important;

    width: 50% !important;
    min-width: 200px !important;
    max-width: 100% !important;

    margin:
        22px
        auto
        0 !important;

    background:
        linear-gradient(
            135deg,
            #4f46e5,
            #7c3aed
        ) !important;

    color: #ffffff !important;

    border: none !important;

    padding:
        12px
        24px !important;

    border-radius:
        8px !important;

    font-family:
        inherit !important;

    font-size:
        16px !important;

    font-weight:
        600 !important;

    line-height:
        normal !important;

    text-align:
        center !important;

    box-shadow:
        0 4px 12px
        rgba(
            99,
            102,
            241,
            0.3
        ) !important;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease !important;

    cursor:
        pointer !important;
}


.ssdcap-save-share
.ssdcap-confirm-save:hover:not(:disabled) {

    transform:
        translateY(-2px);

    box-shadow:
        0 6px 16px
        rgba(
            99,
            102,
            241,
            0.45
        ) !important;
}


.ssdcap-save-share
.ssdcap-confirm-save:active:not(:disabled) {

    transform:
        translateY(1px);

    box-shadow:
        0 2px 6px
        rgba(
            99,
            102,
            241,
            0.2
        ) !important;
}


.ssdcap-save-share
.ssdcap-confirm-save:disabled {

    opacity: 0.6 !important;

    transform:
        none !important;

    box-shadow:
        none !important;
}


@media (max-width: 600px) {

    .ssdcap-save-share
    .ssdcap-confirm-save {

        width: 100% !important;
        min-width: 0 !important;
    }
}

/* =======================================================
   Shareable portrait image
   ======================================================= */

.ssdcap-shareable-section {
  box-sizing: border-box;
  max-width: 900px;
  margin: 34px auto 44px;
  padding: 0 18px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ssdcap-shareable-heading {
  margin: 0 auto 16px;
  max-width: 540px;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  line-height: 1.2;
}

.ssdcap-shareable-media {
  position: relative;
  width: 100%;
  max-width: 540px;
  aspect-ratio: 1080 / 1350;
  margin: 0 auto;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

.ssdcap-shareable-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1080 / 1350;
  object-fit: contain;
}

.ssdcap-shareable-placeholder {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  color: #64748b;
}

.ssdcap-shareable-spinner {
  width: 36px;
  height: 36px;
  box-sizing: border-box;
  border: 4px solid #dbe5f1;
  border-top-color: #4f46e5;
  border-radius: 50%;
  animation: ssdcap-shareable-spin 0.9s linear infinite;
}

.ssdcap-shareable-status {
  max-width: 340px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.ssdcap-shareable-retry {
  margin-top: 2px !important;
}

.ssdcap-shareable-actions {
  max-width: 540px;
  margin: 14px auto 0;
  text-align: center;
}

.ssdcap-shareable-actions[hidden] {
  display: none !important;
}


.ssdcap-shareable-hint {
  margin-top: 8px;
  color: #71717a;
  font-size: 0.84rem;
  line-height: 1.4;
}

@keyframes ssdcap-shareable-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 640px) {
  .ssdcap-shareable-section {
    margin-top: 28px;
    padding: 0;
  }

  .ssdcap-shareable-media,
  .ssdcap-shareable-heading,
  .ssdcap-shareable-actions {
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ssdcap-shareable-spinner {
    animation-duration: 1.8s;
  }
}


/* Optional [ssdcap_og_image]: show the existing landscape social-preview PNG. */
.ssdcap-og-image-wrap {
  box-sizing: border-box;
  max-width: 720px;
  margin: 24px auto;
  padding: 0 12px;
}

.ssdcap-og-image-wrap .ssdcap-og-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}


@media (max-width: 600px) {
  .ssdcap-shared-plan-card {
    padding: 16px;
  }

  .ssdcap-share-card-header {
    gap: 10px;
  }

  .ssdcap-title {
    font-size: 1.15rem;
  }

  .ssdcap-meta {
    font-size: 0.84rem;
  }
}


/* =======================================================
   Shared-plan collapsible header
   Remove browser/theme focus rectangle so it behaves
   visually like DCASIM User Settings.
   ======================================================= */
.ssdcap-share-card-header,
.ssdcap-share-card-header:focus,
.ssdcap-share-card-header:focus-visible,
.ssdcap-share-card-header:active {
    outline: none !important;
    box-shadow: none !important;
    border: 0 !important;
}

.ssdcap-share-card-header::-moz-focus-inner {
    border: 0 !important;
}

.ssdcap-share-card-header:-moz-focusring {
    outline: none !important;
}

/* Center P50X and S.T. columns (cols 3-4) */
.ssdcap-plan-table thead th:nth-child(3),
.ssdcap-plan-table tbody tr.ssdcap-plan-row > td:nth-child(3),
.ssdcap-plan-table thead th:nth-child(4),
.ssdcap-plan-table tbody tr.ssdcap-plan-row > td:nth-child(4) {
  text-align: center;
}

/* Force %Div column (col 7) centered, matching P50X. */
.ssdcap-plan-table thead th:nth-child(7),
.ssdcap-plan-table tbody tr.ssdcap-plan-row > td:nth-child(7) {
  text-align: center !important;
}

/* Expanded plan details: Assets must span the full two-column grid. */
.ssdcap-plan-detail-assets {
  grid-column: 1 / -1;
}

.ssdcap-plan-detail-discuss {
  grid-column: 1 / -1;
}

@media (max-width: 760px) {
  .ssdcap-plan-detail-assets {
    grid-column: 1;
  }


  .ssdcap-plan-detail-discuss {
    grid-column: 1;
  }
}

/* "Created: 24/10/26 14:28 · 1 bookmark": the count stays on the same line,
   same size as the date, in a softer grey. */
.ssdcap-plan-detail-bookmarks {
  color: #71717a;
  font-size: inherit;
  white-space: nowrap;
}

/* Expanded plan details: Note is full width under Title; line breaks kept. */
.ssdcap-plan-detail-note {
  grid-column: 1 / -1;
}

.ssdcap-plan-note-text {
  white-space: pre-line;
}

.ssdcap-plan-detail-grid > [hidden] {
  display: none;
}

/* My Plans: edit title and note inline. */
.ssdcap-edit-text {
  float: right;
  margin: 0 0 0 8px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: #2563eb;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.ssdcap-plan-text-form {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.ssdcap-plan-text-form[hidden] {
  display: none;
}

.ssdcap-plan-text-form label {
  display: block;
}

.ssdcap-plan-text-title-field,
.ssdcap-plan-text-note-field,
.ssdcap-plan-text-discuss-field,
.ssdcap-plan-text-actions {
  grid-column: 1 / -1;
}

.ssdcap-plan-text-form input,
.ssdcap-plan-text-form textarea {
  box-sizing: border-box;
  display: block;
  width: 100%;
  margin-top: 3px;
  font: inherit;
}

/* Save / Cancel: same width as the 4 action buttons (View, Copy link...). */
.ssdcap-plan-text-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.ssdcap-plan-text-actions .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  background: #fff !important;
  text-align: center;
}

.ssdcap-plan-text-actions .button:hover:not(:disabled) {
  background: #fafafa !important;
}

/* 4 equal columns while the form is at least 560px wide, then 2 columns. */
@container (max-width: 559px) {
  .ssdcap-plan-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .ssdcap-plan-detail-note,
  .ssdcap-plan-text-form {
    grid-column: 1;
  }

  .ssdcap-plan-text-form {
    grid-template-columns: 1fr;
  }

  .ssdcap-plan-text-title-field,
  .ssdcap-plan-text-note-field,
  .ssdcap-plan-text-discuss-field,
  .ssdcap-plan-text-actions {
    grid-column: 1;
  }

  .ssdcap-plan-text-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Owner's public plans: small grey eye at the left of the Success cell. */
.ssdcap-plan-table .ssdcap-success-cell .ssdcap-vis-icon {
  position: absolute;
  top: 50%;
  left: 4px;
  display: inline-flex;
  color: #a1a1aa;
  transform: translateY(-50%);
  pointer-events: none;
}

.ssdcap-plan-table .ssdcap-success-cell .ssdcap-vis-icon[hidden] {
  display: none;
}

/* My Plans: bookmark count and visibility, above the action buttons. */
.ssdcap-plan-detail-status-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px 18px;
  margin-top: 6px;
  color: #52525b;
  font-size: 13px;
  line-height: 1.5;
}

.ssdcap-plan-detail-status-row > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .ssdcap-plan-detail-status-row {
    grid-template-columns: 1fr;
  }
}


/* =======================================================
   Profile header / owner editor
   Profile-only styles. The established plan-table CSS above
   remains intentionally unchanged.
   ======================================================= */
.ssdcap-profile-header {
  box-sizing: border-box;
  max-width: 100%;
  margin: 0 0 20px;
}

.ssdcap-profile-name {
  margin: 0 0 10px;
}

.ssdcap-profile-description {
  max-width: 760px;
  margin: 0 0 12px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.ssdcap-profile-socials {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}

.ssdcap-profile-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: #27272a;
  background: #ffffff;
  border: 1px solid #d4d4d8;
  border-radius: 50%;
  text-decoration: none !important;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.ssdcap-profile-social-link:hover,
.ssdcap-profile-social-link:focus-visible {
  color: #18181b;
  border-color: #71717a;
  transform: translateY(-1px);
}

.ssdcap-profile-social-link svg {
  display: block;
  width: 18px;
  height: 18px;
}

.ssdcap-profile-editor {
  max-width: 640px;
  margin: 12px 0 18px;
  padding: 0;
}

.ssdcap-profile-editor > summary {
  display: inline-block;
  color: #2271b1;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
}

.ssdcap-profile-editor > summary:hover,
.ssdcap-profile-editor > summary:focus-visible {
  color: #135e96;
  text-decoration: underline;
}

.ssdcap-profile-editor form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
}

.ssdcap-profile-editor label {
  display: grid;
  gap: 5px;
  font-weight: 600;
}

.ssdcap-profile-editor input,
.ssdcap-profile-editor textarea {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  font: inherit;
  font-weight: 400;
}

.ssdcap-profile-editor textarea {
  resize: vertical;
}

.ssdcap-profile-editor .button {
  justify-self: start;
}

.ssdcap-profile-notice {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 640px;
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.92rem;
}

.ssdcap-profile-notice-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.ssdcap-profile-notice-close {
  flex: 0 0 auto;
  margin: -4px -3px -4px 0;
  padding: 2px 5px;
  color: #3f6212;
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.ssdcap-profile-notice-close:hover,
.ssdcap-profile-notice-close:focus-visible {
  color: #14532d;
}

.ssdcap-profile-notice-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.ssdcap-profile-notice-error .ssdcap-profile-notice-close {
  color: #991b1b;
}

.ssdcap-profile-notice-error .ssdcap-profile-notice-close:hover,
.ssdcap-profile-notice-error .ssdcap-profile-notice-close:focus-visible {
  color: #7f1d1d;
}


/* Share-page author profile link. Keep outside <summary> so it never competes with the expand control. */
.ssdcap-share-card-header .ssdcap-title {
  margin-bottom: 0;
}

.ssdcap-share-card-meta {
  margin-top: 5px;
  margin-left: 18px;
}

.ssdcap-author-profile-link {
  color: #0073aa;
  font-weight: 500;
  text-decoration: none;
}

.ssdcap-author-profile-link:hover,
.ssdcap-author-profile-link:focus-visible {
  color: #005177;
  text-decoration: underline;
}


/* Share-page byline alignment: match the card title inset on mobile. */
@media (max-width: 600px) {
  .ssdcap-share-card-meta {
    margin-left: 16px;
  }
}


/* My Plans: quiet "Remove duplicated plans" tool below pagination, right aligned. */
.ssdcap-plan-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 14px 0 0;
}

.ssdcap-plan-tools-status {
  color: #71717a;
  font-size: 12px;
}

/* One quiet button style for every plan-table button: Apply, Reset, View,
   Copy link, Make public, Delete, Bookmark, My plan, Save, Cancel and
   Remove duplicated plans. Reset and Remove duplicated plans use muted text. */
.ssdcap-plan-table-section .button,
.ssdcap-plan-tools .ssdcap-remove-duplicates {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 34px;
  min-height: 34px;
  margin: 0;
  padding: 0 12px;
  background: transparent;
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  box-shadow: none;
  color: #3f3f46;
  font: inherit;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  text-shadow: none;
  text-transform: none;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.ssdcap-plan-table-section .button:hover:not(:disabled),
.ssdcap-plan-tools .ssdcap-remove-duplicates:hover:not(:disabled) {
  border-color: #a1a1aa;
  background: #fafafa;
  color: #18181b;
}

.ssdcap-plan-table-section .button:focus-visible,
.ssdcap-plan-tools .ssdcap-remove-duplicates:focus-visible {
  outline: 2px solid #a1a1aa;
  outline-offset: 2px;
}

.ssdcap-plan-table-section .button:disabled,
.ssdcap-plan-tools .ssdcap-remove-duplicates:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Muted: Reset and Remove duplicated plans. */
.ssdcap-plan-table-section .button.ssdcap-filter-reset,
.ssdcap-plan-tools .ssdcap-remove-duplicates {
  color: #a1a1aa;
}

/* Same width as one action button (4 per row, 2 on phones), allowing for
   the expanded row's borders, padding and gaps. */
.ssdcap-plan-tools .ssdcap-remove-duplicates {
  width: calc((100% - 57px) / 4);
  white-space: nowrap;
}

@media (max-width: 760px) {
  .ssdcap-plan-tools .ssdcap-remove-duplicates {
    width: calc((100% - 37px) / 2);
  }
}

.ssdcap-plan-table-section .button.ssdcap-filter-reset:hover,
.ssdcap-plan-tools .ssdcap-remove-duplicates:hover:not(:disabled) {
  color: #71717a;
}

/* Expanded-row action buttons: white fill on the light-blue row. */
.ssdcap-plan-table-section .ssdcap-plan-detail .ssdcap-card-actions .button {
  background: #fff;
}

.ssdcap-plan-table-section .ssdcap-plan-detail .ssdcap-card-actions .button:hover:not(:disabled) {
  background: #fafafa;
}

/* Delete keeps its red text and border in the same shape. */
.ssdcap-plan-table-section .button.ssdcap-danger {
  background: #fff !important;
}

.ssdcap-plan-table-section .button.ssdcap-danger:hover:not(:disabled) {
  border-color: #f87171 !important;
  background: #fef2f2 !important;
}

/* My Plans single-plan view (opened from Community "My plan"). */
.ssdcap-plan-focus {
  margin: 0 0 10px;
  color: #52525b;
  font-size: 13px;
}
