/* The mathew.cc gate (docs/plan-gate.md). Quicksand: font-license.txt. */
@font-face{font-family:Quicksand;font-weight:500;font-display:swap;src:url(quicksand-medium.woff2) format("woff2")}
@font-face{font-family:Quicksand;font-weight:700;font-display:swap;src:url(quicksand-bold.woff2) format("woff2")}

/* blue = mathew, magenta = mathai. navy is the ink and the one shadow. */
:root,.mathew{--lead:#4370b4;--tint:#e3eaf6}
.mathai{--lead:#af48be;--tint:#f5e5f7}
:root{
  color-scheme:light;
  --ground:#f5f5f5;--paper:#fffefa;--ink:#0d2958;--quiet:#47567a;--rule:#d5d8e0;
  font-family:Quicksand,"Trebuchet MS",sans-serif;font-weight:500;
  color:var(--ink);background:var(--ground);
}
*{box-sizing:border-box}
body{margin:0}
h1,h2,h3,p{margin:0}
::selection{background:var(--lead);color:#fff}
.icon{display:block;width:1.1em;height:1.1em;flex:none}

.gate{display:flex;flex-direction:column;container-type:inline-size;min-height:100vh;min-height:100svh;background:var(--ground)}
.shell{width:min(calc(100% - 96px),1200px);margin-inline:auto}
.masthead,.colophon,.host,.signature,.method{display:flex;align-items:center}
.masthead{justify-content:space-between;gap:10px;padding-block:26px 22px;border-bottom:1px solid var(--rule)}
.brand{display:block;width:auto;height:38px;flex:none}
.host,.signature,.method{color:var(--quiet);font-size:.875rem;gap:.5em}

.landing{flex:1;display:grid;place-items:center;padding:58px 32px}
.ticket{display:grid;grid-template-columns:34% minmax(0,1fr);width:min(100%,800px);border:1.5px solid var(--ink);border-radius:18px;background:var(--paper)}
.stub{position:relative;display:grid;place-items:center;min-height:348px;border-radius:16px 0 0 16px;border-right:1.5px dashed var(--ink);background:var(--tint) url(paper.svg) center/cover}
.keyring{display:block;width:98%;max-width:285px;height:auto}
/* the two punched notches at the ends of the perforation */
.stub::before,.stub::after{content:"";position:absolute;right:-9px;width:16px;height:8px;border:1.5px solid var(--ink);background:var(--ground)}
.stub::before{top:-1.5px;border-top:0;border-radius:0 0 12px 12px}
.stub::after{bottom:-1.5px;border-bottom:0;border-radius:12px 12px 0 0}

.ticket-body{align-self:center;min-width:0;padding:48px clamp(32px,5cqi,62px)}
.headline{font-size:3rem;line-height:1.13;letter-spacing:-.04em;font-weight:700;text-wrap:balance}
.period{color:var(--lead)}
.detail{margin-top:21px}
.caption,.message{color:var(--quiet);line-height:1.55}
.value{display:flex;align-items:center;gap:.45em;margin-top:2px;font-size:1.0625rem;font-weight:700;line-height:1.5;overflow-wrap:anywhere}
.value .icon{width:1em;height:1em;color:var(--quiet)}
.value+.message{margin-top:12px}
#msg:not(:empty){margin-top:14px}
.message a{color:inherit;font-weight:700}

/* one depth effect: a solid navy shadow straight down, the same as under the m */
.action-row{margin:30px 0 4px}
.key-button{display:inline-flex;justify-content:center;align-items:center;gap:11px;width:100%;max-width:355px;min-height:54px;padding:10px 14px;
  font-family:inherit;font-weight:700;font-size:1.25rem;line-height:1.4;letter-spacing:-.01em;color:#fff;background:var(--lead);
  border:1.5px solid transparent;border-radius:10px;box-shadow:0 4px 0 var(--ink);cursor:pointer;
  transition:transform .12s cubic-bezier(.2,.8,.2,1),box-shadow .12s cubic-bezier(.2,.8,.2,1)}
.key-button .icon{width:1em;height:1em}
.key-button span{display:inline-flex;align-items:center;gap:inherit}
.key-button:hover:enabled{transform:translateY(1px);box-shadow:0 3px 0 var(--ink)}
.key-button:active:enabled{transform:translateY(4px);box-shadow:0 0 0 var(--ink)}
.key-button:focus-visible{outline:3px solid var(--ink);outline-offset:3px}
/* waiting: the key stays held down */
.key-button:disabled{color:var(--quiet);background:#e2e5ed;border-color:#b9bfce;box-shadow:none;transform:translateY(4px);cursor:default}
.key-button.quiet{width:auto;min-height:46px;padding-inline:22px;font-size:1rem;color:var(--ink);background:var(--paper);border-color:var(--ink);box-shadow:0 3px 0 var(--ink)}
.key-button.quiet:hover{transform:translateY(1px);box-shadow:0 2px 0 var(--ink)}
.key-button.quiet:active{transform:translateY(3px);box-shadow:0 0 0 var(--ink)}

/* app.js marks the page .waiting while the passkey prompt is open and .failed after it went wrong */
main:not(.waiting) .busy,main:not(.failed) .oops,.waiting .idle,.waiting .ready,.failed .idle{display:none}

.colophon{justify-content:space-between;gap:10px;border-top:1px solid var(--rule);padding-block:18px 22px}
.bubbles{display:block;width:27px;height:20px}

@container (max-width:700px){
  .shell{width:calc(100% - 40px)}
  .masthead{padding-block:20px 17px}
  .brand{height:30px}
  .host,.signature,.method{font-size:.8125rem;gap:.35em}
  .landing{padding:34px 22px}
  .ticket{grid-template-columns:minmax(0,1fr);width:min(100%,392px);border-radius:15px}
  .stub{min-height:0;height:168px;border:0;border-bottom:1.5px dashed var(--ink);border-radius:13px 13px 0 0}
  .keyring{width:176px}
  .stub::before,.stub::after{top:auto;bottom:-9px;width:9px;height:16px;border:1.5px solid var(--ink)}
  .stub::before{left:-1.5px;right:auto;border-left:0;border-radius:0 12px 12px 0}
  .stub::after{right:-1.5px;border-right:0;border-radius:12px 0 0 12px}
  .ticket-body{padding:27px 27px 31px}
  .headline{font-size:clamp(2rem,9.7cqi,2.5rem)}
  .detail{margin-top:14px}
  .action-row{margin-top:23px}
  .key-button{font-size:1.1875rem;min-height:51px}
  .colophon{padding-block:16px 19px}
}
@container (max-width:355px){
  .shell{width:calc(100% - 32px)}
  .brand{height:25px}
  .landing{padding-inline:16px}
  .ticket-body{padding-inline:20px}
}
@media (prefers-reduced-motion:reduce){.key-button{transition:none}}
@media (forced-colors:active){.key-button{border-color:ButtonText}}
