/* CatchUI — the pages outside the app: about, the MCP page, the guides, the
   legal pages and the 404. They wear the app's look (src/ui.css): system
   type, white grouped surfaces on a gray ground, hairlines, one yellow
   action, light and dark. The tokens below mirror the app's — change them in
   both places. Each page links this file; none carries styles of its own. */

@font-face{
  font-family:'Archivo';
  font-style:normal;
  font-weight:400 900;
  font-display:swap;
  src:url('/fonts/archivo-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+2000-206F;
}

:root{
  color-scheme:light dark;
  --bg:#F2F2F7;
  --card:#FFFFFF;
  --text:#141414;
  --text-2:#6B6B70;
  --line:rgba(60,60,67,.16);
  --line-strong:rgba(60,60,67,.3);
  --fill:rgba(118,118,128,.12);
  --fill-hover:rgba(118,118,128,.18);
  --accent:#FFDE59;
  --accent-hover:#FFD43B;
  --on-accent:#141414;
  --art-paper:#F4F2EC;
  --brand-mark:url('/images/brand/catchui-mark-light.png');
  --font-mono:ui-monospace,"SF Mono",SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;
  --gutter:clamp(16px,4vw,32px);
}
@media (prefers-color-scheme:dark){
  :root{
    --bg:#000000;
    --card:#1C1C1E;
    --text:#F5F5F7;
    --text-2:#A1A1A6;
    --line:rgba(84,84,88,.55);
    --line-strong:rgba(120,120,128,.6);
    --fill:rgba(118,118,128,.24);
    --fill-hover:rgba(118,118,128,.32);
    --brand-mark:url('/images/brand/catchui-mark-dark.png');
  }
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Roboto,"Helvetica Neue","PingFang SC","Hiragino Sans GB","Microsoft YaHei","Noto Sans CJK SC",sans-serif;
  font-size:17px;
  line-height:1.55;
}
a{
  color:inherit;
  font-weight:500;
  text-decoration:underline;
  text-decoration-color:var(--line-strong);
  text-underline-offset:3px;
}
a:hover{text-decoration-color:currentColor}
:focus-visible{outline:2px solid var(--text);outline-offset:2px}

/* ---- The page: a header, the text, a footer, on one column ---- */
body>header,
body>main,
body>footer{width:min(880px,calc(100% - 2 * var(--gutter)));margin:0 auto}
body>header{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:6px 20px;
  padding:12px 0;
}
.brand{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:var(--text);
  text-decoration:none;
}
/* The app icon as it is. */
.mark{
  width:28px;height:28px;
  flex:none;
  border-radius:7px;
  background:var(--brand-mark) center/cover no-repeat;
  box-shadow:0 0 0 .5px var(--line-strong);
}
.wordmark{
  font-family:'Archivo',"Arial Black",Helvetica,sans-serif;
  font-size:18px;
  font-weight:900;
  letter-spacing:-.02em;
  line-height:1;
}
nav{display:flex;flex-wrap:wrap;gap:2px}
body>header nav{margin:0 -12px}
body>header nav a{
  display:inline-flex;
  align-items:center;
  min-height:36px;
  padding:0 12px;
  border-radius:999px;
  font-size:15px;
  color:var(--text-2);
  text-decoration:none;
}
body>header nav a:hover,
body>header nav a[aria-current]{color:var(--text);background:var(--fill)}
main{padding:clamp(24px,5vw,56px) 0 72px}
body>footer{
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  gap:10px 20px;
  padding:24px 0 44px;
  border-top:1px solid var(--line);
  font-size:14px;
  color:var(--text-2);
}
body>footer nav{gap:6px 18px}
body>footer a{font-weight:400;text-decoration:none}
body>footer a:hover{color:var(--text);text-decoration:underline}
body>footer p{flex-basis:100%;margin:0}

/* ---- Words ---- */
.eyebrow{display:block;font-size:14px;font-weight:600;color:var(--text-2)}
h1{
  margin:10px 0 18px;
  font-size:clamp(34px,24px + 2.4vw,52px);
  font-weight:700;
  line-height:1.06;
  letter-spacing:-.024em;
  text-wrap:balance;
}
h2{
  margin:56px 0 16px;
  font-size:clamp(24px,20px + .9vw,30px);
  font-weight:700;
  line-height:1.15;
  letter-spacing:-.018em;
  text-wrap:balance;
}
h3{margin:0 0 6px;font-size:19px;font-weight:600;line-height:1.25}
p,li{text-wrap:pretty}
.lede{max-width:40em;font-size:20px;line-height:1.45}
.said{color:var(--text-2);font-style:italic}
code{
  padding:1px 6px;
  border-radius:6px;
  background:var(--fill);
  font-family:var(--font-mono);
  font-size:.86em;
}
pre{
  margin:12px 0 0;
  padding:16px 18px;
  overflow-x:auto;
  border-radius:16px;
  background:var(--card);
  font-family:var(--font-mono);
  font-size:14px;
  line-height:1.55;
  white-space:pre-wrap;
}
pre code{padding:0;background:none;font-size:inherit}
.card pre{background:var(--fill)}

/* ---- Actions: the yellow one is what the page is for ---- */
.actions{display:flex;flex-wrap:wrap;gap:10px;margin:26px 0 10px}
.button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:48px;
  padding:0 22px;
  border-radius:999px;
  font-size:16px;
  font-weight:600;
  text-align:center;
  text-decoration:none;
}
.button.primary{background:var(--accent);color:var(--on-accent)}
.button.primary:hover{background:var(--accent-hover)}
.button.secondary{background:var(--fill)}
.button.secondary:hover{background:var(--fill-hover)}

/* ---- Grouped surfaces ---- */
.facts,.steps,.faq,.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.card{min-width:0;padding:20px 22px;border-radius:24px;background:var(--card)}
.card p{margin:0 0 8px}
.card p:last-child{margin:0}
.step-num{
  display:flex;
  align-items:center;
  justify-content:center;
  width:32px;height:32px;
  margin-bottom:12px;
  border-radius:50%;
  background:var(--fill);
  font-size:15px;
  font-weight:700;
}
.note,.answer{padding:18px 22px;border-radius:20px;background:var(--card)}
.note{color:var(--text-2)}
.answer{margin:26px 0}
.answer>:first-child{margin-top:0}
.answer>:last-child{margin-bottom:0}
.endpoint{
  display:inline-block;
  margin:6px 0 2px;
  padding:10px 16px;
  border-radius:14px;
  background:var(--card);
  font-family:var(--font-mono);
  font-size:16px;
  font-weight:600;
  word-break:break-all;
}
.ask{display:flex;flex-direction:column;gap:8px;max-width:780px;padding:0;list-style:none}
.ask li{padding:12px 18px;border-radius:16px;background:var(--card)}
.jump{gap:8px;margin:18px 0 6px}
.jump a{
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:0 13px;
  border-radius:999px;
  background:var(--fill);
  font-size:15px;
  text-decoration:none;
}
.jump a:hover{background:var(--fill-hover)}
table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border-radius:20px;
  background:var(--card);
  font-size:16px;
}
th,td{
  padding:12px 16px;
  border-bottom:1px solid var(--line);
  text-align:left;
  vertical-align:top;
  overflow-wrap:break-word;
}
td:first-child{width:38%}
td code{overflow-wrap:anywhere}
thead th,tr:first-child>th{font-size:13px;font-weight:600;color:var(--text-2)}
tr:last-child>*{border-bottom:0}
figure.shot{margin:28px 0}
figure.shot img{
  display:block;
  width:100%;height:auto;
  border-radius:20px;
  background:var(--card);
  box-shadow:0 0 0 1px var(--line);
}
figure.shot.portrait{max-width:420px}
figure.shot figcaption{margin-top:8px;font-size:14px;line-height:1.5;color:var(--text-2)}
/* The iPhone app's screens, side by side at a phone's size, on the app's own
   warm ground (ui.css .ui-appground). */
figure.phones{
  display:flex;
  justify-content:center;
  gap:clamp(10px,3vw,24px);
  margin:28px 0;
  padding:clamp(20px,5vw,40px) clamp(12px,4vw,32px);
  border-radius:24px;
  background:
    radial-gradient(rgba(60,60,67,.13) 1px,transparent 1.3px) 0 0/16px 16px,
    linear-gradient(180deg,#F8EFCF 0%,#F6F3EC 60%);
}
figure.phones img{
  width:min(220px,30%);
  height:auto;
  padding:min(7px,.8vw);
  border-radius:clamp(18px,4vw,36px);
  background:#0B0B0C;
  box-shadow:0 20px 40px -18px rgba(0,0,0,.3);
}
figure.phones figcaption{display:none}
/* One phone with a caption under it: the caption is read, not hidden. */
figure.phones.one{flex-direction:column;align-items:center;gap:16px}
figure.phones.one img{width:min(240px,70%)}
figure.phones.one figcaption{display:block;max-width:34em;font-size:14px;line-height:1.5;color:var(--text-2)}
@media (prefers-color-scheme:dark){
  figure.phones{
    background:
      radial-gradient(rgba(255,255,255,.08) 1px,transparent 1.3px) 0 0/16px 16px,
      linear-gradient(180deg,#24210F 0%,var(--card) 62%);
  }
}

/* ---- The icon guide ---- */
nav.icons{display:grid;grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:10px;margin:22px 0}
.icons a{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  padding:14px 8px 12px;
  border-radius:18px;
  background:var(--card);
  font-size:14px;
  line-height:1.25;
  text-align:center;
  text-decoration:none;
}
.icons a span{display:flex;gap:6px}
.icons svg{width:30px;height:30px}
.icon-row{
  display:grid;
  grid-template-columns:76px minmax(0,1fr);
  gap:18px;
  align-items:start;
  margin:0 0 12px;
  padding:20px;
  border-radius:24px;
  background:var(--card);
}
.glyph{display:flex;flex-direction:column;gap:8px}
/* A glyph is drawn in ink on the specimens' paper, in either appearance. */
.glyph span{
  display:flex;
  align-items:center;
  justify-content:center;
  width:76px;height:76px;
  border-radius:16px;
  background:var(--art-paper);
  color:#141414;
}
.glyph svg{width:42px;height:42px}
.icon-row h3 .sym{font-weight:400;color:var(--text-2)}
.icon-row p{margin:0 0 8px}
.icon-row p:last-child{margin:0}
.icon-row .aside,.icon-row .code{font-size:15px}
.icon-row .aside{color:var(--text-2)}

/* ---- The legal pages: one long card ---- */
.wrap{max-width:calc(760px + 2 * var(--gutter));margin:0 auto;padding:20px var(--gutter) 80px}
.topnav{gap:8px;margin-bottom:18px}
.topnav a{
  display:inline-flex;
  align-items:center;
  min-height:36px;
  padding:0 14px;
  border-radius:999px;
  background:var(--fill);
  font-size:15px;
  text-decoration:none;
}
.topnav a:hover{background:var(--fill-hover)}
.wrap>.card{padding:clamp(22px,4vw,44px)}
.wrap h1{margin:0 0 6px;font-size:clamp(28px,22px + 1.6vw,38px)}
.wrap .meta{margin:0 0 24px;font-size:14px;color:var(--text-2)}
.wrap h2{margin:32px 0 8px;font-size:20px;letter-spacing:-.01em}
.wrap .card p{margin:0 0 12px}
.tablewrap{overflow-x:auto}
.wrap table{margin:10px 0;border-radius:14px;background:var(--fill);font-size:15px}
.wrap td:first-child{width:auto}

/* ---- The 404: a page that is only a main ---- */
body>main:first-child{max-width:640px;padding-top:72px}
main>.code{font-size:15px;font-weight:700;color:var(--text-2)}
main>.code+h1{margin-top:8px}
main>.code~p{color:var(--text-2)}
main>.code~nav{gap:10px;margin-top:28px}
main>.code~nav a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:0 20px;
  border-radius:999px;
  background:var(--fill);
  font-size:16px;
  font-weight:600;
  text-decoration:none;
}
main>.code~nav a:first-child{background:var(--accent);color:var(--on-accent)}

@media (max-width:680px){
  .facts,.steps,.faq,.grid{grid-template-columns:minmax(0,1fr)}
  .lede{font-size:19px}
  table{font-size:15px}
  /* "anywhere" lets a long word shrink a column, so a three-column table
     stays inside a 320px phone. */
  th,td{padding:10px 12px;overflow-wrap:anywhere}
  .actions .button{flex:1 1 100%}
}
@media (max-width:480px){
  .icon-row{grid-template-columns:minmax(0,1fr);gap:12px;padding:16px}
  .glyph{flex-direction:row}
  .glyph span{width:56px;height:56px;border-radius:12px}
  .glyph svg{width:32px;height:32px}
  nav.icons{grid-template-columns:repeat(2,minmax(0,1fr))}
}
