/* Page styles: study-timer. Scoped under <main class="page">. */
.page {
  --bg: #0E1320;
  --panel: #171E2E;
  --edge: #232C40;
  --text: #E6EAF2;
  --body: #B4BDCD;
  --muted: #8D97AB;
  --t: #4FC3F7;
  --e: #FFC247;   /* Education color */
  --radius: 12px;
}
.page {
  background: var(--bg);
  color: var(--body);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
:where(.page) a { color: inherit; text-decoration: none; }
:where(.page) a:focus-visible, :where(.page) button:focus-visible { outline: 2px solid var(--e); outline-offset: 3px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 16px 20px 20px; }

/* ---------- Header row ---------- */
.top { display: flex; align-items: center; gap: 16px 24px; margin-bottom: 20px; }
.title { display: flex; align-items: center; gap: 12px; flex: none; }
.flap {
  position: relative;
  width: 40px; height: 48px;
  border-radius: 8px;
  background: linear-gradient(180deg, #1B2335 0%, var(--panel) 50%, #141A28 50%, #121827 100%);
  border: 1px solid var(--edge);
  display: grid; place-items: center;
}
.flap::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0,0,0,0.6); }
.flap span { color: var(--e); font-weight: 900; font-size: 34px; line-height: 1; }
.crumb { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 2px; }
.title h1 { color: var(--text); font-size: 24px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; }

.strip {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: color-mix(in srgb, var(--e) 8%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--e) 35%, var(--edge));
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color .2s ease;
}
.strip:hover { border-color: var(--e); }
.pill {
  flex: none; background: var(--e); color: #1A1405;
  font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px;
}
.strip-text { flex: 1; min-width: 0; }
.strip-cta { flex: none; color: var(--e); font-weight: 600; white-space: nowrap; }
.arrow { display: inline-block; transition: transform .2s ease; }
.strip:hover .arrow { transform: translateX(3px); }

/* ---------- Main row: timer + how it works ---------- */
.main { display: grid; grid-template-columns: 1.1fr 1fr; gap: 14px; margin-bottom: 18px; }
.panel {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.label {
  color: var(--text);
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 12px;
}

/* Timer */
.timer { display: flex; flex-direction: column; align-items: center; text-align: center; }
.modes {
  display: inline-flex; gap: 4px; padding: 3px;
  background: var(--bg); border: 1px solid var(--edge); border-radius: 999px;
  margin-bottom: 10px;
}
.modes button {
  font: inherit; font-size: 13px; font-weight: 600;
  color: var(--muted); background: transparent; border: 0;
  padding: 5px 14px; border-radius: 999px; cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.modes button[aria-pressed="true"] { background: var(--e); color: #1A1405; }
.timer.break .modes button[aria-pressed="true"] { background: var(--t); color: #06202C; }
.display {
  color: var(--text);
  font-size: 72px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 4px 0 12px;
}
.timer.break .display { color: var(--t); }
.bar { width: 100%; max-width: 360px; height: 4px; background: var(--bg); border-radius: 999px; overflow: hidden; margin-bottom: 14px; }
.bar span { display: block; height: 100%; width: 0; background: var(--e); transition: width .5s linear; }
.timer.break .bar span { background: var(--t); }
.controls { display: flex; gap: 10px; margin-bottom: 10px; }
.controls button {
  font: inherit; font-size: 14px; font-weight: 600;
  padding: 8px 18px; border-radius: 8px; cursor: pointer;
  transition: filter .2s ease, border-color .2s ease;
}
.primary { background: var(--e); color: #1A1405; border: 1px solid var(--e); min-width: 96px; }
.primary:hover { filter: brightness(1.08); }
.ghost { background: transparent; color: var(--text); border: 1px solid var(--edge); }
.ghost:hover { border-color: var(--e); }
.status { color: var(--muted); font-size: 13px; min-height: 19px; }
.status strong { color: var(--text); font-weight: 600; }

/* How it works */
.steps { list-style: none; counter-reset: step; display: grid; gap: 8px; margin-bottom: 14px; }
.steps li { counter-increment: step; display: flex; align-items: baseline; gap: 10px; }
.steps li::before {
  content: counter(step);
  flex: none;
  width: 22px; height: 22px;
  display: inline-grid; place-items: center;
  border-radius: 6px;
  background: color-mix(in srgb, var(--e) 15%, var(--bg));
  color: var(--e);
  font-size: 12px; font-weight: 700;
  transform: translateY(-1px);
}
.steps strong { color: var(--text); font-weight: 600; }
.why { color: var(--muted); font-size: 13px; border-top: 1px solid var(--edge); padding-top: 12px; }
.why strong { color: var(--body); }

/* ---------- Tips ---------- */
.tips-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.tips-head h2 { color: var(--text); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; }
.tips-head .rule { flex: 1; height: 1px; background: var(--edge); align-self: center; }
.tips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tip {
  background: color-mix(in srgb, var(--panel) 75%, var(--bg));
  border: 1px solid var(--edge);
  border-left: 3px solid var(--e);
  border-radius: 10px;
  padding: 10px 14px;
}
.tip h3 { color: var(--text); font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.tip p { color: var(--muted); font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  .arrow, .strip, .bar span, .modes button { transition: none; }
}
@media (max-width: 1000px) {
  .tips { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .top { flex-direction: column; align-items: stretch; }
  .main { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .wrap { padding: 14px 14px 18px; }
  .strip { flex-wrap: wrap; gap: 6px 10px; }
  .strip-text { flex-basis: 100%; order: 2; }
  .strip-cta { order: 3; }
  .display { font-size: 56px; }
  .tips { grid-template-columns: 1fr; gap: 10px; }
}
