﻿@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&display=swap');

:root {
  color-scheme: dark;
  --bg: #110f0d;
  --surface: #191612;
  --line: #383027;
  --text: #f6efe4;
  --muted: #bcb0a0;
  --gold: #ebba67;
  --dark: #21170b;
  --danger: #ffb6b0;
  font: 500 16px/1.65 Cairo, Tahoma, system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--bg); }
a { color: var(--gold); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .58; cursor: wait; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
[dir=ltr], input[type=number], input[type=date] { text-align: start; }
.shell { width: min(1150px, calc(100% - 2rem)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); }
.site-header .shell, .brand, .row, .section-head, .pager {
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
}
.site-header .shell, .row, .section-head, .pager { justify-content: space-between; }
.site-header .shell { min-height: 76px; padding-block: .65rem; }
.brand { color: var(--text); text-decoration: none; font-weight: 900; letter-spacing: .055em; }
.mark {
  display: grid; place-items: center; width: 43px; aspect-ratio: 1;
  border: 1px solid #a97f42; color: var(--gold); border-radius: 11px; font: 800 1rem system-ui;
}
main.shell { padding-block: 2rem 4.5rem; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.05rem, 6vw, 4.1rem); line-height: 1.13; font-weight: 900; }
h2 { font-size: clamp(1.23rem, 3vw, 1.65rem); line-height: 1.35; }
h3 { font-size: 1.1rem; overflow-wrap: anywhere; }
.muted, small { color: var(--muted); }
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 243px; display: grid; align-items: center;
  padding: clamp(1.35rem, 5vw, 3.4rem);
  border-radius: 22px; border: 1px solid #4a3722;
  background: radial-gradient(ellipse at 10% 14%, #5d3b19 0%, transparent 55%), #1e1811;
}
.hero::before {
  content: ''; z-index: -1; position: absolute; inset: 0;
  background: repeating-linear-gradient(125deg, transparent 0 28px, #ead4ad12 29px 30px);
  mask-image: linear-gradient(90deg, black 0, transparent 76%);
}
.hero::after {
  content: 'EH'; position: absolute; inset-inline-end: 4%; top: 50%; translate: 0 -50%;
  z-index: -1; color: #f5c67516; font: 900 clamp(8rem, 25vw, 19rem)/1 system-ui;
}
.hero p { max-width: 43rem; margin-block-start: .7rem; }
.hero h1 em { font-style: normal; color: var(--gold); }
.panel, .stat { border: 1px solid var(--line); background: var(--surface); border-radius: 16px; padding: 1.15rem; }
.auth-panel { margin: 1.25rem auto 0; max-width: 520px; padding: clamp(1.25rem, 4vw, 2rem); }
.auth-panel p { margin-block: .55rem 1rem; }
.auth-panel .btn { width: 100%; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.summary, .section { margin-block-start: 1.35rem; }
.metric { display: block; color: var(--gold); font-size: clamp(1.35rem, 4vw, 2.25rem); font-weight: 800; }
.section-head { margin-block-end: .9rem; }
.days { display: flex; gap: .5rem; overflow-x: auto; margin-block-end: .85rem; padding-block: 3px; }
.tab, .btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 42px;
  padding: .44rem .95rem; gap: .4rem; border-radius: 9px; border: 1px solid transparent;
  text-decoration: none; font-weight: 800; white-space: nowrap;
}
.btn, .tab[aria-pressed=true] { color: var(--dark); background: var(--gold); }
.tab, .btn.secondary { background: #211d17; color: var(--text); border-color: #494035; }
.btn.danger { background: #301c1a; color: var(--danger); border-color: #774740; }
.btn.small { min-height: 36px; padding: .34rem .7rem; font-size: .83rem; }
.btn.google { background: #f8f4eb; color: #20170d; }
.google b { color: #2859b5; font: 900 1.1rem system-ui; }
.workouts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.workout h3 { color: var(--gold); }
.workout form { margin-block-start: .88rem; }
.set-grid { display: grid; grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr)); gap: .55rem; align-items: end; }
.field { display: grid; gap: .26rem; color: var(--muted); font-size: .87rem; }
.input {
  width: 100%; min-width: 0; min-height: 42px; padding: .37rem .65rem; border-radius: 8px;
  background: var(--bg); color: var(--text); border: 1px solid #4d4235;
}
.set-actions, .auth-panel form, .invite-form { display: grid; gap: .6rem; }
.set-actions { margin-block-start: .7rem; grid-template-columns: auto 1fr; align-items: center; }
.invite-form { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.notice { background: #201a12; border: 1px solid #59452a; border-radius: 8px; padding: .6rem .75rem; margin-block-start: .65rem; overflow-wrap: anywhere; }
.error { color: var(--danger); }
.success { color: #b6edc5; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 610px; }
th, td { text-align: start; padding: .65rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--gold); font-size: .83rem; }
td { font-size: .92rem; }
.pager { margin-block-start: .85rem; }
.filter { width: min(100%, 41ch); }
.code { display: block; direction: ltr; text-align: center; color: var(--gold); padding-block: .5rem; }
.site-footer { padding: 1rem 0 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
@media (max-width: 820px) { .workouts { grid-template-columns: 1fr; } }
@media (max-width: 480px) {
  .shell { width: calc(100% - 1.2rem); }
  .hero { min-height: 210px; }
  .grid { grid-template-columns: 1fr; gap: .5rem; }
  .stat { display: flex; align-items: center; justify-content: space-between; padding: .6rem .85rem; }
  .set-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .invite-form { grid-template-columns: 1fr; }
}
