/* Interface stage (2026-10-28): the layout of the new shell, phone first. Colours, font, sizes and corners come ONLY from triflow-theme.css
   (var(--tf-...)); no colour value is written here. */
body{background:var(--tf-bg);color:var(--tf-text);font-family:var(--tf-font);font-size:var(--tf-text-size)}
.tf-shell{display:block;min-height:100vh;padding-bottom:calc(var(--tf-touch) + 34px)}
/* the identity bar */
.tf-bar{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:12px;padding:8px 16px;background:var(--tf-bar-bg);color:var(--tf-bar-text);border-bottom:0;min-height:56px}
.tf-bar .product-brand{display:flex;align-items:center;gap:8px;color:var(--tf-bar-text);font-size:18px;font-weight:700;text-decoration:none}
.tf-bar .product-brand img{width:32px;height:32px;border-radius:8px;background:var(--tf-bar-mark)}
.tf-bar-line{width:1px;align-self:stretch;margin:6px 0;background:var(--tf-bar-line)}
.tf-club-logo{display:inline-block;width:56px;height:36px;border-radius:6px}
.tf-context{margin-left:auto;display:flex;flex-direction:column;align-items:flex-end;min-height:var(--tf-touch);padding:4px 12px;border:1px solid var(--tf-bar-line);border-radius:var(--tf-radius-button);background:transparent;color:var(--tf-bar-text);font:inherit;cursor:pointer;text-align:right}
.tf-context:disabled{cursor:default;border-color:transparent}
.tf-context:not(:disabled)::after{content:"▾";font-size:11px;opacity:.8}
.tf-ctx-role{font-size:var(--tf-label);opacity:.85}.tf-ctx-who{font-weight:700;font-size:14px}
.tf-bar .product-context-picker,.tf-bar .product-identity,.tf-bar #product-child-picker,.tf-bar #product-coach-picker{display:none!important}
.tf-bar .product-action{margin:0;padding:6px 10px;min-height:36px;border-radius:10px;background:transparent;color:var(--tf-bar-text);border:1px solid var(--tf-bar-line);font-size:var(--tf-label);font-weight:500}
.tf-bar #product-logout-all{display:none}
/* the bottom navigation (phone); on a wide screen it becomes a row under the identity bar */
.tf-nav{position:fixed;left:0;right:0;bottom:0;z-index:20;display:grid;grid-auto-flow:column;grid-auto-columns:1fr;background:var(--tf-surface);border-top:1px solid var(--tf-border);padding:4px 4px calc(4px + env(safe-area-inset-bottom))}
.tf-nav-item{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:calc(var(--tf-touch) + 8px);border:0;border-radius:var(--tf-radius-button);background:transparent;color:var(--tf-text-2);font:inherit;font-size:var(--tf-label);font-weight:500;cursor:pointer}
.tf-nav-item[aria-current=page]{background:var(--tf-black);color:var(--tf-on-black);font-weight:700}
.tf-icon{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
/* the zone head: the title, the "?" help, the person chips, the tabs, the first-use balloon */
#tf-zone-head{max-width:1040px;margin:0 auto;padding:16px 16px 0}
#tf-zone-head:empty{display:none}
.tf-zone-top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.tf-zone-title{font-size:var(--tf-title-1);font-weight:700;margin:0}
.tf-help{width:var(--tf-touch);height:var(--tf-touch);border-radius:50%;border:1px solid var(--tf-border);background:var(--tf-surface);color:var(--tf-text);font:inherit;font-weight:700;font-size:18px;cursor:pointer}
.tf-chips,.tf-tabs{display:flex;gap:8px;overflow-x:auto;padding:12px 0 4px;scrollbar-width:none}
.tf-chip,.tf-tab{flex:0 0 auto;min-height:var(--tf-touch);padding:8px 14px;border-radius:999px;border:1px solid var(--tf-border);background:var(--tf-surface);color:var(--tf-text);font:inherit;font-size:14px;cursor:pointer;white-space:nowrap}
.tf-tabs>.tf-tab,.tf-chips>.tf-chip{width:auto}   /* app.css stretches every button on a phone; the switches stay side by side ("Viitoare" / "Trecute", 28.10) */
.tf-chip[aria-pressed=true],.tf-tab[aria-selected=true]{background:var(--tf-black);color:var(--tf-on-black);border-color:var(--tf-black);font-weight:700}
.tf-for{margin:8px 0 0;color:var(--tf-text-2);font-size:14px}
.tf-balloon{margin:12px 0 0;padding:12px 14px;border-radius:var(--tf-radius-card);background:var(--tf-indigo-soft);color:var(--tf-text);border:1px solid var(--tf-border-soft)}
.tf-balloon p{margin:0 0 8px}.tf-balloon-row{display:flex;gap:8px;flex-wrap:wrap}
/* buttons of the new screens */
.tf-primary,.tf-secondary,.tf-link,.tf-card-button,.tf-attention-button{min-height:var(--tf-touch);padding:10px 16px;border-radius:var(--tf-radius-button);font:inherit;font-weight:700;cursor:pointer}
.tf-primary{background:var(--tf-gold);color:var(--tf-on-gold);border:0}
.tf-secondary{background:var(--tf-surface);color:var(--tf-text);border:1px solid var(--tf-border)}
.tf-link{background:transparent;color:var(--tf-indigo);border:0;padding-left:0}
.tf-card-button{display:block;width:100%;margin:8px 0;text-align:left;background:var(--tf-surface);color:var(--tf-text);border:1px solid var(--tf-border);border-radius:var(--tf-radius-card)}
.tf-attention-button{display:block;width:100%;margin:8px 0;text-align:left;background:var(--tf-warn-bg);color:var(--tf-warn-text);border:1px solid var(--tf-warn-border)}
.tf-muted{color:var(--tf-text-2)}
/* the sheets (help, guides, the choice of the context) */
.tf-sheet-back{position:fixed;inset:0;z-index:40;background:var(--tf-scrim);display:flex;align-items:flex-end;justify-content:center}
.tf-sheet{width:min(560px,100%);max-height:85vh;overflow:auto;background:var(--tf-surface);color:var(--tf-text);border-radius:var(--tf-radius-card) var(--tf-radius-card) 0 0;padding:16px 16px calc(16px + env(safe-area-inset-bottom))}
.tf-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.tf-sheet-head h2{font-size:var(--tf-title-2);margin:0}
.tf-sheet-close{min-height:var(--tf-touch);padding:8px 14px;border-radius:var(--tf-radius-button);border:1px solid var(--tf-border);background:var(--tf-surface);font:inherit;cursor:pointer}
.tf-guide{padding-left:22px}.tf-guide li{margin:10px 0}.tf-guide p{margin:0 0 4px}
.tf-ctx-group h3{margin:16px 0 6px;font-size:14px;color:var(--tf-text-2)}
.tf-ctx-item{display:block;width:100%;min-height:var(--tf-touch);margin:6px 0;padding:10px 14px;text-align:left;border-radius:var(--tf-radius-button);border:1px solid var(--tf-border);background:var(--tf-surface);color:var(--tf-text);font:inherit;cursor:pointer}
.tf-ctx-item[aria-pressed=true]{background:var(--tf-black);color:var(--tf-on-black);border-color:var(--tf-black)}
.tf-me-footer{display:flex;gap:8px;flex-wrap:wrap;margin-top:24px;padding-top:16px;border-top:1px solid var(--tf-border-soft)}
/* the content area of the shell */
.tf-shell #product-content{max-width:1040px;margin:0 auto;padding:16px}
.tf-shell #product-content>h1:first-child{font-size:var(--tf-title-2)}
.tf-shell .product-card{border-radius:var(--tf-radius-card);border-top-width:3px;padding:18px}
.tf-shell .product-action,.tf-shell #product-retry{border-radius:var(--tf-radius-button)}
.tf-shell button{min-height:36px}
/* the drawings */
.tf-week{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;margin:12px 0}
.tf-week-day{display:flex;flex-direction:column;align-items:center;gap:2px;min-height:64px;padding:6px 2px;border-radius:var(--tf-radius-button);border:1px solid var(--tf-border-soft);background:var(--tf-surface);color:var(--tf-text);font:inherit;cursor:pointer}
.tf-week-day.is-today{background:var(--tf-black);color:var(--tf-on-black);border-color:var(--tf-black)}
.tf-week-name{font-size:11px;text-transform:capitalize}.tf-week-num{font-size:16px;font-weight:700}
.tf-week-dots{display:flex;gap:3px;min-height:10px}.tf-week-star{color:var(--tf-gold);font-size:14px;line-height:1}
.tf-dot{width:9px;height:9px;border-radius:50%;background:var(--tf-dot)}
.tf-dot.is-planned{background:transparent;border:2px solid var(--tf-dot);width:9px;height:9px}
.tf-dot.is-attention{outline:2px solid var(--tf-warn-border);outline-offset:1px}
.tf-week-line{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:4px 0 8px}.tf-week-line p{margin:0;font-weight:700}
.tf-profile{display:block;width:100%;max-width:420px;height:56px;margin:6px 0}
.tf-ring-block{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin:8px 0}.tf-ring{width:120px;height:120px;flex:0 0 auto}
.tf-figure{margin:12px 0}.tf-figure figcaption{font-size:var(--tf-label);color:var(--tf-text-2)}
.tf-bars,.tf-laps{display:block;width:100%;max-width:520px;height:auto}
.tf-stacked{display:grid;gap:4px;margin:12px 0;max-width:520px}.tf-stacked-title{font-weight:700;font-size:14px}
.tf-stacked-bar{display:flex;height:16px;border-radius:8px;overflow:hidden;background:var(--tf-border-soft)}
.tf-stacked-part{display:block;background:var(--tf-indigo);opacity:var(--tf-shade)}
.tf-stacked-legend{font-size:var(--tf-label);color:var(--tf-text-2)}
.tf-adapt>summary{font-weight:700;cursor:pointer}
/* Echipă */
.tf-attention{margin:0 0 16px;padding:12px 14px;border-radius:var(--tf-radius-card);background:var(--tf-warn-bg);border:1px solid var(--tf-warn-border);color:var(--tf-warn-text)}
.tf-attention h3{margin:0 0 6px}
.tf-team{display:grid;gap:6px;margin:12px 0}
.tf-team-row{display:grid;grid-template-columns:minmax(110px,1fr) 2fr;gap:8px;align-items:center;padding:6px;border-radius:var(--tf-radius-button);background:var(--tf-surface);border:1px solid var(--tf-border-soft)}
.tf-team-name{min-height:var(--tf-touch);text-align:left;border:0;background:transparent;font:inherit;font-weight:700;color:var(--tf-text);cursor:pointer}
.tf-team-days{display:grid;grid-template-columns:repeat(7,1fr);gap:3px}
.tf-team-cell{display:flex;gap:2px;justify-content:center;align-items:center;min-height:28px;border-radius:8px;background:var(--tf-bg)}
.tf-team-cell.is-today{outline:2px solid var(--tf-gold)}
.tf-guide-list{display:grid;gap:4px}
/* a wide screen: the navigation goes up, under the identity bar */
@media(min-width:900px){
 .tf-shell{padding-bottom:0}
 .tf-nav{position:sticky;top:56px;bottom:auto;display:flex;justify-content:center;gap:4px;border-top:0;border-bottom:1px solid var(--tf-border);padding:6px}
 .tf-nav-item{flex-direction:row;gap:8px;padding:8px 18px;font-size:14px}
 .tf-sheet-back{align-items:center}.tf-sheet{border-radius:var(--tf-radius-card)}
}
@media(max-width:420px){.tf-bar .product-brand strong{font-size:16px}.tf-club-logo{width:36px}}
/* the older stylesheet styles #product-nav, .product-top and every button with selectors stronger than a class: the shell's own places win here */
#product-nav.tf-nav{position:fixed;left:0;right:0;bottom:0;top:auto;z-index:20;display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:2px;flex-wrap:nowrap;background:var(--tf-surface);border-top:1px solid var(--tf-border);border-bottom:0;padding:4px 4px calc(4px + env(safe-area-inset-bottom))}
#product-nav.tf-nav:empty{display:none}
#product-nav .tf-nav-item{width:auto;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:calc(var(--tf-touch) + 8px);padding:4px 2px;border:0;border-radius:var(--tf-radius-button);background:transparent;color:var(--tf-text-2);text-align:center;font-size:var(--tf-label)}
#product-nav .tf-nav-item[aria-current=page]{background:var(--tf-black);color:var(--tf-on-black);border:0}
.tf-shell header.tf-bar{display:flex;flex-wrap:nowrap;align-items:center;gap:10px;min-height:56px;padding:8px 16px;background:var(--tf-bar-bg);box-shadow:none;border:0}
.tf-shell header.tf-bar button{width:auto;min-height:36px;text-align:right}
.tf-shell header.tf-bar .product-action{white-space:nowrap;padding:6px 8px;font-size:11px}
#tf-zone-head button{width:auto;flex:0 0 auto;text-align:center}
#tf-zone-head .tf-help{width:var(--tf-touch);padding:0}
.tf-sheet button.tf-ctx-item,.tf-sheet button.tf-card-button{width:100%;text-align:left}
.tf-sheet .tf-sheet-close,.tf-sheet .tf-link,.tf-balloon button{width:auto}
#product-content .tf-week-day{width:auto;text-align:center;padding:6px 2px}
#product-content .tf-team-name{width:auto}
#product-content .tf-team-row button.tf-team-name{text-align:left}
@media(min-width:900px){
 #product-nav.tf-nav{position:sticky;top:56px;bottom:auto;display:flex;justify-content:center;border-top:0;border-bottom:1px solid var(--tf-border);padding:6px}
 #product-nav .tf-nav-item{flex-direction:row;gap:8px;padding:8px 18px;font-size:14px}
}
/* a long name of the person stays on one line in the identity bar (the full name is in the zone head and in the choice window) */
.tf-shell header.tf-bar .tf-context{min-width:0;flex:0 1 auto;max-width:60%;overflow:hidden}
.tf-shell header.tf-bar .tf-ctx-role,.tf-shell header.tf-bar .tf-ctx-who{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tf-shell header.tf-bar .product-brand{flex:0 0 auto}
.tf-shell header.tf-bar .tf-club-logo{flex:0 1 56px;min-width:0}
/* the choice of the week stays on one or two short rows on the phone */
.tf-shell #product-content .product-week-nav{display:flex;flex-wrap:wrap;gap:6px;align-items:end}
.tf-shell #product-content .product-week-nav button{width:auto;flex:1 1 28%;min-height:var(--tf-touch);padding:6px 8px;font-size:13px;text-align:center}
.tf-shell #product-content .product-week-nav label{flex:1 1 55%}
/* stage of corrections (2026-10-28): Benchmark-uri - the band of the work pace, the rows with signs */
.tf-band{display:block;width:100%;max-width:520px;height:auto;margin:6px 0}
.tf-bench-row{display:grid;gap:4px;padding:10px 12px;margin:8px 0;border:1px solid var(--tf-border-soft);border-radius:var(--tf-radius-button);background:var(--tf-surface)}
.tf-signs{display:flex;gap:6px;flex-wrap:wrap}
.tf-sign{display:inline-block;padding:2px 10px;border-radius:var(--tf-radius-badge);font-size:var(--tf-label);font-weight:700;background:var(--tf-border-soft);color:var(--tf-text)}
.tf-sign.is-bench{background:var(--tf-gold-soft);color:var(--tf-on-gold-soft)}
.tf-sign.is-test{background:var(--tf-indigo-soft);color:var(--tf-indigo)}
.tf-sign.is-watch{background:var(--tf-ok-soft);color:var(--tf-ok)}
.tf-sign.is-race{background:var(--tf-black);color:var(--tf-on-black)}
/* stage of corrections (2026-10-28): threshold chart, Metodologie groups, the guided path, the child's step icons */
.tf-threshold{display:block;width:100%;max-width:520px;height:auto}
.tf-method-groups{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:10px;margin:12px 0 20px}
.tf-method-group{padding:14px;border-radius:var(--tf-radius-card);border:1px solid var(--tf-border-soft);background:var(--tf-surface)}
.tf-method-group h3{margin:0 0 4px}.tf-method-version{font-weight:700;color:var(--tf-indigo);margin:0 0 4px}
.tf-child-path{margin:12px 0;padding:10px 14px;border-radius:var(--tf-radius-card);background:var(--tf-gold-soft);color:var(--tf-on-gold-soft)}
.tf-child-path summary{font-weight:700;cursor:pointer;min-height:var(--tf-touch);display:flex;align-items:center}
.tf-steps{display:flex;gap:6px;flex-wrap:wrap;padding:0;list-style:none}.tf-steps li{padding:4px 10px;border-radius:var(--tf-radius-badge);background:var(--tf-surface);color:var(--tf-text-2);font-size:var(--tf-label)}
.tf-steps li.is-current{background:var(--tf-black);color:var(--tf-on-black)}.tf-steps li.is-done{background:var(--tf-ok-soft);color:var(--tf-ok)}
.tf-highlight{outline:3px solid var(--tf-gold);outline-offset:4px;border-radius:var(--tf-radius-card)}
.tf-step-icon{display:inline-block;margin-right:6px;font-size:18px}
/* stage of corrections and competitions (2026-10-28): the competitions */
.tf-comp-row{display:flex;justify-content:space-between;align-items:center;gap:12px;width:100%;min-height:var(--tf-touch);margin:8px 0;padding:12px 14px;text-align:left;border:1px solid var(--tf-border-soft);border-radius:var(--tf-radius-card);background:var(--tf-surface);color:var(--tf-text);font:inherit;cursor:pointer}
.tf-comp-main{display:grid;gap:2px}.tf-comp-places{font-weight:700;color:var(--tf-indigo)}
.tf-comp-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.tf-comp-grid div{display:grid;gap:2px;padding:10px;border-radius:var(--tf-radius-button);background:var(--tf-bg)}.tf-comp-grid strong{font-size:var(--tf-title-2)}
.tf-comp-day{border-left:4px solid var(--tf-gold)!important}
.tf-comp-question summary{font-weight:700;cursor:pointer;min-height:var(--tf-touch);display:flex;align-items:center}
.tf-legs{display:grid;gap:6px}.tf-leg{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.tf-team-race{font-size:12px;line-height:1}
#tf-zone-head button.tf-link,#product-content .tf-link{width:auto}
/* v0.1.1 (4): the date picker and 'Vezi săptămâna' on one line, the same height */
.product-week-nav{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px}.product-week-nav label{display:flex;flex-direction:column;gap:4px;margin:0}.product-week-nav input,.product-week-nav button{min-height:var(--tf-touch);height:var(--tf-touch);margin:0;box-sizing:border-box}
