/* Mock interview page (study/interview/). Colors come from the page's :root and study/theme.css. */
*{ margin:0; padding:0; box-sizing:border-box; }
body{ background:var(--bg); color:var(--text); font-family:var(--font-body); line-height:1.6; }
a{ color:inherit; }
[hidden]{ display:none !important; }
.wrap{ max-width:760px; margin:0 auto; padding:60px 28px 100px; }
.back{ font-family:var(--font-mono); font-size:12.5px; color:var(--accent); text-decoration:none; display:inline-block; margin-bottom:36px; }
h1{ font-family:var(--font-display); font-size:clamp(30px,5vw,44px); font-weight:700; margin-bottom:8px; }
.sub{ color:var(--text-muted); margin-bottom:32px; }
.iv-h2{ font-family:var(--font-display); font-size:20px; margin:48px 0 14px; }
.iv-muted{ color:var(--text-muted); font-size:14px; }
.iv-empty{ color:var(--text-dim); font-family:var(--font-mono); font-size:13px; }

.iv-btn{ font:600 13.5px/1 var(--font-display); padding:10px 16px; border-radius:8px; border:1px solid var(--panel-border);
  background:var(--panel); color:var(--text); cursor:pointer; }
.iv-btn:hover{ border-color:var(--accent); }
.iv-btn:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
.iv-btn.primary{ background:var(--accent); border-color:var(--accent); color:var(--bg); }
.iv-btn.primary:hover{ filter:brightness(1.08); }
.iv-btn.danger{ color:var(--hard); }
.iv-btn.danger:hover{ border-color:var(--hard); }
.iv-btn.big{ font-size:16px; padding:14px 26px; }
.iv-btn.on{ border-color:var(--accent); color:var(--accent); }
/* Square icon button, same size as the theme toggle next to it. */
.iv-icon-btn{ width:34px; height:34px; padding:0; display:inline-flex; align-items:center; justify-content:center; flex-shrink:0;
  border-radius:8px; border:1px solid var(--panel-border); background:var(--panel); color:var(--text); cursor:pointer; }
.iv-icon-btn:hover{ border-color:var(--accent); color:var(--accent); }
.iv-icon-btn:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
.iv-icon-btn svg{ width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.iv-run.side-closed .iv-chev{ transform:rotate(180deg); transform-origin:14.5px 12px; }

/* start screen: content rises in on load, cards lift on hover */
@keyframes iv-rise{ from{ opacity:0; transform:translateY(12px); } to{ opacity:1; transform:none; } }
@keyframes iv-glow{ 0%,100%{ box-shadow:0 0 0 0 color-mix(in srgb, var(--accent) 35%, transparent); } 50%{ box-shadow:0 0 0 6px transparent; } }
.iv-start > *{ animation:iv-rise .55s cubic-bezier(.2,.7,.2,1) both; }
.iv-start > :nth-child(2){ animation-delay:.04s; } .iv-start > :nth-child(3){ animation-delay:.08s; }
.iv-start > :nth-child(n+4){ animation-delay:.14s; }

.iv-format{ display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:12px; margin-bottom:28px; }
.iv-format div{ position:relative; overflow:hidden; background:var(--panel); border:1px solid var(--panel-border); border-radius:12px;
  padding:16px 16px 18px; font-weight:600; transition:transform .25s cubic-bezier(.2,.7,.2,1), border-color .25s;
  animation:iv-rise .55s cubic-bezier(.2,.7,.2,1) both; animation-delay:calc(.12s + var(--i, 0) * .07s); }
.iv-format div::before{ content:""; position:absolute; inset:0 0 auto; height:2px; background:linear-gradient(90deg, var(--accent), transparent);
  transform:scaleX(0); transform-origin:left; transition:transform .35s; }
.iv-format div:hover{ transform:translateY(-3px); border-color:color-mix(in srgb, var(--accent) 60%, var(--panel-border)); }
.iv-format div:hover::before{ transform:scaleX(1); }
.iv-format small{ display:block; font-weight:400; color:var(--text-muted); font-size:13px; margin-top:4px; }
.iv-f-icon{ position:absolute; top:14px; right:14px; width:20px; height:20px; fill:none; stroke:var(--text-dim); stroke-width:1.7;
  stroke-linecap:round; stroke-linejoin:round; transition:stroke .25s; }
.iv-format div:hover .iv-f-icon{ stroke:var(--accent); }
.iv-num{ display:block; font-family:var(--font-display); font-size:30px; line-height:1.2; color:var(--accent); margin-bottom:2px; }
#iv-start-btn{ animation:iv-rise .55s cubic-bezier(.2,.7,.2,1) .3s both, iv-glow 2.4s ease-in-out 1s infinite; }
.iv-resume{ display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap;
  background:var(--panel); border:1px solid var(--accent); border-radius:12px; padding:16px 18px; margin-bottom:24px; }
.iv-notice{ background:var(--panel); border:1px solid var(--gold); color:var(--text); border-radius:8px; padding:10px 14px; font-size:14px; margin-bottom:18px; }

/* today's result: score ring (red below 60%) */
@property --p{ syntax:"<number>"; inherits:false; initial-value:0; }
.iv-today{ display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:18px; margin-bottom:8px;
  padding:18px 20px; border-radius:14px; border:1px solid color-mix(in srgb, var(--ring-c, var(--accent)) 45%, var(--panel-border));
  background:linear-gradient(110deg, color-mix(in srgb, var(--ring-c, var(--accent)) 9%, var(--panel)), var(--panel) 60%); }
.iv-today:has(.iv-ring.low){ --ring-c:var(--hard); }
.iv-ring{ --ring:var(--accent); --p:0; position:relative; width:76px; height:76px; border-radius:50%; display:grid; place-items:center;
  background:conic-gradient(var(--ring) calc(var(--p) * 1%), color-mix(in srgb, var(--text-dim) 25%, transparent) 0);
  transition:--p 1.1s cubic-bezier(.2,.7,.2,1); }
.iv-ring.low{ --ring:var(--hard); }
.iv-ring::before{ content:""; position:absolute; inset:7px; border-radius:50%; background:var(--panel); }
.iv-ring span{ position:relative; font-family:var(--font-display); font-weight:700; font-size:18px; }
.iv-today-title{ font-family:var(--font-display); font-weight:600; font-size:17px; margin-bottom:2px; }
.iv-today-body .iv-muted{ margin-bottom:8px; }
.iv-chip{ display:inline-flex; align-items:center; gap:6px; font-family:var(--font-mono); font-size:12px; color:var(--text-muted);
  border:1px solid var(--panel-border); border-radius:99px; padding:3px 10px; }
.iv-chip::before{ content:""; width:6px; height:6px; border-radius:50%; background:var(--accent); animation:iv-glow 2s infinite; }

/* day-wise results: stats row + one row per day with an animated score bar (red below 60%) */
.iv-stats{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-bottom:14px; }
.iv-stats div{ background:var(--panel); border:1px solid var(--panel-border); border-radius:10px; padding:10px 14px;
  animation:iv-rise .5s cubic-bezier(.2,.7,.2,1) both; animation-delay:calc(.2s + var(--i, 0) * .06s); }
.iv-stats small{ display:block; font-size:12px; color:var(--text-muted); }
.iv-stats b{ font-family:var(--font-display); font-size:20px; color:var(--accent); }
.iv-stats .low b{ color:var(--hard); }
.iv-history{ list-style:none; }
.iv-history li{ margin-bottom:8px; animation:iv-rise .5s cubic-bezier(.2,.7,.2,1) both; animation-delay:calc(.28s + var(--i, 0) * .05s); }
.iv-history button{ width:100%; display:grid; grid-template-columns:minmax(0,1fr) minmax(80px,180px) 56px; align-items:center; gap:16px;
  text-align:left; background:var(--panel); border:1px solid var(--panel-border); border-left:3px solid var(--accent); border-radius:10px;
  padding:12px 16px; color:var(--text); font:inherit; cursor:pointer; transition:transform .2s, border-color .2s, background .2s; }
.iv-history button.low{ border-left-color:var(--hard); }
.iv-history button:hover{ transform:translateX(3px); border-color:var(--accent); background:color-mix(in srgb, var(--accent) 5%, var(--panel)); }
.iv-history button.low:hover{ border-color:var(--hard); background:color-mix(in srgb, var(--hard) 6%, var(--panel)); }
.iv-h-day b{ display:block; font-family:var(--font-display); font-weight:600; }
.iv-h-day small{ display:block; font-family:var(--font-mono); font-size:12px; color:var(--text-muted); }
.iv-bar-track{ height:7px; border-radius:99px; background:color-mix(in srgb, var(--text-dim) 25%, transparent); overflow:hidden; }
.iv-bar-fill{ display:block; height:100%; width:0; border-radius:inherit; background:var(--accent); transition:width 1s cubic-bezier(.2,.7,.2,1); }
.low .iv-bar-fill{ background:var(--hard); }
.iv-history .iv-h-score{ font-family:var(--font-display); font-weight:700; font-size:17px; text-align:right; color:var(--accent); }
.iv-history .low .iv-h-score{ color:var(--hard); }

@media (prefers-reduced-motion: reduce){
  .iv-start *, .iv-start *::before{ animation:none !important; transition:none !important; }
}
@media (max-width:560px){
  .iv-today{ grid-template-columns:auto minmax(0,1fr); }
  .iv-today .iv-btn{ grid-column:1 / -1; }
  .iv-stats{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .iv-history button{ grid-template-columns:minmax(0,1fr) 64px 44px; gap:10px; padding:11px 12px; }
}

/* running */
.iv-run{ height:100vh; display:flex; flex-direction:column; }
.iv-bar{ display:flex; align-items:center; gap:14px; padding:10px 16px; border-bottom:1px solid var(--panel-border);
  background:var(--panel); padding-right:104px; flex-wrap:wrap; }
.iv-bar-title{ font-family:var(--font-display); font-weight:600; }
/* 34px account/theme buttons centred on the bar's first row (bar content is 37px tall + 10px padding). */
.iv-running .theme-toggle,.iv-running .dsa-acct-btn{ top:11.5px; }
.iv-clock{ font-family:var(--font-mono); font-size:20px; font-weight:600; margin-left:auto; }
.iv-clock.amber{ color:var(--gold); }
.iv-clock.red{ color:var(--hard); }
.iv-progress{ color:var(--text-muted); font-size:13px; font-family:var(--font-mono); }
.iv-run-notice{ margin:10px 16px 0; }
.iv-body{ flex:1; min-height:0; display:grid; grid-template-columns:240px minmax(0,1fr); }
.iv-run.side-closed .iv-body{ grid-template-columns:minmax(0,1fr); }
.iv-run.side-closed .iv-side{ display:none; }
.iv-side{ overflow:auto; border-right:1px solid var(--panel-border); padding:12px 10px; }
.iv-group{ font-family:var(--font-mono); font-size:11px; color:var(--text-dim); text-transform:uppercase; letter-spacing:.06em; margin:12px 8px 6px; }
.iv-group:first-child{ margin-top:2px; }
.iv-item{ display:flex; align-items:flex-start; gap:8px; width:100%; text-align:left; background:none; border:1px solid transparent;
  border-radius:8px; padding:7px 8px; color:var(--text); font:inherit; font-size:13.5px; line-height:1.35; cursor:pointer; }
.iv-item:hover{ border-color:var(--panel-border); }
.iv-item.cur{ background:var(--panel); border-color:var(--accent); }
.iv-item .iv-n{ font-family:var(--font-mono); font-size:11.5px; color:var(--text-dim); min-width:18px; padding-top:1px; }
.iv-item .iv-t{ flex:1; }
.iv-item .iv-x{ font-family:var(--font-mono); font-size:11.5px; color:var(--text-muted); }
.iv-dot{ width:9px; height:9px; border-radius:50%; border:1.5px solid var(--text-dim); margin-top:4px; flex-shrink:0; }
.iv-dot.open{ border-color:var(--gold); background:linear-gradient(90deg,var(--gold) 50%,transparent 50%); }
.iv-dot.done{ border-color:var(--accent); background:var(--accent); }
.iv-main{ overflow:auto; min-width:0; }
.iv-q{ max-width:780px; padding:28px 28px 60px; }
.iv-cat{ font-family:var(--font-mono); font-size:12px; color:var(--text-dim); margin-bottom:6px; }
.iv-q h2{ font-family:var(--font-display); font-size:22px; line-height:1.3; margin-bottom:14px; }
.iv-prompt{ white-space:pre-line; margin-bottom:22px; }
.iv-reveal{ background:var(--panel); border:1px solid var(--panel-border); border-radius:10px; padding:18px 20px; margin:18px 0; }
.iv-reveal h3{ font-family:var(--font-display); font-size:15px; margin:0 0 8px; }
.iv-reveal h3:not(:first-child){ margin-top:18px; }
.iv-reveal ul{ padding-left:20px; }
.iv-reveal li{ margin-bottom:5px; }
.iv-reveal p{ margin-bottom:10px; }
.iv-grade{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.iv-grade .iv-muted{ margin-right:4px; }
.iv-grade .iv-btn.on.got{ border-color:var(--easy); color:var(--easy); }
.iv-grade .iv-btn.on.partial{ border-color:var(--gold); color:var(--gold); }
.iv-grade .iv-btn.on.missed{ border-color:var(--hard); color:var(--hard); }
.iv-nav{ display:flex; justify-content:space-between; margin-top:28px; gap:10px; }
.iv-dsa{ height:100%; display:flex; flex-direction:column; }
.iv-dsa-head{ display:flex; align-items:center; gap:6px 12px; padding:10px 16px; border-bottom:1px solid var(--panel-border); flex-wrap:wrap; font-size:14px; line-height:1.4; }
.iv-dsa-head .iv-cat{ margin:0; }
.iv-dsa-head strong{ font-family:var(--font-display); font-size:15px; }
.iv-dsa-head .iv-x{ font-family:var(--font-mono); color:var(--text-muted); margin-left:auto; }
.iv-dsa iframe{ flex:1; width:100%; border:0; min-height:0; background:var(--bg); }
.iv-dsa-fallback{ padding:8px 16px; font-size:13px; color:var(--text-muted); }
.iv-dsa-fallback a{ color:var(--accent); }

.iv-dialog{ margin:auto; max-width:420px; width:calc(100% - 32px); background:var(--panel); color:var(--text);
  border:1px solid var(--panel-border); border-radius:12px; padding:22px; }
.iv-dialog::backdrop{ background:rgba(0,0,0,.55); }
.iv-dialog p{ margin-bottom:8px; }
.iv-dialog-btns{ display:flex; justify-content:flex-end; gap:10px; margin-top:16px; }

/* report */
.iv-score{ display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; margin:8px 0 28px; }
.iv-score div{ background:var(--panel); border:1px solid var(--panel-border); border-radius:10px; padding:14px 16px; }
.iv-score small{ display:block; color:var(--text-muted); font-size:12.5px; }
.iv-score b{ font-family:var(--font-display); font-size:26px; }
.iv-rows{ list-style:none; }
.iv-rows li{ border:1px solid var(--panel-border); background:var(--panel); border-radius:8px; margin-bottom:8px; }
.iv-rows summary{ display:flex; gap:10px; padding:12px 14px; cursor:pointer; list-style:none; }
.iv-rows summary::-webkit-details-marker{ display:none; }
.iv-rows .iv-t{ flex:1; }
.iv-rows .iv-x{ font-family:var(--font-mono); font-size:12.5px; color:var(--text-muted); white-space:nowrap; }
.iv-rows .iv-x.got{ color:var(--easy); } .iv-rows .iv-x.partial{ color:var(--gold); } .iv-rows .iv-x.missed{ color:var(--hard); }
.iv-rows .iv-reveal{ margin:0 14px 14px; }
.iv-report-btns{ display:flex; gap:10px; flex-wrap:wrap; margin-top:28px; }

@media (max-width:760px){
  .wrap{ padding:56px 16px 80px; }
  .iv-bar{ gap:8px 10px; padding:8px 100px 8px 12px; }
  .iv-bar-title{ display:none; }
  .iv-progress{ display:none; }            /* the question chips below show progress on phones */
  #iv-end-btn{ padding:8px 12px; }
  .iv-running .theme-toggle,.iv-running .dsa-acct-btn{ top:7px; }
  .iv-clock{ margin-left:0; font-size:18px; }
  #iv-side-toggle{ display:none; }
  .iv-body{ display:flex; flex-direction:column; }
  .iv-side{ display:flex !important; gap:6px; overflow-x:auto; border-right:0; border-bottom:1px solid var(--panel-border); padding:8px 10px; flex-shrink:0; }
  .iv-group{ display:none; }
  .iv-item{ width:auto; flex-shrink:0; padding:6px 10px; border-color:var(--panel-border); }
  .iv-item .iv-t,.iv-item .iv-x{ display:none; }
  .iv-main{ flex:1; }
  .iv-q{ padding:20px 16px 48px; }
}
