---
title: "Account & States"
description: "Website blocks - Account & States: Blocks for accounts and the moments around them: sign in, providers, sign up and password resets, profiles and settings, support, feedback and surveys and form progress - and the states every product needs: empty, error, success, coming soon, maintenance and 404."
slug: "website-account-states"
---

import { DocPage, PageHeader, DocText, DocLink } from "../../lib/components/index";

<DocPage meta={meta}>

<PageHeader slug="website-account-states" title="Account & States" introStyle="max-width:42rem;">
  Blocks for accounts and the moments around them: sign in, providers, sign up and password resets, profiles and settings, support, feedback and surveys and form progress - and the states every product needs: empty, error, success, coming soon, maintenance and 404. Every block is CSS-only and built from the library's components and tokens.
</PageHeader>

<h2 id="template" class="h2-display">The template</h2>

<DocText>The sign-in of a product, composed from the Account & States blocks - the source is the page. Sign in, create an account, reset the password and the signed-in state are routes of <DocLink href="routing.html">defuss-dom-router</DocLink> (<code>#/sign-up</code>); submitting a form moves on, and the language switch translates the cards with <DocLink href="translation.html">defuss-i18n</DocLink>. The Look select changes the palette and what moves behind the quote.</DocText>

<div class="flex flex-wrap items-center gap-2 mb-6">
  <a class="btn" href="full-website-account-states.html" target="_blank" rel="noopener"><i data-lucide="maximize-2"></i> Open full screen</a>
</div>

```html example label="Sign in" schema="none" hint="Sign in, create an account, reset the password and the signed-in state are routes (#/sign-up, #/reset); the switch translates them. Login Form with Social Login, Signup Form, Reset Request and a Success State beside a panel of moving light - only Account & States blocks." previewStyle="align-items:stretch;padding:0;"
<style>
  @import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Newsreader:ital,opsz,wght@1,6..72,400&display=swap');
  /* The sign-in of a product: the form on the left of a two-column page, a panel of moving light on the right with
     one customer's sentence. Every card is the block itself, without its own frame - the page is the frame. Geist
     for the forms, Newsreader italic for the quote. Looks: Calm (white and violet, follows light / dark), Midnight
     (ink and cyan, a nebula behind the quote) and Paper (warm paper, dots of ink, square corners). */
  #site-account {
    --background: oklch(0.99 0.002 280);
    --foreground: oklch(0.2 0.02 280);
    --card: oklch(1 0 0);
    --card-foreground: var(--foreground);
    --muted: oklch(0.965 0.006 280);
    --muted-foreground: oklch(0.5 0.02 280);
    --border: oklch(0.2 0.02 280 / 0.12);
    --input: oklch(0.2 0.02 280 / 0.2);
    --primary: oklch(0.47 0.2 285);
    --primary-foreground: oklch(0.99 0.002 280);
    --secondary: oklch(0.96 0.015 285);
    --secondary-foreground: oklch(0.36 0.16 285);
    --accent: oklch(0.96 0.015 285);
    --accent-foreground: oklch(0.36 0.16 285);
    --ring: var(--primary);
    --radius: 0.625rem;
    --radius-sm: max(0px, calc(var(--radius) - 4px));
    --radius-md: max(0px, calc(var(--radius) - 2px));
    --radius-lg: var(--radius);
    --radius-xl: calc(var(--radius) + 4px);
    --acc-aside: oklch(0.3 0.12 285);
    --acc-aside-ink: oklch(0.98 0.01 285);
    color-scheme: light;
    container-type: inline-size;
    box-sizing: border-box;
    width: 100%;
    background: var(--background);
    color: var(--foreground);
    font:
      400 1rem/1.55 'Geist',
      var(--font-sans);
  }
  .dark #site-account[data-look='calm'] {
    color-scheme: dark;
    --background: oklch(0.17 0.015 285);
    --foreground: oklch(0.95 0.006 280);
    --card: oklch(0.2 0.018 285);
    --muted: oklch(0.24 0.02 285);
    --muted-foreground: oklch(0.74 0.02 280);
    --border: oklch(0.95 0.006 280 / 0.12);
    --input: oklch(0.95 0.006 280 / 0.22);
    --primary: oklch(0.72 0.15 285);
    --primary-foreground: oklch(0.17 0.015 285);
    --secondary: oklch(0.28 0.05 285);
    --secondary-foreground: oklch(0.9 0.05 285);
    --accent: oklch(0.28 0.05 285);
    --accent-foreground: oklch(0.9 0.05 285);
  }
  #site-account[data-look='midnight'] {
    color-scheme: dark;
    --background: oklch(0.15 0.02 250);
    --foreground: oklch(0.95 0.008 230);
    --card: oklch(0.19 0.025 250);
    --muted: oklch(0.22 0.025 250);
    --muted-foreground: oklch(0.74 0.02 240);
    --border: oklch(0.95 0.008 230 / 0.12);
    --input: oklch(0.95 0.008 230 / 0.22);
    --primary: oklch(0.82 0.12 200);
    --primary-foreground: oklch(0.15 0.02 250);
    --secondary: oklch(0.26 0.04 220);
    --secondary-foreground: oklch(0.9 0.06 200);
    --accent: oklch(0.26 0.04 220);
    --accent-foreground: oklch(0.9 0.06 200);
    --acc-aside: oklch(0.1 0.02 260);
  }
  #site-account[data-look='paper'] {
    color-scheme: light;
    --background: oklch(0.965 0.014 85);
    --foreground: oklch(0.22 0.02 60);
    --card: oklch(0.985 0.01 85);
    --muted: oklch(0.93 0.018 82);
    --muted-foreground: oklch(0.46 0.025 60);
    --border: oklch(0.22 0.02 60 / 0.16);
    --input: oklch(0.22 0.02 60 / 0.3);
    --primary: oklch(0.22 0.02 60);
    --primary-foreground: oklch(0.985 0.01 85);
    --secondary: oklch(0.93 0.018 82);
    --secondary-foreground: oklch(0.22 0.02 60);
    --accent: oklch(0.93 0.018 82);
    --accent-foreground: oklch(0.22 0.02 60);
    --ring: oklch(0.5 0.14 35);
    --radius: 0.125rem;
    --acc-aside: oklch(0.91 0.03 80);
    --acc-aside-ink: oklch(0.22 0.02 60);
  }
  #site-account [hidden] {
    display: none !important;
  }
  #site-account .acc-look-only {
    display: none;
  }
  #site-account[data-look='calm'] .acc-look-only[data-for='calm'],
  #site-account[data-look='midnight'] .acc-look-only[data-for='midnight'],
  #site-account[data-look='paper'] .acc-look-only[data-for='paper'] {
    display: block;
  }
  /* two columns: the form, the panel */
  #site-account .acc-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-height: max(44rem, var(--scaffold-height, 0px));
  }
  @container (width > 60rem) {
    #site-account .acc-shell {
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
    #site-account .acc-stage {
      align-items: center;
    }
  }
  #site-account .acc-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 1.5rem clamp(1rem, 4vw, 3rem);
  }
  #site-account .acc-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
  }
  #site-account .acc-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--foreground);
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-decoration: none;
  }
  #site-account .acc-brand svg {
    color: var(--primary);
  }
  #site-account .acc-bar-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  #site-account .acc-bar .select {
    width: auto;
    min-width: 7.5rem;
  }
  #site-account .acc-stage {
    display: grid;
    flex: 1;
    place-items: start center;
    padding-block: 1rem;
  }
  /* the blocks without their own frame: the page is the frame */
  #site-account .acc-card {
    max-width: 24rem;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
  }
  #site-account :is(.mk-login-form-head, .mk-signup-form-head, .mk-reset-request-head) {
    justify-items: start;
    text-align: start;
  }
  #site-account :is(.mk-login-form-head, .mk-signup-form-head, .mk-reset-request-head) h1 {
    font-size: 1.875rem;
    font-weight: 600;
    letter-spacing: -0.03em;
  }
  #site-account .mk-social-login {
    margin: 0;
  }
  #site-account .mk-success-state {
    max-width: 26rem;
    padding: 0;
  }
  #site-account .mk-success-state-title {
    font-size: 1.875rem;
    font-weight: 600;
    letter-spacing: -0.03em;
  }
  /* the footer's links in the site's ink (they showed the browser's default blue) */
  #site-account .acc-legal a {
    color: inherit;
    text-underline-offset: 3px;
  }
  #site-account .acc-legal a:hover {
    color: var(--foreground);
  }
  #site-account .acc-legal {
    margin: 0;
    color: var(--muted-foreground);
    font-size: 0.8125rem;
  }
  /* the panel: moving light, one customer's sentence */
  #site-account .acc-aside {
    position: relative;
    isolation: isolate;
    display: none;
    flex-direction: column;
    justify-content: flex-end;
    gap: 1.25rem;
    margin: 0.75rem;
    padding: clamp(2rem, 4vw, 3.5rem);
    overflow: hidden;
    border-radius: calc(var(--radius) + 0.75rem);
    background: var(--acc-aside);
    color: var(--acc-aside-ink);
  }
  @container (width > 60rem) {
    #site-account .acc-aside {
      display: flex;
    }
  }
  #site-account .acc-aside::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(transparent 35%, oklch(0 0 0 / 0.45));
    pointer-events: none;
  }
  #site-account[data-look='paper'] .acc-aside::after {
    background: linear-gradient(transparent 35%, var(--acc-aside) 80%);
  }
  #site-account .acc-dots {
    --surface-ink: oklch(0.22 0.02 60 / 0.1);
    --surface-accent: oklch(0.5 0.14 35 / 0.28);
    mask-image: linear-gradient(transparent, #000 45%, transparent 85%);
  }
  #site-account .acc-stat {
    margin: 0 0 auto;
    font-size: 0.9375rem;
  }
  #site-account .acc-stat b {
    display: block;
    font-size: 3rem;
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1;
  }
  #site-account .acc-aside blockquote {
    max-width: 28rem;
    margin: 0;
    font:
      italic 400 clamp(1.75rem, 3vw, 2.25rem) / 1.2 'Newsreader',
      Georgia,
      serif;
    letter-spacing: -0.01em;
    text-wrap: balance;
  }
  #site-account .acc-aside figcaption {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 500;
  }
  /* light or dark: the Swap writes the page's dark class - every look has a light and a dark palette */
  #site-account .site-mode {
    flex: none;
    border: 1px solid var(--input);
    border-radius: var(--radius-md);
    background: var(--background);
    color: var(--foreground);
  }
  #site-account .site-mode:hover {
    background: var(--accent);
    color: var(--accent-foreground);
  }
  /* -- modes: each look in light and dark, derived from the palettes above (the other mode of each look) -- */
  :root:not(.dark) #site-account[data-look='calm'] {
    --accent: oklch(0.945 0.015 280);
    --accent-foreground: oklch(0.2 0.02 280);
  }
  .dark #site-account[data-look='calm'] {
    --accent: oklch(0.26 0.05 285);
    --accent-foreground: oklch(0.95 0.006 280);
  }
  .dark #site-account[data-look='midnight'] {
    --accent: oklch(0.24 0.04 220);
    --accent-foreground: oklch(0.95 0.008 230);
  }
  :root:not(.dark) #site-account[data-look='midnight'] {
    color-scheme: light;
    --background: oklch(0.985 0.02 250);
    --foreground: oklch(0.2 0.008 230);
    --card: oklch(0.997 0.025 250);
    --card-foreground: oklch(0.2 0.008 230);
    --muted: oklch(0.95 0.025 250);
    --muted-foreground: oklch(0.46 0.02 240);
    --border: oklch(0.2 0.008 230 / 0.12);
    --input: oklch(0.2 0.008 230 / 0.12);
    /* the button white on a deeper teal (5:1), like the dark mode's light-on-dark */
    --primary: oklch(0.5 0.1 200);
    --primary-foreground: oklch(0.99 0.004 200);
    --secondary: oklch(0.955 0.025 220);
    --secondary-foreground: oklch(0.25 0.03 200);
    --accent: oklch(0.94 0.025 220);
    --accent-foreground: oklch(0.2 0.008 230);
    --ring: oklch(0.5 0.1 200);
    /* the side panel stays the night sky its nebula draws - light text on it in both modes */
    --acc-aside: oklch(0.1 0.02 260);
    --acc-aside-ink: oklch(0.95 0.008 230);
    --popover: oklch(0.997 0 0);
    --popover-foreground: oklch(0.2 0 0);
  }
  :root:not(.dark) #site-account[data-look='paper'] {
    --accent: oklch(0.92 0.018 85);
  }
  .dark #site-account[data-look='paper'] {
    color-scheme: dark;
    --background: oklch(0.17 0.014 85);
    --foreground: oklch(0.94 0.02 60);
    --card: oklch(0.205 0.01 85);
    --card-foreground: oklch(0.94 0.02 60);
    --muted: oklch(0.24 0.018 82);
    --muted-foreground: oklch(0.74 0.025 60);
    --border: oklch(0.95 0.02 60 / 0.14);
    --input: oklch(0.95 0.02 60 / 0.14);
    --primary: oklch(0.93 0.02 60);
    --primary-foreground: oklch(0.17 0.02 60);
    --secondary: oklch(0.25 0.018 82);
    --secondary-foreground: oklch(0.9 0.02 60);
    --accent: oklch(0.26 0.018 85);
    --accent-foreground: oklch(0.94 0.02 60);
    --ring: oklch(0.74 0.14 35);
    --acc-aside: oklch(0.285 0.03 80);
    --acc-aside-ink: oklch(0.907 0.02 60);
    --popover: oklch(0.215 0 0);
    --popover-foreground: oklch(0.94 0 0);
  }
  /* -- modes: end -- */
</style>
<div id="site-account" data-look="calm" data-i18n-component>
  <div class="acc-shell">
    <div class="acc-main">
      <div class="acc-bar">
        <a class="acc-brand" href="#/" data-router-link
          ><svg
            viewBox="0 0 24 24"
            width="22"
            height="22"
            fill="none"
            stroke="currentColor"
            stroke-width="2"
            stroke-linecap="round"
            stroke-linejoin="round"
            aria-hidden="true"
          >
            <polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2" /></svg
          ><span>Acme</span></a
        >
        <div class="acc-bar-controls">
          <select
            class="select"
            data-size="sm"
            data-site-look
            aria-label="Look"
            data-i18n-aria-label-en="Look"
            data-i18n-aria-label-de="Stil"
          >
            <option value="calm" data-i18n-target="look-calm">Calm</option>
            <option value="midnight" data-i18n-target="look-midnight">Midnight</option>
            <option value="paper" data-i18n-target="look-paper">Paper</option>
          </select>
          <div
            class="language-switcher"
            data-app-locale
            role="group"
            aria-label="Language"
            data-i18n-aria-label-en="Language"
            data-i18n-aria-label-de="Sprache"
            data-languages="en de"
            data-value="en"
            data-size="sm"
            data-variant="swap"
            data-display="icon"
            data-flag-shape="squircle"
          ></div>
          <label class="swap site-mode" data-variant="rotate" data-size="sm">
            <input
              type="checkbox"
              data-site-mode
              aria-label="Dark mode"
              data-i18n-aria-label-en="Dark mode"
              data-i18n-aria-label-de="Dunkler Modus"
            />
            <span class="swap-on" aria-hidden="true"><i data-lucide="moon"></i></span>
            <span class="swap-off" aria-hidden="true"><i data-lucide="sun"></i></span>
          </label>
        </div>
      </div>
      <div class="acc-stage">
        <section class="mk-login-form acc-card" aria-labelledby="lf2-title" data-account-view="sign-in">
          <div class="mk-login-form-head">
            <h1 id="lf2-title" data-i18n-target="acc-1-1">Welcome back</h1>
            <p data-i18n-target="acc-1-2">Sign in to your Acme workspace.</p>
          </div>
          <div class="mk-social-login" data-variant="icons">
            <a
              class="btn"
              data-variant="outline"
              href="#/sso/google"
              data-router-link
              aria-label="Continue with Google"
              data-i18n-aria-label-en="Continue with Google"
              data-i18n-aria-label-de="Weiter mit Google"
              ><svg viewBox="0 0 24 24" width="18" height="18" aria-hidden="true">
                <path
                  fill="#4285F4"
                  d="M23.5 12.3c0-.8-.1-1.6-.2-2.3H12v4.4h6.5a5.6 5.6 0 0 1-2.4 3.7v3h3.9c2.3-2.1 3.5-5.2 3.5-8.8Z"
                />
                <path
                  fill="#34A853"
                  d="M12 24c3.2 0 6-1.1 8-2.9l-3.9-3c-1.1.7-2.5 1.2-4.1 1.2-3.1 0-5.8-2.1-6.7-5H1.3v3.1A12 12 0 0 0 12 24Z"
                />
                <path fill="#FBBC05" d="M5.3 14.3a7.2 7.2 0 0 1 0-4.6V6.6h-4a12 12 0 0 0 0 10.8l4-3.1Z" />
                <path
                  fill="#EA4335"
                  d="M12 4.8c1.8 0 3.3.6 4.6 1.8l3.4-3.4A11.9 11.9 0 0 0 1.3 6.6l4 3.1c.9-2.9 3.6-4.9 6.7-4.9Z"
                /></svg
            ></a>
            <a
              class="btn"
              data-variant="outline"
              href="#/sso/apple"
              data-router-link
              aria-label="Continue with Apple"
              data-i18n-aria-label-en="Continue with Apple"
              data-i18n-aria-label-de="Weiter mit Apple"
              ><svg viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true">
                <path
                  d="M16.4 12.6c0-2.6 2.1-3.8 2.2-3.9a4.8 4.8 0 0 0-3.8-2c-1.6-.2-3.1.9-3.9.9-.8 0-2-.9-3.4-.9a5 5 0 0 0-4.2 2.6c-1.8 3.1-.5 7.7 1.3 10.2.8 1.2 1.8 2.6 3.1 2.5 1.3 0 1.7-.8 3.2-.8s1.9.8 3.2.8c1.3 0 2.2-1.2 3-2.4a10 10 0 0 0 1.4-2.8 4.3 4.3 0 0 1-2.1-4.2ZM14 5.1A4.2 4.2 0 0 0 15 2a4.4 4.4 0 0 0-2.8 1.5 4.1 4.1 0 0 0-1 3c1 .1 2.1-.5 2.8-1.4Z"
                /></svg
            ></a>
            <a
              class="btn"
              data-variant="outline"
              href="#/sso/github"
              data-router-link
              aria-label="Continue with GitHub"
              data-i18n-aria-label-en="Continue with GitHub"
              data-i18n-aria-label-de="Weiter mit GitHub"
              ><svg viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true">
                <path
                  d="M12 .5a11.5 11.5 0 0 0-3.6 22.4c.6.1.8-.3.8-.6v-2.1c-3.2.7-3.9-1.5-3.9-1.5-.5-1.3-1.3-1.7-1.3-1.7-1-.7.1-.7.1-.7 1.2.1 1.8 1.2 1.8 1.2 1 1.8 2.8 1.3 3.5 1 .1-.8.4-1.3.7-1.6-2.6-.3-5.3-1.3-5.3-5.7 0-1.3.5-2.3 1.2-3.1-.1-.3-.5-1.5.1-3.1 0 0 1-.3 3.2 1.2a11 11 0 0 1 5.8 0c2.2-1.5 3.2-1.2 3.2-1.2.6 1.6.2 2.8.1 3.1.8.8 1.2 1.8 1.2 3.1 0 4.4-2.7 5.4-5.3 5.7.4.4.8 1.1.8 2.2v3.3c0 .3.2.7.8.6A11.5 11.5 0 0 0 12 .5Z"
                /></svg
            ></a>
            <a
              class="btn"
              data-variant="outline"
              href="#/sso/microsoft"
              data-router-link
              aria-label="Continue with Microsoft"
              data-i18n-aria-label-en="Continue with Microsoft"
              data-i18n-aria-label-de="Weiter mit Microsoft"
              ><svg viewBox="0 0 24 24" width="18" height="18" aria-hidden="true">
                <path fill="#F25022" d="M1 1h10.5v10.5H1z" />
                <path fill="#7FBA00" d="M12.5 1H23v10.5H12.5z" />
                <path fill="#00A4EF" d="M1 12.5h10.5V23H1z" />
                <path fill="#FFB900" d="M12.5 12.5H23V23H12.5z" /></svg
            ></a>
          </div>
          <p class="mk-social-login-divider" data-i18n-target="acc-6-1">or continue with email</p>
          <form action="#" method="post" data-account-sign-in>
            <div class="mk-auth-field"
              ><label class="label" for="lf2-email" data-i18n-target="acc-2-1">Email</label
              ><input class="input" id="lf2-email" type="email" name="email" autocomplete="username" required
            /></div>
            <div class="mk-auth-field"
              ><div class="mk-login-form-label-row"
                ><label class="label" for="lf2-pass" data-i18n-target="acc-3-1">Password</label
                ><a href="#/reset" data-router-link data-i18n-target="acc-3-2">Forgot password?</a></div
              ><input
                class="input"
                id="lf2-pass"
                type="password"
                name="password"
                autocomplete="current-password"
                required
            /></div>
            <button class="btn" type="submit" data-i18n-target="acc-4-1">Sign in</button>
          </form>
          <p class="mk-login-form-foot"
            ><span data-i18n-target="acc-7-1">New to Acme?</span>
            <a href="#/sign-up" data-router-link data-i18n-target="acc-7-2">Create an account</a></p
          >
        </section>
        <section class="mk-signup-form acc-card" aria-labelledby="su-title" data-account-view="sign-up" hidden>
          <div class="mk-signup-form-head">
            <h1 id="su-title" data-i18n-target="acc-8-1">Create your account</h1>
            <p data-i18n-target="acc-8-2">Free for 14 days. No credit card.</p>
          </div>
          <form action="#" method="post" data-account-sign-up>
            <div class="mk-auth-field"
              ><label class="label" for="su-name" data-i18n-target="acc-9-1">Full name</label
              ><input class="input" id="su-name" name="name" autocomplete="name" required
            /></div>
            <div class="mk-auth-field"
              ><label class="label" for="su-email" data-i18n-target="acc-2-3">Work email</label
              ><input class="input" id="su-email" type="email" name="email" autocomplete="email" required
            /></div>
            <div class="mk-auth-field"
              ><label class="label" for="su-pass" data-i18n-target="acc-3-3">Password</label
              ><input
                class="input"
                id="su-pass"
                type="password"
                name="password"
                autocomplete="new-password"
                minlength="12"
                required
                aria-describedby="su-pass-rules"
              /><ul class="mk-signup-form-rules" id="su-pass-rules"
                ><li data-i18n-target="acc-10-1">At least 12 characters</li
                ><li data-i18n-target="acc-10-2">A number or a symbol</li></ul
              ></div
            >
            <label class="mk-signup-form-terms"
              ><input class="checkbox" type="checkbox" name="terms" required /><span data-i18n-target="acc-11-1"
                >I agree to the <a href="#/terms" data-router-link>Terms</a> and the
                <a href="#/privacy" data-router-link>Privacy Policy</a>.</span
              ></label
            >
            <button class="btn" type="submit" data-i18n-target="acc-12-1">Create account</button>
          </form>
          <p class="mk-signup-form-foot"
            ><span data-i18n-target="acc-13-1">Already have an account?</span>
            <a href="#/" data-router-link data-i18n-target="acc-13-2">Sign in</a></p
          >
        </section>
        <section class="mk-reset-request acc-card" aria-labelledby="rr-title" data-account-view="reset" hidden>
          <div class="mk-reset-request-head">
            <span class="mk-reset-request-icon" aria-hidden="true"><i data-lucide="key-round"></i></span>
            <h1 id="rr-title" data-i18n-target="acc-14-1">Forgot your password?</h1>
            <p data-i18n-target="acc-14-2">Enter your email and we'll send you a link to reset it.</p>
          </div>
          <form action="#" method="post" data-account-reset>
            <div class="mk-auth-field"
              ><label class="label" for="rr-email" data-i18n-target="acc-2-4">Email</label
              ><input class="input" id="rr-email" type="email" name="email" autocomplete="email" required
            /></div>
            <button class="btn" type="submit" data-i18n-target="acc-15-1">Send reset link</button>
          </form>
          <a class="mk-reset-request-back" href="#/" data-router-link
            ><i data-lucide="arrow-left"></i> <span data-i18n-target="acc-16-1">Back to sign in</span></a
          >
        </section>
        <section
          class="mk-success-state acc-card"
          role="status"
          aria-labelledby="ss-0"
          data-account-view="welcome"
          hidden
        >
          <span class="mk-success-state-icon" aria-hidden="true"><i data-lucide="check"></i></span>
          <h1 class="mk-success-state-title" id="ss-0" data-i18n-target="acc-17-1">You're signed in</h1>
          <p class="mk-success-state-text" data-i18n-target="acc-17-2"
            >Welcome back, Anna. Your workspace has three new comments since Friday.</p
          >
          <div class="mk-success-state-actions"
            ><a class="btn" href="app-notes.html" data-i18n-target="acc-17-3">Open workspace</a
            ><a class="btn" data-variant="outline" href="#/" data-router-link data-i18n-target="acc-17-4"
              >Sign out</a
            ></div
          >
        </section>
        <section class="acc-card acc-page" aria-labelledby="sso-title" data-account-view="sso" hidden>
          <span class="mk-reset-request-icon" aria-hidden="true"><i data-lucide="link-2"></i></span>
          <h1 id="sso-title"
            ><span data-i18n-target="sso-title">Continue with</span> <span data-account-provider>Google</span></h1
          >
          <p data-i18n-target="sso-text"
            >Acme asks for your name, your email address and your profile picture - nothing else. You can remove the
            connection at any time in your account settings.</p
          >
          <a class="btn" href="#/welcome" data-router-link data-i18n-target="sso-go">Continue</a>
          <a class="mk-reset-request-back" href="#/" data-router-link
            ><i data-lucide="arrow-left"></i> <span data-i18n-target="sso-back">Use email instead</span></a
          >
        </section>
        <section class="acc-card acc-page" aria-labelledby="terms-title" data-account-view="terms" hidden>
          <h1 id="terms-title" data-i18n-target="terms-title">Terms of service</h1>
          <p data-i18n-target="terms-1"
            >Acme gives your team a workspace for plans, documents and tasks. You keep every right to what you put in
            it; we only process it to run the service.</p
          >
          <p data-i18n-target="terms-2"
            >A trial lasts 14 days and ends by itself. A paid plan renews monthly and can be cancelled at any time,
            effective at the end of the month.</p
          >
          <p data-i18n-target="terms-3">Questions about these terms go to legal@acme.example.</p>
          <a class="mk-reset-request-back" href="#/sign-up" data-router-link
            ><i data-lucide="arrow-left"></i> <span data-i18n-target="terms-back">Back to the sign-up</span></a
          >
        </section>
        <section class="acc-card acc-page" aria-labelledby="privacy-title" data-account-view="privacy" hidden>
          <h1 id="privacy-title" data-i18n-target="privacy-title">Privacy policy</h1>
          <p data-i18n-target="privacy-1"
            >We store your name, your email address and what your team writes in Acme - in data centres in the European
            Union.</p
          >
          <p data-i18n-target="privacy-2"
            >We never sell your data and never use it to train models. Logs that could identify you are deleted after 30
            days.</p
          >
          <p data-i18n-target="privacy-3"
            >You can export or delete everything at any time; privacy@acme.example answers within a week.</p
          >
          <a class="mk-reset-request-back" href="#/sign-up" data-router-link
            ><i data-lucide="arrow-left"></i> <span data-i18n-target="privacy-back">Back to the sign-up</span></a
          >
        </section>
      </div>
      <p class="acc-legal" data-i18n-target="acc-legal"
        >© 2026 Acme · <a href="#/privacy" data-router-link>Privacy</a> ·
        <a href="#/terms" data-router-link>Terms</a></p
      >
    </div>
    <figure class="acc-aside">
      <div
        class="shader acc-look-only"
        data-for="calm"
        data-variant="background"
        data-effect="mesh-gradient"
        data-colors="oklch(0.42 0.2 275) oklch(0.62 0.18 320) oklch(0.72 0.12 225) oklch(0.36 0.16 290)"
        data-speed="0.3"
        data-fps="30"
        aria-hidden="true"
      ></div>
      <div
        class="shader acc-look-only"
        data-for="midnight"
        data-variant="background"
        data-effect="nebula"
        data-speed="0.35"
        data-fps="30"
        aria-hidden="true"
      ></div>
      <div
        class="surface acc-dots acc-look-only"
        data-for="paper"
        data-variant="background"
        data-pattern="dots"
        aria-hidden="true"
      ></div>
      <p class="acc-stat"><b>12,000</b> <span data-i18n-target="acc-q-3">teams plan their week in Acme</span></p>
      <blockquote data-i18n-target="acc-q-1">"Acme gave our team its afternoons back."</blockquote>
      <figcaption
        ><span class="avatar" data-size="sm"><img class="avatar-image" src="images/avatars/13-96.webp" alt="" /></span
        ><span data-i18n-target="acc-q-2">Marco Rossi, COO at Globex</span></figcaption
      >
    </figure>
  </div>
  <!-- the translations: one template per target and language (defuss-i18n) -->
  <template data-i18n-for="look-calm" data-i18n-locale="en">Calm</template>
  <template data-i18n-for="look-calm" data-i18n-locale="de">Ruhig</template>
  <template data-i18n-for="look-midnight" data-i18n-locale="en">Midnight</template>
  <template data-i18n-for="look-midnight" data-i18n-locale="de">Mitternacht</template>
  <template data-i18n-for="look-paper" data-i18n-locale="en">Paper</template>
  <template data-i18n-for="look-paper" data-i18n-locale="de">Papier</template>
  <template data-i18n-for="acc-1-1" data-i18n-locale="en">Welcome back</template>
  <template data-i18n-for="acc-1-1" data-i18n-locale="de">Willkommen zurück</template>
  <template data-i18n-for="acc-1-2" data-i18n-locale="en">Sign in to your Acme workspace.</template>
  <template data-i18n-for="acc-1-2" data-i18n-locale="de">Melde dich bei deinem Acme-Workspace an.</template>
  <template data-i18n-for="acc-6-1" data-i18n-locale="en">or continue with email</template>
  <template data-i18n-for="acc-6-1" data-i18n-locale="de">oder weiter mit E-Mail</template>
  <template data-i18n-for="acc-2-1" data-i18n-locale="en">Email</template>
  <template data-i18n-for="acc-2-1" data-i18n-locale="de">E-Mail</template>
  <template data-i18n-for="acc-3-1" data-i18n-locale="en">Password</template>
  <template data-i18n-for="acc-3-1" data-i18n-locale="de">Passwort</template>
  <template data-i18n-for="acc-3-2" data-i18n-locale="en">Forgot password?</template>
  <template data-i18n-for="acc-3-2" data-i18n-locale="de">Passwort vergessen?</template>
  <template data-i18n-for="acc-4-1" data-i18n-locale="en">Sign in</template>
  <template data-i18n-for="acc-4-1" data-i18n-locale="de">Anmelden</template>
  <template data-i18n-for="acc-7-1" data-i18n-locale="en">New to Acme?</template>
  <template data-i18n-for="acc-7-1" data-i18n-locale="de">Neu bei Acme?</template>
  <template data-i18n-for="acc-7-2" data-i18n-locale="en">Create an account</template>
  <template data-i18n-for="acc-7-2" data-i18n-locale="de">Konto erstellen</template>
  <template data-i18n-for="acc-8-1" data-i18n-locale="en">Create your account</template>
  <template data-i18n-for="acc-8-1" data-i18n-locale="de">Erstelle dein Konto</template>
  <template data-i18n-for="acc-8-2" data-i18n-locale="en">Free for 14 days. No credit card.</template>
  <template data-i18n-for="acc-8-2" data-i18n-locale="de">14 Tage kostenlos. Keine Kreditkarte.</template>
  <template data-i18n-for="acc-9-1" data-i18n-locale="en">Full name</template>
  <template data-i18n-for="acc-9-1" data-i18n-locale="de">Vollständiger Name</template>
  <template data-i18n-for="acc-2-3" data-i18n-locale="en">Work email</template>
  <template data-i18n-for="acc-2-3" data-i18n-locale="de">Geschäftliche E-Mail</template>
  <template data-i18n-for="acc-3-3" data-i18n-locale="en">Password</template>
  <template data-i18n-for="acc-3-3" data-i18n-locale="de">Passwort</template>
  <template data-i18n-for="acc-10-1" data-i18n-locale="en">At least 12 characters</template>
  <template data-i18n-for="acc-10-1" data-i18n-locale="de">Mindestens 12 Zeichen</template>
  <template data-i18n-for="acc-10-2" data-i18n-locale="en">A number or a symbol</template>
  <template data-i18n-for="acc-10-2" data-i18n-locale="de">Eine Zahl oder ein Symbol</template>
  <template data-i18n-for="acc-11-1" data-i18n-locale="en"
    >I agree to the <a href="#/terms" data-router-link>Terms</a> and the
    <a href="#/privacy" data-router-link>Privacy Policy</a>.</template
  >
  <template data-i18n-for="acc-11-1" data-i18n-locale="de"
    >Ich stimme den <a href="#/terms" data-router-link>AGB</a> und der
    <a href="#/privacy" data-router-link>Datenschutzerklärung</a> zu.</template
  >
  <template data-i18n-for="acc-12-1" data-i18n-locale="en">Create account</template>
  <template data-i18n-for="acc-12-1" data-i18n-locale="de">Konto erstellen</template>
  <template data-i18n-for="acc-13-1" data-i18n-locale="en">Already have an account?</template>
  <template data-i18n-for="acc-13-1" data-i18n-locale="de">Schon ein Konto?</template>
  <template data-i18n-for="acc-13-2" data-i18n-locale="en">Sign in</template>
  <template data-i18n-for="acc-13-2" data-i18n-locale="de">Anmelden</template>
  <template data-i18n-for="acc-14-1" data-i18n-locale="en">Forgot your password?</template>
  <template data-i18n-for="acc-14-1" data-i18n-locale="de">Passwort vergessen?</template>
  <template data-i18n-for="acc-14-2" data-i18n-locale="en"
    >Enter your email and we'll send you a link to reset it.</template
  >
  <template data-i18n-for="acc-14-2" data-i18n-locale="de"
    >Gib deine E-Mail ein, wir schicken dir einen Link zum Zurücksetzen.</template
  >
  <template data-i18n-for="acc-2-4" data-i18n-locale="en">Email</template>
  <template data-i18n-for="acc-2-4" data-i18n-locale="de">E-Mail</template>
  <template data-i18n-for="acc-15-1" data-i18n-locale="en">Send reset link</template>
  <template data-i18n-for="acc-15-1" data-i18n-locale="de">Link senden</template>
  <template data-i18n-for="acc-16-1" data-i18n-locale="en">Back to sign in</template>
  <template data-i18n-for="acc-16-1" data-i18n-locale="de">Zurück zur Anmeldung</template>
  <template data-i18n-for="acc-17-1" data-i18n-locale="en">You're signed in</template>
  <template data-i18n-for="acc-17-1" data-i18n-locale="de">Du bist angemeldet</template>
  <template data-i18n-for="acc-17-2" data-i18n-locale="en"
    >Welcome back, Anna. Your workspace has three new comments since Friday.</template
  >
  <template data-i18n-for="acc-17-2" data-i18n-locale="de"
    >Willkommen zurück, Anna. Seit Freitag gibt es drei neue Kommentare in deinem Workspace.</template
  >
  <template data-i18n-for="acc-17-3" data-i18n-locale="en">Open workspace</template>
  <template data-i18n-for="acc-17-3" data-i18n-locale="de">Workspace öffnen</template>
  <template data-i18n-for="acc-17-4" data-i18n-locale="en">Sign out</template>
  <template data-i18n-for="acc-17-4" data-i18n-locale="de">Abmelden</template>
  <template data-i18n-for="acc-q-1" data-i18n-locale="en">"Acme gave our team its afternoons back."</template>
  <template data-i18n-for="acc-q-1" data-i18n-locale="de"
    >„Acme hat unserem Team die Nachmittage zurückgegeben.“</template
  >
  <template data-i18n-for="acc-q-2" data-i18n-locale="en">Marco Rossi, COO at Globex</template>
  <template data-i18n-for="acc-q-2" data-i18n-locale="de">Marco Rossi, COO bei Globex</template>
  <template data-i18n-for="acc-q-3" data-i18n-locale="en">teams plan their week in Acme</template>
  <template data-i18n-for="acc-q-3" data-i18n-locale="de">Teams planen ihre Woche in Acme</template>
  <template data-i18n-for="acc-legal" data-i18n-locale="en"
    >© 2026 Acme · <a href="#/privacy" data-router-link>Privacy</a> ·
    <a href="#/terms" data-router-link>Terms</a></template
  >
  <template data-i18n-for="acc-legal" data-i18n-locale="de"
    >© 2026 Acme · <a href="#/privacy" data-router-link>Datenschutz</a> ·
    <a href="#/terms" data-router-link>AGB</a></template
  >
  <template data-i18n-for="sso-title" data-i18n-locale="en">Continue with</template>
  <template data-i18n-for="sso-title" data-i18n-locale="de">Weiter mit</template>
  <template data-i18n-for="sso-text" data-i18n-locale="en"
    >Acme asks for your name, your email address and your profile picture - nothing else. You can remove the connection
    at any time in your account settings.</template
  >
  <template data-i18n-for="sso-text" data-i18n-locale="de"
    >Acme fragt nur nach deinem Namen, deiner E-Mail-Adresse und deinem Profilbild. Du kannst die Verbindung jederzeit
    in deinen Kontoeinstellungen trennen.</template
  >
  <template data-i18n-for="sso-go" data-i18n-locale="en">Continue</template>
  <template data-i18n-for="sso-go" data-i18n-locale="de">Weiter</template>
  <template data-i18n-for="sso-back" data-i18n-locale="en">Use email instead</template>
  <template data-i18n-for="sso-back" data-i18n-locale="de">Lieber mit E-Mail</template>
  <template data-i18n-for="terms-title" data-i18n-locale="en">Terms of service</template>
  <template data-i18n-for="terms-title" data-i18n-locale="de">Allgemeine Geschäftsbedingungen</template>
  <template data-i18n-for="terms-1" data-i18n-locale="en"
    >Acme gives your team a workspace for plans, documents and tasks. You keep every right to what you put in it; we
    only process it to run the service.</template
  >
  <template data-i18n-for="terms-1" data-i18n-locale="de"
    >Acme gibt deinem Team einen Arbeitsbereich für Pläne, Dokumente und Aufgaben. Alle Rechte an deinen Inhalten
    bleiben bei dir; wir verarbeiten sie nur, um den Dienst zu betreiben.</template
  >
  <template data-i18n-for="terms-2" data-i18n-locale="en"
    >A trial lasts 14 days and ends by itself. A paid plan renews monthly and can be cancelled at any time, effective at
    the end of the month.</template
  >
  <template data-i18n-for="terms-2" data-i18n-locale="de"
    >Ein Test dauert 14 Tage und endet von selbst. Ein bezahlter Tarif verlängert sich monatlich und ist jederzeit zum
    Monatsende kündbar.</template
  >
  <template data-i18n-for="terms-3" data-i18n-locale="en"
    >Questions about these terms go to legal@acme.example.</template
  >
  <template data-i18n-for="terms-3" data-i18n-locale="de"
    >Fragen zu diesen Bedingungen gehen an legal@acme.example.</template
  >
  <template data-i18n-for="terms-back" data-i18n-locale="en">Back to the sign-up</template>
  <template data-i18n-for="terms-back" data-i18n-locale="de">Zurück zur Registrierung</template>
  <template data-i18n-for="privacy-title" data-i18n-locale="en">Privacy policy</template>
  <template data-i18n-for="privacy-title" data-i18n-locale="de">Datenschutzerklärung</template>
  <template data-i18n-for="privacy-1" data-i18n-locale="en"
    >We store your name, your email address and what your team writes in Acme - in data centres in the European
    Union.</template
  >
  <template data-i18n-for="privacy-1" data-i18n-locale="de"
    >Wir speichern deinen Namen, deine E-Mail-Adresse und was dein Team in Acme schreibt - in Rechenzentren in der
    Europäischen Union.</template
  >
  <template data-i18n-for="privacy-2" data-i18n-locale="en"
    >We never sell your data and never use it to train models. Logs that could identify you are deleted after 30
    days.</template
  >
  <template data-i18n-for="privacy-2" data-i18n-locale="de"
    >Wir verkaufen deine Daten nie und trainieren nie Modelle damit. Protokolle, die dich erkennbar machen, löschen wir
    nach 30 Tagen.</template
  >
  <template data-i18n-for="privacy-3" data-i18n-locale="en"
    >You can export or delete everything at any time; privacy@acme.example answers within a week.</template
  >
  <template data-i18n-for="privacy-3" data-i18n-locale="de"
    >Du kannst jederzeit alles exportieren oder löschen; privacy@acme.example antwortet innerhalb einer Woche.</template
  >
  <template data-i18n-for="privacy-back" data-i18n-locale="en">Back to the sign-up</template>
  <template data-i18n-for="privacy-back" data-i18n-locale="de">Zurück zur Registrierung</template>
</div>
<script type="module">
  // routing and translation: defuss-dom-router owns the address, defuss-i18n the language
  import { createRouter } from 'https://cdn.jsdelivr.net/npm/defuss-dom-router@0.1.1/dist/index.js';
  import { createDomI18n, createI18n } from 'https://cdn.jsdelivr.net/npm/defuss-i18n@0.2.0/dist/core.js';

  // df$ comes with the component bundle - a full-screen page loads it after this module
  addEventListener('DOMContentLoaded', async () => {
    // light or dark: the switch writes the page's dark class (every look has both palettes); it follows the class when
    // something else sets it (the docs card follows the site's mode)
    const siteMode = df$('#site-account [data-site-mode]');
    const syncMode = () => siteMode.prop('checked', document.documentElement.classList.contains('dark'));
    siteMode.on('change', () => {
      document.documentElement.classList.toggle('dark', siteMode.prop('checked'));
      document.dispatchEvent(new CustomEvent('defuss-theme-change'));
    });
    new MutationObserver(syncMode).observe(document.documentElement, { attributes: true, attributeFilter: ['class'] });
    syncMode();

    const site = df$('#site-account').get(0);

    // -- translation: the markup is the catalog (the templates at the end of the page)
    const locale = createI18n({
      locale: 'en', // the demos start in English; the language select offers German
    });
    createDomI18n(df$).bind(site, locale);
    // the Language Switcher sets the locale on a pick and follows it when something else sets it
    df$.shadcn.languageSwitcher.bind(df$('[data-app-locale]').get(0), locale);

    // -- the look: one of the site's designs; a shader reads its colors again on defuss-theme-change
    const look = df$('#site-account [data-site-look]');
    look.val(site.dataset.look).on('change', () => {
      site.dataset.look = look.val();
      document.dispatchEvent(new CustomEvent('defuss-theme-change'));
    });

    // -- routing: one card at a time
    const routes = [
      { id: 'sign-in', path: '/' },
      { id: 'sign-up', path: '/sign-up' },
      { id: 'reset', path: '/reset' },
      { id: 'welcome', path: '/welcome' },
      { id: 'sso', path: '/sso/:provider' },
      { id: 'terms', path: '/terms' },
      { id: 'privacy', path: '/privacy' },
      { id: 'missing', path: '*' },
    ];
    // a social sign-in names its provider before it goes on
    const PROVIDERS = { google: 'Google', apple: 'Apple', github: 'GitHub', microsoft: 'Microsoft' };
    const show = (to) => {
      const provider = to.routeId === 'sso' ? PROVIDERS[to.params.provider] : null;
      const view = to.routeId === 'missing' || (to.routeId === 'sso' && !provider) ? 'sign-in' : to.routeId;
      if (provider) df$('#site-account [data-account-provider]').text(provider);
      df$('#site-account [data-account-view]').each((_i, card) => {
        card.hidden = card.dataset.accountView !== view;
      });
    };
    const go = (path) => {
      if (router.getSnapshot().current) router.navigate('#' + path);
      else location.hash = path;
    };
    // signing in or creating the account lands on the signed-in state; a reset link goes back to sign in
    df$('[data-account-sign-in], [data-account-sign-up]').on('submit', (event) => {
      event.preventDefault();
      go('/welcome');
    });
    df$('[data-account-reset]').on('submit', (event) => {
      event.preventDefault();
      go('/');
    });
    // a new page opens at its start, the way a page load would - the first view stays where the reader is
    let shownPath = null;
    const showAt = (to) => {
      show(to);
      if (shownPath !== null && shownPath !== to.path)
        df$('#site-account [data-account-view]:not([hidden])')
          .get(0)
          ?.scrollIntoView({ block: 'start', behavior: 'instant' });
      shownPath = to.path;
    };
    const router = createRouter({ mode: 'hash', routes, prepare: ({ to }) => ({ commit: () => showAt(to) }) });
    router.attachLinks(site);
    if ((await router.start()).status === 'rejected') {
      // no address the router may own - a docs preview is an about:srcdoc frame: the same routes match its hash
      const preview = createRouter({ mode: 'hash', routes, baseUrl: 'https://preview.invalid/' });
      const follow = () => showAt(preview.resolve(location.hash.startsWith('#/') ? location.hash : '#/'));
      addEventListener('hashchange', follow);
      follow();
    }
  });
</script>
```

<h2 id="screens" class="h2-display">More screens</h2>

<DocText>The other screens of an account, each one example of its own: the settings, a step of the onboarding and the three states a page falls into. They take the palette of the page they sit on.</DocText>

```html example label="Account settings" schema="none" hint="A settings page: the sections listed on the left, the Profile Header over Security and Notification Settings on the right - the same blocks, in the theme of the page. The list follows the page: a click marks its link and scrolls there, scrolling marks the section that fills the view (aria-current, an IntersectionObserver)." previewStyle="align-items:stretch;padding:0;"
<style>
  #acc-settings {
    container-type: inline-size;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    width: 100%;
    padding: clamp(1.25rem, 4vw, 2.5rem);
    background: var(--background);
    color: var(--foreground);
  }
  #acc-settings .acc-settings-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
  }
  #acc-settings .acc-settings-title + p {
    margin: 0.25rem 0 0;
    color: var(--muted-foreground);
  }
  #acc-settings .acc-settings-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
  }
  @container (width > 52rem) {
    #acc-settings .acc-settings-layout {
      grid-template-columns: 13rem minmax(0, 1fr);
    }
    #acc-settings .acc-settings-nav {
      position: sticky;
      top: 1rem;
    }
  }
  #acc-settings .acc-settings-nav {
    display: grid;
    gap: 0.125rem;
  }
  #acc-settings .acc-settings-nav a {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    color: var(--muted-foreground);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
  }
  #acc-settings .acc-settings-nav a:hover {
    background: var(--muted);
    color: var(--foreground);
  }
  #acc-settings .acc-settings-nav a[aria-current] {
    background: var(--muted);
    color: var(--foreground);
    font-weight: 600;
  }
  #acc-settings .acc-settings-nav svg {
    width: 1rem;
    height: 1rem;
  }
  #acc-settings .acc-settings-panels {
    display: grid;
    gap: 2rem;
    min-width: 0;
  }
  #acc-settings :is(.mk-security-settings, .mk-notification-settings) {
    max-width: none;
    margin: 0;
  }
  #acc-settings .mk-profile-header {
    max-width: none;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--card);
  }
</style>
<div id="acc-settings">
  <div>
    <h2 class="acc-settings-title">Settings</h2>
    <p>Your profile, how you sign in and what we tell you about.</p>
  </div>
  <div class="acc-settings-layout">
    <nav class="acc-settings-nav" aria-label="Settings">
      <a href="#acc-s-profile" aria-current="true"><i data-lucide="user"></i> Profile</a>
      <a href="#acc-s-security"><i data-lucide="shield"></i> Security</a>
      <a href="#acc-s-notify"><i data-lucide="bell"></i> Notifications</a>
    </nav>
    <div class="acc-settings-panels">
      <div id="acc-s-profile">
        <header class="mk-profile-header">
          <img class="mk-profile-header-cover" src="images/photos/29-1400x400.webp" alt="" />
          <div class="mk-profile-header-body">
            <div class="mk-profile-header-top">
              <span class="avatar" data-size="xl"
                ><img class="avatar-image" src="images/avatars/32-240.webp" alt=""
              /></span>
              <div class="mk-profile-header-actions">
                <a class="btn" data-variant="outline" href="#acc-s-profile"
                  ><i data-lucide="pencil"></i> Edit profile</a
                >
                <a class="btn" data-variant="ghost" href="full-website-resume-portfolio.html">View public profile</a>
                <button class="btn" data-variant="outline" data-size="icon" type="button" aria-label="More actions"
                  ><i data-lucide="ellipsis"></i
                ></button>
              </div>
            </div>
            <div>
              <h1 class="mk-profile-header-name"
                >Hannah Lee <span class="badge" data-variant="secondary" data-size="sm">Design Lead</span></h1
              >
              <p class="mk-profile-header-handle">@hannahdesigns</p>
            </div>
            <p class="mk-profile-header-bio"
              >Making software quieter at Northwind. Writing about calm design, type and the space between things.</p
            >
            <ul class="mk-profile-header-meta">
              <li><i data-lucide="map-pin"></i>Lisbon, Portugal</li>
              <li><i data-lucide="link"></i><a href="full-website-resume-portfolio.html">hannahlee.design</a></li>
              <li><i data-lucide="calendar"></i>Joined <time datetime="2021-03">March 2021</time></li>
            </ul>
            <dl class="mk-profile-header-stats"
              ><div><dt>followers</dt><dd>1.2k</dd></div
              ><div><dt>following</dt><dd>318</dd></div
              ><div><dt>posts</dt><dd>94</dd></div></dl
            >
          </div>
        </header>
      </div>
      <div id="acc-s-security">
        <div class="mk-security-settings">
          <section class="mk-security-settings-section" aria-labelledby="sec-sign">
            <h2 id="sec-sign">Signing in</h2>
            <div class="mk-security-settings-row"
              ><i data-lucide="key-round"></i
              ><div
                ><strong>Password</strong><p>Last changed <time datetime="2026-07-02">3 months ago</time></p></div
              ><a class="btn" data-variant="outline" data-size="sm" href="full-website-account-states.html#/reset"
                >Change</a
              ></div
            >
            <div class="mk-security-settings-row"
              ><i data-lucide="smartphone"></i
              ><div
                ><strong
                  >Two-factor authentication
                  <span class="mk-security-settings-status" data-status="on">On</span></strong
                ><p>Authenticator app · backup codes saved</p></div
              ><div class="switch-item"
                ><input class="switch" type="checkbox" role="switch" id="sec-2fa" checked /><label
                  for="sec-2fa"
                  class="sr-only"
                  >Two-factor authentication</label
                ></div
              ></div
            >
            <div class="mk-security-settings-row"
              ><i data-lucide="fingerprint"></i
              ><div
                ><strong>Passkeys <span class="mk-security-settings-status" data-status="off">None yet</span></strong
                ><p>Sign in with your fingerprint or face - no password.</p></div
              ><a
                class="btn"
                data-variant="outline"
                data-size="sm"
                href="https://passkeys.dev/"
                target="_blank"
                rel="noopener"
                >Add a passkey</a
              ></div
            >
          </section>
          <section class="mk-security-settings-section" aria-labelledby="sec-sess">
            <h2 id="sec-sess">Where you're signed in</h2>
            <ul class="mk-security-settings-list">
              <li
                ><span class="mk-security-settings-device"><i data-lucide="laptop"></i></span
                ><div
                  ><strong
                    >Chrome on macOS
                    <span class="badge" data-variant="secondary" data-size="sm">This device</span></strong
                  ><span>Lisbon · active now</span></div
                ></li
              >
              <li
                ><span class="mk-security-settings-device"><i data-lucide="smartphone"></i></span
                ><div><strong>Safari on iPhone</strong><span>Lisbon · 2 hours ago</span></div
                ><button
                  class="btn"
                  data-variant="ghost"
                  data-size="sm"
                  type="button"
                  aria-label="Sign out Safari on iPhone"
                  >Sign out</button
                ></li
              >
              <li
                ><span class="mk-security-settings-device"><i data-lucide="monitor"></i></span
                ><div><strong>Firefox on Windows</strong><span>Berlin · 3 days ago</span></div
                ><button
                  class="btn"
                  data-variant="ghost"
                  data-size="sm"
                  type="button"
                  aria-label="Sign out Firefox on Windows"
                  >Sign out</button
                ></li
              >
            </ul>
            <div class="mk-security-settings-foot"
              ><button class="btn" data-variant="outline" data-size="sm" type="button"
                >Sign out of all other sessions</button
              ></div
            >
          </section>
        </div>
      </div>
      <div id="acc-s-notify">
        <div class="mk-notification-settings">
          <table>
            <caption class="sr-only">Notifications by topic and channel</caption>
            <thead
              ><tr
                ><th scope="col">Topic</th><th scope="col">Email</th><th scope="col">Push</th
                ><th scope="col">SMS</th></tr
              ></thead
            >
            <tbody>
              <tr
                ><th scope="row"><span>Mentions</span><small>When someone @mentions you</small></th
                ><td
                  ><input
                    class="checkbox"
                    type="checkbox"
                    name="mentions"
                    value="email"
                    checked
                    aria-label="Mentions by Email" /></td
                ><td
                  ><input
                    class="checkbox"
                    type="checkbox"
                    name="mentions"
                    value="push"
                    checked
                    aria-label="Mentions by Push" /></td
                ><td
                  ><input
                    class="checkbox"
                    type="checkbox"
                    name="mentions"
                    value="sms"
                    aria-label="Mentions by SMS" /></td
              ></tr>
              <tr
                ><th scope="row"><span>Comments</span><small>Replies on your docs and tasks</small></th
                ><td
                  ><input
                    class="checkbox"
                    type="checkbox"
                    name="comments"
                    value="email"
                    checked
                    aria-label="Comments by Email" /></td
                ><td
                  ><input
                    class="checkbox"
                    type="checkbox"
                    name="comments"
                    value="push"
                    aria-label="Comments by Push" /></td
                ><td
                  ><input
                    class="checkbox"
                    type="checkbox"
                    name="comments"
                    value="sms"
                    aria-label="Comments by SMS" /></td
              ></tr>
              <tr
                ><th scope="row"><span>Assignments</span><small>Tasks assigned to you</small></th
                ><td
                  ><input
                    class="checkbox"
                    type="checkbox"
                    name="assignments"
                    value="email"
                    checked
                    aria-label="Assignments by Email" /></td
                ><td
                  ><input
                    class="checkbox"
                    type="checkbox"
                    name="assignments"
                    value="push"
                    checked
                    aria-label="Assignments by Push" /></td
                ><td
                  ><input
                    class="checkbox"
                    type="checkbox"
                    name="assignments"
                    value="sms"
                    checked
                    aria-label="Assignments by SMS" /></td
              ></tr>
              <tr
                ><th scope="row"><span>Weekly digest</span><small>A summary every Monday</small></th
                ><td
                  ><input
                    class="checkbox"
                    type="checkbox"
                    name="weekly-digest"
                    value="email"
                    checked
                    aria-label="Weekly digest by Email" /></td
                ><td
                  ><input
                    class="checkbox"
                    type="checkbox"
                    name="weekly-digest"
                    value="push"
                    aria-label="Weekly digest by Push" /></td
                ><td
                  ><input
                    class="checkbox"
                    type="checkbox"
                    name="weekly-digest"
                    value="sms"
                    aria-label="Weekly digest by SMS" /></td
              ></tr>
            </tbody>
          </table>
        </div>
      </div>
    </div>
  </div>
</div>
<script type="module">
  // the section list follows the page: a click marks its link and scrolls there, scrolling marks the section that fills the view
  // (no rootMargin: a docs preview is a cross-origin frame, where the observer ignores it - the visible height decides)
  addEventListener('DOMContentLoaded', () => {
    const links = df$('#acc-settings .acc-settings-nav a');
    const mark = (id) => {
      links.each((_i, a) => {
        if (a.getAttribute('href') === '#' + id) a.setAttribute('aria-current', 'true');
        else a.removeAttribute('aria-current');
      });
    };
    let clicked = 0;
    links.on('click', (event) => {
      event.preventDefault();
      const id = event.currentTarget.getAttribute('href').slice(1);
      mark(id);
      clicked = Date.now();
      const still = matchMedia('(prefers-reduced-motion: reduce)').matches;
      df$('#' + id)
        .get(0)
        .scrollIntoView({ behavior: still ? 'instant' : 'smooth', block: 'start' });
    });
    const shown = new Map();
    const spy = new IntersectionObserver(
      (entries) => {
        for (const entry of entries)
          shown.set(entry.target.id, entry.isIntersecting ? entry.intersectionRect.height : 0);
        if (Date.now() - clicked < 1000) return;
        const [id, height] = [...shown].sort((a, b) => b[1] - a[1])[0] ?? [];
        if (height > 0) mark(id);
      },
      { threshold: [0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1] },
    );
    df$('#acc-settings .acc-settings-panels > [id]').each((_i, panel) => {
      spy.observe(panel);
    });
  });
</script>
```

```html example label="An onboarding step" schema="none" hint="One question of a short onboarding survey: Form Progress names the four steps and marks this one, the Survey Question asks it - centered, with nothing else on the page." previewStyle="align-items:stretch;padding:0;"
<style>
  #acc-onboarding {
    box-sizing: border-box;
    display: grid;
    justify-items: center;
    gap: 2.5rem;
    width: 100%;
    padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 4vw, 2rem);
    background:
      radial-gradient(60% 50% at 50% 0%, color-mix(in oklch, var(--primary) 10%, transparent), transparent 70%),
      var(--background);
    color: var(--foreground);
  }
  #acc-onboarding > * {
    box-sizing: border-box;
    width: min(100%, 38rem);
  }
  #acc-onboarding .mk-survey-question {
    padding: clamp(1.5rem, 4vw, 2.25rem);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--card);
    box-shadow: 0 20px 50px -30px oklch(0 0 0 / 0.35);
  }
</style>
<div id="acc-onboarding">
  <nav class="mk-form-progress" data-variant="numbered" aria-label="Progress">
    <ol class="mk-form-progress-steps">
      <li data-done
        ><span class="mk-form-progress-dot" aria-hidden="true"><i data-lucide="check"></i></span
        ><span>Account</span></li
      >
      <li data-done
        ><span class="mk-form-progress-dot" aria-hidden="true"><i data-lucide="check"></i></span
        ><span>Company</span></li
      >
      <li aria-current="step"><span class="mk-form-progress-dot" aria-hidden="true">3</span><span>Plan</span></li>
      <li><span class="mk-form-progress-dot" aria-hidden="true">4</span><span>Invite</span></li>
    </ol>
  </nav>
  <form class="mk-survey-question" action="#" method="post">
    <div class="mk-survey-question-meta"
      ><span>Question 3 of 8</span
      ><progress class="progress" value="3" max="8" aria-label="Survey progress">3 of 8</progress></div
    >
    <fieldset>
      <legend>How big is your team?</legend>
      <label class="mk-survey-question-option"
        ><input type="radio" name="team" value="0" required /><span>Just me</span></label
      >
      <label class="mk-survey-question-option"
        ><input type="radio" name="team" value="1" checked required /><span>2–10 people</span></label
      >
      <label class="mk-survey-question-option"
        ><input type="radio" name="team" value="2" required /><span>11–50 people</span></label
      >
      <label class="mk-survey-question-option"
        ><input type="radio" name="team" value="3" required /><span>More than 50</span></label
      >
    </fieldset>
    <div class="mk-survey-question-actions"
      ><button class="btn" data-variant="ghost" type="button">Back</button
      ><button class="btn" type="submit">Next</button></div
    >
  </form>
</div>
```

```html example label="Empty, success and error states" schema="none" hint="The three states a page falls into: nothing there yet (the folder bobs), something done (dots fly from the check) and something wrong (the icon shakes once) - Empty, Success and Error State side by side." previewStyle="align-items:stretch;padding:0;"
<style>
  #acc-states {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
    gap: 1.5rem;
    align-items: start;
    width: 100%;
    padding: clamp(1.25rem, 4vw, 2.5rem);
    background: var(--muted);
    color: var(--foreground);
  }
  #acc-states > div {
    display: contents;
  }
  #acc-states :is(.mk-empty-state, .mk-success-state, .mk-error-state) {
    box-sizing: border-box;
    height: 100%;
    align-content: center;
    margin: 0;
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--card);
  }
  #acc-states .mk-empty-state-icon {
    animation: acc-bob 3.2s ease-in-out infinite;
  }
  @keyframes acc-bob {
    50% {
      translate: 0 -0.4rem;
      rotate: -4deg;
    }
  }
  #acc-states .mk-success-state-icon {
    background-image:
      radial-gradient(circle at 10% 20%, oklch(0.75 0.17 145) 0 3px, transparent 4px),
      radial-gradient(circle at 90% 15%, oklch(0.75 0.17 60) 0 3px, transparent 4px),
      radial-gradient(circle at 85% 85%, var(--primary) 0 3px, transparent 4px),
      radial-gradient(circle at 15% 80%, oklch(0.7 0.2 0) 0 3px, transparent 4px);
    background-size: 160% 160%;
    background-position: center;
    animation: acc-pop 2.4s ease-out infinite;
  }
  @keyframes acc-pop {
    0% {
      background-size: 60% 60%;
    }
    40%,
    100% {
      background-size: 190% 190%;
    }
  }
  #acc-states .mk-error-state-icon {
    animation: acc-shake 3s ease-in-out infinite;
  }
  @keyframes acc-shake {
    0%,
    8%,
    100% {
      translate: 0;
    }
    2%,
    6% {
      translate: -4px 0;
    }
    4% {
      translate: 4px 0;
    }
  }
  @media (prefers-reduced-motion: reduce) {
    #acc-states :is(.mk-empty-state-icon, .mk-success-state-icon, .mk-error-state-icon) {
      animation: none;
    }
  }
</style>
<div id="acc-states">
  <div>
    <section class="mk-empty-state" aria-labelledby="es-1">
      <span class="mk-empty-state-icon" aria-hidden="true"><i data-lucide="folder-open"></i></span>
      <h2 class="mk-empty-state-title" id="es-1">No projects yet</h2>
      <p class="mk-empty-state-text"
        >Projects keep plans, docs and tasks together. Create one, or start from a template.</p
      >
      <div class="mk-empty-state-actions"
        ><a class="btn" href="app-issue-tracker.html"><i data-lucide="plus"></i> <span>New project</span></a
        ><a class="btn" data-variant="outline" href="index.html#websites">Browse templates</a></div
      >
    </section>
    <section class="mk-success-state" role="status" aria-labelledby="ss-1">
      <span class="mk-success-state-icon" aria-hidden="true"><i data-lucide="check"></i></span>
      <h2 class="mk-success-state-title" id="ss-1">Invitations sent</h2>
      <p class="mk-success-state-text">Your three teammates get an email with a link to join. It works for 7 days.</p>
      <dl class="mk-success-state-summary"
        ><div><dt>Workspace</dt><dd>Acme Product</dd></div
        ><div><dt>Invited</dt><dd>3 people</dd></div
        ><div><dt>Role</dt><dd>Editor</dd></div></dl
      >
      <div class="mk-success-state-actions"
        ><a class="btn" href="app-notes.html">Go to workspace</a
        ><a class="btn" data-variant="outline" href="mailto:?subject=Join%20me%20on%20Acme">Invite more</a></div
      >
    </section>
  </div>
  <section class="mk-error-state" role="alert" aria-labelledby="er-2">
    <span class="mk-error-state-icon" aria-hidden="true"><i data-lucide="wifi-off"></i></span>
    <h2 class="mk-error-state-title" id="er-2">You're offline</h2>
    <p class="mk-error-state-text">Changes are saved on this device and sync when you're back.</p>
    <div class="mk-error-state-actions"
      ><button class="btn" data-variant="outline" data-size="sm" type="button">Retry now</button></div
    >
  </section>
</div>
```

<h2 id="blocks" class="h2-display">The blocks</h2>

<div class="grid gap-4 mb-8" style="grid-template-columns:repeat(auto-fill,minmax(16rem,1fr))">
  <a class="card" data-size="sm" href="login-form.html" style="text-decoration:none;color:inherit">
    <div class="card-header">
      <h3 class="card-title card-title-sm">Login Form</h3>
      <p class="card-description">Authenticates a user with account credentials - email, password, "remember me" and a reset link, on a card, beside a picture, or plain.</p>
    </div>
  </a>
  <a class="card" data-size="sm" href="social-login.html" style="text-decoration:none;color:inherit">
    <div class="card-header">
      <h3 class="card-title card-title-sm">Social Login</h3>
      <p class="card-description">Provides authentication through external identity providers - Google, Apple, GitHub, Microsoft - as full-width buttons, an icon row, with a divider to the email form.</p>
    </div>
  </a>
  <a class="card" data-size="sm" href="signup-form.html" style="text-decoration:none;color:inherit">
    <div class="card-header">
      <h3 class="card-title card-title-sm">Signup Form</h3>
      <p class="card-description">Collects the information needed to create an account - name, email, a new password with its rules, consent - on a card or beside the benefits.</p>
    </div>
  </a>
  <a class="card" data-size="sm" href="reset-request.html" style="text-decoration:none;color:inherit">
    <div class="card-header">
      <h3 class="card-title card-title-sm">Reset Request</h3>
      <p class="card-description">Requests a password-reset link for an account - the email field, then the "check your inbox" state with a way to resend.</p>
    </div>
  </a>
  <a class="card" data-size="sm" href="password-reset.html" style="text-decoration:none;color:inherit">
    <div class="card-header">
      <h3 class="card-title card-title-sm">Password Reset</h3>
      <p class="card-description">Collects and confirms a replacement password - the new password with its rules, the confirmation, and the done state.</p>
    </div>
  </a>
  <a class="card" data-size="sm" href="profile-header.html" style="text-decoration:none;color:inherit">
    <div class="card-header">
      <h3 class="card-title card-title-sm">Profile Header</h3>
      <p class="card-description">Presents a user's avatar, identity, biography, and relevant actions - a cover, an overlapping avatar, name and handle, bio, details, counts and follow / message.</p>
    </div>
  </a>
  <a class="card" data-size="sm" href="profile-form.html" style="text-decoration:none;color:inherit">
    <div class="card-header">
      <h3 class="card-title card-title-sm">Profile Form</h3>
      <p class="card-description">Edits a user's personal information - photo, name, username, bio, website and time zone - as settings rows with a description beside each group.</p>
    </div>
  </a>
  <a class="card" data-size="sm" href="security-settings.html" style="text-decoration:none;color:inherit">
    <div class="card-header">
      <h3 class="card-title card-title-sm">Security Settings</h3>
      <p class="card-description">Manages passwords, authentication methods, and active sessions - the password, two-factor methods, passkeys and every signed-in device.</p>
    </div>
  </a>
  <a class="card" data-size="sm" href="notification-settings.html" style="text-decoration:none;color:inherit">
    <div class="card-header">
      <h3 class="card-title card-title-sm">Notification Settings</h3>
      <p class="card-description">Controls notification topics and delivery channels - a matrix of topics by channel, or a list of switches with a digest frequency.</p>
    </div>
  </a>
  <a class="card" data-size="sm" href="support-form.html" style="text-decoration:none;color:inherit">
    <div class="card-header">
      <h3 class="card-title card-title-sm">Support Form</h3>
      <p class="card-description">Collects an issue description and supporting attachments - topic, subject, description, priority and files, beside the expected response time and self-help links.</p>
    </div>
  </a>
  <a class="card" data-size="sm" href="feedback-form.html" style="text-decoration:none;color:inherit">
    <div class="card-header">
      <h3 class="card-title card-title-sm">Feedback Form</h3>
      <p class="card-description">Collects a rating or written feedback about an experience - faces and topics on a card, a 0–10 recommendation scale, or "was this helpful?" inline.</p>
    </div>
  </a>
  <a class="card" data-size="sm" href="survey-question.html" style="text-decoration:none;color:inherit">
    <div class="card-header">
      <h3 class="card-title card-title-sm">Survey Question</h3>
      <p class="card-description">Presents one question with its response controls - a single choice as cards, several choices, an agreement scale, or a written answer.</p>
    </div>
  </a>
  <a class="card" data-size="sm" href="form-progress.html" style="text-decoration:none;color:inherit">
    <div class="card-header">
      <h3 class="card-title card-title-sm">Form Progress</h3>
      <p class="card-description">Shows the current stage and remaining steps of a form - a bar with the step names, numbered steps, segments or one compact line.</p>
    </div>
  </a>
  <a class="card" data-size="sm" href="empty-state.html" style="text-decoration:none;color:inherit">
    <div class="card-header">
      <h3 class="card-title card-title-sm">Empty State</h3>
      <p class="card-description">Explains missing content and offers an appropriate next action - an icon, why it is empty, and the first step; on a dashed area or inline in a list.</p>
    </div>
  </a>
  <a class="card" data-size="sm" href="error-state.html" style="text-decoration:none;color:inherit">
    <div class="card-header">
      <h3 class="card-title card-title-sm">Error State</h3>
      <p class="card-description">Explains a failure and provides recovery actions - what went wrong in plain words, what to do, and the technical details on request.</p>
    </div>
  </a>
  <a class="card" data-size="sm" href="success-state.html" style="text-decoration:none;color:inherit">
    <div class="card-header">
      <h3 class="card-title card-title-sm">Success State</h3>
      <p class="card-description">Confirms a completed action and offers relevant next steps - a check with a ripple, what happened, and where to go from here.</p>
    </div>
  </a>
  <a class="card" data-size="sm" href="coming-soon.html" style="text-decoration:none;color:inherit">
    <div class="card-header">
      <h3 class="card-title card-title-sm">Coming Soon</h3>
      <p class="card-description">Announces an upcoming launch and its expected availability - the date, a live rolling countdown, a notify-me form and where to follow along.</p>
    </div>
  </a>
  <a class="card" data-size="sm" href="maintenance.html" style="text-decoration:none;color:inherit">
    <div class="card-header">
      <h3 class="card-title card-title-sm">Maintenance</h3>
      <p class="card-description">Explains temporary unavailability and provides status information - what is happening, when it ends, and where to follow; or a banner announcing it.</p>
    </div>
  </a>
  <a class="card" data-size="sm" href="page-not-found.html" style="text-decoration:none;color:inherit">
    <div class="card-header">
      <h3 class="card-title card-title-sm">404 Page</h3>
      <p class="card-description">Tells visitors the page does not exist and helps them on - a big 404, a search, the most useful links and the way home.</p>
    </div>
  </a>
</div>

</DocPage>
