@import url("./theme.css");

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--grc-canvas);
  color: var(--grc-ink);
  font: 14px/1.5 var(--grc-font-body);
}
button, select, input, textarea { font: inherit; color: inherit; }
button, select, summary { cursor: pointer; }
button { border: 0; background: none; }
a { color: inherit; text-underline-offset: 3px; }
[hidden] { display: none !important; }
.grc-shell .layout {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  height: 100dvh;
}
.grc-shell .layout > aside {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: white;
  border-right: 1px solid var(--grc-line);
  padding: 24px 14px 18px;
  overflow-y: auto;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px;
  color: var(--grc-ink);
  text-decoration: none;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.8px;
}
.logo i {
  width: 29px;
  height: 29px;
  border-radius: 9px;
  background: var(--grc-gradient);
  box-shadow: 0 3px 10px #6d28d92b;
  position: relative;
}
.logo i::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1.5px solid white;
  border-radius: 50%;
}
.tenant {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 25px 8px 20px;
  padding: 14px 0;
  border-block: 1px solid var(--grc-line);
  font-size: 13px;
  font-weight: 600;
}
.tenant b {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--grc-wash);
  color: var(--grc-accent);
  font-family: var(--grc-font-display);
}
.tenant small { display: block; color: var(--grc-muted); font-size: 12px; font-weight: 400; }
#workspace { display: grid; gap: 5px; }
#workspace a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  color: var(--grc-secondary);
  border: 1px solid transparent;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 550;
}
#workspace a:hover { background: #f8f6fd; }
#workspace a[aria-current] {
  color: var(--grc-accent);
  background: var(--grc-wash);
  border-color: #e2d5fa;
  font-weight: 650;
}
.nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.other { margin: auto 12px 0; padding-top: 25px; color: var(--grc-muted); font-size: 13px; }
.canvas {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
}
.top {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 24px;
  min-height: 68px;
  background: white;
  border-bottom: 1px solid var(--grc-line);
  font-size: 13px;
  color: var(--grc-muted);
}
.top strong { color: var(--grc-ink); font-weight: 600; white-space: nowrap; }
#workspace-name { white-space: nowrap; }
.ws-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.ws-toolbar .ws-button, .ws-toolbar select { font-size: 12px; padding: 6px 9px; min-height: 33px; }
.ws-toolbar > .ws-note { font-size: 12px; }
.ws-button, .bench .run {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  background: white;
  border: 1px solid var(--grc-line);
  border-radius: 8px;
  color: var(--grc-secondary);
  font-size: 14px;
  font-weight: 550;
}
.ws-button:hover { border-color: #cbb5ee; background: #faf8ff; }
.ws-button:disabled { opacity: .55; cursor: wait; }
.ws-primary, .bench .run, .ws-work form > .ws-button {
  color: white;
  background: var(--grc-gradient);
  border-color: transparent;
  box-shadow: 0 3px 8px #6d28d91c;
}
select, input, textarea {
  background: white;
  border: 1px solid var(--grc-line);
  border-radius: 8px;
  padding: 8px 10px;
}
select { appearance: none; padding-right: 27px !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%2375688e' viewBox='0 0 12 12'%3E%3Cpath d='m3 4 3 3 3-3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
.grc-shell .canvas > main { min-width: 0; padding: 28px 30px 40px; overflow-y: auto; }
.grc-shell .canvas > main.embedded-app { padding: 0; }
.embedded-app #app-screen { height: 100%; }
.lens-frame { display: block; width: 100%; height: 100%; border: 0; background: var(--grc-canvas); }
#overview-screen { max-width: 1260px; margin: auto; }
h1 { font-size: clamp(27px, 3.1vw, 39px); line-height: 1.18; letter-spacing: -.045em; margin: 0; }
h2 { font-size: 23px; line-height: 1.25; letter-spacing: -.035em; margin: 0; }
h3 { font-size: 17px; line-height: 1.35; margin: 0 0 8px; }
p { margin: 0; }
.vision { padding: 5px 0 27px; }
.vision p { max-width: 70ch; margin-top: 12px; color: var(--grc-muted); line-height: 1.6; }
.lens-index { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 25px; }
.lens-index a {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-bottom: 18px;
  background: white;
  border: 1px solid var(--grc-line);
  border-radius: var(--grc-radius);
  box-shadow: var(--grc-shadow);
  text-decoration: none;
  overflow: hidden;
}
.lens-index a:hover { border-color: #bea5ed; box-shadow: 0 8px 25px #6d28d912; }
.lens-index img { width: 100%; height: auto; aspect-ratio: 2.8; object-fit: cover; object-position: top; border-bottom: 1px solid var(--grc-line); }
.lens-index strong, .lens-index span, .lens-index em { margin-inline: 18px; }
.lens-index strong { color: var(--grc-ink); font-family: var(--grc-font-display); font-size: 18px; margin-top: 5px; }
.lens-index span { font-size: 14px; color: var(--grc-secondary); }
.lens-index em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--grc-accent); margin-top: auto; padding-top: 5px; }
#overview-screen > a { color: var(--grc-accent); font-weight: 600; margin-right: 14px; }
#overview-screen > .ws-button { margin-top: 8px; }
.panel { background: white; border: 1px solid var(--grc-line); border-radius: var(--grc-radius); box-shadow: var(--grc-shadow); min-width: 0; }
.bench, .ws-work { display: grid; gap: 20px; }
.bench { padding: 26px; }
.bench-intro, .ws-work > p { max-width: 76ch; color: var(--grc-secondary); line-height: 1.6; }
.bench-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.bench-panel { padding: 22px; display: grid; gap: 14px; }
.bench-panel p { line-height: 1.6; }
.bench-row { display: grid; gap: 4px; padding: 12px 0; border-top: 1px solid var(--grc-line); }
.bench-row strong { font-size: 13px; color: var(--grc-muted); }
.bench-row span { font-size: 14px; }
.bench .lens-frame { height: 70dvh; }
.bench a { color: var(--grc-accent); }
.subnav { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 14px; border-bottom: 1px solid var(--grc-line); }
.subnav button, .subnav a { padding: 9px 2px; color: var(--grc-muted); text-decoration: none; font-size: 14px; }
.subnav [aria-current] { color: var(--grc-accent); border-bottom: 2px solid var(--grc-accent); font-weight: 600; }
details { border-top: 1px solid var(--grc-line); padding-top: 12px; }
summary { color: var(--grc-secondary); font-size: 14px; font-weight: 600; }
details p { margin-top: 12px; line-height: 1.6; }
.ws-work { padding: 28px; }
.ws-field { display: grid; gap: 7px; margin: 14px 0; font-size: 14px; font-weight: 600; }
.ws-field input, .ws-field select, .ws-field textarea { max-width: 100%; width: 100%; font: inherit; font-weight: 400; }
.ws-note, .foot { color: var(--grc-muted); font-size: 13px; line-height: 1.5; }
.ws-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ws-actions a { color: var(--grc-accent); }
.ws-result { padding: 24px; }
.ws-result article { border-bottom: 1px solid var(--grc-line); padding: 20px 0; }
.ws-result p { white-space: pre-wrap; line-height: 1.6; margin: 9px 0 16px; }
.ws-result article > strong { color: var(--grc-muted); font-size: 13px; font-weight: 600; }
.ws-work details { padding: 14px; background: white; border: 1px solid var(--grc-line); border-radius: 9px; }
.ws-work details p { white-space: pre-wrap; font-size: 14px; }
.ws-conversation { display: grid; gap: 12px; }
.ws-conversation p { display: grid; gap: 7px; padding: 18px; border: 1px solid var(--grc-line); border-radius: var(--grc-radius); background: white; line-height: 1.6; }
.ws-conversation strong { color: var(--grc-accent); font-size: 13px; }
.ws-dialog {
  width: min(680px, calc(100% - 28px));
  max-height: 90dvh;
  border: 1px solid var(--grc-line);
  border-radius: 16px;
  padding: 25px;
  color: var(--grc-ink);
  box-shadow: 0 22px 80px #28134430;
  overflow-y: auto;
}
.ws-dialog::backdrop { background: #1b123066; }
.ws-close { float: right; margin-left: 14px; }
.ws-dialog-content { padding-top: 8px; }
.ws-dialog h2 { font-size: 26px; margin-bottom: 14px; }
.ws-dialog h3 { margin: 20px 0 12px; }
.ws-dialog p { line-height: 1.6; margin: 12px 0; }
.ws-dialog form { clear: both; }
.ws-dialog a { color: var(--grc-accent); }
.ws-records { padding: 12px; border: 1px solid var(--grc-line); border-radius: 8px; background: var(--grc-canvas); font-size: 14px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
#mobile-view { display: none; }
@media (min-width: 1600px) { .lens-index { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1200px) {
  .top { flex-wrap: wrap; padding: 12px 20px; }
  .ws-toolbar { margin-left: 0; flex-basis: 100%; }
}
@media (max-width: 760px) {
  .grc-shell .layout { display: block; }
  .grc-shell .layout > aside { height: 58px; padding: 10px 14px; flex-direction: row; align-items: center; justify-content: space-between; overflow: visible; border-bottom: 1px solid var(--grc-line); }
  #workspace, .tenant, .other { display: none; }
  .logo { font-size: 19px; padding: 0; }
  .logo i { width: 26px; height: 26px; }
  #mobile-view { display: block; width: auto; max-width: 52vw; color: var(--grc-accent); font-size: 13px; }
  .canvas { height: calc(100dvh - 58px); }
  .top { padding: 10px 14px; }
  .ws-toolbar { gap: 5px; }
  .ws-toolbar .ws-button, .ws-toolbar select { padding: 6px 8px; font-size: 12px; }
  .grc-shell .canvas > main { padding: 22px 16px 30px; }
  .lens-index { grid-template-columns: 1fr; }
  .lens-index img { aspect-ratio: 3; }
  .bench, .ws-work { padding: 20px 14px; }
  .bench-grid { grid-template-columns: 1fr; }
}
.logo i::after {
  inset: 5px;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 23% 23%, white 1.5px, transparent 2px),
    radial-gradient(circle at 77% 23%, white 1.5px, transparent 2px),
    radial-gradient(circle at 50% 50%, white 1.5px, transparent 2px),
    radial-gradient(circle at 23% 77%, white 1.5px, transparent 2px),
    radial-gradient(circle at 77% 77%, white 1.5px, transparent 2px);
}
.ws-dialog input[type="file"] { display: block; width: 100%; padding: 8px; margin: 10px 0; }
.ws-dialog input[type="file"]::file-selector-button { border: 1px solid var(--grc-line); padding: 7px 11px; border-radius: 6px; background: var(--grc-wash); color: var(--grc-accent); font: inherit; margin-right: 10px; cursor: pointer; }
.ws-dialog-content > a { display: inline-block; margin: 4px 0; }
