/* The rebuilt /you (Profile) and /legal pages' own sheet (board 07-account-nav.html #you and #delete). Shared parts
   (tokens, bar, dock, pictures, the section head, buttons, the dot-matrix number) are in rb.css; the delete dialog's
   look is rb-sheets.css over today's sheet markup. Sizes are in rem so 200% text grows every part. */

/* ---- Profile: one column, the board's 640px on a computer, with the side list beside it ---- */
.rb-you #rb-main { display: block; }
.rb-y-col { display: grid; gap: 26px; padding-top: 6px; max-width: 640px; margin: 0 auto; }
.rb-y-side { display: none; }
.rb-y-top h1, .rb-lg h1 { font: 700 1.75rem/1.1 var(--head); letter-spacing: -.025em; }
.rb-y-who { display: flex; gap: 12px; align-items: center; margin-top: 10px; font-size: .875rem; color: var(--muted); min-width: 0; }
.rb-y-who > span:last-child { min-width: 0; display: grid; overflow-wrap: anywhere; }
.rb-y-who b { color: var(--fg); font-weight: 600; font-size: .9375rem; }
.rb-y-av { width: 42px; height: 42px; flex: none; border-radius: 50%; background: linear-gradient(135deg, #6d5a4c, #2f2925); display: grid; place-items: center; font: 600 .9375rem var(--body); color: #f3e6dc; }
.rb-y-sec { display: grid; gap: 10px; scroll-margin-top: 16px; min-width: 0; }
.rb-y-sec > .rb-hd h2 { font-size: 1rem; }

/* the plan as an object */
.rb-y-plan { border-radius: 18px; padding: 18px 18px 16px; display: grid; gap: 14px; min-width: 0;
  background: linear-gradient(140deg, color-mix(in srgb, var(--sig) 16%, var(--surf)) 0%, var(--surf) 55%); border: 1px solid color-mix(in srgb, var(--sig) 28%, var(--line)); }
.rb-y-plan-warn { border-color: color-mix(in srgb, var(--dn) 50%, var(--line)); }
.rb-y-ph { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 8px 12px; }
.rb-y-nm { font: 700 1.75rem/1.05 var(--head); letter-spacing: -.02em; min-width: 0; overflow-wrap: anywhere; }
.rb-y-nm.rb-y-warn { font-size: 1.375rem; }
.rb-y-ct { margin-left: auto; text-align: right; display: grid; gap: 2px; justify-items: end; }
.rb-y-ct .px { font-size: 2.125rem; }
.rb-y-ct b { font: 600 1.125rem var(--body); color: var(--muted); }
.rb-y-ct > span:last-child { font-size: .75rem; color: var(--muted); }
.rb-y-slots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.rb-y-slot { height: 2.5rem; min-height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line); color: var(--faint); font-size: .875rem; }
.rb-y-slot-free { border-style: dashed; }
.rb-y-slot-n { display: none; }
.rb-y-v { flex: none; margin-left: auto; color: var(--muted); font-size: .84375rem; text-align: right; }
.rb-y-trust b { color: var(--fg); font-weight: 600; }
.rb-y-rn { font-size: .8125rem; color: var(--muted); line-height: 1.45; }

/* lists */
.rb-y-lst { border-top: 1px solid var(--line); }
.rb-y-li { display: flex; gap: 12px; align-items: center; min-height: 56px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .90625rem; min-width: 0; }
a.rb-y-li:hover b { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.rb-y-t { min-width: 0; flex: 1; display: grid; gap: 1px; }
.rb-y-t b { font-weight: 600; overflow-wrap: anywhere; }
.rb-y-t small { font-size: .78125rem; color: var(--muted); overflow-wrap: anywhere; }
.rb-y-ch { color: var(--faint); font-size: 1rem; flex: none; }
.rb-y-get { flex: none; font: 600 .8125rem var(--body); color: var(--sig); }
.rb-y-go b { color: var(--sig); }
.rb-y-warn, .rb-y-go.rb-y-warn b { color: var(--dn); }
.rb-y-ended .rb-pic { opacity: .5; }
.rb-y-ended b { color: var(--muted); }
.rb-y-seg { display: inline-flex; flex: none; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 3px; margin-left: auto; }
.rb-y-seg button { min-height: 40px; min-width: 56px; padding: 0 12px; border-radius: 7px; font-size: .8125rem; color: var(--muted); text-align: center; }
.rb-y-seg button[aria-pressed="true"] { background: var(--surf2); color: var(--fg); }
.rb-y-trust { display: flex; gap: 10px; font-size: .8125rem; line-height: 1.45; color: var(--muted); padding: 12px 14px; border-radius: 12px; background: var(--surf); }
.rb-y-trust svg { width: 18px; height: 18px; flex: none; margin-top: 1px; fill: none; stroke: var(--up); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.rb-y-fine { font-size: .78125rem; color: var(--faint); line-height: 1.45; }
.rb-y-plan + [data-rb="plan-acts"] { margin-top: -2px; }

/* leaving */
.rb-y-end { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.rb-y-del { font: 600 .875rem var(--body); color: var(--dn); min-height: 44px; padding: 0 6px; border-radius: 9px; }
.rb-y-del:hover { text-decoration: underline; text-underline-offset: 3px; }
/* the delete dialog (today's sheet markup): Delete everything is the quiet red one, an error line reads as one */
[data-rb="you-dialog"] [data-ref$="delete.go"] { background: none; border-color: transparent; color: var(--dn); }
[data-rb="you-dialog"] [data-ref$="delete.go"][disabled] { opacity: .55; cursor: default; }
[data-rb="you-dialog"] [data-ref$="delete.error"] { color: var(--dn); text-align: left; font-size: .8125rem; }

/* the server's billing lines (src/billing/page.ts), moved under the plan card by the client; in flow under the page without script */
#sweat-billing, #sweat-billing-notice { display: grid; gap: 8px; font-size: .8125rem; color: var(--muted); line-height: 1.45; max-width: 640px; margin: 0 auto; padding: 0 16px 12px; }
/* without script they stay under the page: the last of them clears the fixed dock */
body > :is(#sweat-billing, #sweat-billing-notice):last-of-type { padding-bottom: 112px; }
[data-rb="billing-slot"] :is(#sweat-billing, #sweat-billing-notice) { padding: 0; margin: 0; }
[data-rb="billing-slot"]:empty { display: none; }
#sweat-billing-notice p { border: 1px solid color-mix(in srgb, var(--dn) 40%, var(--line)); border-radius: 12px; padding: 10px 14px; color: var(--fg); }
:is(#sweat-billing, #sweat-billing-notice) .ybtn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 14px; margin: 0 6px 6px 0; border-radius: 9px; border: 1px solid var(--line); background: var(--surf); font: 600 .8125rem/1.2 var(--body); color: var(--fg); }
:is(#sweat-billing, #sweat-billing-notice) .ybtn:hover { background: var(--surf2); }

/* ---- /legal: Privacy and Terms, a reading column ---- */
.rb-lg { max-width: 680px; margin: 0 auto; padding-top: 6px; display: grid; gap: 14px; min-width: 0; }
.rb-lg-tabs { display: inline-flex; gap: 2px; justify-self: start; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.rb-lg-tabs a { min-height: 40px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 7px; font: 600 .8125rem var(--body); color: var(--muted); }
.rb-lg-tabs a[aria-current="page"] { background: var(--surf2); color: var(--fg); }
.rb-lg-dates { font-size: .8125rem; color: var(--muted); margin-top: -6px; }
.rb-lg-toc { border: 1px solid var(--line); border-radius: 12px; background: var(--surf); }
.rb-lg-toc summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; font: 600 .84375rem var(--body); cursor: pointer; list-style: none; }
.rb-lg-toc summary::-webkit-details-marker { display: none; }
.rb-lg-toc summary span { color: var(--faint); }
.rb-lg-toc[open] summary span { transform: rotate(180deg); }
.rb-lg-toc ul { padding: 0 14px 10px; display: grid; }
.rb-lg-toc li a { display: block; padding: 10px 0; min-height: 40px; font-size: .84375rem; color: var(--muted); border-top: 1px solid var(--line); }
.rb-lg-toc li a:hover { color: var(--fg); }
.rb-lg-body { display: grid; gap: 10px; font-size: .9375rem; line-height: 1.6; color: color-mix(in srgb, var(--fg) 82%, var(--muted)); overflow-wrap: anywhere; }
.rb-lg-body h2 { font: 700 1.125rem/1.25 var(--head); letter-spacing: -.01em; color: var(--fg); margin-top: 16px; scroll-margin-top: 16px; }
.rb-lg-body h2:focus { outline: none; }
.rb-lg-body b { color: var(--fg); font-weight: 600; }
.rb-lg-body ul { list-style: disc; padding-left: 1.25em; display: grid; gap: 6px; }
.rb-lg-body dl { margin: 0; display: grid; gap: 4px; }
.rb-lg-body dt { font-weight: 600; color: var(--fg); margin-top: 6px; }
.rb-lg-body dd { margin: 0; }
.rb-lg-ph { color: var(--sig); }
/* the short version: two boxes, then the real delete path */
.rb-lg-short { display: grid; gap: 10px; }
.rb-lg-short > h2 { text-transform: uppercase; letter-spacing: .08em; scroll-margin-top: 16px; }
.rb-lg-short > h2:focus { outline: none; }
.rb-lg-box { background: var(--surf); border-radius: 14px; padding: 14px 16px; display: grid; gap: 6px; align-content: start; font-size: .875rem; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.rb-lg-box > b { color: var(--fg); font-weight: 600; font-size: .90625rem; }
.rb-lg-box p b { color: var(--fg); font-weight: 600; }
.rb-lg-del { border-left: 2px solid var(--sig); padding: 6px 0 6px 14px; font-size: .875rem; color: var(--muted); }
.rb-lg-del b { color: var(--fg); font-weight: 600; }
.rb-lg-rail { display: none; }
.rb-lg-foot-x { display: block; padding: 2px 0; }
.rb-lg-foot { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .8125rem; color: var(--faint); }
.rb-lg-foot a { display: inline-block; padding: 12px 0; color: var(--muted); font-weight: 600; }
.rb-lg-foot a:hover { color: var(--fg); }

@media (min-width: 900px) {
  .rb-y-col { gap: 28px; padding-top: 26px; }
  .rb-y-top h1, .rb-lg h1 { font-size: 2.125rem; }
  .rb-y-plan { padding: 20px 22px; }
  .rb-y-slot[data-on] { display: flex; align-items: center; gap: 8px; padding: 0 10px; min-width: 0; font-size: .75rem; color: var(--muted); }
  .rb-y-slot-n { display: block; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rb-y-nm { font-size: 1.875rem; }
  .rb-lg { padding-top: 26px; }
  /* the side list of the four sections, beside the column while there is room for it */
  .rb-you-you #rb-main { position: relative; }
}
@media (min-width: 1100px) {
  /* the side list in its own column beside the 640px one, so large text wraps it and never lays it over the page */
  .rb-you-you #rb-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 640px) minmax(0, 1fr); column-gap: 24px; align-items: start; }
  .rb-y-col { grid-column: 2; width: 100%; }
  .rb-y-side { display: grid; gap: 2px; grid-column: 1; justify-self: start; max-width: 100%; margin-top: 96px; font-size: .84375rem; color: var(--muted); overflow-wrap: anywhere; }
  .rb-y-side a { padding: 8px 10px; border-radius: 8px; min-height: 36px; }
  .rb-y-side a:hover { background: var(--surf); color: var(--fg); }
}
@media (min-width: 1100px) {
  /* "On this page" beside the text, as the board's rail; the fold is the phone's */
  .rb-you-legal #rb-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 680px) minmax(0, 1fr); column-gap: 24px; align-items: start; }
  .rb-lg { grid-column: 2; width: 100%; }
  .rb-lg-rail { display: grid; gap: 2px; grid-column: 1; justify-self: start; max-width: 220px; position: sticky; top: 16px; margin-top: 96px; font-size: .8125rem; color: var(--muted); overflow-wrap: anywhere; }
  .rb-lg-rail > b { padding: 0 10px 6px; font: 600 .75rem var(--body); color: var(--faint); letter-spacing: .02em; }
  .rb-lg-rail a { display: block; padding: 7px 10px; border-radius: 8px; }
  .rb-lg-rail a:hover { background: var(--surf); color: var(--fg); }
  .rb-lg-toc { display: none; }
  .rb-lg-short { grid-template-columns: 1fr 1fr; }
  .rb-lg-short > h2, .rb-lg-del { grid-column: 1 / -1; }
}
@media (max-width: 359px) {
  .rb-y-slots { gap: 5px; }
  .rb-y-plan { padding: 16px 14px 14px; }
}
