/* Private circles (/circles/, issue #500) and the dashboard's Circles card.
   Colors come from the site tokens in styles.css, so dark mode follows. */

.site-layout__main .circles-page {
  max-width: calc(var(--measure-app) + 2 * var(--page-gutter));
  min-height: 100vh;
  min-height: 100dvh;
}

.circles-page .eyebrow a { color: inherit; text-decoration: none; }
.circles-page .eyebrow a:hover { text-decoration: underline; }
.circle-title { margin-bottom: 6px; overflow-wrap: anywhere; }
.circles-tagline { font-size: 1.15rem; font-weight: 600; color: var(--ink); margin: -4px 0 12px; }
.circles-lead { color: var(--ink-soft); margin: 0 0 22px; }
.circles-loading { color: var(--ink-subtle); }
.circles-h2 { font-family: var(--serif); font-size: 20px; font-weight: 600; margin: 0 0 14px; }
.circles-note { color: var(--ink-subtle); font-size: 14px; line-height: 1.55; margin: 0 0 14px; }
.circles-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.circles-callout {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--r-md, 12px);
  padding: 12px 16px;
  margin: 0 0 20px;
  color: var(--ink-soft);
  line-height: 1.55;
}
.circles-callout--strong { border-left-color: var(--warn); color: var(--ink); }

/* Forms */
.circles-form { display: grid; gap: 8px; margin: 0 0 12px; max-width: 520px; }
.circles-form label { font-weight: 600; font-size: 14px; color: var(--ink); }
.circles-form input[type="text"],
.circles-form input[type="date"],
.circles-form select,
.circles-form textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
.circles-form input:focus,
.circles-form select:focus,
.circles-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.circles-form .btn { justify-self: start; margin-top: 6px; }
.circles-form--row { grid-template-columns: 1fr auto; align-items: end; max-width: 620px; }
.circles-form--row label { display: grid; gap: 6px; }
.circles-form--row .btn { margin-top: 0; }
#focusForm { grid-template-columns: 1fr 1fr auto; }
.circles-check { display: flex; gap: 10px; align-items: center; margin: 10px 0; font-size: 15px; color: var(--ink); }
.circles-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.circles-status { min-height: 1.4em; margin: 6px 0 0; font-size: 14px; color: var(--ok); }
.circles-status--error { color: var(--danger); }

.circles-privacy ul { margin: 0; padding-left: 20px; display: grid; gap: 10px; color: var(--ink-soft); line-height: 1.55; }
.circles-privacy strong { color: var(--ink); }

/* List page */
.circle-tiles { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.circle-tile { display: grid; gap: 8px; margin: 0; padding: 20px 22px; color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.circle-tile:hover { border-color: var(--accent); transform: translateY(-1px); }
.circle-tile__name { font-family: var(--serif); font-size: 20px; font-weight: 600; overflow-wrap: anywhere; }
.circle-tile__meta { font-size: 13px; color: var(--ink-subtle); }
.circle-tile__scores { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 15px; color: var(--ink-soft); }
.circle-tile__scores strong { color: var(--ink); }
.circle-tile__focus { font-size: 13px; color: var(--accent); font-weight: 600; }

/* Compare card */
.circle-headline { display: flex; flex-wrap: wrap; gap: 14px 40px; margin: 0 0 12px; }
.circle-headline > div { display: grid; gap: 2px; }
.circle-headline__label { font-size: 13px; color: var(--ink-subtle); text-transform: uppercase; letter-spacing: 1.4px; font-weight: 700; }
.circle-headline__value { font-family: var(--serif); font-size: 32px; font-weight: 600; color: var(--ink); line-height: 1.1; }
.circle-compare__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.circle-compare__radar { margin: 0; }
.circle-radar { width: 100%; height: auto; max-width: 420px; display: block; margin: 0 auto; overflow: visible; }
.circle-radar__ring { fill: none; stroke: var(--line); stroke-width: 1; }
.circle-radar__spoke { stroke: var(--line); stroke-width: 1; }
.circle-radar__label { fill: var(--ink-soft); font-size: 12px; font-family: var(--sans, inherit); }
.circle-radar__band { fill: color-mix(in srgb, var(--d-social) 26%, transparent); stroke: color-mix(in srgb, var(--d-social) 60%, transparent); stroke-width: 1; }
.circle-radar__other { fill: color-mix(in srgb, var(--d-social) 14%, transparent); stroke: var(--d-social); stroke-width: 2; stroke-dasharray: 5 4; }
.circle-radar__me { fill: color-mix(in srgb, var(--accent) 16%, transparent); stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.circle-radar__dot { fill: var(--accent); }

.circle-legend { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; padding: 0; margin: 8px 0 0; font-size: 13px; color: var(--ink-soft); }
.circle-legend li { display: flex; align-items: center; gap: 6px; }
.circle-legend span { display: inline-block; width: 18px; height: 10px; border-radius: 3px; }
.circle-legend__me { background: color-mix(in srgb, var(--accent) 16%, transparent); border: 2px solid var(--accent); }
.circle-legend__band { background: color-mix(in srgb, var(--d-social) 30%, transparent); }
.circle-legend__other { border: 2px dashed var(--d-social); }

.circle-rows { width: 100%; border-collapse: collapse; font-size: 15px; }
.circle-rows th, .circle-rows td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.circle-rows thead th { font-size: 12px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--ink-subtle); font-weight: 700; }
.circle-rows tbody th { font-weight: 600; }
.circle-rows tbody th a { color: var(--ink); text-decoration: none; }
.circle-rows tbody th a:hover { text-decoration: underline; }
.circle-rows__n { color: var(--ink-subtle); font-size: 12px; margin-left: 4px; }
.circle-rows__wait { color: var(--ink-subtle); font-size: 13px; }
.circle-rows__take { font-size: 13px; color: var(--accent); font-weight: 600; }
.circle-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.circle-dot--financial { background: var(--d-financial); }
.circle-dot--retirement { background: var(--d-retirement); }
.circle-dot--security { background: var(--d-security); }
.circle-dot--medical { background: var(--d-medical); }
.circle-dot--physical { background: var(--d-physical); }
.circle-dot--mental { background: var(--d-mental); }
.circle-dot--social { background: var(--d-social); }
.circle-dot--time { background: var(--d-time); }

/* Focus */
.circle-focus__goal { font-size: 17px; margin: 0 0 12px; }
.circle-focus__goal a { color: var(--accent); font-weight: 600; }
.circle-progress { height: 12px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); overflow: hidden; margin: 0 0 8px; }
.circle-progress span { display: block; height: 100%; background: var(--accent); border-radius: 999px; min-width: 4px; }
.circle-focus__count { color: var(--ink-soft); margin: 0 0 14px; }
.circle-focus__done { color: var(--ok); font-weight: 600; margin: 0 0 8px; }
.circle-details { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.circle-details summary { cursor: pointer; font-weight: 600; color: var(--accent); margin-bottom: 12px; }

/* Trend */
.circle-trend { width: 100%; height: auto; display: block; }
.circle-trend__grid { stroke: var(--line); stroke-width: 1; }
.circle-trend__axis { fill: var(--ink-subtle); font-size: 11px; }
.circle-trend__band { fill: color-mix(in srgb, var(--d-social) 30%, transparent); }
.circle-trend__me { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.circle-trend__me-dot { fill: var(--card); stroke: var(--accent); stroke-width: 2; }
.circle-trend__other { fill: none; stroke: var(--d-social); stroke-width: 2; stroke-dasharray: 5 4; }
.circle-trend__other-dot { fill: var(--card); stroke: var(--d-social); stroke-width: 2; }

/* Members */
.circle-members { list-style: none; margin: 0; padding: 0; }
.circle-members li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.circle-members li:last-child { border-bottom: 0; }
.circle-members__name { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.circle-members__meta { grid-column: 1; font-size: 13px; color: var(--ink-subtle); }
.circle-members__actions { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 8px; }
.circle-badge { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; margin-left: 6px; vertical-align: 2px; }

/* Owner */
.circle-owner h3 { font-size: 16px; margin: 22px 0 8px; }
.circle-owner h3:first-of-type { margin-top: 0; }
.circle-invite { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 16px; }
.circle-invite__out { display: flex; gap: 8px; flex: 1 1 320px; }
.circle-invite__out[hidden] { display: none; }
.circle-invite__out input { flex: 1; min-width: 0; font: inherit; font-size: 14px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }

/* Dashboard entry card */
.circles-entry { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; }
.circles-entry h2 { margin-bottom: 6px; }
.circles-entry p { margin: 0; color: var(--ink-soft); line-height: 1.55; }
.circles-entry__icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--card)); }

@media (max-width: 760px) {
  .circle-compare__grid { grid-template-columns: 1fr; }
  .circles-entry { grid-template-columns: 1fr; }
  .circles-entry__icon { display: none; }
  .circles-form--row, #focusForm { grid-template-columns: 1fr; }
  .circles-form--row .btn { justify-self: start; }
  .circle-members li { grid-template-columns: 1fr; }
  .circle-members__actions { grid-column: 1; grid-row: auto; margin-top: 6px; }
  .circle-headline__value { font-size: 28px; }
}

/* Page lists get an indent from the article styles; the tile grid doesn't. */
.circles-page .circle-tiles,
.circles-page .circle-members { padding-left: 0; margin-left: 0; }
.circles-page .circle-tiles > li,
.circles-page .circle-members > li { margin-left: 0; }
.circles-page .circle-tiles > li::before,
.circles-page .circle-members > li::before { content: none; }
