import '../globals.css';
import '../token.css';

/**
 * Layout for the email token pages.
 *
 * These live outside [lang] because the link arrives from an email,
 * where the reader's language comes from their subscription rather than
 * the URL. Each page sets its own `lang` and `dir` on the <main> once
 * the API tells it which locale the subscriber chose.
 *
 * Both fonts load, since either language may render.
 */
export default function TokenLayout({ children }: { children: React.ReactNode }) {
  return (
    <html suppressHydrationWarning>
      <head>
        <link rel="preconnect" href="https://fonts.googleapis.com" />
        <link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="" />
        <link
          rel="stylesheet"
          href="https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,400..600&family=Inter+Tight:wght@400..600&family=JetBrains+Mono:wght@400..600&family=Noto+Kufi+Arabic:wght@400..700&family=IBM+Plex+Sans+Arabic:wght@400;500;600&display=swap"
        />
      </head>
      <body>{children}</body>
    </html>
  );
}
